<!--#include file="inc/conn.asp"-->
<!--#include file="inc/safe.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/const.asp"-->
<%
if MemberName="" then
  response.Redirect("userlogin.asp")
  response.end
end if
%>
<%
fwid=int(request("id"))
set dz=conn.execute("select * from fw where fwid="&fwid&" and uid="&userid)
				  if dz.eof then 
				 response.Redirect("dz.asp?fwid="&fwid)
				 response.End()
				 end if%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>红嫂视屏交友网</title>
<meta name="keywords" content="情感,在线,新新,照片,动感影片,诗歌,爱情,纯洁,心连心">
<meta name="description" content="红嫂视屏交友情缘 情感在线">
<link href="style.css" rel="stylesheet" type="text/css">
<link href="css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	background-image: url();
}
-->
</style>
</head>
<body>
<%
dim logins,lastlogintime,artnum,lycount,photo,renqi
set rs=server.CreateObject("adodb.recordset")
sql="select logins,lastlogin,artnum,photo,renqi,endtime,grade,innum,outnum from user_info where userid="& UserId &""
rs.open sql,conn,1,3
if not rs.bof then
  logins=rs("logins")
  lastlogintime=rs("lastlogin")
  artnum=rs("artnum")
  photo=rs("photo")
  renqi=rs("renqi")
  innum=rs("innum")
  outnum=rs("outnum")
  if isnull(rs("endtime")) or rs("endtime")<now() then
    rs("grade")=1
	rs.update
	Response.Cookies(Forum_sdjy)("userclass")="注册会员"
	memberclass=checkStr(request.cookies(Forum_sdjy)("Userclass"))
  end if
end if
rs.close
set rs=nothing
set rs=server.CreateObject("adodb.recordset") '新留言数
sql1="select count(*) from sd_ly where userid="& UserId &" and isread=0"
rs.open sql1,conn,1
lycount=rs(0)
rs.close
set rs=nothing
%>
<table width="1002" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><!--#include file="top.asp"--></td>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="219" height="168" align="center" valign="top"><div align="left"><!--#include file="memberleft.asp"-->
        </div></td>
    <td width="731" align="center" valign="top"><div align="left"></div>
        <table width="730" border="0" align="left" cellpadding="0" cellspacing="0" style="border-left:#9DCCF6 1px solid;border-right:#9DCCF6 1px solid;border-bottom:#9DCCF6 1px solid;border-top:#9DCCF6 1px solid  ">
          <tr>
            <td height="28" colspan="3" background="images/lg_1.gif">&nbsp;&nbsp;<strong>在线会员&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;筛选：</strong><a href="?sex=男&id=1">男</a> | <a href="?sex=女&id=1">女</a> | <a href="?id=1">全部</a>&nbsp;&nbsp;&nbsp;在线人数 <span class="pgd"><font color="#FF0000"><%=GetOnlineMember%></font></span> &nbsp;&nbsp;会员总数 <span class="pgd"><font color="#FF0000"><%=GetTotalMember%></font></span></td>
          </tr>
          <tr>
            <td width="731" valign="top">

			<table width="731" border="0" align="center" cellpadding="0" cellspacing="0" >

      <tr>
        <td align="center" height="10"></td>
      </tr>
      <%
dim rowcount,page,pcount
set rs1=server.CreateObject("adodb.recordset")
'sql="select top 40 userid,username,birthday,prov,sex,school,photo from user_info where sex='女' and addmodel<>2 and photo<>'' and photo is not null order by renqi desc"
sql1="select [username] from sd_online"


rs1.open sql1,conn,1
if rs1.eof and rs1.bof then
   response.Write "<tr><td align='center'><p class='style4'><br>暂在线会员信息！<br><br></p></td></tr>"
else

Dim page_size '定义每页多少条记录变量 
Dim page_no '定义当前是第几页变量 
Dim page_total '定义总的页数变量 
page_size=20
'如果第一次打开则page_no为1,否则由传回参数决定 
If Request.QueryString("page_no")="" Then 
page_no=1 
Else 
page_no=int(Cint(Request.QueryString("page_no"))) 
End If 
rs1.PageSize=page_size '设置每页多少条记录 
page_total=rs1.PageCount '返回总页数 
rs1.AbsolutePage=page_no '设置当前显示第几页 
%>
      <tr>
        <td align="center"><table width="659" border="0" cellspacing="0" cellpadding="0">

            <tr>
              <td height="165" align="center" valign="top"><table width="687" border="0" cellpadding="0" cellspacing="0">
 <%             
dim I,j 
I=page_size 
j=0
Do while Not rs1.Eof And I>0 

%>
<tr><td width=131><%
set rs=server.CreateObject("adodb.recordset")
sex=trim(left(request("sex"),2))
if sex<>"" then
sexs="and sex='"&sex&"' "
else
sexs=""
end if
sql="select userid,username,birthday,prov,sex,school,photo from user_info where username='"&rs1("username")&"' "&sexs
rs.open sql,conn,1,1
if not rs.eof then
j=j+1
I=I-1 
%>
<table width=131 height=165 border=0 cellpadding=2 cellspacing=2 bgcolor=#FFFFFF>
  <tr>
<td width=125 height=110 align=center><a href=userinfo.asp?user_id=<%=rs("userid")%> target=_blank>
<%if rs("photo")="" or isnull(rs("photo")) then
select case rs("sex")
case "男"
imgphoto="default-1.gif"
case "女"
imgphoto="default-0.gif"
end select
response.Write "<img src=ima/"& imgphoto &" width=105 height=90 border=0>"
else
 response.Write "<img src=""Uppic/photo/"& rs("photo") &""" border=""0"" onload=""javascript:if(this.width>this.height){this.width=105}else{this.height=90}"">"
end if

%></a></td>
<tr align=center><td class=STYLE8><%=rs("username")%></td></tr>
<tr align=center><td class=STYLE4><%=rs("sex")%> ,<%=GetProv(rs("prov"))%></td></tr>
<tr align=center><td class=STYLE4><%=ShowXl(rs("school"))%>  ,<%= datediff("yyyy",rs("birthday"),now()) %>岁</td></tr>
</table>
<%
else
response.Write "&nbsp;"
end if		
rs.close
set rs=nothing%>    </td>
<td width=8></td>
<%
rs1.MoveNext 
Loop 
if j mod 5 =0 then  response.Write("</tr<tr>")
%>  
				  
				  
                </tr>
				
              </table></td>
            </tr>
        </table></td>
      </tr>
 
      <tr>
        <td height="30" align="center" bgcolor="#fafafa">第<%=page_no%>页/共<%=page_total%>页&nbsp;第&nbsp;<%for  I=1 To page_total
response.Write("<a href=?id=1&sex="&sex&"&page_no="&I&">"&I&"</a>&nbsp;")
next
%>页</td>
      </tr>
      <%end if%>
    </table>
		  
            </td>
          </tr>
      </table></td>
  </tr>
</table>
<table width="1002" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><!--#include file="root.asp"--></td>
  </tr>
</table>
</body>
</html>
<%
conn.close
set conn=nothing
%>
