<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Dim NCheck:NCheck=true
%>
<!--#include file="cgi/Config.asp"-->
<%
Dim qstime,qetime,ziliaoku
qstime=request("qstime")
qetime=request("qetime")
l_username=mobj.CheckBadstr(request("l_username"))
if not isdate(qstime) then qstime=""
if not isdate(qetime) then qetime=""
if not mobj.testreg(l_username,"^\w{1,20}$") then l_username=""

Dim page:page=request("page")
If not mobj.testreg(page,"^\d{1,10}$") Then page=1
page=abs(cint(page))
if page=0 then page=1
Dim pages:pages=10
DIm pageSql:pageSql="select count(0) as rcount from b2c_log   "
Dim listSqlFilter:listSqlFilter="l_id>0"
if qstime<>"" then listSqlFilter=listSqlFilter&" and l_date>='"&qstime&" 00:00:00' "
if qetime<>"" then listSqlFilter=listSqlFilter&" and l_date<='"&qetime&" 23:59:59' "
if l_username<>"" then listSqlFilter=listSqlFilter&" and l_username='"&l_username&"' "
Dim allcounts

pStr="admin_log.asp?page=$page$&qstime="&qstime&"&qetime="&qetime&"&"&"l_username="&l_username

listSql="select * from b2c_log where "&listSqlFilter&" order by l_id desc"

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title>管理页面</title>
<meta http-equiv="Expires" Content="0"/>
<meta http-equiv="Cache-Control" Content="no-cache"/>
<meta http-equiv="Pragma" Content="no-cache"/>
<link href="/images/skin_1/style.css" type="text/css" rel="stylesheet"/>
<script language=javascript type="text/javascript" src="/calendar/calendar.js"></script>
<script language=javascript type="text/javascript" src="/js/jquery-1.7.1.min.js"></script>
<script language="javascript">
function cleardate(){
	  $("#qstime").val("");
	  $("#qetime").val("");
		
}
</script>

<base target="_self"/>
</head>
<body class="htmlbody">

<table class="table1" cellspacing="1" cellpadding="3" align="center" border="0">
	<tr>
		<td class="tableline linetitle" width="80" align="left" noWrap="noWrap">登录日志</td>
		<td class="tableline" width="*" align="right">&nbsp;</td>
	</tr>
</table>

<table id="tablehovered" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
	<td class="tablerow1" colspan="5"><form name="search_form" id="search_form" method="get" action="admin_log.asp">
		<span style="position:relative">
		开始日期：<input type=text value="<%=qstime%>" id="qstime" AutoComplete="off"   name=qstime onclick="event.cancelBubble=true;javascript:showCalendar('qstime',true,'qstime','','','','','','','','text','Price');" size="15">&nbsp;&nbsp;结束日期：
	<input type=text value="<%=qetime%>" name=qetime id="qetime" AutoComplete="off"  onclick="event.cancelBubble=true; javascript:showCalendar('qetime',true,'qetime','','','','','','','','text','Price');" size="15">(<a href="javascript:cleardate();">清空日期</a>)
    
    &nbsp;
    &nbsp;
    <select name="l_username" id="l_username">
		
			
			<option value="">所有会员</option>
            <%
			mobj.crs rs
			rs.open "select a_username from b2c_admin ",dstr,1,1
			do while not rs.eof
			%>
			<option value="<%=rs("a_username")%>" <%if l_username=rs("a_username") then response.Write(" selected='selected'")%>><%=rs("a_username")%></option>
            <%
			rs.movenext
			loop
			mobj.drs rs
			%>
			
			
		
        </select>
	<input type="submit" class="button" value="查 询" id="submit_button" name="submit_button">
	<div style="display:none" id="sugAutoComplete" onselectstart="return false">&nbsp;</div></span>
		</form>
	</td>
</tr><tr>
	<th width="5%" noWrap="noWrap">序号</th>
	<th width="15%" align="center">登录帐号</th>
	<th width="34%" noWrap="noWrap">登陆IP</th>
	
	<th width="15%" noWrap="noWrap">登陆时间</th>
	<th width="19%" noWrap="noWrap">审核状态</th>
</tr>


<%

Dim kkk:kkk=1
Dim lindex:lindex=1
set rs=server.CreateObject("adodb.recordset")
rs.open listSql,dStr,1,1
If rs.eof and rs.bof Then
	rs.close
	set rs=nothing							
	allPages=1
else
	allcounts=rs.recordcount
	allPages=fix(allcounts/pages)
	If (allcounts mod pages >0) and allcounts>pages then allPages=allPages+1
	If allPages=0 then allPages=1
	rs.pagesize=pages
	rs.absolutepage=page
	do while not rs.eof  and  pages>0
%>
<tr align="center">
	<td class="tablerow2 hovered"><%=lindex%></td>
	<td class="tablerow2 hovered" align="left"><%=rs("l_username")%>
	
	</td>
	<td class="tablerow2 hovered" noWrap="noWrap"><%=rs("l_ip")%>【<%=GetAddress(rs("l_ip"))%>】</td>
	
	<td class="tablerow2 hovered" noWrap="noWrap">
    <%=rs("l_date")%>
    
    </td>
	<td class="tablerow2 hovered" noWrap="noWrap"><%
	select case rs("l_ok")
		case 0:response.Write("审核失败")
		case 1:response.Write("审核成功")
		case else:response.Write("未知")
	end select
	%></td>
</tr>
<%
	lindex=lindex+1
	if kkk=2 then kkk=0
	kkk=kkk+1
	pages=pages-1
	rs.movenext
	loop
	rs.close
	set rs=nothing
end if
	
	%>


<tr>
	<td class="tablerow2" align="right" colspan="5" id="NextPageText"><div style="float:left;">
	
	</div>
	<var class="morePage"><b>总数：<%=allcounts%></b><b><%=allPages%></b><code><a href="<%=replace(pStr,"$page$","1")%>"> <  首页</a><%=mObj.PageListActive(page,allPages,pStr)%><a href="<%=replace(pStr,"$page$",allPages)%>">末页  > </a></code></var></td>
</tr>
</table>

<!--#include file="end.asp"--></body></html>
