<!--#include file="../head.asp"-->
  <!--#include file="../checkrole.asp"-->
 <%
      call checkuser("sh")
  Response.Buffer = true
  Response.ExpiresAbsolute=now()-1
  Response.Expires=0
  Response.CacheControl="no-cache"
 if issession=0 then
username=Replace_Text(request.Cookies("Yxmember"))
else
username=session("user")
end if
if Not ChkPost then 
		response.write "<script language='javascript'>"
		response.write"parent.location.href='"&HOPE_InstallDir&"login/login1.asp';</SCRIPT>"
		response.end
end if

 
%>

<TABLE width=778 border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
  <TR>
    <TD  style="BACKGROUND-POSITION: right 50%; BACKGROUND-IMAGE: url(i../mages/bg1.gif); BACKGROUND-REPEAT: repeat-y; BACKGROUND-COLOR: #ffffff" 
    vAlign=top align=middle>      <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
        <TBODY>
        <TR>
              <TD width="4%"><IMG height=32 src="../images/myfriend.gif" 
            border=0></TD>
              <TD width="96%" background="../images/info_bg.gif">&nbsp;</TD>
        </TR></TBODY></TABLE>
<%
if not isempty(request.form("selected_friend_id")) then
secuserlist=replace_text(request.form("selected_friend_id"))
if instr(secuserlist,",")>0 then
secuserArr=split(secuserlist,",")
for i = 0 to ubound(secuserarr)
secuser=secuserarr(i)
secuser=trim(secuser)
relation=left(secuser,1)
if relation="-" then relation=-1
secuser=replace(replace(replace(secuser,"-1+",""),"0+",""),"1+","")
call deleteannounce(secuser)
next
else
relation=left(secuserlist,1)
if relation="-" then relation=-1
secuser=replace(replace(replace(secuserlist,"-1+",""),"0+",""),"1+","")
call deleteannounce(secuser)
end if


sub deleteannounce(secuser)
dim rs,sql
sql="delete from [Yixiang_memberRelation] where [user]='"&username&"' and secuser='"&secuser&"' and relation="&relation&""
conn.execute sql
if err.Number<>0 then
err.clear
response.write "删 除 失 败 !<br>"
end if
End sub
%>


<TABLE cellSpacing=0 cellPadding=0 width=100% 
border=0>
        <TBODY>
        <TR>
          <TD align=middle><BR><BR>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TBODY>
              <TR>
                <TD class=M>恭喜您！删除商业伙伴成功！</TD></TR></TBODY></TABLE><BR>
            

<br>
<TABLE class=bdr3 cellSpacing=0 cellPadding=0 width=100% 
              border=0>
  <TBODY>
              <TR>
                <TD class=tbg1>现在您可以：</TD></TR>
              <TR>
                <TD class=lh15>
                  <UL>
                    <TABLE cellSpacing=0 cellPadding=9 width="95%" border=0>
                      <TBODY>
                      <TR>
                        <TD class=C>
                          <LI><A 
                          href="addfriend_new.asp">再增加一个商业伙伴</A></LI></TD>
                        <TD class=C>
                <LI><A 
                          href="index.asp">回到“我的商业伙伴”</A></LI></TD></TR></TBODY></TABLE></UL></TD></TR></TBODY></TABLE> </TD>
        </TR></TBODY></TABLE>
<%
else
response.write"亲爱的会员，请选择要删除的商业伙伴!<a href='index.asp'>返回</a>"
end if
conn.close
set conn=nothing
%>
<BR><BR>
</TABLE>