<!--#include file="../head.asp"-->
  <!--#include file="../checkrole.asp"-->
 <%
      call checkuser("sh") 
	  if issession=0 then
		username=Replace_Text(request.Cookies("Yxmember"))
		else
		username=session("user")
	  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>
      <BR>
      <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
        <TBODY>
        <TR>
              <TD width="115"><IMG height=32 src="../images/myfriend.gif" 
            border=0></TD>
              <TD width="663" background="../images/info_bg.gif">&nbsp;</TD>
        </TR></TBODY></TABLE>


<TABLE class=content_border cellSpacing=0 cellPadding=0 width=100% 
border=0>
        <TBODY>
        <TR>
          <TD align=middle><BR>



            <SCRIPT language=JavaScript>
function delfriendclick()
{
	var count = 0;
	for (var i = 0; i < document.mypartnerlist.elements.length; i++){
	    	var field = document.mypartnerlist.elements[i];
	    	var element_name = field.name;
	    	if (element_name == "selected_friend_id"){
	    			if (field.checked ) count++;
		}
	}
	if (count == 0){
		alert("亲爱的会员，请选择您需要删除的商业伙伴！");
		return false;
	}
	var temp=window.confirm("亲爱的会员，被删除的商业伙伴将无法恢复，您确认要删除选择的商业伙伴吗？" );
	if(temp==false){
		//return true;
	//else
		return false;
	}
	document.mypartnerlist.action="delfriend.asp"; 
    document.mypartnerlist.submit();
}


function selectall()
{
    document.mypartnerlist.all.checked = document.mypartnerlist.all.checked|0;

    for (var i = 0; i < document.mypartnerlist.elements.length; i++){
    	var field = document.mypartnerlist.elements[i];
    	var str = field.name.substring(0,5);

    	if (str == "group" ){
    		field.checked=document.mypartnerlist.all.checked;
    	}
    	//选成员
    	var element_name = field.name;
    	if (element_name == "selected_friend_id"){
    		str = field.value.substring(0,2);

    //		if (str != "-1"){
    			field.checked=document.mypartnerlist.all.checked;
    //		}
    	}
    }

}


function selectgroupall(groupname)
{
    groupname.checked = groupname.checked|0;
    var groupid = groupname.value
    for (var i = 0; i < document.mypartnerlist.elements.length; i++){
    	var field = document.mypartnerlist.elements[i];
    	var length;
    	length = groupid.length;
    	if (field.name == "selected_friend_id"){
	    	var str = field.value.substring(0,length);
	    	if (str == groupid){
	    		field.checked=groupname.checked;
	    	}
	 }
    }
}



function dosendmessage(){
	var count = 0;
	for (var i = 0; i < document.mypartnerlist.elements.length; i++){
	    	var field = document.mypartnerlist.elements[i];
	    	var element_name = field.name;
	    	if (element_name == "selected_friend_id"){
	    			if (field.checked ) count++;
		}
	}

	if (count == 0){
    		 alert("亲爱的会员，请选择您要发送留言的对象!");
    		 return false;
    	}
    	if (count > 1 ){
    		alert("亲爱的会员，我们暂时不支持群发留言的功能，请只选择一个您要发送留言的对象!");
    		return false;
    	}
    document.mypartnerlist.action="../getprice/sendnewmessage.asp"; 
    document.mypartnerlist.submit(); 

}

function domovefriend(){
	var count = 0;
	for (var i = 0; i < document.mypartnerlist.elements.length; i++){
	    	var field = document.mypartnerlist.elements[i];
	    	var element_name = field.name;
	    	if (element_name == "selected_friend_id"){
	    			if (field.checked ) count++;
		}
	}

    	if (count == 0){
    		 alert("亲爱的会员，请先选择要移动/复制到其他组的商业伙伴!");
    		 return false;
    	}

    document.mypartnerlist.action="movefriend.asp"; 
    document.mypartnerlist.submit();
}

