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

家庭/个人应用

开发平台:

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. <!--#include file="top1.asp"-->
  21. <center>
  22. <%
  23.    MaxPerPage=20
  24.    dim totalPut   
  25.    dim CurrentPage
  26.    dim TotalPages
  27.    dim i,j
  28.    dim typename
  29.    
  30.    typename=""
  31.    if not isempty(request("page")) then
  32.       currentPage=cint(request("page"))
  33.    else
  34.       currentPage=1
  35.    end if
  36.    dim sql
  37.    dim rs
  38.    dim rstype
  39.    if request("page")="" then
  40.    page=0
  41.    end if
  42. %> <center>
  43. <%
  44. if request("userid123")="" then  
  45.  sql="select * from tolook order by id desc"
  46. else  
  47.  sql="select * from tolook where userid like '%"&request("userid123")&"%' order by id desc"
  48. end if
  49. Set rs= Server.CreateObject("ADODB.Recordset")
  50. rs.open sql,conn,1,1
  51.   if rs.eof and rs.bof then
  52.        response.write "<p align='center'> 还 没 有 任 何 软 件</p>"
  53.    else
  54.   totalPut=rs.recordcount
  55.       totalPut=rs.recordcount
  56.       if currentpage<1 then
  57.           currentpage=1
  58.       end if
  59.       if (currentpage-1)*MaxPerPage>totalput then
  60.    if (totalPut mod MaxPerPage)=0 then
  61.      currentpage= totalPut  MaxPerPage
  62.    else
  63.       currentpage= totalPut  MaxPerPage + 1
  64.    end if
  65.       end if
  66.        if currentPage=1 then
  67.            showpage totalput,MaxPerPage,"userlook.asp"
  68.             showContent
  69.             showpage totalput,MaxPerPage,"userlook.asp"
  70.        else
  71.           if (currentPage-1)*MaxPerPage<totalPut then
  72.             rs.move  (currentPage-1)*MaxPerPage
  73.             dim bookmark
  74.             bookmark=rs.bookmark
  75.            showpage totalput,MaxPerPage,"userlook.asp"
  76.             showContent
  77.              showpage totalput,MaxPerPage,"userlook.asp"
  78.         else
  79.         currentPage=1
  80.            showpage totalput,MaxPerPage,"userlook.asp"
  81.            showContent
  82.            showpage totalput,MaxPerPage,"userlook.asp"
  83.       end if
  84.    end if
  85.    end if
  86.         
  87.   
  88.    sub showContent
  89.        dim i
  90.    i=0
  91.   %>
  92. <form method="POST" action="userlook.asp" align=" center">
  93.   <p align="center"><b>会员帐号:</b><input type="text" name="userid123" size="20">
  94.   <input type="submit" value="查询">
  95. </form>
  96. <p><br>
  97. <a href="DELoklook30.ASP">删除已超过一个月的记录 </a><br><a href="DELoklook.ASP">删除已超过一个星期的记录 </a></p>
  98. <table border="0" cellspacing="1" width="100%" class="border" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="2" height="48" style="border-collapse: collapse" bordercolor="#111111">
  99.     <tr> 
  100.       <td width="75" height="21" align="center" bgcolor="#429AEF"><b> <font color="#FFFFFF">会员帐号</font></b></td>
  101.       <td width="56" height="21" align="center" bgcolor="#429AEF"><font color="#FFFFFF"><b>会员等级</b></font></td>
  102.       <td width="125" height="21" align="center" bgcolor="#429AEF"><font color="#FFFFFF"><b>会员IP</b></font></td>
  103.       <td width="58" height="21" align="center" bgcolor="#429AEF"><font color="#FFFFFF"><b>观看方式</b></font></td>
  104.       <td width="132" height="21" align="center" bgcolor="#429AEF"><font color="#FFFFFF"><b>观看时间</b></font></td>
  105.       <td width="148" height="21" align="center" bgcolor="#429AEF"><font color="#FFFFFF"><b>观看电影</b></font></td>
  106.     </tr>
  107.      <%do while not rs.eof%>
  108.     <tr> 
  109.       <td width="75" height="23"  align="center" class="tdbg"> <u> 
  110.         </u></a><a href="useredit.asp?userid=<%=rs("userid")%>" target="_blank"><u><%=rs("userid")%></u></a></td>
  111.       <td width="56" height="23"  align="center" class="tdbg"> 
  112.         <%if rs("oklook")=1 then 
  113. oklook="普通会员"
  114. elseif rs("oklook")=2 then
  115. oklook="白银会员"
  116. elseif rs("oklook")=3 then
  117. oklook="黄金会员"
  118. elseif rs("oklook")=4 then
  119. oklook="钻石会员"
  120. end if 
  121. %><%=oklook%></td>
  122.       <td width="125" height="23"  align="center" class="tdbg"><%=rs("userip")%> </td>
  123.       <td width="58" height="23"  align="center" class="tdbg"> <%=rs("lookordown")%> </td>
  124.       <td width="132" height="23"  align="center" class="tdbg"><%=rs("looktime")%> </td>
  125.       <td width="148" height="23"  align="center" class="tdbg"><%=rs("title")%> </td>
  126.     </tr>
  127.       <% i=i+1
  128.       if i>=MaxPerPage then exit do
  129.       rs.movenext
  130.    loop
  131.   %>
  132.   </table>
  133. <div align="center">
  134.   <center>
  135.         
  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 "<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>"
  162.        
  163. end function
  164.     
  165.     rs.close
  166.     set rs=nothing  
  167.    conn.close
  168.    set conn=nothing
  169.   %>    </center>
  170.   </div>
  171. </center>
  172. </body>
  173. </html>