<!--#include file="../../conn/conn.asp" -->
<!--#include file="../../Inc/Commoncode.asp" -->
<!--#include file="../checkvalid.asp" -->
<!--#include file="../../inc/memberpagelist.asp" -->
<!--#include file="../../inc/replace.asp" -->
<%
If Not FRAdminLevel(802) Then
	Call ErrorMsg()
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>后台管理LOG日志</title>
<link href="../css/style<%=sk%>.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../inc/input.js"></script>
</head>
<SCRIPT language=javascript>
function unselectall(){
    if(document.myform.chkAll.checked){
 document.myform.chkAll.checked = document.myform.chkAll.checked&0;
    }
}
function CheckAll(form){
  for (var i=0;i<form.elements.length;i++){
    var e = form.elements[i];
    if (e.Name != 'chkAll'&&e.disabled==false)
       e.checked = form.chkAll.checked;
    }
  }
</script>
<body>
<% 
Server.ScriptTimeout=500
URL=Request.ServerVariables("URL")
Action= Request("Action")
Id=Request("id")
if Action="lock" then
	conn.execute("update job_errlog set Sqlin_Killip=1 where id="&id)
elseif Action="unlock" then
	conn.execute("update job_errlog set Sqlin_Killip=0 where id="&id)
end if
if not isempty(request("selAnnounce")) then
idlist=request("selAnnounce")
if instr(idlist,",")>0 then
dim idarr
idArr=split(idlist)
dim log_id
for i = 0 to ubound(idarr)
log_id=clng(idarr(i))
call deleteannounce(log_id)
next
else
call deleteannounce(clng(idlist))
end if
end if 
%>
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center" class="tableBorder">
  <tr>
	<TH colspan="9">网站前台安全日志管理</TH>
  </tr>
 <Form name="form" method="POST" action="dispcont_web.asp"> 
 <tr>
    <td align="center">选中</td>
    <td align="center">编号</td>
    <td align="center">操作ＩＰ</td>
	<td align="center">是否锁定</td>
    <td align="center">操作时间</td>
    <td align="center">操作页面</td>
    <td align="center">提交方式</td>
    <td align="center">提交参数</td>
    <td align="center">提交数据</td>
 </tr><%
  keyword=CheckStr(trim(request("keyword"))) 
  segment=CheckStr(trim(request("segment")))                               
  pgsz=20
  sql="SELECT * FROM job_errlog order by id desc"  
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,1,1
  If not rs.eof then
   rs.pagesize=pgsz
	   if request("Gocurrentpage")<>"" then
		ipage=request("Gocurrentpage")
	   else
		ipage=request("currentpage")
	   end if
	   
	   if ipage="" or ipage=0 then
		ipage=1
	   else
		   if cint(ipage)>cint(rs.pagecount) then
			ipage=rs.pagecount
		   end if
	   end if 
  rs.absolutepage=ipage
  for i=1 to rs.pagesize
Response.Write "<tr align='center'>"
Response.Write "<td><input name='selAnnounce' type='checkbox' class='checkbox' value='"&rs("id")&"'></td>" 
Response.Write "<td>"&rs("id")&"</td>" 
Response.Write "<td>"&rs("Sqlin_IP")&"</td>" 
If rs("Sqlin_Killip")=1 then 
	Response.write "<td><a href="&URL&"?action=unlock&id="&rs("id")&"><font color=red>已锁定</font></a></td>"
Else
	Response.write "<td><a href="&URL&"?action=lock&id="&rs("id")&"><font color=green>未锁定</font></a></td>"
End if
Response.Write "<td>"&rs("Sqlin_TIME")&"</td>" 
Response.Write "<td>"&rs("SqlIn_Web")&"</td>" 
Response.Write "<td>"&rs("SqlIn_FS")&" </td>"
Response.Write "<td>"&rs("SqlIn_CS")&" </td>"
Response.Write "<td>"&rs("SqlIn_SJ")&" </td>"
Response.Write "</tr>" 
rs.movenext 
if rs.eof then exit for 
next
End If
%> 
	<tr>
		<td colspan=10>请选择要删除的事件，
		  <input name='chkAll' type='checkbox' class="checkbox" id='chkAll' onclick='CheckAll(this.form)' value='checkbox'>
		  全选 <input name=act type=submit class="inputs"  onclick="{if(confirm('您确定执行的操作吗?')){this.document.even.submit();return true;}return false;}" value=删除日志>　		
	  </td>
	</tr>
	<tr>
	  <td colspan=10><%call pagelist("dispcont_web.asp","keyword="&keyword&"&segment="&segment&"",rs.pagecount,cint(ipage),rs.recordcount)%></td>
	</tr>
 </form> 
</table>
<% 
rs.close 
sub deleteannounce(log_id)
	dim rs,sql
	set rs=server.createobject("adodb.recordset")
	sql="delete from [job_errlog] where id="&cstr(log_id)
	conn.execute sql
End sub
%>
<!--#include file="../inc/copy.asp"-->