function addvisitorinfo(id_value){
	document.formlink.myfriend_id.value=id_value;
	document.formlink.submit();
}

function hve_display(t_id,i_id){//显示隐藏程序

	//var t_id;//表格id
	//var i_id;//图片id
	var on_img="on.gif";//打开时图片
	var off_img="off.gif";//隐藏时图片
		if (t_id.style.display == "none") {//如果为隐藏状态
		t_id.style.display="";//切换为显示状态
		i_id.src="../images/groupfo.gif";}//换图
	else{//否则
		t_id.style.display="none";//切换为隐藏状态
		i_id.src="../images/groupex.gif";}//换图
}

function Hve_Display(t_id){//显示隐藏程序
	var t_id;
		if (t_id.style.display == "none") {//如果为隐藏状态
		t_id.style.display="";//切换为显示状态
		}//换图
	else{//否则
		t_id.style.display="none";//切换为隐藏状态
		}//换图
}

</SCRIPT>

            <TABLE cellSpacing=0 cellPadding=0 width="95%" border=0>
              <TBODY>
              <TR>
                      <TD align=right><A 
                  href="addfriend_new.asp"><IMG 
                  height=26 src="../images/addnewpartner.gif" width=97 
                  border=0></A></TD>
                  </TR></TBODY></TABLE><BR>
            <TABLE cellSpacing=0 cellPadding=0 width="95%" border=0>
              <TBODY>
              <TR>
                <TD class=tbg1>现有商业伙伴：</TD></TR></TBODY></TABLE>
            <FORM style="MARGIN-TOP: 8px" name=mypartnerlist action="" method=post>
            <IMG height=8 src="../images/shim(1).gif" width=1><BR>
            <TABLE cellSpacing=0 cellPadding=0 width="95%" border=0>
              <TBODY>
              <TR>
                <TD bgColor=#eeeeee>
                  <TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
                    
                    <TR>
                      <TD width="90%" bgColor=#e6e6e6>
                        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                          <TBODY>
                          <TR>
                            <TD width="5%">
							<%
							set rs=Server.CreateObject("Adodb.RecordSet")
								Sql="select Websen_memberRelation.[user] as MemUser,Websen_memberRelation.secuser,Websen_memberRelation.relation,Websen_memberRelation.addtime,Websen_corporation.* from Websen_memberRelation,Websen_corporation where Websen_memberRelation.relation=0 and Websen_memberRelation.[user]='"&username&"' and Websen_corporation.[user]=Websen_memberRelation.secuser order by Websen_memberRelation.id desc"
								Rs.Open Sql,Conn,1,3
							%>
							<INPUT 
                              onclick=selectgroupall(this.form.group0) 
                              type=checkbox value=0 name=group0> </TD>
                            <TD class=M style="CURSOR: hand" 
                            onclick=javascript:hve_display(table1754891,image1754891)><IMG 
                              src="../images/groupex.gif" border=0 
                              name=image1754891> <U><FONT 
                              color=#000000>我的供应商(<span style="color:red;">共<%=Rs.Recordcount%>位</span>)</FONT></U> 
