<!--#include file="../conn/conn.asp"-->
<!--#include file="../conn/config.asp"-->
<!--#include file="../conn/nosql.asp"-->
<%action=request("action")%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>迷你主页首页-<%=webname%></title>
<link href="../css.css" REL="stylesheet" TYPE="text/css">
<style type="text/css">
<!--
body {
	background-image: url();
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {color: #FFFFFF}
.style7 {color: #FF0000}
.style8 {
	color: #0099FF;
	font-weight: bold;
}
.style9 {
	color: #FF6600;
	font-weight: bold;
}
-->
</style>
<SCRIPT language=javascript>
//--检测登陆-->

	   function DoLogin() {

	      var UsernameGet = trim(document.loginForm.UsernameGet.value);
		  var PasswordGet = trim(document.loginForm.PasswordGet.value);
		  var Verifycode = trim(document.loginForm.Verifycode.value);

          if(UsernameGet == "") {
		    alert("请输入会员登录名！");
			document.loginForm.UsernameGet.focus();
		    return false;
		  } 
		  if(PasswordGet == "") {
		    alert("请输入您的会员密码！");
			document.loginForm.PasswordGet.focus();
		    return false;
		  } 
		  if(Verifycode == "") {
		    alert("请输入您的登录验证码！");
			document.loginForm.Verifycode.focus();
		    return false;
		  }  
		  
		  
		 }

           function trim(inputString) {
	   
              if (typeof inputString != "string") { return inputString; }
              var retValue = inputString;
              var ch = retValue.substring(0, 1);
              while (ch == " ") { 
	          //检查字符串开始部分的空格
                  retValue = retValue.substring(1, retValue.length);
                  ch = retValue.substring(0, 1);
              }
              ch = retValue.substring(retValue.length-1, retValue.length);
              while (ch == " ") {
                 //检查字符串结束部分的空格
                 retValue = retValue.substring(0, retValue.length-1);
                 ch = retValue.substring(retValue.length-1, retValue.length);
              }
              while (retValue.indexOf("  ") != -1) { 
	         //将文字中间多个相连的空格变为一个空格
                 retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); 
              }
              return retValue;
           } 

//-->
</SCRIPT>
<script language="JavaScript" type="text/JavaScript">
<!--



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>

<body><!--#include file="top.asp"-->
<table width="100" height="5" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" valign="top"><!--#include file="../left.asp"--></td><td width="5" valign="top">&nbsp;</td>
    <td valign="top"><span class="style10">
      </span>
      <table width="575" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="23" background="../images/bj_575_0.gif"><table border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="23"><img src="../images/bj_575_4.gif" width="9" height="23"></td>
                <td><a href="pr.asp"><img src="../images/bj_575_xcgc<%if action="" then%>2<%end if%>.gif" width="69" height="23" border="0"></a></td>
                <td><a href="pr.asp?action=xs"><img src="../images/bj_575_xcsg<%if action="xs" then%>2<%end if%>.gif" width="69" height="23" border="0"></a></td>
                <td><a href="pr.asp?action=xj"><img src="../images/bj_575_xcln<%if action="xj" then%>2<%end if%>.gif" width="69" height="23" border="0"></a></td>
                <td><a href="javascript:;" class="style7" onClick="window.open('action2.asp','show','scrollbars=no,resizable=no,width=420,height=260,menubar=no,top=10,left=188')"><img src="../images/bj_575_wyxc.gif" width="69" height="23" border="0"></a></td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td background="../images/bj_575_1.gif"><span class="style10">
            <%set rs=server.CreateObject("adodb.recordset")
			if action="xs" then
			rs.open "select mini_pr.*,snsn_user.id,snsn_user.username,snsn_user.name,snsn_user.url,snsn_user.idate,snsn_user.homename,snsn_user.h_xxy,snsn_user.uflag as cxzs from mini_pr,snsn_user where mini_pr.userid=snsn_user.id and snsn_user.ch='先生' order by mini_pr.id desc",conn,1,1
			elseif action="xj" then
			rs.open "select mini_pr.*,snsn_user.id,snsn_user.username,snsn_user.name,snsn_user.url,snsn_user.idate,snsn_user.homename,snsn_user.h_xxy,snsn_user.uflag as cxzs from mini_pr,snsn_user where mini_pr.userid=snsn_user.id and snsn_user.ch='女士' order by mini_pr.id desc",conn,1,1
			else
		  rs.open "select * from mini_pr order by xctj desc,id desc",conn,1,1
		  end if
		  if rs.eof then
          response.Write"<div align='center'>暂无任何信息</div>"
           else
		          rs.PageSize =6 '每页记录条数
		iCount=rs.RecordCount '记录总数
		iPageSize=rs.PageSize
    	maxpage=rs.PageCount 
    	page=request("page")
    	per_page=rs.PageSize
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	For i=1 To x
	set rs3=conn.execute("select * from [snsn_user] where id="&rs("userid")&"")%>
          </span>
            <table width="130" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td></td>
              </tr>
            </table>
            <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="110" align="center"><table width="95" height="95" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF">
                    <tr>
                      <td bordercolor="efefef"><div align="center"><img src="<%=rs3("h_face")%>" width=81 height="81" border=0></div></td>
                    </tr>
                </table></td>
                <td valign="top"><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="25"><span class="style8"><%=trim(rs("xcname"))%> (<%=trim(rs("adddate"))%>) </span><a href="http://<%=rs3("username")%>.snsn.net" target="_blank">http://<%=rs3("username")%>.snsn.net</a></td>
                    </tr>
                    <tr>
                      <td height="1" background="../img/bj_x.gif"></td>
                    </tr>
                    <tr>
                      <td height="23"><%
									if rs3.eof or rs3.bof then
response.write "<a href=#>"
else%>
                          <a href="javascript:;" onClick="showmenuie5(<%=rs3("url")%>,<%=rs3("id")%>,'<%=rs3("username")%>')" >
                          <%end if%>
                          <span class="style9"><%=rs3("username")%></span></a><span class="link_redblank">
                          <%if rs3("ch")="先生" then%>
                          <img src="../ico/ico_man.gif" width="11" height="12">
                          <%else%>
                          <img src="../ico/ico_women.gif" width="11" height="12">
                          <%end if%>
                          </span>&nbsp;&nbsp;
                          <%set ujilu=conn.execute("select name from online where name='"&rs3("username")&"'")                                                                                      
if not ujilu.eof then%>
                          <span class="style7">在线</span>
                          <%else%>
            不在线
            <%end if%>
            / 最近登陆：<%=rs3("logindate")%> / 访问量：
            <%tmprs=conn.execute("Select hit From snsn_count where userid="&rs("userid"))
	hit=tmprs(0)%>
            <%=hit%></td>
                    </tr>
                    <tr>
                      <td height="1" background="../img/bj_x.gif"></td>
                    </tr>
                    <tr>
                    <tr>
                      <td height="22"> <%=trim(rs("xcnr"))%></td>
                    </tr>
                </table></td>
              </tr>
            </table>
          <%
			rs.movenext
			next
end if
			rs.close
			set rs=nothing%></td>
        </tr>
        <tr>
          <td><img src="../images/bj_575_2.gif" width="575" height="7"></td>
        </tr>
      </table>
      <span class="style10">      </span>
      <TABLE width="100%" 
        border=0 align="center" cellPadding=4 cellSpacing=0>
        <TBODY>
          <TR>
            <TD class=M noWrap align=middle><%
					call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>",per_page)
				  %></TD>
          </TR>
        </TBODY>
      </TABLE>
    <span class="style10"> </span></td>
  </tr>
</table>

<table width="90%" height="10"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table><!--#include file="../end.asp"-->
</body>
</html><%
Sub PageControl(iCount,pagecount,page,table_style,font_style,per_page)
'生成上一页下一页链接
    Dim query, a, x, temp
    action1 = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
	
    temp=""

    Response.Write("<table " & Table_style & ">" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action1 & "?" & temp & "action="&action&"&id="&id&"&Page='+ this.page.value;return false;""><TR>" & vbCrLf )
    Response.Write("<TD align=right>" & vbCrLf )
    Response.Write(font_style & vbCrLf )    
        
    if page<=1 then
        Response.Write ("首页 " & vbCrLf)        
        Response.Write ("上页 " & vbCrLf)
    else        
        Response.Write("<A HREF=" & action1 & "?" & temp & "action="&action&"&id="&id&"&Page=1>首页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action1 & "?" & temp & "action="&action&"&id="&id&"&Page=" & (Page-1) & ">上页</A> " & vbCrLf)
    end if

    if page>=pagecount then
        Response.Write ("下页 " & vbCrLf)
        Response.Write ("尾页 " & vbCrLf)            
    else
        Response.Write("<A HREF=" & action1 & "?" & temp & "action="&action&"&id="&id&"&Page=" & (Page+1) & ">下页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action1 & "?" & temp & "action="&action&"&id="&id&"&Page=" & pagecount & ">尾页</A> " & vbCrLf)            
    end if

    Response.Write(" 页次：" & page & "/" & pageCount & "页" &  vbCrLf)
    Response.Write(" 共有" & iCount & "条/每页"&per_page&"条" &  vbCrLf)
    Response.Write(" 转到 " & "<INPUT TYEP=TEXT NAME=page SIZE=4 Maxlength=8 class=wenbenkuang VALUE=" & page & ">" & " 页"  & vbCrLf & "<input name=go type=image  src=/images/btn_go.gif alt=GO align=absMiddle  border=0>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%>