📄 log.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("user")="" or session("group")<>1 then
response.write("<script>alert('您没有权限,请与管理员联系');window.location.href('vir.asp')</script>")
response.end
end if
%>
<%
dim page
page=cint(request.querystring("page"))
if page<1 then
page=1
end if
%>
<%
set rs=server.CreateObject("adodb.recordset")
cmd="select * from log"
rs.open cmd,conn,1,1
if rs.eof then
response.write("<script>alert('无相关日志!');window.location.href('vir.asp')</script>")
response.end
else
rs.pagesize=20
dim pgcount,rcount
pgcount=rs.pagecount
rcount=rs.recordcount
if page>pgcount then page=pgcount
rs.absolutepage=page
end if
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style2 {
color: #6699CC;
font-size: 12px;
}
.style3 {color: #FFFFFF; font-size: 12px; }
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<table width="700" border="0" align="center" bgcolor="#6699cc">
<tr>
<td colspan="2"><span class="style3">登陆日志查看[<a href="dellogall.asp" class="style3">清空日志</a>]</span></span></td>
</tr>
<%
dim i
i=0
while not rs.eof and i<20
%>
<tr>
<td width="610" bgcolor="#FFFFFF"><span class="style2">
<% =rs("log")%>
</span></td>
<td width="80" bgcolor="#FFFFFF"><a href="dellog.asp?id=<%=rs("id")%>"><img src="images/a_delete.gif" width="52" height="16" border="0" /></a></td>
</tr>
<%
i=i+1
rs.movenext
wend
%>
</table>
<table width="700" border="0" align="center">
<tr>
<td><div align="center"><span class="style2">共有
<%=rs.recordcount %>
条记录,</span><a href="log.asp?id=<%=page-1%>" class="style2">上一页</a> </span><a href="log.asp?page=<%=page+1%>" class="style2">下一页</a></div></td>
</tr>
</table>
<p> </p>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -