<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="../Inc/Conn.asp" -->
<!--#include file="../Inc/SK.Session.asp" -->
<!--#include file="../Inc/SK.Funtion.asp" -->
<!--#include file="../Inc/SK.PageClass.asp" -->
<%if Not (Session("Manager")="1" OR (JudgePopedomTF(Session("UserName"),"SK900000000") AND JudgePopedomTF(Session("UserName"),"SK910000004"))) then Call ReturnError1()%>
<%
'Delete begin
if F("id")<>"" and RQ("Action")="Del" then
conn.execute("delete from SK_SystemEvent where EID in("&F("id")&")")
'Event Begin
if getconfig("SK_Event")=0 then
set rsEvent=server.createobject("adodb.recordset")
sqlEvent="select * from SK_SystemEvent"
rsEvent.open sqlEvent,conn,1,3
rsEvent.AddNew
rsEvent("SK_Title")="删除用户操作日志"
rsEvent("SK_User")=Session("UserName")
rsEvent("SK_Time")=Now()
rsEvent("SK_IP")=request.ServerVariables("Remote_Addr")
rsEvent.Update
rsEvent.Close 
set rsEvent=Nothing
end if
'Event End
Call Returnokback()
end if

if RQ("Action")="DelAll" then
conn.execute("delete from SK_SystemEvent")
'Event Begin
if getconfig("SK_Event")=0 then
set rsEvent=server.createobject("adodb.recordset")
sqlEvent="select * from SK_SystemEvent"
rsEvent.open sqlEvent,conn,1,3
rsEvent.AddNew
rsEvent("SK_Title")="清空用户操作日志"
rsEvent("SK_User")=Session("UserName")
rsEvent("SK_Time")=Now()
rsEvent("SK_IP")=request.ServerVariables("Remote_Addr")
rsEvent.Update
rsEvent.Close 
set rsEvent=Nothing
end if
'Event End
Call Returnokback()
end if
'Delete End

Set Page = new MyPages				'创建对象
Set Page.Conn = conn				'得到数据库连接对象
With Page
if Cint(F("PNum"))="" then
.PageSize=20		             '每页记录条数
else
.PageSize=Cint(F("PNum"))		'每页记录条数
end if
.PageParm = "P"					'页参数
'.PageIndex = 10				'当前页，可选参数，一般是生成静态时需要
.Database = "mssql"				'数据库类型,AC为access,MSSQL为sqlserver2000存储过程版,MYSQL为mysql,PGSQL为PostGreSql
.Table="SK_SystemEvent"				'表名
.Pkey="EID"						'主键
.Field="*"	'字段

.Condition=""		'条件,不需要where
.OrderBy="EID Desc"			'排序,不需要order by,需要asc或者desc
'//指定排序条件结束

.RecordCount = 0	'总记录数，可以外部赋值，0不保存（适合搜索），-1存为session，-2存为cookies，-3存为applacation
.NumericJump = 3 '数字上下页个数，可选参数，默认为3，负数为跳转个数，0为显示所有
.Template = "总记录数：{$RecordCount} 总页数：{$PageCount} 每页记录数：{$PageSize} 当前页数：{$PageIndex} {$FirstPage} {$PreviousPage} {$NumericPage} {$NextPage} {$LastPage} {$InputPage} {$SelectPage}" '整体模板，可选参数，有默认值
.FirstPage = "首页" '可选参数，有默认值
.PreviousPage = "上一页" '可选参数，有默认值
.NextPage = "下一页" '可选参数，有默认值
.LastPage = "尾页" '可选参数，有默认值
.NumericPage = " {$PageNum} " '数字分页部分模板，可选参数，有默认值
End With
rs = Page.ResultSet() '记录集
rc = Page.RowCount() '可选，输出总记录数
nav = Page.Nav() '分页样式
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>用户操作日志</title>
<META http-equiv=Page-Enter content=SKCRM>
<META http-equiv=Page-Exit content=SKCRM>
<META content="MSHTML 6.00.3790.2858" name=GENERATOR>
<LINK href="../images/style.css" type=text/css rel=stylesheet>
<script type="text/javascript" src="../Inc/Check.js"></script>
<script>
function sh(id)
{
if (id==1)
 {
 {
 thisForm.target='_self';
 thisForm.action="?Action=Del";
 thisForm.submit();
 }
 }

if (id==2)
 {
 {
 thisForm.target='_self';
 thisForm.action="?Action=DelAll";
 thisForm.submit();
 }
 }
}
</script>
<style type="text/css">
<!--
body {
margin: 5px 0px 0px 0px;
overflow-x: hidden;
}
-->
</style>
</head>

<body>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<TBODY>
  <tr>
    <td class="SK_Td_Top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="25"><img src="../images/tab_03.gif" width="12" height="25" /></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="46%" valign="middle">用户操作日志</td>
<td width="54%"></td>
</tr>
</table></td>
        <td width="16"><img src="../images/tab_07.gif" width="16" height="25" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>
	
<table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>
<td width="8" background="../images/tab_12.gif"></td>
<td>

<%
If IsNull(Rs) Then
response.write"对不起，没有你要的信息!"
else
%>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6">
<form name="thisForm" id="form1" method="post" action="">	  
<tr><td width="20" class="SK_Title">
<input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form)" style="border:0" /></td>
<td width="583" class="SK_Title">操作行为</td>
<td width="99" class="SK_Title">用户名</td>
<td width="113" class="SK_Title">操作者IP</td>
<td width="148" class="SK_Title">操作时间</td>
</tr>
<%For i=0 To Ubound(Rs,2)%>
<tr onMouseOver="changeto()" onMouseOut="changeback()">
<td <%if i mod 2 = 0 then%>class="SK_Text"<%else%>class="SK_Texttwo"<%end if%>><input type="checkbox" name="ID" value="<%=Rs(0,i)%>" style="border:0"></td>
<td <%if i mod 2 = 0 then%>class="SK_Text1"<%else%>class="SK_Text1two"<%end if%>><%=left(Rs(1,i),35)%></td>
<td <%if i mod 2 = 0 then%>class="SK_Text"<%else%>class="SK_Texttwo"<%end if%>><%=Rs(2,i)%></td>
<td <%if i mod 2 = 0 then%>class="SK_Text"<%else%>class="SK_Texttwo"<%end if%>><%=Rs(3,i)%></td>
<td <%if i mod 2 = 0 then%>class="SK_Text"<%else%>class="SK_Texttwo"<%end if%>><%=Rs(4,i)%></td>
</tr>
<%next%>
</form>
<tr>
<td colspan="5" class="SK_Text">
<input type="button" name="Del" value="删除" class="button1" onClick="if (confirm('温馨提示:删除后的数据将无法恢复,是否要删除?')){sh(1)}" /> <input type="button" name="DelAll" value="清空" class="button1" onClick="if (confirm('温馨提示:清空后的数据将无法恢复,是否要删除?')){sh(2)}" /></td>
</tr>
<tr>
<td colspan="5" class="SK_Text"><%Response.Write nav%></td>
</tr>
</table>
<%end if%>
</td>
<td width="8" background="../images/tab_15.gif"></td>
</tr>
</table></td>
</tr>
<tr>
<td class="SK_Td_Foot">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%" height="20"><img src="../images/tab_18.gif" width="12" height="20" /></td>
<td width="98%" class="SK_Td_Page"></td>
<td width="1%"><img src="../images/tab_20.gif" width="16" height="20" /></td>
</tr>
</table>
	
</td>
</tr>
</TBODY>
</table>
</body>
<%
Page = Null
Set Page = Nothing
Call CloseDB()
%>
</html>