</TD></TR></TBODY></TABLE></TD>
                                <TD align=middle width="5%" bgColor=#e6e6e6>&nbsp;</TD>
                      <TD align=middle width="5%" bgColor=#e6e6e6>&nbsp;</TD></TR>
                    <TBODY id=table1754891 style="DISPLAY: none">
					<%
										if rs.eof or rs.bof then
					response.write"<TR>"
                    response.write"<TD style='PADDING-LEFT: 28px' bgColor=#ffffff colSpan=3 height=28>"
                    response.write"<DIV id=nav>该组下无成员</DIV></TD></TR>"
					else
					do while not rs.eof
					%>
                    <TR>
                      <TD style="PADDING-LEFT: 28px" bgColor=#ffffff colSpan=3 
                      height=28>
                        <DIV id=nav><INPUT type=checkbox value=0+<%=rs("secuser")%> 
                        name=selected_friend_id> 
 						
						<%
						if is2weburl=1 then

						%>
						<A  href="http://<%=rs("user")%>.<%=weburl1%>"  target=_blank><%=rs("qymc")%></A>
							<%
							else
							%>
						
						<A  href="<%=HOPE_InstallDir%>vipcom/<%=rs("user")%>" target=_blank><%=rs("qymc")%></A>
						
						<%
						end if
						 %>
						主营产品/服务:
						<%
					zycp=rs("zycp")
				 if zycp>"" then
				   if instr(zycp,",")>0 then
				      zcarry=split(rs("zycp"),",")
					  if ubound(zcarry)=1 then
				         response.write"<a href='"&HOPE_InstallDir&"search/searchcom.asp?keywords="&zcarry(0)&"' target=_blank>"&zcarry(0)&"</a>&nbsp;<a href='"&HOPE_InstallDir&"search/searchcom.asp?keywords="&zcarry(1)&"'  target=_blank>"&zcarry(1)&"</a>"
				      elseif ubound(zcarry)=2 then
				         response.write"<a href='"&HOPE_InstallDir&"search/searchcom.asp?keywords="&zcarry(0)&"'  target=_blank>"&zcarry(0)&"</a>&nbsp;<a href='"&HOPE_InstallDir&"search/searchcom.asp?keywords="&zcarry(1)&"'  target=_blank>"&zcarry(1)&"</a>&nbsp;<a href='"&HOPE_InstallDir&"search/searchcom.asp?keywords="&zcarry(2)&"'  target=_blank>"&zcarry(2)&"</a>"
                      elseif ubound(zcarry)>2 then
				         response.write"<a href='"&HOPE_InstallDir&"search/searchcom.asp?keywords="&zcarry(0)&"'  target=_blank>"&zcarry(0)&"</a>&nbsp;<a href='"&HOPE_InstallDir&"search/searchcom.asp?keywords="&zcarry(1)&"'  target=_blank>"&zcarry(1)&"</a>&nbsp;<a href='"&HOPE_InstallDir&"search/searchcom.asp?keywords="&zcarry(2)&"'  target=_blank>"&zcarry(2)&"</a>"
                      end if
				   else
				         response.write"<a href='"&HOPE_InstallDir&"search/searchcom.asp?keywords="&zycp&"'>"&zycp&"</a>"
				   end if
				end if%> 
                    </DIV></TD></TR>
					<%
					rs.movenext
					loop
					end if
					%>
                    </TBODY></TABLE></TD></TR>
                </TABLE><IMG 
            height=8 src="../images/shim(1).gif" width=1><BR>
            <TABLE cellSpacing=0 cellPadding=0 width="95%" border=0>
              <TBODY>
              <TR>
                <TD bgColor=#eeeeee>
                  <TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
                    
                    <TR>
                      <TD width="90%" bgColor=#e6e6e6>
                        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                          <TBODY>
                          <TR>
                            <TD width="5%">
							<%
						Sql=("select Websen_memberRelation.[user] as MemUser,Websen_memberRelation.secuser,Websen_memberRelation.relation,Websen_memberRelation.addtime,Websen_corporation.* from Websen_memberRelation,Websen_corporation where Websen_memberRelation.relation=1 and Websen_memberRelation.[user]='"&username&"' and Websen_corporation.[user]=Websen_memberRelation.secuser order by Websen_memberRelation.id desc")
						set Rs=Server.CreateObject("Adodb.RecordSet")
						Rs.Open sql,conn,1,3%>
							
							<INPUT 
                              onclick=selectgroupall(this.form.group1) 
                              type=checkbox value=1 name=group1> </TD>
                            <TD class=M style="CURSOR: hand" 
                            onclick=javascript:hve_display(table0,image0)><IMG 
                              src="../images/groupex.gif" border=0 
                              name=image0> <U><FONT 
                              color=#000000>我的采购商(<span style="color:red;">共<%=Rs.Recordcount%>位</span>)</FONT></U> 
                        </TD></TR></TBODY></TABLE></TD>
                      <TD align=middle width="5%" bgColor=#e6e6e6>&nbsp;</TD>
                      <TD align=middle width="5%" bgColor=#e6e6e6>&nbsp;</TD></TR>
                    <TBODY id=table0>
					<%
				if rs.eof or rs.bof then
					response.write"<TR>"
                    response.write"<TD style='PADDING-LEFT: 28px' bgColor=#ffffff colSpan=3 height=28>"
                    response.write"<DIV id=nav>该组下无成员</DIV></TD></TR>"
				else
					do while not rs.eof
					%>
                    <TR>
                      <TD style="PADDING-LEFT: 28px" bgColor=#ffffff colSpan=3 
                      height=28>
                        <DIV id=nav><INPUT type=checkbox value=1+<%=rs("secuser")%> 
                        name=selected_friend_id>  
						
						<%
						if rs("flag")=1 then 
						if is2weburl=1 then
						%>
						<A   href="http://<%=rs("user")%>.<%=weburl1%>"   target=_blank><%=rs("qymc")%></A>
						<%else%>
						
						<A   href="<%=HOPE_InstallDir%>vipcom/<%=rs("user")%>"   target=_blank><%=rs("qymc")%></A>
						<%
						end if
						end if
						 %>
						   主营产品/服务:<%=rs("zycp")%> 
                        </DIV></TD></TR>
					<%
					rs.movenext
					loop
					end if
					%>
						</TBODY></TABLE></TD></TR>
                </TABLE><IMG      height=8 src="../images/shim(1).gif" width=1><BR>
            <TABLE cellSpacing=0 cellPadding=0 width="95%" border=0>
               <TR>
                <TD bgColor=#eeeeee>
                  <TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
                     <TR>
                      <TD width="90%" bgColor=#e6e6e6>
                        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                          <TBODY>
                          <TR>
                            <TD width="5%">
							<%
							 sql="select Websen_memberRelation.[user] as MemUser,Websen_memberRelation.secuser,Websen_memberRelation.relation,Websen_memberRelation.addtime,Websen_corporation.* from Websen_memberRelation,Websen_corporation where Websen_memberRelation.relation=-1 and Websen_memberRelation.[user]='"&username&"' and Websen_corporation.[user]=Websen_memberRelation.secuser order by Websen_memberRelation.id desc"
							set Rs=Server.CreateObject("Adodb.RecordSet")
						Rs.Open sql,conn,1,3%>
							<INPUT 
                              onclick=selectgroupall(this.form.group) 
                              type=checkbox value=-1 name=group> </TD>
                            <TD class=M style="CURSOR: hand" 
                            onclick=javascript:hve_display(tableblacklist,imageblacklist)><IMG 
                              src="../images/groupex.gif" border=0 
                              name=imageblacklist> <U><FONT 
                              color=#000000>黑名单</FONT></U><U><FONT 
                              color=#000000>(<span style="color:red;">共<%=Rs.Recordcount%>位</span>)</FONT></U>  
                      </TD>
                          </TR></TBODY></TABLE></TD>
                      <TD align=middle width="5%" bgColor=#e6e6e6>&nbsp;</TD>
                      <TD align=middle width="5%" bgColor=#e6e6e6>&nbsp;</TD></TR>
                    <TBODY id=tableblacklist style="DISPLAY: none">
					  <%
					
					if rs.eof or rs.bof then
					response.write"<TR>"
                    response.write"<TD style='PADDING-LEFT: 28px' bgColor=#ffffff colSpan=3 height=28>"
                    response.write"<DIV id=nav>该组下无成员</DIV></TD></TR>"
					else
					do while not rs.eof
					%>
					  <TR>
                      <TD style="PADDING-LEFT: 28px" bgColor=#ffffff colSpan=3 
                      height=28>
                        <DIV id=nav><INPUT type=checkbox value=-1+<%=rs("secuser")%> 
                        name=selected_friend_id> 
 						
						
						<%
						if is2weburl=1 then
						%>
			 		<A    href="http://<%=rs("user")%>.<%=weburl1%>"    target=_blank><%=rs("qymc")%></A>

						<%
						else
						%>
						<A    href="<%=HOPE_InstallDir%>vipcom/<%=rs("user")%>"   target=_blank><%=rs("qymc")%></A>
						
						<%end if%>
				 <%=rs("qymc")%>  [<%if rs("country")="中国" then response.write""&rs("city")&"" else response.write""&country&"" end if%>] 主营产品/服务:<%=rs("zycp")%> </DIV></TD></TR>
					<%
					rs.movenext
					loop
					end if
					%>	
                    </TBODY></TABLE></TD></TR>
                </TABLE><IMG 
            height=8 src="../images/shim(1).gif" width=1><BR><IMG 
            height=4 src="../images/shim(1).gif" width=1><BR>
            <TABLE cellSpacing=1 cellPadding=0 width="95%" border=0>
              <TBODY>
              <TR>
                <TD><INPUT onclick=selectall() type=checkbox value=on 
                  name=all> 全选 </TD></TR></TBODY></TABLE>
            <TABLE cellSpacing=1 cellPadding=0 width="95%" border=0>
              <TBODY>
              <TR>
                <TD align=middle><INPUT onClick="return dosendmessage()" type=submit value="发留言" name=eventSubmit_doMessage> 
