Sys_Oper_Log.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:9k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../FS_Inc/Const.asp" -->
  3. <!--#include file="../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../FS_Inc/Function.asp" -->
  5. <!--#include file="../FS_Inc/Func_page.asp" -->
  6. <%'Copyright (c) 2006 Foosun Inc. Code by Simpwind.Xie
  7. Response.Buffer = True
  8. Response.Expires = -1
  9. Response.ExpiresAbsolute = Now() - 1
  10. Response.Expires = 0
  11. Response.CacheControl = "no-cache"
  12. Dim Conn
  13. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo
  14. int_RPP=20'设置每页显示数目
  15. int_showNumberLink_=8 '数字导航显示数目
  16. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  17. str_nonLinkColor_="#999999" '非热链接颜色
  18. toF_="<font face=webdings title=""首页"">9</font>"   '首页 
  19. toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
  20. toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
  21. toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
  22. toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
  23. toL_="<font face=webdings title=""最后一页"">:</font>"
  24. MF_Default_Conn
  25. MF_Session_TF
  26. if not MF_Check_Pop_TF("MF_Log") then Err_Show
  27. if not MF_Check_Pop_TF("MF018") then Err_Show
  28. %>
  29. <html xmlns="http://www.w3.org/1999/xhtml">
  30. <HEAD>
  31. <TITLE>FoosunCMS</TITLE>
  32. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
  33. </HEAD>
  34. <script language="JavaScript" src="../FS_Inc/PublicJS.js" type="text/JavaScript"></script>
  35. <link href="images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  36. <BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 scroll=yes>
  37. <%
  38. Dim obj_Log_Rs,strpage,select_count,select_pagecount,i,Tmp_adminname,Tmp_super,Tmp_Lock,tmp_my,SQL,tmp_admin_name,tmp_SubType
  39. strpage=request("page")
  40. 'if len(strpage)=0 Or strpage<1 or trim(strpage)=""Then:strpage="1":end if
  41. Set  obj_Log_Rs = server.CreateObject(G_FS_RS)
  42. if tRIM(Request("Admin_Name"))<>"" then:tmp_admin_name=" and Admin_Name='"& Trim(Request("Admin_Name")) &"'":else:tmp_admin_name="":end if
  43. if tRIM(Request("SubType"))<>"" then:tmp_SubType=" and Logtype='"& tRIM(Request("SubType")) &"'":else:tmp_SubType="":end if
  44. SQL = "Select ID,LogTitle,LogContent,LogTime,Admin_Name,Logtype  from FS_MF_Oper_Log where ID>0  "& tmp_SubType & tmp_admin_name &" Order by id desc"
  45. obj_Log_Rs.Open SQL,Conn,1,1
  46. %>
  47. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  48.   <tr class="xingmu">
  49.     <td class="xingmu"><a href="#" onMouseOver="this.T_BGCOLOR='#404040';this.T_FONTCOLOR='#FFFFFF';return escape('<div align='center'>FoosunCMS4.0<br> Code by Simpwind.Xie <BR>Copyright (c) 2006 Foosun Inc</div>')" class="sd"><strong>管理员操作日志</strong></a>
  50.       </td>
  51.   </tr>
  52.   <tr class="hback">
  53.     <td><a href="Sys_Oper_Log.asp">首页</a>|<a href="Sys_Oper_Log.asp?SubType=MF">主系统</a>|<a href="Sys_Oper_Log.asp?SubType=NS">新闻</a>|<%if Request.Cookies("FoosunSUBCookie")("FoosunSUBMS")=1 then%><a href="Sys_Oper_Log.asp?SubType=MS">商城</a>|<%end if%><%if Request.Cookies("FoosunSUBCookie")("FoosunSUBDS")=1 then%><a href="Sys_Oper_Log.asp?SubType=DS">下载</a>|<%end if%><%if Request.Cookies("FoosunSUBCookie")("FoosunSUBCS")=1 then%><a href="Sys_Oper_Log.asp?SubType=CS">采集</a>|<%end if%><%if Request.Cookies("FoosunSUBCookie")("FoosunSUBAP")=1 then%><a href="Sys_Oper_Log.asp?SubType=AP">人才</a>|<%end if%><%if Request.Cookies("FoosunSUBCookie")("FoosunSUBHS")=1 then%><a href="Sys_Oper_Log.asp?SubType=HS">房产</a>|<%End if%><%if Request.Cookies("FoosunSUBCookie")("FoosunSUBSS")=1 then%><a href="Sys_Oper_Log.asp?SubType=SS">统计</a>|<%End if%><%if Request.Cookies("FoosunSUBCookie")("FoosunSUBSD")=1 then%><a href="Sys_Oper_Log.asp?SubType=SD">供求</a>|<%End if%><%if Request.Cookies("FoosunSUBCookie")("FoosunSUBME")=1 then%><a href="Sys_Oper_Log.asp?SubType=ME">会员</a>|<%end if%><%if Request.Cookies("FoosunSUBCookie")("FoosunSUBVS")=1 then%><a href="Sys_Oper_Log.asp?SubType=VS">投票</a>|<%End if%><%if Request.Cookies("FoosunSUBCookie")("FoosunSUBAS")=1 then%><a href="Sys_Oper_Log.asp?SubType=AS">广告</a>|<%End if%><%if Request.Cookies("FoosunSUBCookie")("FoosunSUBWS")=1 then%><a href="Sys_Oper_Log.asp?SubType=WS">留言本</a>|<%end if%><%if Request.Cookies("FoosunSUBCookie")("FoosunSUBFL")=1 then%><a href="Sys_Oper_Log.asp?SubType=FL">友情连接</a><%End if%> <a href="Sys_Login_Log.asp"><strong>安全日志</strong></a></td>
  54.   </tr>
  55. </table>
  56. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  57.   <form name="LogForm" method="post" action="">
  58.     <tr class="hback"> 
  59.       <td width="17%" height="25" class="xingmu"> <div align="left">标题(点标题查看操作描述)</div></td>
  60.       <td width="13%" height="25" class="xingmu"> <div align="center">日期</div></td>
  61.       <td width="18%" height="25" class="xingmu"> <div align="center">管理员</div></td>
  62.       <td width="11%" height="25" class="xingmu"> <div align="center">子系统</div></td>
  63.     </tr>
  64.     <%
  65. if obj_Log_Rs.eof then
  66.    obj_Log_Rs.close
  67.    set obj_Log_Rs=nothing
  68.    Response.Write"<TR  class=""hback""><TD colspan=""6""  class=""hback"" height=""40"">没有操作。</TD></TR>"
  69. else
  70. obj_Log_Rs.PageSize=int_RPP
  71. cPageNo=NoSqlHack(Request.QueryString("Page"))
  72. If cPageNo="" Then cPageNo = 1
  73. If not isnumeric(cPageNo) Then cPageNo = 1
  74. cPageNo = Clng(cPageNo)
  75. If cPageNo>obj_Log_Rs.PageCount Then cPageNo=obj_Log_Rs.PageCount 
  76. If cPageNo<=0 Then cPageNo=1
  77. obj_Log_Rs.AbsolutePage=cPageNo
  78. for i=1 to obj_Log_Rs.pagesize
  79. if obj_Log_Rs.eof Then exit For 
  80. %>
  81.     <tr class="hback"> 
  82.       <td height="25"> <div  id=item$pval[CatID]) style="CURSOR: hand"  onmouseup="opencat(Logid<% = obj_Log_Rs("ID")%>);"  language=javascript>·<a href="#"><% = obj_Log_Rs("LogTitle")%></a></div></td>
  83.       <td height="25"><div align="center"> 
  84.           <% = obj_Log_Rs("LogTime")%>
  85.         </div></td>
  86.       <td height="25"><div align="center"> <a href="Sys_Oper_Log.asp?Admin_Name=<% = obj_Log_Rs("Admin_Name")%>"> 
  87.           <% = obj_Log_Rs("Admin_Name")%>
  88.           </a> </div></td>
  89.       <td height="25"><div align="center"> 
  90.           <% = obj_Log_Rs("Logtype")%>
  91.         </div></td>
  92.     </tr>
  93.     <tr valign="top" class="hback" id="Logid<% = obj_Log_Rs("ID")%>" style="display:none"> 
  94.       <td height="32" colspan="4">   
  95.         <% = obj_Log_Rs("LogContent")%>
  96.       </td>
  97.     </tr>
  98.     <%
  99. obj_Log_Rs.movenext
  100. Next
  101. %>
  102.     <tr class="hback"> 
  103.       <td height="25" colspan="4"><div align="right"> 
  104.           <input name="Action" type="hidden" id="Action">
  105.           <input type="button" name="Submit222" value="删除所有日志,只能删除最近<% = G_HOLD_LOG_DAY_NUM %>天以前的日志"   onClick="document.LogForm.Action.value='Del';{if(confirm('确定清除日志吗?')){this.document.LogForm.submit();return true;}return false;}">
  106.         </div></td>
  107.     </tr>
  108.     <tr class="hback">
  109.       <td height="25" colspan="4"><span class="tx">子系统类型说明</span><br>
  110.         MF-主系统 NS-新闻系统 MS-商城 DS-下载 CS-采集系统 AP-人才系统 HS-房产系统 <br>
  111.         SS-统计系统 ME-会员系统 VS-投票系统 AS-广告系统 WS-留言系统 FL-友情联接</td>
  112.     </tr>
  113.   </form>
  114. </table>
  115. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  116.   <tr height="1" class="hback"> 
  117.     <td height="25"> 
  118.       <%
  119. response.Write "<p>"&  fPageCount(obj_Log_Rs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)
  120.     End if%>
  121.     </td>
  122.   </tr>
  123. </table>
  124. <script language="javascript" type="text/javascript" src="../../FS_Inc/wz_tooltip.js"></script>
  125. </body>
  126. </html>
  127. <%
  128. set obj_Log_Rs = nothing
  129. if Request.Form("Action")="Del" then
  130. if not MF_Check_Pop_TF("MF020") then Err_Show
  131. Dim obj_DLog_rs,strShowErr,tmp_i,DatAllowDate,f_Sql
  132. Set  obj_DLog_rs = server.CreateObject(G_FS_RS)
  133. DatAllowDate=dateadd("d",-G_HOLD_LOG_DAY_NUM,date())
  134. If G_IS_SQL_DB=1 then
  135. f_Sql = "Select ID from FS_MF_Oper_Log Where logtime<='" & DatAllowDate & " 23:59:59' Order by  id desc"
  136. Else
  137. f_Sql = "Select ID from FS_MF_Oper_Log Where  logtime<=#" & DatAllowDate & " 23:59:59# Order by  id desc"
  138. End If
  139. obj_DLog_rs.Open f_Sql,Conn,1,3
  140. tmp_i = 0 
  141. Do while not obj_DLog_rs.eof 
  142. Conn.execute("Delete From FS_MF_Oper_Log where ID="&obj_DLog_rs("ID"))
  143. obj_DLog_rs.movenext
  144. tmp_i = tmp_i +1 
  145. Loop
  146. if tmp_i>0 then
  147. Call MF_Insert_oper_Log("删除操作日志","删除所有操作日志,删除共"& tmp_i &"个日志",now,session("admin_name"),"MF")
  148. End if
  149. strShowErr = "<li>日志删除成功,共删除"& tmp_i &"个日志</li>"
  150. Response.Redirect("Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  151. Response.end
  152. obj_DLog_rs.close:set obj_DLog_rs = nothing
  153. End if
  154. Set Conn = Nothing
  155. %>
  156. <script language="JavaScript" type="text/JavaScript">
  157. function opencat(cat)
  158. {
  159.   if(cat.style.display=="none"){
  160.      cat.style.display="";
  161.   } else {
  162.      cat.style.display="none"; 
  163.   }
  164. }
  165. </script>
  166. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->