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