<INPUT onClick="return domovefriend()" type=submit value="转移/复制 到其他组" name=eventSubmit_doMove> 
<INPUT onClick="return delfriendclick()" type=submit value="删除" name=eventSubmit_doDelete> 
                </TD></TR></TBODY></TABLE></FORM>
            <TABLE class=bdr1 cellSpacing=0 cellPadding=0 width="95%" 
              border=0><TBODY>
              <TR>
                <TD>
                  <TABLE class=bdr2 cellSpacing=0 cellPadding=0 width="100%" 
                  border=0>
                    <TBODY>
                    <TR>
                              <TD>您可以将骚扰您的会员归到“黑名单”组，您就不会收到他通过<%=webname%>发送的网上留言、email啦！ 
                              </TD>
                          </TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR><BR><BR>
            <TABLE cellSpacing=0 cellPadding=0 width="95%" border=0>
              <TBODY>
              <TR>
                <TD class=tbg1>对我感兴趣的商友： </TD></TR></TBODY></TABLE><IMG height=8 
            src="../images/shim(1).gif" width=1><BR>
            <TABLE class=bdr1 cellSpacing=0 cellPadding=0 width="95%" 
              border=0><TBODY>
              <TR>
                <TD>
                  <TABLE class=bdr2 cellSpacing=0 cellPadding=0 width="100%" 
                  border=0>
                    <TBODY>
                    <TR>
                      <TD class=lh15>
<%
sql1="select distinct [user] from Websen_memberRelation where secuser='"&username&"'"
Set rs1= Server.CreateObject("ADODB.Recordset") 
rs1.open sql1,conn,1,1
totle=rs1.recordcount
response.write" 共有<b><font color='#ff0000'>"&totle&"</font></b>个会员将我加入到他的商业伙伴列表。" 
if totle>0 then response.write"<img src='../images/indexpoint.gif' width='5' height='9'> <a href='addmefriend.asp' target='_blank'>立即查看</a>"
%>
                    </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR>
                <IMG 
            height=21 src="../images/addpartner_s.gif" width=29 
            align=absMiddle border=0> <A 
            href="addfriend_new.asp">将其他会员添加为“我的商业伙伴”</A> &nbsp; <A 
            href="toldmyfriend.asp"></A> <BR>
                <BR><BR><BR></TD></TR>
      </TABLE>
</TABLE>
<%
rs1.close
set rs1=nothing
rs.close
set rs=nothing
conn.close
set conn=nothing
%>