<!--#include file="../conn/conn.asp"-->
<!--#include file="../conn/config.asp"-->
<!--#include file="../conn/nosql.asp"-->
<%if Not ChkPosturl then response.redirect ("../login.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}
.style6 {font-size: 14px}
.style10 {color: #FF3300;
	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"><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="new.asp"><img src="../images/bj_575_xjhy<%if action="" then%>2<%end if%>.gif" width="69" height="23" border="0"></a></td>
          <td><a href="new.asp?action=xs"><img src="../images/bj_575_xjsg<%if action="xs" then%>2<%end if%>.gif" width="69" height="23" border="0"></a></td>
          <td><a href="new.asp?action=xj"><img src="../images/bj_575_xjln<%if action="xj" then%>2<%end if%>.gif" width="69" height="23" border="0"></a></td>
          <td><a href="new.asp?action=cf"><img src="../images/bj_575_cfph<%if action="cf" then%>2<%end if%>.gif" width="69" height="23" border="0"></a></td>
          <td><a href="new.asp?action=fw"><img src="../images/bj_575_fwph<%if action="fw" then%>2<%end if%>.gif" width="69" height="23" border="0"></a></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td background="../images/bj_575_1.gif"><%
set rs=server.CreateObject("adodb.recordset")
if action="xj" then
rs.open "select top 100 * from snsn_user where ch='女士' and uflag=3 order by id desc",conn,1,1
elseif action="cf" then
rs.open "select top 100 * from snsn_user where uflag=3 order by jifen desc",conn,1,1
elseif action="fw" then
rs.open "select snsn_count.*,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 snsn_count,snsn_user where snsn_count.userid=snsn_user.id  order by snsn_count.hit desc",conn,1,1
elseif action="xs" then
rs.open "select top 100 * from snsn_user where ch='先生' and uflag=3 order by id desc",conn,1,1
else
rs.open "select top 100 * from snsn_user where uflag=3 order by id desc",conn,1,1
end if
%>
        <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="10"></td>
          </tr>
        </table>
        <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
          <%if rs.eof then
          response.Write"<div align='center'>暂无任何信息</div>"
           else
        rs.PageSize =12 '每页记录条数
		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 %>
          <tr onMouseOver='JavaScript:this.style.backgroundColor="#FCFBF3"' onMouseOut='JavaScript:this.style.backgroundColor=""'>
            <td height="25"><span class="link_redblank"> <strong>
              <%
								response.write "<a href=""javascript:;"" onclick=""showmenuie5("&rs("url")&","&rs("id")&",'"&rs("username")&"')"" >"&trim(rs("homename"))&"</A>"%>
            </strong>(<%=rs("idate")%>) </span>站长：<span class="link_redblank"><%=rs("username")%>(<%=rs("name")%>)</span></td>
          </tr>
          <tr>
            <td height="1" bgcolor="efefef"></td>
          </tr>
          <tr onMouseOver='JavaScript:this.style.backgroundColor="#FCFBF3"' onMouseOut='JavaScript:this.style.backgroundColor=""'>
            <td height="22">
              <table width="100%"  border="0" align="center" cellpadding="5" cellspacing="0">
                <tr>
                  <td><span class="link_redblank"><img src="../images/h.gif" width="5" height="11">
                        <%
								response.write "<a href=""javascript:;"" onclick=""showmenuie5("&rs("url")&","&rs("id")&",'"&rs("username")&"')"" >"&htmltotext(trim(rs("h_xxy")))&"</A>"%>
                  </span></td>
                </tr>
                <tr height="10">
                  <td height="10"></td>
                </tr>
            </table></td>
          </tr>
          <TR height="20" bgcolor="#ffffff">
            <td height="1" colspan="2" background="../images/ml_img_05.gif"></td>
          </TR>
          <%RS.MoveNext
                  next
			      end if
			      rs.close
			     set rs=nothing%>
        </table></td>
    </tr>
    <tr>
      <td><img src="../images/bj_575_2.gif" width="575" height="7"></td>
    </tr>
  </table>
      <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>
<!--#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
%>