📄 list_history.asp
字号:
<!--#include file="include.asp"-->
<%
user=trim(request("user"))
if not session("log") then response.redirect "login.asp"
if request.form("del")<>empty then call del_hist()
sql="select * from cnt_history where user01='"&user&"' order by date01 desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof then
response.write "没有历史记录!"
conn.close()
set conn=nothing
response.end
end if
%>
<html>
<head>
<title>::查看历史记录::</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
td { font-size: 9pt}
input { font-size: 9pt}
.unnamed1 { color: #FFFFFF; background-color: #000000}
-->
</style>
</head>
<body bgcolor="#6A4F9A">
<form method="post" action="list_history.asp?user=<%=user%>">
<table width="639" border="1" bgcolor="#EAEAEA" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF">
<tr align="center">
<td height="22" width="21"> </td>
<td height="22" width="124">用户名</td>
<td height="22" width="169">记录日期</td>
<td height="22" width="169">访问次数</td>
<td height="22" width="134">IP次数</td>
</tr>
<% while not rs.eof %>
<tr align="center">
<td height="22" width="21">
<input type="checkbox" name="flag" value="<%=rs("id")%>">
</td>
<td height="22" width="124"><font color="#990033"><%=rs("user01")%></font></td>
<td height="22" width="169"><font color="#990033"><%=rs("date01")%></font></td>
<td height="22" width="169"><font color="#990033"><%=rs("vi_num")%></font></td>
<td height="22" width="134"><font color="#990033"><%=rs("ip_num")%></font></td>
</tr>
<%
rs.movenext
wend
%>
</table>
<table width="640" border="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr align="center">
<td>
<input type="submit" name="del" value="删除选定记录" class="unnamed1">
<input type="button" name="Submit2" value="重新选择" class="unnamed1">
</td>
</tr>
</table>
</form>
</body>
<%
rs.close()
conn.close()
set rs=nothing
set conn=nothing
%>
</html>
<%
function del_hist()
idstr=trim(request.form("flag"))
sql="delete cnt_history where id in ("&idstr&")"
conn.execute(sql)
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -