<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/nosql.asp"-->
<!--#include file="../../conn/config.asp"-->
 <%
if session("user")="" then
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
if nosql(request("act"))="del" then
conn.execute"delete from snsn_myfriend where id="&nosql(request("id"))&" and username='"&nosql(session("user"))&"'"
response.Write("<script>alert('删除完成');location.href='haoyou.asp'</script>")
end if
%>
<html>
<head>
<title>交友中心_<%=webname%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/css.css" type="text/css">
</head>
<body>
<!--#include file="../../top.asp"-->
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
    <td width="970"><table width="970"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="10"><img src="/img/m_left.gif" width="10" height="20"></td>
          <td width="950" bgcolor="#FFFFFF"></td>
          <td width="10"><img src="/img/m_right.gif" width="10" height="20"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td height="188" colspan="3"><table width="950"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="1" bgcolor="efefef"></td>
                <td width="200" height="77" valign="top"><!--#include file="../left.asp"--></td>
                <td width="1" bgcolor="efefef"></td>
                <td valign="top">
                    <TABLE width=95% 
border=0 align="center" cellPadding=0 cellSpacing=0 class=content_border>
                      <TBODY>
                        <TR>
                          <TD align=middle>
                            <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>
                            <FORM style="MARGIN-TOP: 8px" name=mypartnerlist action="" method=post>
                              <IMG height=8 src="../images/shim(1).gif" width=1>
                              <TABLE width="100%" border=0 cellPadding=1 cellSpacing=1 bgcolor="#BBD7FF">
                                <TR>
                                  <TD height="23" bgColor=#e8f4ff>
                                    <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                                      <TBODY>
                                        <TR>
                                          <TD width="5%"><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>我的普通好友</FONT></U> </TD>
                                        </TR>
                                      </TBODY>
                                  </TABLE></TD>
                                </TR>
                                <TBODY id=table1754891 style="DISPLAY: none">
                                  <%	
set rs=server.CreateObject("adodb.recordset")
rs.open"select snsn_myfriend.username as MemUser,snsn_myfriend.friend_name,snsn_user.* from snsn_myfriend,snsn_user where snsn_myfriend.username='"&nosql(session("user"))&"' and snsn_user.username=snsn_myfriend.friend_name and snsn_myfriend.relation=0",conn,1,3
					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 
                      height=28>
                                      <DIV id=nav>
                                        <INPUT type=checkbox value=0+<%=rs("friend_name")%>
                        name=selected_friend_id>
                                        <a href="javascript:;" onClick="window.open('/web/<%=rs("url")%>/index.asp?web_id=<%=rs("id")%>','cheng','scrollbars=no,resizable=no,width=920,height=565,menubar=no,top=10,left=10')" class=over> <%=rs("friend_name")%></a>&nbsp;<a href="/minishow/minihy.asp?friend_id=<%=rs("id")%>" target="_blank"><font color=red>与其合影</font></a>&nbsp;[ 真实姓名：<%=rs("name")%>&nbsp; <%=rs("ch")%>&nbsp;所在地区：<%=rs("szd")%> &nbsp;] </DIV></TD>
                                  </TR>
                                  <%
					rs.movenext
					loop
					end if
					%>
                                </TBODY>
                              </TABLE>
                              <IMG 
            height=8 src="../images/shim(1).gif" width=1><BR>
                              <TABLE width="100%" border=0 cellPadding=1 cellSpacing=1 bgcolor="#BBD7FF">
                                <TR bgcolor="#e6e6e6">
                                  <TD height="23" bgColor=#e8f4ff>
                                    <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                                      <TBODY>
                                        <TR>
                                          <TD width="5%"><INPUT 
                              onclick=selectgroupall(this.form.group1) 
                              type=checkbox value=1 name=group1>
                                          </TD>
                                          <TD class=M style="CURSOR: hand" 
                            onclick=javascript:hve_display(table17548911,image17548911)><IMG 
                              src="../images/groupex.gif" border=0 
                              name=image17548911> <U><FONT 
                              color=#000000>我的亲密好友</FONT></U></TD>
                                        </TR>
                                      </TBODY>
                                  </TABLE></TD>
                                </TR>
                                <TBODY id=table17548911>
                                  <%
					set rs=server.CreateObject("adodb.recordset")
rs.open"select snsn_myfriend.username as MemUser,snsn_myfriend.friend_name,snsn_user.* from snsn_myfriend,snsn_user where snsn_myfriend.username='"&nosql(session("user"))&"' and snsn_user.username=snsn_myfriend.friend_name  and snsn_myfriend.relation=1",conn,1,3
					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 
                      height=28>
                                      <DIV id=nav>
                                        <INPUT type=checkbox value=1+<%=rs("friend_name")%> 
                        name=selected_friend_id>
                                        <a href="javascript:;" onClick="window.open('/web/<%=rs("url")%>/index.asp?web_id=<%=rs("id")%>','cheng','scrollbars=no,resizable=no,width=920,height=565,menubar=no,top=10,left=10')" class=over><%=rs("friend_name")%></a>&nbsp;<a href="/minishow/minihy.asp?friend_id=<%=rs("id")%>" target="_blank"><font color=red>与其合影</font></a>&nbsp;[ 真实姓名：<%=rs("name")%>&nbsp; <%=rs("ch")%> &nbsp;所在地区：<%=rs("szd")%> &nbsp;] </DIV></TD>
                                  </TR>
                                  <%
					rs.movenext
					loop
					end if
					%>
                                </TBODY>
                              </TABLE>
                              <IMG 
            height=8 src="../images/shim(1).gif" width=1><BR>
                              <TABLE width="100%" border=0 cellPadding=1 cellSpacing=1 bgcolor="#BBD7FF">
                                <TR bgcolor="#e6e6e6">
                                  <TD height="23" bgColor=#e8f4ff>
                                    <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                                      <TBODY>
                                        <TR>
                                          <TD width="5%"><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> </TD>
                                        </TR>
                                      </TBODY>
                                  </TABLE></TD>
                                </TR>
                                <TBODY id=tableblacklist style="DISPLAY: none">
                                  <%
					set rs=server.CreateObject("adodb.recordset")
rs.open"select snsn_myfriend.username as MemUser,snsn_myfriend.friend_name,snsn_user.* from snsn_myfriend,snsn_user where snsn_myfriend.username='"&nosql(session("user"))&"' and snsn_user.username=snsn_myfriend.friend_name  and snsn_myfriend.relation=-1",conn,1,3
					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 
                      height=28>
                                      <DIV id=nav>
                                        <INPUT type=checkbox value=-1+<%=rs("friend_name")%> 
                        name=selected_friend_id>
                                        <a href="javascript:;" onClick="window.open('/web/<%=rs("url")%>/index.asp?web_id=<%=rs("id")%>','cheng','scrollbars=no,resizable=no,width=920,height=565,menubar=no,top=10,left=10')" class=over><%=rs("friend_name")%></a> [ 真实姓名：<%=rs("name")%>&nbsp; <%=rs("ch")%> &nbsp;所在地区：<%=rs("szd")%> &nbsp;] </DIV></TD>
                                  </TR>
                                  <%
					rs.movenext
					loop
					end if
					%>
                                </TBODY>
                              </TABLE>
                              <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  class="go-wenbenkuang" onClick="return dosendmessage()" type=submit value="发留言" name=eventSubmit_doMessage>
                                        <INPUT class="go-wenbenkuang" onClick="return domovefriend()" type=submit value="转移到其他组" name=eventSubmit_doMove>
                                        <INPUT class="go-wenbenkuang" 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>
                            <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 id from snsn_friendlist where friend_name='"&nosql(session("user"))&"'"
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='friendlist.asp'><font color=red>立即查看</font></a>
                                          </TD>
                                        </TR>
                                      </TBODY>
                                  </TABLE></TD>
                                </TR>
                              </TBODY>
                            </TABLE>
                            <BR>
                            <IMG 
            height=21 src="../images/addpartner_s.gif" width=29 
            align=absMiddle border=0> <A 
            href="addfriend_new.asp">将其他会员添加为“我的好友伙伴”</A> &nbsp;&nbsp;&nbsp; <IMG 
            height=21 src="../images/addpartner_s.gif" width=29 
            align=absMiddle border=0> <A 
            href="toldmyfriend.asp">邀请非会员朋友成为“我的好友伙伴”</A> <BR></TD>
                        </TR>
                  </TABLE>
                </td>
              </tr>
          </table></td>
        </tr>
    </table></td>
    <td valign="top"><img src="/img/index_img.jpg" width="10"></td>
  </tr>
</table>
<!--#include file="../../end.asp"-->
</body>
</html>
