📄 alist.asp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--#include file="conn.asp"-->
<!--#include file="../fn/cut.asp"-->
<!--#include file="seeadmin.asp"-->
<%
call gadmin
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>系统日志列表</title>
<link href="../css/new.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style2 {font-weight: bold}
body {
background-image: url(../images/bei.gif);
background-color: #CCCCFF;
}
.style5 {color: #000000; font-weight: bold; }
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="604" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCFF" bgcolor="#A6CAF0">
<tr><td align="center"><br>
<h2 class="style1">系统日志列表</h2></td>
</tr></table>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#A6CAF0" top="10">
<tr>
<td width="600" height="150" valign="top"><table width="600" height="404" border="0" cellpadding="0" cellspacing="0" bordercolor="#A6CAF0">
<tr>
<td height="500" valign="top" bordercolor="#CCCCCC"><table width="100%" border="1" bordercolor="#CCCCFF">
<tr bordercolor="#CCCCFF">
<td width="15%" align="center"><span class="style5">id编号</span></td>
<td width="15%" align="center"><span class="style5">操作人帐号</span></td>
<td width="45%" height="20" align="center"><span class="style5">操作动作</span></td>
<td width="25%" align="center"><span class="style5">操作时间</span> </td>
</tr>
<script language="javascript">
function pageii(i){
document.gopage.currentpage.value=i;
document.gopage.submit();
}
function pagei(tname){
document.gopage.tname.value=tname;
document.gopage.submit();
}
</script>
<% if request.form("tname")<>"" then
tname=request.form("tname")
strsql9="select * from sysdong where koyee_user='"&tname&"' order by id desc"
else
strsql9="select * from sysdong order by id desc"
end if
set rs9=Server.createObject("adodb.recordset")
rs9.open strsql9,conn,1,1
if rs9.eof then
%>
<tr>
<td bgcolor="#FFFFFF" colspan="17">
<p align="center"><font color="#FF0000">暂时没有任何资料记录!</font></p>
</td>
</tr>
<%
else
const maxperpage=15 '定义每一页显示的数据记录的常量
dim currentpage '定义当前页的变量
rs9.pagesize=maxperpage
currentpage=request.form("currentpage")
if currentpage="" or not Isnumeric(currentpage) then
currentpage=1
elseif currentpage<1 then
currentpage=1
else
currentpage=clng(currentpage)
if currentpage > rs9.pagecount then
currentpage=rs9.pagecount
end if
end if
'如果变量currentpage的数据类型不是数值型
'就1赋给变量currentpage
if not isnumeric(currentpage) then
currentpage=1
end if
dim totalput,n '定义变量
totalput=rs9.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs9.move(currentpage-1)*maxperpage
i=0
%>
<% do while i< maxperpage and not rs9.eof
%>
<tr bordercolor="#CCCCCC"><td align="center"><%=rs9("id")%></td><td align="center"><a href="javascript:pagei('<%=rs9("koyee_user")%>')"><%=rs9("koyee_user")%></a></td>
<td height="20" align="center"> <img src="../images/dian.gif"> <span><%=rs9("koyee_dong")%></span></td><td align="center"><span class="style2"> <%=rs9("arttime")%></span> </td>
</tr>
<%
i=i+1
rs9.movenext
loop
end if
%>
</table>
</center>
</div>
<div align="center">
<center>
<table width="600" border="0" cellpadding="0" cellspacing="0" bordercolor="#CCCCFF">
<tr>
<td width="563">页数:<font color="red"><%=currentpage%></font>/<% =n%>
<% k=currentpage
if k<>1 then%>
[<a class="link" href="javascript:pageii(1);">首页</a>]
[<a class="link" href="javascript:pageii(<%=k-1%>);">上一页</a>]
<%else%>
[首页] [上一页]
<%end if%>
<%if k<>n then%>
[<a class="link" href="javascript:pageii(<%=k+1%>);">下一页</a>]
[<a class="link" href="javascript:pageii(<%=n%>);">尾页</a>]
<%else%>
[下一页] [尾页]
<%end if%>
共有<font color="red"><%=totalput%></font>条记录
</td>
<form action="" method="post" name="pag">
<td width="197" height="23">
<p align="right">
<select onChange="javascript:pageii(document.pag.pag.value)" size="1" id="pag" name="pag" style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 23; width: 96; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%">
<%
i=1
do while not i > n
%>
<option value="<%=I%>" <%if i=currentpage then %>selected<%end if%>>第 <%=i%> 页</option>
<%
i=i+1
loop
%>
</select>
</td>
</form>
<TR>
</TR>
</table></td>
</tr>
</table><hr></td>
</tr>
</table>
<form action="" method="post" name="gopage">
<input type="hidden" name="currentpage" value="">
<input type="hidden" name="tname" value="<%=tname%>">
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -