<html>
<head>
<META content=ywnt,云网互动影视管理系统 name=keywords>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>云网互动影视6.0--日志管理</title>
<LINK href="css/css.css" type=text/css rel=stylesheet>
</head>
<BODY leftMargin=0 topMargin=0 scroll=yes MARGINHEIGHT="0" MARGINWIDTH="0">
<script language="JavaScript" src="YWNT_TMS_Inc/Calendar.js"></script>
<!--#include file="../Conn.asp" -->
<!--#include file="YWNT_TMS_inc/YWNT_TMS_Function.asp" -->
<!--#include file="YWNT_TMS_inc/YWNT_TMS_Page.asp" -->
<%
'===================================================================================================================
'软件名称：云网影视管理系统
'Copyright (C) 2002-2007 ywnt.net  All rights reserved.
'产品咨询QQ：489234,2813712
'程序版权：云网互动科技有限公司
'程序开发：云网互动科技有限公司
'官方网站：http://www.ywnt.net 
'郑重声明:
'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
'    2、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    3、云网互动科技有限公司保留此软件的法律追究权利
'===================================================================================================================
Call CheckLogin("Log")
sub Del()
	DatAllowDate=dateadd("d",-7,date())
	If dbtype=1 then
	conn.execute "delete from YWNT_TMS_Log WHERE Date<='" & DatAllowDate & " 23:59:59'"
	else
	conn.execute "delete from YWNT_TMS_Log WHERE Date<=#" & DatAllowDate & " 23:59:59#"
	End If
	Call AddLog("删除7天前日志",1)
	call Admin_ShowErr("<li>日志删除成功！</li>","Admin_Log.asp",1)
end sub %>
<TABLE class=table cellSpacing=1 cellPadding=3 width="98%" align=center border=0>
  <TBODY>
    <TR>
      <TD class=xingmu colSpan=3>日志管理</TD>
    </TR>
    <TR>
      <TD class="hback"><a href="Admin_Log.asp">全部日志</a> | <a href="Admin_Log.asp?LogType=1">系统</a> | <a href="Admin_Log.asp?LogType=2">发布</a> | <a href="Admin_Log.asp?LogType=3">影片</a> | <a href="Admin_Log.asp?LogType=4">专题</a> | <a href="Admin_Log.asp?LogType=5">直播</a> | <a href="Admin_Log.asp?LogType=6">模版</a> | <a href="Admin_Log.asp?LogType=7">会员</a> | <a href="Admin_Log.asp?LogType=8">财务</a> | <a href="Admin_Log.asp?LogType=9">其它</a> | <a href="Admin_Log.asp?LogType=10">安全</a></TD>
    </TR>
  </TBODY>
</TABLE>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td colspan="5" class=xingmu>日志查询</td>
    </tr>
  <form action="Admin_Log.asp" method="post">
    <tr>
      <td align="right" class="hback">按操作时间查询：</td>
      <td class="hback"><INPUT name=StopDate id=StopDate onfocus=setday(this) value="" size="15" readOnly maskType="longDate" realValue="">
          <IMG onclick=StopDate.focus() src="images/calendar.gif" align=absBottom> 到
        <INPUT name=EndDate id=EndDate onfocus=setday(this) value="" size="15" readOnly maskType="longDate" realValue="">
          <IMG onclick=EndDate.focus() src="images/calendar.gif" align=absBottom></td>
      <td align="right" class="hback">按操作管理员查询：</td>
      <td class="hback"><input name="AdminName" type="text" id="AdminName" size="20"></td>
      <td class="hback"><input type="submit" name="Submit2" value="查 询"></td>
    </tr>
  </form>
  </tbody>
</table>
<%Action=Trim(request.QueryString("Action"))
Select Case Action
Case "Del"
	call Del()
Case else
	call List()
End Select
sub List()
Dim int_RPP
	int_RPP=GetConfig("PageNumber") '设置每页显示数目%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td width="5%" align="center" class=xingmu>ID</td>
      <td align="center" class=xingmu>操作内容</td>
      <td width="15%" align="center" class=xingmu>操作管理员</td>
      <td width="18%" align="center" class=xingmu>时间</td>
      <td width="15%" align="center" class=xingmu>IP</td>
    </tr>
      <%Set Rs = server.CreateObject(YWNT_TMS_RS)
		sql="SELECT ID,Events,AdminName,Date,AdminIP FROM YWNT_TMS_Log"
		if Request.QueryString("LogType")<>"" then
		sql=sql&" where LogType="&NoSqlHack(Request.QueryString("LogType"))&" ORDER BY id DESC"
		elseif Request("StopDate")<>"" and Request("EndDate")<>"" then
		Select Case dbtype
			Case 0
			sql =sql&" where Date>=#"&NoSqlHack(Request("StopDate"))&"# And Date<=#"&NoSqlHack(Request("EndDate"))&"# Order by ID desc" 		
			Case 1
			sql =sql&" where Date>='"&NoSqlHack(Request("StopDate"))&"' And Date<='"&NoSqlHack(Request("EndDate"))&"'  Order by ID desc" 
			End Select
		elseif Request("AdminName")<>"" then
			sql =sql&" where AdminName = '"&NoSqlHack(Request("AdminName"))&"' Order by ID desc"
		else
		sql=sql&" ORDER BY id DESC"
		end if
		Rs.open sql,Conn,1,1
		if RS.eof then
		Response.Write"<tr><td colspan=""5"" height=40 class=""hback"">没有日志</td></tr>"
		else
		Rs.PageSize=int_RPP
		cPageNo=NoSqlHack(Request.QueryString("Page"))
		If cPageNo="" Then cPageNo = 1
		If not isnumeric(cPageNo) Then cPageNo = 1
		cPageNo = Clng(cPageNo)
		If cPageNo>Rs.PageCount Then cPageNo=Rs.PageCount 
		If cPageNo<=0 Then cPageNo=1
		Rs.AbsolutePage=cPageNo 
		for i=1 to int_RPP
	 	if Rs.eof Then exit For%>
    <tr>
      <td height=32 align="center" class="hback"><%=RS("ID")%></td>
      <td height=32 class="hback"><%=RS("Events")%></td>
      <td align="center" class="hback"><%=RS("AdminName")%></td>
      <td align="center" class="hback"><%=RS("Date")%></td>
      <td align="center" class="hback"><%=RS("AdminIP")%></td>
    </tr>
  <%Rs.MoveNext
	next 
	end if%>
    	<tr align="right">
    <td height=32 colspan="9" class="hback"><% response.Write fPageCount(Rs,cPageNo) %></td>
	</tr>
	<%RS.close     
	set RS=nothing%>
    <tr>
      <td height=32 colspan="5" align="center" class="hback"><input type="submit" name="Submit" value="删除日志,系统会自动保留7天内日志" onClick="location.href = 'Admin_Log.asp?Action=Del'"></td>
    </tr>
  </tbody>
</table>
<%end sub
Call connclose()%>
</BODY></HTML>
