?? rizi.asp
字號:
<%
if session("yida_username")="" then
%>
<script language="javascript">
top.location.href="../index.asp"
</script>
<%
response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->
<html>
<head>
<title><%=dianming%> - 登陸日志</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel="stylesheet" type="text/css">
<style>
body {
background-color:#FFFFFF;
}
</style>
</HEAD>
<BODY>
<script>
function CheckAll(form) {
for (var i=0;i<form.elements.length;i++) {
var e = form.elements[i];
if (e.name != 'chkall') e.checked = form.chkall.checked;
}
}
</script>
<%
if fla86="0" and session("shiwei_id")<>"1" then
%>
<br><center><img src="../images/note.gif" align="absmiddle"> <font color="#FF0000">你不具備此權限,請與管理員聯系!</font></center>
<%
response.end
end if
if request("submit1")<>"" then
id=replace(request("id")," ","")
id=split(id,",")
for i=0 to UBound(id)
sql="delete from rizi where id="&id(i)
conn.execute(sql)
next
response.redirect "rizi.asp"
end if
if request("submit2")<>"" then
sql="delete from rizi where 1=1"
conn.execute(sql)
response.redirect "rizi.asp"
end if
if request("submit3")<>"" then
sql="delete from rizi where now()-logindate>30"
conn.execute(sql)
response.redirect "rizi.asp"
end if
'取得當前頁碼
currentpage=request("page")
'response.write currentpage
'response.end
if currentpage<1 or currentpage="" then
currentpage="1"
end if
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="../images/r_1.gif" alt="" /></td>
<td width="100%" background="../images/r_0.gif">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td> 登陸日志</td>
<td align="right">
<input type="button" value="刪除所有日志" onClick="if (confirm('此操作無法恢復!!!請慎重!!!\n\n確定要刪除所有日志嗎?')==true) {window.location.href='?submit2=ok'}" class="button">
<input type="button" value="刪除30天之前的日志" onClick="if (confirm('此操作無法恢復!!!請慎重!!!\n\n確定要刪除所有日志嗎?')==true) {window.location.href='?submit3=ok'}" class="button"> </td>
</tr>
</table>
</td>
<td><img src="../images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<form name="form1" action="">
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<tr align="center">
<td class="category" height="30">登陸用戶</td>
<td class="category">時間</td>
<td class="category">狀態</td>
<td class="category">登陸IP</td>
<td class="category" width="5%">刪除</td>
</tr>
<%
set rs_huiyuan =server.createobject("ADODB.RecordSet")
sql="select * from rizi order by id desc"
rs_huiyuan.open sql,conn,1,3
if not rs_huiyuan.eof then
rs_huiyuan.pagesize=maxrecord
rs_huiyuan.absolutepage=currentpage
for currentrec=1 to rs_huiyuan.pagesize
if rs_huiyuan.eof then
exit for
end if
%>
<tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''">
<td align="center" height="25"><%=rs_huiyuan("username")%></td>
<td align="center"><%=rs_huiyuan("logindate")%></td>
<td align="center"><%=rs_huiyuan("class")%></td>
<td align="center"><%=rs_huiyuan("address")%></td>
<td align="center"><input type="checkbox" name="ID" value="<%=rs_huiyuan("id")%>" style="border:0"></td>
</tr>
<%
rs_huiyuan.movenext
next
else
%>
<tr align="center" onMouseOver="this.className='highlight'" onMouseOut="this.className=''">
<td colspan="10" height="25" align="center" style="color:red"><b>沒有找到記錄</b></td>
</tr>
<%
end if
%>
<%
if rs_huiyuan.recordcount>0 then
%>
<tr>
<td colspan="10" height="30" class="category">
<table cellpadding=0 cellspacing=0 width="100%">
<tr>
<td align="left" style="color:#FF0000;"> </td>
<td align="right">
<%=rs_huiyuan.recordcount%> 條信息 共 <%=rs_huiyuan.pagecount%> 頁
<%
nowstart=currentpage-3
if nowstart<1 then
nowstart=1
end if
nowend=currentpage+3
if nowend>rs_huiyuan.pagecount then
nowend=rs_huiyuan.pagecount
end if
response.write " <a href='?page=1' class='page'>最前頁</a> "
for ipage=nowstart to nowend
if cstr(ipage)=cstr(currentpage) then
response.write " <span style='font-weight:bold;color:#5858E6'>" & ipage &"</span> "
else
response.write " [ <a href='?page="&ipage&"' class='page'>" & ipage &"</a> ] "
end if
next
response.write " <a href='?page="&rs_huiyuan.pagecount&"' class='page'>最后頁</a> "
%>
<%if fla38="1" or session("shiwei_id")="1" then%>
<input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form)" style="border:0"> 全選
<input type="submit" name="submit1" value="刪 除" onClick="return confirm('此操作無法恢復!!!請慎重!!!\n\n確定要刪除所選擇的記錄嗎?')" class="button">
<%end if%>
</td>
</tr></table></td></tr>
<%end if%>
</table>
</form>
</td>
<td></td>
</tr>
<tr>
<td><img src="../images/r_4.gif" alt="" /></td>
<td></td>
<td><img src="../images/r_3.gif" alt="" /></td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -