<!--#include file ="Conn.asp"-->
<!--#include file ="Check_Manager.asp"-->
<html>
<head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><LINK href="admin/admin.css" type=text/css rel=stylesheet><script language="JavaScript" src="admin/js.js"></SCRIPT>
</head>
<SCRIPT language=javascript>
function ConfirmDel()
{
   if(confirm("确定要清空系统日志吗？一旦删除将不能恢复！"))
     return true;
   else
     return false;	 
}
</Script>
<%
If Request.QueryString("action")="del" Then
Conn.ExeCute("Delete * From [JaSys]")
JaSys("管理员" & session("ManagerUser")&"<font color=red>清空系统管理日志</font>")
Response.write "<script language='javascript'>" & chr(13)
		response.write "alert('日志清空成功！');" & Chr(13)
		response.write "window.document.location.href='JaSys.asp';"&Chr(13)
		response.write "</script>" & Chr(13)
Response.End
Else
%>
<body text="#000000">
<br>
<table width="95%" border="0" align="center" cellpadding="4" cellspacing="0" class=tableBorder>
  <tr> 
    <td height="25" background="admin/admin_bg_1.gif"><div align="center"><strong><font color="#FFFFFF">系统安全日志</font></strong></div></td>
  </tr>
 
    <%
page=request.querystring("page")
PageSize = 20
SqlStr = "Select * From [JaSys] Order By ID DESC"
Set rs=Server.CreateObject("Adodb.Recordset")
rs.Open SqlStr,Conn,3,3
rs.PageSize = PageSize
TotalPages=rs.pagecount
if page="" or clng(page)<1 then page=1
if clng(page) > TotalPages then page=TotalPages
if TotalPages>0 then rs.AbsolutePage=page
count = 0
Do While Not rs.Eof and count<rs.PageSize
%>
 <tr><td>
系统信息：时间 <b><%=Rs("Ja_time")%></b> 接收IP <font color=#990000><%=Rs("Ja_ip")%></font> 的操作  <b><%=Rs("Ja_Uinfo")%></b> 
    </td> </tr>
       <%
count = count+1
rs.MoveNext
Loop
rs.Close
Set rs=Nothing
%>
 
</table>
<table width="80%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><div align="center"><%
Response.Write "共" & TotalPages & "页<b>"
beginpage=1
endpage=Totalpages
if TotalPages>=5 then
  if page>=3 then
    beginpage=page-2
    if page<=(TotalPages-2) then
      endpage=page+2
    else
      endpage=TotalPages
      beginpage=TotalPages-4
    end if
  else
    beginpage=1
    endpage=5
  end if
end if
if beginpage>1 then response.write"<a href='JaSys.Asp?page=1'>&lt&lt</a>"
for i=beginpage to endpage
  if i=Cint(page) then
    response.write " [<font color=red>"&  i &"</font>]"
  else
    response.write " [<a href='JaSys.Asp?page="&i&"'>"&i&"</a>]"
  end if
next
if endpage<TotalPages then response.write " <a href=JaSys.Asp?page="&TotalPages&">&gt&gt</a>"
%></div></td>
  </tr>
</table>
  
<table width="80%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><div align="center"><a href="JaSys.Asp?action=del" onclick="return ConfirmDel();"><strong>清空系统管理日志</strong></a></div></td>
  </tr>
</table>
<%
End If
%>