<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%if WS_S.MemberPriv("WS_SystemSetOperation")<>1 then HX_GoBack "对不起,您的权限不够!",""
ColumnName="":Tablename="HX_ManageLog":action=request("action")
If action="clear" then 
Orderby=" where WS_UserName='"&LOGINUSERNAME&"' and WS_LogContent='登录成功!' ORDER BY WS_LogTime DESC"
else
Orderby=" ORDER BY WS_LogTime DESC"
end if
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
If action="clear" Then
 set onliners=WS_S.HX_SetRSD("","HX_Online"," where WS_Userid<>"&loginuid)
 if onliners.recordcount>0 then HX_GoBack "当前还有其它员工在线，所以不允许清空，请使用强制清空在线人数功能","wsoasdatabasemanage.asp?action=clearonline"
 if rs.recordcount>0 then conn.execute("delete from HX_ManageLog where WS_Mid<>"&rs("WS_Mid")):HX_GoBack "清空成功","operation.asp" else conn.execute("delete from HX_ManageLog"):HX_GoBack "清空成功","operation.asp"
End If
response.Write "<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>系统日志管理</title><link rel=stylesheet type=text/css href='../HXinclude/HX_Style.css'></head><body topmargin='20' leftmargin='0' bottommargin='0'><table width='596'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#613c25'><tr><td colspan='2' bgcolor=FFFBE8><table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>系统日志</font></td></tr></table><table width='100%'  border='0' cellspacing='1' cellpadding='3' bgcolor=FFFBE8><tr bgcolor='#FFFBE8' class='td4'><td colspan='4' align='right'><table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr><td width='83%'><font color=red>注：点击操作ＩＰ直接锁定此ＩＰ</font></td><td width='17%'><a href='?action=clear'><font color=red>清空所有日志</font></a>&nbsp;</td></tr></table></td></tr><tr bgcolor='#BF9B73' class='td4'><td width='121' align='center'>操作人</td><td width='89' align=center>操作IP</td><td width='222' align=center>操作记录</td><td width='133' align='center'>日 期</td></tr>"
If Rs.recordcount<=0 then
response.write "<tr><td colspan=4 bgcolor=FFFBE8 height=30 align=center>数据库中还没有记录！</font>"
else
	rs.PageSize =15 '每页记录条数
	iCount=rs.RecordCount '记录总数
	iPageSize=rs.PageSize
    	maxpage=rs.PageCount 
    	page=request("page")
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    rs.AbsolutePage=Page
	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	i=0
	do while not rs.EOF
		response.Write "<tr bgcolor='#FFFBE8'><td width='121'>"&WS_S.HX_OutAppointment(rs("WS_Appointment"))&rs("WS_UserName")&"</td><td width='89'><a href='SystemInterviewControl.asp?action=addiplock&startip="&rs("WS_UserIP")&"'>"&rs("WS_UserIP")&"</a></td><td width='222'>"&rs("WS_LogContent")&"</td><td width='133'>"&rs("WS_LogTime")&"</td></tr>"
		i=i+1
	  if i>=rs.PageSize then Exit Do
	  rs.movenext
      loop
      rs.close
      set rs=nothing
      call WS_S.PageControl(iCount,maxpage,page,"border=0 align=right","<p align=right>",4)
  end if
response.Write "</table></td></tr></table>"
%>