userok.ASP
上传用户:qyswxdl
上传日期:2013-06-01
资源大小:1373k
文件大小:7k
源码类别:

家庭/个人应用

开发平台:

ASP/ASPX

  1. <!--#include file="../checkpost.asp"-->
  2. <!--#include file="articleconn.asp"-->
  3. <!--#include file="home1.asp"-->
  4. <!--#include file="security.asp"-->
  5. <%if session("flag")>3 then
  6.     response.write "<br><p align=center>您的操作权限不够!</p>"
  7.     response.end
  8. end if
  9. %>
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-Language" content="zh-cn">
  13. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  14. <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
  15. <meta name="ProgId" content="FrontPage.Editor.Document">
  16. <link rel="stylesheet" href="inc/Admin_STYLE.CSS" type="text/css">
  17. <title></title>
  18. </head>
  19. <body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  20. <%
  21.    MaxPerPage=20
  22.    dim totalPut   
  23.    dim CurrentPage
  24.    dim TotalPages
  25.    dim i,j
  26.    dim typename
  27.    
  28.    typename=""
  29.    if not isempty(request("page")) then
  30.       currentPage=cint(request("page"))
  31.    else
  32.       currentPage=1
  33.    end if
  34.    dim sql
  35.    dim rs
  36.    dim rstype
  37.    dim typesql
  38.    dim typeid,typename1
  39.    if not isEmpty(Replace(request("typeid"), "'", "''")) then
  40. typeid=Replace(request("typeid"), "'", "''")
  41.    else
  42. typeid=0
  43.    end if
  44. %>
  45. <!--#include file="top1.asp"-->
  46. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  47.   <tr>
  48.     <td width="100%"></td>
  49.   </tr>
  50. </table>
  51. <%
  52.  if request("userid123")="" then
  53.  sql="select * from users where getmoney>=20 order by id desc"
  54.  else
  55.  sql="select * from users where userid='"&request("userid123")&"'"
  56.  end if
  57.  Set rs= Server.CreateObject("ADODB.Recordset")
  58.  rs.open sql,conn,1,1
  59.   if rs.eof and rs.bof then
  60.        response.write "<p align='center'> 还 没 有 任 何 会 员</p>"
  61.    else
  62.   totalPut=rs.recordcount
  63.       totalPut=rs.recordcount
  64.       if currentpage<1 then
  65.           currentpage=1
  66.       end if
  67.       if (currentpage-1)*MaxPerPage>totalput then
  68.    if (totalPut mod MaxPerPage)=0 then
  69.      currentpage= totalPut  MaxPerPage
  70.    else
  71.       currentpage= totalPut  MaxPerPage + 1
  72.    end if
  73.       end if
  74.        if currentPage=1 then
  75.            showpage totalput,MaxPerPage,"user.asp"
  76.             showContent
  77.             showpage totalput,MaxPerPage,"user.asp"
  78.        else
  79.           if (currentPage-1)*MaxPerPage<totalPut then
  80.             rs.move  (currentPage-1)*MaxPerPage
  81.             dim bookmark
  82.             bookmark=rs.bookmark
  83.            showpage totalput,MaxPerPage,"user.asp"
  84.             showContent
  85.              showpage totalput,MaxPerPage,"user.asp"
  86.         else
  87.         currentPage=1
  88.            showpage totalput,MaxPerPage,"user.asp"
  89.            showContent
  90.            showpage totalput,MaxPerPage,"user.asp"
  91.       end if
  92.    end if
  93.    end if
  94.    sub showContent
  95.        dim i
  96.    i=0
  97.   %>
  98. <div align="center">
  99.   <center>
  100.     <table border="0" cellspacing="1" width="100%" class="border" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0" height="33" style="border-collapse: collapse" bordercolor="#111111">
  101.       <tr> 
  102.         <td width="94" height="7" align="center" bgcolor="#429AEF"><font color="#FFFFFF"><b>用户编号</b></font></td>
  103.         <td width="88" height="7" align="center" bgcolor="#429AEF"><font color="#FFFFFF"><b>用户名</b></font></td>
  104.         <td width="80" height="20" align="center" bgcolor="#429AEF"><font color="#FFFFFF"><b>姓名</b></font></td>
  105.         <td width="142" height="20" align="center" bgcolor="#429AEF"><font color="#FFFFFF"><b>注册时间</b></font></td>
  106.         <td width="166" height="20" align="center" bgcolor="#429AEF"> 
  107.           <p align="center"><font color="#FFFFFF"><b>应付金额</b></font></td>
  108.         <td width="70" height="20" align="center" bgcolor="#429AEF"><font color="#FFFFFF"><b>登陆次数</b></font></td>
  109.         <td width="77" height="7" align="center" bgcolor="#429AEF"><font color="#FFFFFF"><b>详细信息</b></font></td>
  110.         <td width="36" height="7" align="center" bgcolor="#429AEF"><font color="#FFFFFF"><b>删除</b></font></td>
  111.       </tr>
  112.       <%do while not rs.eof%>
  113.       <tr> 
  114.         <td width="94" height="4" class="tdbg"> 
  115.         <p align="center"><%=rs("id")%></td>
  116.         <td width="88" height="4" class="tdbg"> 
  117.         <p align="center"><%=rs("userid")%> </td>
  118.         <td width="80" height="4" class="tdbg" align="center"><%=rs("name")%></td>
  119.         <td width="142" height="4" class="tdbg" align="center"><%=rs("date")%></td>
  120.         <td width="166" height="20" class="tdbg" align="center"> <%=rs("getmoney")%></td>
  121.         <td width="70" height="4" class="tdbg" align="center"><%=rs("nos")%></td>
  122.         <td width="77" height="4" class="tdbg"> 
  123.         <p align="center"><font color="#000000"> <a href="useredit.asp?userid=<%=rs("userid")%>" target="_blank">进入</a></font></td>
  124.         <td width="36" height="4" class="tdbg"> 
  125.           <p align="center"><a href="deluser.asp?id=<%=rs("id")%>"> 
  126.         </a><a href="deleteuser.asp?id=<%=rs("id")%>"><font color="#000000">删除</font></a></td>
  127.       </tr>
  128.       <% i=i+1
  129.       if i>=MaxPerPage then exit do
  130.       rs.movenext
  131.    loop
  132.   %>
  133.     </table>
  134.   </center>
  135. </div>
  136. <%
  137.    end sub 
  138. function showpage(totalnumber,maxperpage,filename)
  139.   dim n
  140.   if totalnumber mod maxperpage=0 then
  141.      n= totalnumber  maxperpage
  142.   else
  143.      n= totalnumber  maxperpage+1
  144.   end if
  145.   response.write "<p align=""center""><form method=Post action="&filename&"?typeid="&typeid&">"
  146.     if CurrentPage<2 then
  147.     response.write "<font color='#000080'>首页 上一页</font>&nbsp;"
  148.   else
  149.     response.write "<a href="&filename&"?page=1&typeid="&typeid&">首页</a>&nbsp;"
  150.     response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&">上一页</a>&nbsp;"
  151.   end if
  152.   if n-currentpage<1 then
  153.     response.write "<font color='#000080'>下一页 尾页</font>"
  154.   else
  155.     response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&">"
  156.     response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&">尾页</a>"
  157.   end if
  158.    response.write "<font color='#000080'>&nbsp;页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
  159.     response.write "<font color='#000080'>&nbsp;共<b>"&totalnumber&"</b>个会员 <b>"&maxperpage&"</b>个会员/页</font> "
  160.    response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput value="&currentpage&">"
  161.    response.write " <input class=buttonface type='submit'  value='Goto'  name='cndok'></span></p></form></p>"
  162.        
  163. end function
  164.    rs.close
  165.    set rs=nothing  
  166.    conn.close
  167.    set conn=nothing
  168.   %>
  169. <form method="POST" action="user.asp" align=" center">
  170.   <p align="center"><font color="#FFFFFF"><font color="#000000">用户名:</font> 
  171.     <input type="text" name="userid123" size="20">
  172.     <input name="submit" type="submit" value="查询">
  173.     </font></p>
  174. </form>
  175. <table width="624" border="0" align="center" cellpadding="0" cellspacing="0">
  176.   <tr>
  177.     <td>
  178. <div align="center">本栏目只列出付款金额大于20元的会员</div></td>
  179.   </tr>
  180. </table>
  181. <p align="center">&nbsp;</p>
  182. </body>
  183. </html>