<!--#include file="inc_const.asp"-->
<%response.expires=0
Response.CacheControl = "Private"
application.lock

set cschat=server.createobject("ffcschat.cssbchat")
my_level=cschat.getLevel(Session,Application(ConstStr & "_user_list"),Application(ConstStr & "_room_list"))
set cschat=nothing
application.unlock

if my_level-Application( ConstStr & "_viewsystemlog")<0 then
  response.redirect("showerr.asp?errtext=你没有看任何聊务公开的权限！")
  response.end
end if

Set Conn=Server.CreateObject("ADODB.Connection")
conn.open Application( ConstStr & "_connstr")

sql="select * from record "
ssort=trim(request("ssort"))

if (ssort<>"grade" or my_level-Application( ConstStr & "_viewgradelog")<0) and (ssort<>"admin" or my_level-Application( ConstStr & "_viewmanagelog")<0) then
  ssort="sys"
end if

if ssort="sys" then
  tstr="管理日志"
  sql=sql&"where stype<30"
elseif ssort="grade" then
  tstr="升级日志"
  sql=sql&"where stype=30"
else
  tstr="备案日志"
  sql=sql&"where stype>30"
end if

dim rootRs
Set rootRs=Server.CreateObject("ADODB.RecordSet")
sql=sql&" order by id desc"
pagesize=20
rootRs.Open sql,conn,1,1
if my_level-Application( ConstStr & "_superlevel")=0 then
  super=true
else
  super=false
end if%>
<META content="text/html; charset=gb2312" http-equiv=content-type>
<link rel="stylesheet" type="text/css" href="chat.css">
<style>td{text-align:center;}</style>
<body  style="background-color:EAF2FF;color:112233;scrollbar-Base-Color: #b0d8ff;SCROLLBAR-DARKSHADOW-COLOR:#b0d8ff;SCROLLBAR-arrow-COLOR:#336699;SCROLLBAR-TRACK-COLOR: EAF2FF;SCROLLBAR-3DLIGHT-COLOR: #b0d8ff;SCROLLBAR-SHADOW-COLOR: #336699;SCROLLBAR-HIGHLIGHT-COLOR: #b0d8ff;" leftmargin=3 topmargin=10>
<table cellspacing=0 cellpadding=0 align=center width=100% height=100%><script src="showad.asp?id=1"></script><tr><td valign=center>
  <table width=90% align=center cellspacing=0 cellpadding=0 border=1 BORDERCOLORLIGHT=#000000 BORDERCOLORDARK=#ffffff>
    <tr><td td colspan=7 class=navy2 >聊务公开[<%=tstr%>]</td></tr>
    <form action="record.asp" method="post"><input type=hidden name=ssort value="<%=ssort%>">
    <tr><td colspan=7 >只保留最近10天的记录。 [<a href="record.asp?ssort=sys">管理日志</a>]
 <%if my_level-Application( ConstStr & "_viewgradelog")>=0 then%>[<a href="record.asp?ssort=grade">升级日志</a>] <%end if%><%if my_level-Application( ConstStr & "_viewmanagelog")>=0 then%>[<a href="record.asp?ssort=admin">备案日志</a>] <%end if%>
    <%If rootRs.Bof OR rootRs.Eof Then%>
       <br><font color=red>没有找到任何记录。</font>
     <%else
       rootRs.pagesize=pagesize
       page=Request("page")
       if not IsNumeric(page) or page="" then page=1
       if (page-1)<0 then
           page=rootRs.pagecount
       elseif (page-rootRs.pagecount)>0 then
           page=1
       end if
       rootRs.AbsolutePage=page
       RowCount =rootRs.pagesize%>
       <tr><td class=navy1><font color=009999>第<%=page%>页 共<%=rootRs.pagecount%>页</font>
       <a href='record.asp?page=<%=(page-1)%>&ssort=<%=ssort%>'>上一页<a> <a
       href='record.asp?page=<%=(page+1)%>&ssort=<%=ssort%>'>下一页<a> <a href="record.asp?page=<%=page%>&ssort=<%=ssort%>">刷新浏览</a> 转到 <input
       type="text" name="page" size=6 maxlength=20> 页 <input class=navy2 type=submit name=cmdGo value="GO!" title="转到其他页">
        </td></tr></form>
        <script>
     function a(j,t,w,m,d,y,i,f){
     if (i!='') y=y+"<font color=black>("+i+")</font>";
     y="<font color=8800cc> "+y+" </font>"
     d=d.replace("%%",y)+"</font>";
     var str="<tr><td colspan=7 style=text-align:left><font color=blue>第"+j+"条 <font color=000099>"+t+" ["+w+"] "+
       "<font color=8800cc>"+m+"</font> "+d+"<br> <font color=3366cc>&nbsp;&nbsp;&nbsp;&nbsp;【理由: <font color=green>"+f+"</font> 】</font>";
     document.write(str);}
         <%j=(page-1)*pagesize+1
         Do While Not rootRs.Eof AND RowCount>0
             yy=split(rootRs("occ_env"),">")
             m=yy(1)
             if super and trim(yy(2))<>"" then m=m&"("&yy(2)&")"
             response.write "a('"&j&"','"&rootRs("occ_time")&"','"&yy(0)&"','"&m&"','"&yy(6)&"','"&yy(3)&"','"&trim(yy(4))&"','"&yy(5)&"');"
             rootRs.MoveNext
             j=j+1
             RowCount=RowCount-1
           Loop%></SCRIPT></td></tr>
       <form action="record.asp" method="post"><input type=hidden name=ssort value="<%=ssort%>">
       <tr><td nowrap class=navy1 colspan=7 ><font color=009999>第<%=page%>页 共<%=rootRs.pagecount%>页</font>
       <a href='record.asp?page=<%=(page-1)%>&ssort=<%=ssort%>'>上一页<a> <a
       href='record.asp?page=<%=(page+1)%>&ssort=<%=ssort%>'>下一页<a> <a href="record.asp?page=<%=page%>&ssort=<%=ssort%>">刷新浏览</a> 转到 <input
       type="text" name="page" size=6 maxlength=20> 页 <input class=navy2 type=submit name=cmdGo value="GO!" title="转到其他页">
        </td></tr></form>
     <%end if
rootRs.close
Set rootRs=nothing
conn.close
Set conn=nothing%>
</table><tr<td><center><br>[<a href='javascript:history.go(-1)'>后退</a>]</table></body></html>

