ifon.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=30
  22.    dim totalPut   
  23.    dim CurrentPage
  24.    dim TotalPages
  25.    dim i,j
  26.    dim usid
  27.    dim typename
  28.    
  29.    typename=""
  30.    if not isempty(request("page")) then
  31.       currentPage=cint(request("page"))
  32.    else
  33.       currentPage=1
  34.    end if
  35.    dim sql
  36.    dim rs
  37.    dim rstype
  38.    dim typesql
  39.    dim typeid,typename1
  40.     if not isEmpty(request("oklook")) then
  41. oklook=request("oklook")
  42.    else
  43. oklook=""
  44.    end if
  45. %>
  46. <!--#include file="top1.asp"-->
  47. <%
  48.  if request("userid123")="" then
  49.  if request("oklook")="" then
  50.  sql="select * from online order by id desc"
  51.  else
  52.  sql="select * from online where grad="&request("oklook")&" order by id desc"
  53.   end if
  54.   
  55.  else
  56.  sql="select * from online where username like '%"&request("userid123")&"%'"
  57.  end if
  58.  Set rs= Server.CreateObject("ADODB.Recordset")
  59.  rs.open sql,conn,1,1
  60.   if rs.eof and rs.bof then
  61.        response.write "<p align='center'> 还 没 有 任 何 会 员</p>"
  62.    else
  63.   totalPut=rs.recordcount
  64.       totalPut=rs.recordcount
  65.       if currentpage<1 then
  66.           currentpage=1
  67.       end if
  68.       if (currentpage-1)*MaxPerPage>totalput then
  69.    if (totalPut mod MaxPerPage)=0 then
  70.      currentpage= totalPut  MaxPerPage
  71.    else
  72.       currentpage= totalPut  MaxPerPage + 1
  73.    end if
  74.       end if
  75.        if currentPage=1 then
  76.            showpage totalput,MaxPerPage,"ifon.asp"
  77.             showContent
  78.             showpage totalput,MaxPerPage,"ifon.asp"
  79.        else
  80.           if (currentPage-1)*MaxPerPage<totalPut then
  81.             rs.move  (currentPage-1)*MaxPerPage
  82.             dim bookmark
  83.             bookmark=rs.bookmark
  84.            showpage totalput,MaxPerPage,"ifon.asp"
  85.             showContent
  86.              showpage totalput,MaxPerPage,"ifon.asp"
  87.         else
  88.         currentPage=1
  89.            showpage totalput,MaxPerPage,"ifon.asp"
  90.            showContent
  91.            showpage totalput,MaxPerPage,"ifon.asp"
  92.       end if
  93.    end if
  94.    end if
  95.    sub showContent
  96.        dim i
  97.    i=0
  98.   %>
  99. <form method="POST" action="ifon.asp" align=" center">
  100.   <p align="center"><b>用户名:</b><input type="text" name="userid123" size="20">
  101.   <input type="submit" value="查询"></p>
  102. </form>
  103. <div align="center"> 
  104.   <center>
  105.     <table width="332" border="0" cellspacing="0" cellpadding="0">
  106.       <tr>
  107.         <td width="332"><p align="center"><a href="wantuserout.asp?want=out">将所有在线用户踢出</a>&nbsp; 
  108.             &nbsp;(普通会员以上)<br>
  109.             <br>
  110.             <a href="USER.ASP">全部会员</a>|<a href="ifon.ASP?oklook='电影游客'">电影游客</a>|<a href="ifon.ASP?oklook='普通会员'">普通会员</a>|<a href="ifon.ASP?oklook='白银会员'">白银会员</a>|<a href="ifon.ASP?oklook='黄金会员'">黄金会员</a>|<a href="ifon.ASP?oklook='钻石会员'">钻石会员</a> </p>
  111.         </td>
  112.       </tr>
  113.     </table>
  114.     <p> 
  115.      
  116.     </p>
  117.     <table border="0" cellspacing="1" width="100%" class="border" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="2" height="31" style="border-collapse: collapse" bordercolor="#111111">
  118.       <tr bgcolor="#429AEF"> 
  119.         <td width="78" height="5" align="center"><font color="#FFFFFF"><b>用户编号</b></font></td>
  120.         <td width="108" height="5" align="center"><font color="#FFFFFF"><b>用户名</b></font></td>
  121.         <td width="109" align="center"><div align="center"><font color="#FFFFFF"><b>姓名</b></font></div></td>
  122.         <td width="109" align="center"><div align="center"><font color="#FFFFFF"><b>登录次数</b></font></div></td>
  123.         <td width="133" align="center"><font color="#FFFFFF"><b>最后活动时间</b></font></td>
  124.         <td width="133" align="center"><font color="#FFFFFF"><b>最后活动IP</b></font></td>
  125.         <td width="137" height="18" align="center"><font color="#FFFFFF"><b>会员等级</b></font></td>
  126.         <td width="73" height="5" align="center"><font color="#FFFFFF"><b>详细信息</b></font></td>
  127.         <td width="65" align="center" height="5"><font color="#FFFFFF"><b>踢出</b></font></td>
  128.       </tr>
  129.       <%do while not rs.eof%>
  130.       <tr> 
  131.         <td height="4" width="78" class="tdbg"> <p align="center"><%=rs("id")%></td>
  132.         <td height="4" width="108"  class="tdbg"> <p align="center"><%=rs("username")%> 
  133.         </td>
  134.         <td width="109"  class="tdbg" align="center"><%=rs("name")%></td>
  135.         <td width="109"  class="tdbg" align="center"><%=rs("times")%></td>
  136.         <td width="133"  class="tdbg" align="center"><%=rs("lastime")%></td>
  137.         <td width="133"  class="tdbg" align="center"><%=rs("userip")%></td>
  138.         <td width="137" height="4"  class="tdbg" align="center"><%=rs("grad")%></td>
  139.         <td width="73" height="4"  class="tdbg"> <p align="center"><font color="#000000"> 
  140.             
  141.             </a><a href="useredit.asp?userid=<%=rs("username")%>" target="_blank">进入</a></font></td>
  142.         <td width="65" height="4"  class="tdbg"> <div align="center"><a href="wantuserout.asp?userid=<%=rs("username")%>">踢出</a></div></td>
  143.       </tr>
  144.            <% i=i+1
  145.       if i>=MaxPerPage then exit do
  146.       rs.movenext
  147.    loop
  148.   %>
  149.     </table>
  150.   </center>
  151. </div>
  152. <%
  153.    end sub 
  154. function showpage(totalnumber,maxperpage,filename)
  155.   dim n
  156.   if totalnumber mod maxperpage=0 then
  157.      n= totalnumber  maxperpage
  158.   else
  159.      n= totalnumber  maxperpage+1
  160.   end if
  161.   response.write "<p align=""center""><form method=Post action="&filename&"?typeid="&typeid&"&oklook="&request("oklook")&">"
  162.     if CurrentPage<2 then
  163.     response.write "<font color='#000080'>首页 上一页</font>&nbsp;"
  164.   else
  165.     response.write "<a href="&filename&"?page=1&typeid="&typeid&"&oklook="&request("oklook")&">首页</a>&nbsp;"
  166.     response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&"&oklook="&request("oklook")&">上一页</a>&nbsp;"
  167.   end if
  168.   if n-currentpage<1 then
  169.     response.write "<font color='#000080'>下一页 尾页</font>"
  170.   else
  171.     response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&"&oklook="&request("oklook")&">"
  172.     response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&"&oklook="&request("oklook")&">尾页</a>"
  173.   end if
  174.    response.write "<font color='#000080'>&nbsp;页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
  175.     response.write "<font color='#000080'>&nbsp;共<b>"&totalnumber&"</b>个会员 <b>"&maxperpage&"</b>个会员/页</font> "
  176.    response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput value="&currentpage&">"
  177.    response.write " <input class=buttonface type='submit'  value='Goto'  name='cndok'></span></p></form></p>"
  178.        
  179. end function
  180.    rs.close
  181.    set rs=nothing  
  182.    conn.close
  183.    set conn=nothing
  184.   %>
  185. </body>
  186. </html>