📄 admin_log.asp
字号:
<%if session("pass")<>"ok" then
Response.Redirect "index.asp"
Response.End
end if
%>
<!--#include file="conn.asp"-->
<!--#include file="ChkURL.asp"-->
<html>
<head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css">
</head>
<script src="../js/js_Affiche.js"></script>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<%
sql="select * from Tab_Log order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
rs.pagesize=10
'实现分页
if rs.Eof then
rs_total = 0
else
rs_total = rs.RecordCount
end if
dim pageno
maxpage=rs.pagecount
getpageno = (Request("pageno"))
if(getpageno = "")then
pageno = 1
else
pageno = getpageno
End if
if(not rs.Eof)then
rs.AbsolutePage = pageno
End if
%>
<table cellpadding="0" cellspacing="1" border="0" width="100%" class="TableBorder" align=center>
<tr align="center">
<td height=25 colspan=2 class="TableTitle1"><strong>日 志 管 理</strong></tr>
<tr>
<td width="100" height=25 class="TableRow2"><strong>管理快捷方式:</strong></td>
<td height="25" class="TableRow2" ><a href="Admin_main.asp">管理首页</a>
| <a href="admin_log_dele.asp">清空记录</a> </td>
</tr>
</table>
<form name="Del_Affiche" method="post">
<TABLE border=0 cellPadding=0 cellSpacing=0 width=100% align=center class="border">
<TBODY>
<TR>
<TD align=center width=100%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="TableBorder">
<tr>
<td width="10%" height="25" align="center" class="TableTitle1" >ID</td>
<td width="34%" height="25" align="center" class="TableTitle1" >登录用户</td>
<td width="31%" height="25" align="center" class="TableTitle1" >登录时间</td>
<td width="25%" height="25" align="center" class="TableTitle1" >登录IP</td>
</tr>
<%
If(rs.Eof)Then
%>
<tr>
<td height="120" colspan="9" align="center" class="TableRow2">没有登录记录!</td>
</tr>
<!--#include file="copyright.asp" -->
<%
Response.End()
End If
repeat_rows = 0
While(repeat_rows < rs.PageSize and Not rs.Eof)
%>
<%AfficheId=rs("AfficheId")%>
<tr>
<td width="10%" height="25" align="center" class="TableRow2" ><%=rs("id")%></td>
<td width="34%" height="25" align="center" class="TableRow2" ><font color="#FF0000"><b><%=rs("UserName")%></b></font></td>
<td width="31%" height="25" align="center" class="TableRow2" ><%=rs("dTime")%></td>
<td width="25%" height="25" align="center" class="TableRow2" ><%=rs("dIP")%></td>
</tr>
<%
repeat_rows = repeat_rows + 1
rs.MoveNext
Wend
%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center>
<tr>
<td height="8" colspan=5></td>
</tr>
<tr>
<td><table width="98%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#799AE1" bordercolordark="#ffffff">
<tr>
<td><table width="98%" border="0" cellspacing="0" cellpadding="0" align=center>
<tr>
<td width="28%" height="26">[<%=pageno%>/<%=rs.pagecount%>] | [共<font color=red><%=rs_total%></font>条] </td>
<td width="72%" align="right"><%
if(pageno <> 1)then
%>
<a href="?condition=<%=getcondition%>&key=<%=getkey%>">第一页</a>
<%
end if
%>
<%
if(pageno <> 1)then
%>
<a href="?condition=<%=getcondition%>&key=<%=getkey%>&pageno=<%=(pageno-1)%>">上一页</a>
<%
end if
%>
<%
'这里要判断一下pageno和rs.pagecount的值相等的情况,如果不判断,当它俩的值相等时,pageno<>cstr(rs.pagecount)还是true
if(instr(pageno,cstr(rs.pagecount)) = 0)then
%>
<a href="?condition=<%=getcondition%>&key=<%=getkey%>&pageno=<%=(pageno+1)%>">下一页</a>
<%
end if
%>
<%
if(instr(pageno,cstr(rs.pagecount)) = 0)then
%>
<a href="?condition=<%=getcondition%>&key=<%=getkey%>&pageno=<%=rs.pagecount%>">最后一页</a>
<%
end if
rs.close
set rs = nothing
%></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</TABLE>
</form>
<!--#include file="copyright.asp" -->
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -