<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/nosql.asp"-->
<!--#include file="../../conn/config.asp"-->
<!--#include file="../../conn/md5.asp"-->
<!--#include file="../../conn/headpage.asp"-->
 <%if Not ChkPosturl then response.redirect ("/login.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 session("id")="" then 
response.write "<script language='javascript'>"
response.write "alert('您没还有登录，请登录后再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
end if
%>
<%
sql="select distinct username from snsn_myfriend where friend_name='"&nosql(session("user"))&"'"
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1 
	totalrec=RS.RecordCount'总记录条数
%>
<link rel="stylesheet" href="/css.css" type="text/css">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style><!--#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"><p>&nbsp;
                </p>
                    <TABLE width=98% border=0 align="center" cellPadding=3 cellSpacing=0>
                      <TBODY>
                        <TR bgColor=#f5f5f5>
                          <TD class=C align=left>对您感兴趣的好友共 <font color=#ff0000><b><%=totalrec%></b></font> 名</TD>
                          <TD class=C align=right> </TD>
                        </TR>
                      </TBODY>
                    </TABLE>
                    <BR>
                    <TABLE width=98% border=0 align="center" cellPadding=0 cellSpacing=0>
                      <TBODY>
                        <TR>
                          <TD width="872" bgColor=#a6d0ff>
                            <TABLE cellSpacing=1 cellPadding=5 width=100% border=0>
                              <TBODY>
                                <TR align="center" bgColor=#d7ebff>
                                  <TD width="112" class=M>用户名</TD>
                                  <TD width="89" class=M>昵称</TD>
                                  <TD width="94" class=M>性别</TD>
                                  <TD width="159" class=M>城市</TD>
                                  <TD width="145" class=M> 主页地址 </TD>
                                </TR>
                                <%
if rs.eof or rs.bof then
response.write"<TABLE cellSpacing=1 cellPadding=5 width=750 border=0><TBODY><TR bgColor=#ffffff><TD class=M align=middle>暂无其他好友把我加入他的伙伴</td></TR></TBODY></TABLE>"
Else
rs.pagesize=msg_per_page '定义分页记录集每页显示记录数
if not (rs.eof and rs.bof) then

	if rs.recordcount mod msg_per_page=0 then'计算总页数,recordcount:数据的总记录数
		n=rs.recordcount\msg_per_page'n:总页数
	else
		n=rs.recordcount\msg_per_page+1                        
	end if                                                                
	currentpage=request("page")'currentpage:当前页
	If currentpage <> "" then
		currentpage =  cint(currentpage)
		if currentpage < 1 then  
			currentpage = 1
		end if  
		if err.number <> 0 then '错误处理
			err.clear
			currentpage=1
		end if
	else
		currentpage=1
	End if                                                                
	if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then 
		currentPage=1
	end if
	rs.absolutepage=currentpage'absolutepage：设置指针指向某页开头
	rowcount=rs.pagesize'pagesize：设置每一页的数据记录数
end if

do while not rs.eof and rowcount > 0
set rs1=conn.execute("select *  from snsn_user where username='"&rs("username")&"'")
%>
                                <TR align="center" bgColor=#ffffff>
                                  <TD noWrap class=C>
                                    <DIV id=nav><a href="javascript:;" onClick="window.open('/web/<%=rs1("url")%>/index.asp?web_id=<%=rs1("id")%>','cheng','scrollbars=no,resizable=no,width=920,height=565,menubar=no,top=10,left=10')" class=over><%=rs1("username")%></A> </DIV></TD>
                                  <TD> <%=rs1("name")%></TD>
                                  <TD><%=rs1("ch")%></TD>
                                  <TD><%=rs1("szd")%></TD>
                                  <TD>http://<%=rs1("username")%>.snsn.net</TD>
                                </TR>
                                <%
rowcount=rowcount-1
rs.movenext
loop
%>
                              </TBODY>
                          </TABLE></TD>
                        </TR>
                      </TBODY>
                    </TABLE>
                    <BR>
                    <TABLE width=98% border=0 align="center" cellPadding=3 cellSpacing=0>
                      <TBODY>
                        <TR bgColor=#f5f5f5>
                          <TD class=C align=right>
                            <%call listPages()%>
                          </TD>
                        </TR>
                      </TBODY>
                    </TABLE>
                    <p>&nbsp;</p></td>
              </tr>
          </table></td>
        </tr>
    </table></td>
    <td valign="top"><img src="/img/index_img.jpg" width="10"></td>
  </tr>
</table>
<%End if
rs1.close
set rs1=nothing
rs.close
set rs=nothing
conn.close
set conn=nothing
%><!--#include file="../../end.asp"-->