📄 admin_admin.asp
字号:
<%@ codepage ="936" %><%if instr(session("flag"),"81")=0 thenresponse.write "<SCRIPT language=JavaScript>alert('对不起,你没有权限打开此页!');"response.write"this.location.href='../login.asp';</SCRIPT>" response.endend if%><!--#include file="../../conn/dbconn2.asp" --><link rel="stylesheet" type="text/css" href="../style.css"><BODY topMargin=0 leftmargin="0" marginheight="0"><%if not isempty(request("selAnnounce")) thenidlist=request("selAnnounce")if instr(idlist,",")>0 thendim idarridArr=split(idlist)dim idfor i = 0 to ubound(idarr)id=clng(idarr(i))call deleteannounce(id)nextelsecall deleteannounce(clng(idlist))end ifend if dim totalPutmaxperpage=5 dim CurrentPagedim TotalPagesdim i,jif not isempty(request("page")) thencurrentPage=cint(request("page"))elsecurrentPage=1end ifdim rsdim sqlset rs=server.createobject("adodb.recordset") sql="select * from manage_user order by ID"rs.open sql,conn,1,1 if rs.eof and rs.bof then response.write "<p align='center'>对不起,没有您要查询的信息</p>" else totalPut=rs.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if end if if currentPage=1 then showContentelse if (currentPage-1)*MaxPerPage<totalPut then rs.move (currentPage-1)*MaxPerPage dim bookmark bookmark=rs.bookmark showContentelse currentPage=1 showContentend if end if rs.close end if set rs=nothingsub showContent %><CENTER><br><Form name="search" method="POST" action="admin_admin.asp"><TABLE width="600" border="0" cellspacing="0" cellpadding="0"><TR height=25><TD align="left" class="f11">系统管理员管理(点击用户名进行相应操作)--</TD><TD align="right"><img border="0" src="../images/Add1.gif"><font color=#ff0000> <a href="admin_admin_ok.asp?action=add"><font color="#FF0000">添 加</font></a></font></TD></TR></TABLE><TABLE border=1 cellPadding=4 cellSpacing=0 width="600" bordercolorlight="#E8F4FF" bordercolordark="#E8F4FF" style="border-collapse: collapse" bordercolor="#111111"><TR height=28 bgcolor="#99ccff"> <TD width="8%" align="center">ID号</td><TD width="25%" align="center">用户名</td><TD width="25%" align="center">密码</td><TD width="20%" align="center">最后登录时间</td><TD width="20%" align="center">最后登录IP</td><TD width="12%" align="center"><input type='submit' value='删除' class=smallInput></td></TR><%do while not rs.eof%><TR height="28" bgcolor="#ffffff"> <TD width="8%" align="center"><font face="Arial"><b><%=rs("id")%></b></font> </td><TD width="25%" align="center"><a href="admin_admin_ok.asp?id=<%=rs("id")%>"><%=rs("username")%></a> </td><TD width="25%" align="center"><%=rs("password")%> </td><TD width="30%" align="center"><%=rs("LastLogin")%> </td><TD width="20%" align="center"><%=rs("LastLoginIP")%> </td><TD width="12%" align="center"><input class=smallInput type='checkbox' name='selAnnounce' value='<%=cstr(rs("id"))%>'></td></TR><% I=I+1IF I>=MaxPerPage then exit doRS.movenextLOOP%><TR><TD colspan="7" height="35"><%showpage totalput,MaxPerPage,"system_admi.asp"%></TD></TR></TABLE></CENTER><%end subfunction showpage(totalnumber,maxperpage,filename) dim n if totalnumber mod maxperpage=0 then n= totalnumber \ maxperpage else n= totalnumber \ maxperpage+1 end if if CurrentPage<2 then response.write "<center>" response.write "<table border=0 width=600 cellspacing=0 cellpadding=0 bgcolor=#99ccff>" response.write "<tr height=25>"response.write "<td align=left>"response.write "共<font color=#ff6600><b>"&n&"</b></font>页 第<font color=#ff6600><b>"&CurrentPage&"</b></font>页 共检索到<font color=#ff6600><b>"&totalnumber&"</b></font>条相关信息</td>" response.write "<td align=right>"response.write "【最前页】【上一页】" else response.write "<center>" response.write "<table border=0 width=600 cellspacing=0 cellpadding=0 bgcolor=#99ccff>"response.write "<tr height=25>"response.write "<td align=left>"response.write "共<font color=#ff6600><b>"&n&"</b></font>页 第<font color=#ff6600><b>"&CurrentPage&"</b></font>页 共检索到<font color=#ff6600><b>"&totalnumber&"</b></font>条相关信息</td>" response.write "<td align=right>"response.write "【<a href="&filename&"?page=1>最前页</a>】" response.write "【<a href="&filename&"?page="&CurrentPage-1&">上一页</a>】 " end if if n-currentpage<1 then response.write "【下一页】【最后页】" else response.write "【<a href="&filename&"?page="&(CurrentPage+1)&">"response.write "下一页</a>】【<a href="&filename&"?page="&n&">最后页</a>】" end if response.write "</td>"response.write "</tr>"response.write "</form>"response.write "</table>"end functionsub deleteannounce(id)dim rs,sqlset rs=server.createobject("adodb.recordset")sql="delete from [Manage_User] where id="&cstr(id)conn.execute sqlEnd sub%></CENTER>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -