<!--#include file="conn.asp"-->
<!--#include file="inc/cookies_check.asp"-->
<!--#include file="inc/Page_cls.asp"-->
<%
'*****************************************
'* 软件名称 乐彼网上开店软件(56770 EShop)
'* 软件开发 http://www.56770.com
'* 版权所有 http://www.56770.com
'* 文件名称 Admin_log.asp
'* 最后更新 2010-12-28 by 56770.kingdge
'*****************************************
Dim admin_flag
admin_flag=",10.2,"
include "lang/"& LangFilePath &"/lang_sys.inc"
include "lang/"& LangFilePath &"/lang_menu.inc"
include "lang/"& LangFilePath &"/lang_flag.inc"
CurrentId = 0
CurrentUrl = "admin_log.asp"
LB_Head()
LB_Menu()
Response.Write("<div class=""mainbody"">")
Response.Write("<div class=""mainbody2"">")
If Eshop_Lebi_name="" Or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 Then
	    adminflag()
Else
		If OutSubmit = 1 Then CheckOutSubmit()
		Select Case Request("action")
			   Case Else
					Loglist()
		End Select
End If
Response.Write("</div>")
Response.Write("</div>")
LB_Footer()

Sub Loglist()
		If IsSqlDataBase =1 Then
				conn.execute("delete from [Lebi_manage_log] where datediff(d,l_time,"&sqlnowstring&")>30")
		Else
				conn.execute("delete from [Lebi_manage_log] where datediff('d',l_time,"&sqlnowstring&")>30")
		End If
	    keyword = safereplace(request("keyword"))
		l_name = safereplace(request("l_name"))
        page = CheckNum(request("page"),1)
		pagenum = CheckNum(request("pagenum"),15)
		datefrom = safeReplace(request("datefrom"))
		dateto = safeReplace(request("dateto"))
		Dim ors
		Set ors=new Cls_vbsPage
		Set ors.Conn=conn
		With ors
		.PageSize=pagenum
		.PageName="Page"
		If IsSqlDataBase = 0 Then
				.DbType="AC"
		Else
				.DbType="MSSQL"
		End If
		.RecType=-1
		.Pkey="l_id"
		.Field="l_name,l_time,l_info,l_url"
		.Table="[Lebi_manage_log]"
		sql = "1=1"
		if keyword<>"" Then sql = sql &" and (l_info like '%"& keyword &"%' or l_url like '%"& keyword &"%')"
		If l_name <> "" Then sql = sql &" and l_name='"&l_name&"'"
		If IsSqlDataBase = 1 And datefrom<>"" And dateto<>"" Then sql=sql + " and DateDiff(d,l_time,'"& datefrom &"')<=0 and DateDiff(d,l_time,'"& dateto &"')>=0"
		If IsSqlDataBase = 0 And datefrom<>"" And dateto<>"" Then sql=sql + " and DateDiff('d',l_time,'"& datefrom &"')<=0 and DateDiff('d',l_time,'"& dateto &"')>=0"
		.Condition=sql
		.OrderBy="l_time desc"
		End With
		DataCount=ors.RecCount()
		DataList=ors.ResultSet()
%>
		<script language="javascript" type="text/javascript" src="inc/js/MyCalendar.js"></script>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="classtable-top">
		<tbody>
		<form name="form" action="?" method="get">
		<tr>
		<td height="30" class="classhead">
		<table border="0" cellspacing="0" cellpadding="0">
		<tr>
		<td>
		<select name="l_name">
		<option value="">┌ <%=Lang_Flag(60)%></option>
		<option value="">├ <%=Lang_Flag(61)%></option>
		  <% Set rs=conn.execute("select admin_name,id from [Lebi_adminuser]")
			 If Not rs.eof then
					 Do While Not rs.eof
					 response.write "<option value="""&rs("admin_name")&""""& judge2(rs("admin_name"),l_name) &">├ "&rs("admin_name")&"</option>"
					 rs.movenext
					 Loop
			 End If
			 rs.close:Set rs=Nothing
		  %>
		</select>
		</td>
		<td style="padding-left:5px;">
		 <input type="text" name="dateFrom" value="<%=dateFrom%>" size="12" class="form_calendar" onclick="setday(this)" /> - <input type="text" name="dateTo" value="<%=dateTo%>" size="12" class="form_calendar" onclick="setday(this)" />
		</td>
		<td style="padding-left:5px;">
		<input type="text" name="keyword" value="<%= keyword %>" class="form_query" size="15"><input name="Submit" type="submit" value="" title="<%=Lang_sys(25)%>" align="absmiddle" class="btn_query"><input type="hidden" name="pagenum" value="<%= pagenum %>">
		</td>
		</tr>
		</table>
		</td>
		<td class="classhead" align="right">
		<%=QuickMenu("admin_sql.asp|"& Lang_Menu(150) &"","admin_count.asp|"& Lang_Menu(151) &"")%>
		</td>
		</tr>
		</form>
		</table>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="classtable2" id="classtable">
		<tr>
		<td height="30" class="classhead" align="right" colspan="4"><%=ors.ShowPageHead(page)%></td>
		</tr>
		  <tr>
			<td width="10%" height="30" class="classtop"><%=Lang_Flag(1)%></td>
			<td width="15%" class="classtop"><%=Lang_Flag(62)%></td>
			<td width="40%" class="classtop"><%=Lang_Flag(63)%></td>
			<td width="35%" class="classtop"><%=Lang_Flag(64)%></td>
		  </tr>
		<%
		If DataCount >0 Then
				For i = 0 To Ubound(DataList,2)
		%>
		  <tr class="classrow">
			<td height="30" class="classrow"><%=DataList(0,i)%></td>
			<td height="30" class="classrow"><%=DataList(1,i)%></td>
			<td height="30" class="classrow"><%=DataList(2,i)%></td>
			<td height="30" class="classrow"><%If Len(DataList(3,i))>30 Then
			response.write"<span title="""& DataList(3,i) &""">"& left(DataList(3,i),45)&"...</span>"
			Else
			response.write DataList(3,i)
			End If%></td>
		  </tr>
		<%
				Next
		End If
		%>
		</form>
		<tr>
			<td height="30" class="classfooter" colspan="2"><%=GetPageNum(15,pagenum)%></td>
			<td height="30" class="classfooter" align="right" colspan="2"><%=ors.ShowPageFoot(page)%></td>
		</tr>
		<tr>
		<td colspan="4" class="classfaq">
		  <div class="faq_main">
		  <p class="faq_title"><%=Lang_sys(49)%></p>
		  <%=Lang_Flag(65)%>
		  </div>
		</td>
		</tr>
		</tbody>
		</table>
		<script>tdshow("classtable");</script>
<%End sub%>