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

家庭/个人应用

开发平台:

ASP/ASPX

  1. <!--#include file="articleconn.asp"-->
  2. <!--#include file="../checkpost.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 6.0">
  15. <meta name="ProgId" content="FrontPage.Editor.Document">
  16. <link rel="stylesheet" type="text/css" href="css/css.css">
  17. <title>会员管理页</title>
  18. </head>
  19. <LINK href="images/forum_admin.css" type=text/css rel=stylesheet>
  20. <body  leftmargin="0" topmargin="0">
  21. <TABLE class=tableBorder height=1 cellSpacing=1 cellPadding=5 width="100%" 
  22. align=center border=0>
  23.   <TBODY>
  24. <TR>
  25.     <TH height=25 style="background-image: url('images/admin_bg_1.gif')">&nbsp;&nbsp;<b><font style="font-size: 9pt"> 会 员 管 理</font></span></b></TH></TR></tbody></table>
  26. <%
  27.    MaxPerPage=30
  28.    dim totalPut   
  29.    dim CurrentPage
  30.    dim TotalPages
  31.    dim i,j
  32.    dim typename
  33.    
  34.    typename=""
  35.    if not isempty(request("page")) then
  36.       currentPage=cint(request("page"))
  37.    else
  38.       currentPage=1
  39.    end if
  40.    dim sql
  41.    dim rs
  42.    dim rstype
  43.    dim typesql
  44.    dim typeid,typename1
  45.    if not isEmpty(request("oklook")) then
  46. oklook=request("oklook")
  47.    else
  48. oklook=""
  49.    end if
  50. %>
  51. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  52.   <tr>
  53.     <td width="100%"></td>
  54.   </tr>
  55. </table>
  56. <%
  57. if request("nos")=0 then
  58.  sql="select * from users where nos=0 order by id desc"
  59. end if
  60.  
  61.  Set rs= Server.CreateObject("ADODB.Recordset")
  62.  rs.open sql,conn,1,1
  63.   if rs.eof and rs.bof then
  64.        response.write "<p align='center'> 还 没 有 任 何 会 员</p>"
  65.    else
  66.   totalPut=rs.recordcount
  67.       totalPut=rs.recordcount
  68.       if currentpage<1 then
  69.           currentpage=1
  70.       end if
  71.       if (currentpage-1)*MaxPerPage>totalput then
  72.    if (totalPut mod MaxPerPage)=0 then
  73.      currentpage= totalPut  MaxPerPage
  74.    else
  75.       currentpage= totalPut  MaxPerPage + 1
  76.    end if
  77.       end if
  78.        if currentPage=1 then
  79.            showpage totalput,MaxPerPage,"user01.asp"
  80.             showContent
  81.             showpage totalput,MaxPerPage,"user01.asp"
  82.        else
  83.           if (currentPage-1)*MaxPerPage<totalPut then
  84.             rs.move  (currentPage-1)*MaxPerPage
  85.             dim bookmark
  86.             bookmark=rs.bookmark
  87.            showpage totalput,MaxPerPage,"user01.asp"
  88.             showContent
  89.              showpage totalput,MaxPerPage,"user01.asp"
  90.         else
  91.         currentPage=1
  92.            showpage totalput,MaxPerPage,"user01.asp"
  93.            showContent
  94.            showpage totalput,MaxPerPage,"user01.asp"
  95.       end if
  96.    end if
  97.    end if
  98.    sub showContent
  99.        dim i
  100.    i=0
  101.   %>
  102. <form method="POST" action="user.asp" align=" center">
  103.   <p align="center"><b>用户名:</b><input type="text" name="userid123" size="20">
  104.   <input type="submit" value="查询"></p>
  105. </form>
  106. <p align="center"><a href="DELuser.ASP">删除一个星期未登录过的会员</a></p>
  107. <p align="center"><a href="DELuser01.ASP">删除3天均未登录过的会员</a></p>
  108. <body bgcolor="#D6EF7E" leftmargin="0" topmargin="0">
  109. <div align="center">
  110.   <center>
  111.   <p><a href="USER.ASP">全部会员</a>|<a href="USER.ASP?oklook=0">电影游客</a>|<a href="USER.ASP?oklook=1">普通会员</a>|<a href="USER.ASP?oklook=2">白银会员</a>|<a href="USER.ASP?oklook=3">黄金会员</a> 
  112.   |<a href="USER.ASP?oklook=4">钻石会员</a>|<a href="USER01.ASP?nos=0">未登录过的会员</a></p>
  113.   <table border="0" cellspacing="1" width="624" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0" height="33" style="border-collapse: collapse" bordercolor="#111111">
  114.     <tr bgcolor="#CCCCCC">
  115.       <td width="94" align="center" bgcolor="#0099FF" height="7"><b>用户编号</b></td>
  116.       <td width="88" align="center" bgcolor="#0099FF" height="7"><b>用户名</b></td>
  117.       <td width="80" align="center" bgcolor="#0099FF" height="20"><b>姓名</b></td>
  118.       <td width="142" align="center" bgcolor="#0099FF" height="20"><b>注册时间</b></td>
  119.       <td width="166" align="center" bgcolor="#0099FF" height="20">
  120.       <p align="center"><b>EMAIL</b></td>
  121.       <td width="70" align="center" bgcolor="#0099FF" height="20"><b>登陆次数</b></td>
  122.       <td width="77" align="center" bgcolor="#0099FF" height="7"><b>详细信息</b></td>
  123.       <td width="36" align="center" bgcolor="#0099FF" height="7"><b>删除</b></td>
  124.     </tr>
  125.     <%do while not rs.eof%>
  126.     <tr>
  127.       <td height="4" width="94" bgcolor="#FFFFFF">
  128.       <p align="center"><%=rs("id")%></td>
  129.       <td height="4" width="88" bgcolor="#FFFFFF">
  130.       <p align="center"><%=rs("userid")%> </td>
  131.       <td width="80" height="4" bgcolor="#FFFFFF" align="center"><%=rs("name")%></td>
  132.       <td width="142" height="4" bgcolor="#FFFFFF" align="center"><%=rs("date")%></td>
  133.       <td width="166" height="20" bgcolor="#FFFFFF" align="center"><%=rs("email")%></td>
  134.       <td width="70" height="4" bgcolor="#FFFFFF" align="center"><%=rs("nos")%></td>
  135.       <td width="77" height="4" bgcolor="#FFFFFF">
  136.       <p align="center"><font color="#000000">
  137.       <a href="useredit.asp?userid=<%=rs("userid")%>" >进入</a></font></td>
  138.       <td width="36" height="4" bgcolor="#FFFFFF">
  139.       <p align="center"><a href="deleteuser.asp?id=<%=rs("id")%>">
  140.       <font color="#000000">删除</font></a></td>
  141.     </tr>
  142.     <% i=i+1
  143.       if i>=MaxPerPage then exit do
  144.       rs.movenext
  145.    loop
  146.   %>
  147.   </table>
  148.   </center>
  149. </div>
  150. <%
  151.    end sub 
  152. function showpage(totalnumber,maxperpage,filename)
  153.   dim n
  154.   if totalnumber mod maxperpage=0 then
  155.      n= totalnumber  maxperpage
  156.   else
  157.      n= totalnumber  maxperpage+1
  158.   end if
  159.   response.write "<p align=""center""><form method=Post action="&filename&"?typeid="&typeid&"&oklook="&request("oklook")&">"
  160.     if CurrentPage<2 then
  161.     response.write "<font color='#000080'>首页 上一页</font>&nbsp;"
  162.   else
  163.     response.write "<a href="&filename&"?page=1&typeid="&typeid&"&oklook="&request("oklook")&">首页</a>&nbsp;"
  164.     response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&"&oklook="&request("oklook")&">上一页</a>&nbsp;"
  165.   end if
  166.   if n-currentpage<1 then
  167.     response.write "<font color='#000080'>下一页 尾页</font>"
  168.   else
  169.     response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&"&oklook="&request("oklook")&">"
  170.     response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&"&oklook="&request("oklook")&">尾页</a>"
  171.   end if
  172.    response.write "<font color='#000080'>&nbsp;页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
  173.     response.write "<font color='#000080'>&nbsp;共<b>"&totalnumber&"</b>个会员 <b>"&maxperpage&"</b>个会员/页</font> "
  174.    response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput value="&currentpage&">"
  175.    response.write " <input class=buttonface type='submit'  value='Goto'  name='cndok'></span></p></form></p>"
  176.        
  177. end function
  178.    rs.close
  179.    set rs=nothing  
  180.    conn.close
  181.    set conn=nothing
  182.   %>
  183. </body>
  184. </html>