<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="inc_style.css" rel="stylesheet" type="text/css">
<script>
function loadThreadFollow(t_id,b_id){
	var targetImg =eval("document.all.followImg" + t_id);
	var targetDiv =eval("document.all.follow" + t_id);
	
	if ("object"==typeof(targetImg)){
		if (targetDiv.style.display!='block'){
			targetDiv.style.display="block";
			
		}else{
			targetDiv.style.display="none";
		}
	}
}
</script>
<SCRIPT language=JavaScript>
function showoperatealert(id)
{
		if (id==1)
        {

		{
		  	thisForm.target='_self';
			thisForm.action="admin_shop_del.asp";
			thisForm.submit();
		}
		}
		if (id==2)
        {

		{
		  	thisForm.target='_self';
			thisForm.action="admin_shop_vip.asp?jle=vip";
			thisForm.submit();
		}
		}
		if (id==3)
        {

		{
		  	thisForm.target='_self';
			thisForm.action="admin_shop_vip.asp";
			thisForm.submit();
		}
		}
		if (id==4)
        {

		{
		  	thisForm.target='_self';
			thisForm.action="admin_shop_vip.asp?jleyz=ok";
			thisForm.submit();
		}
		}

}

function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'chkall' )
       e.checked = form.chkall.checked;
    }
  }
//-->
    </SCRIPT>
<body topmargin="0" leftmargin="0">
<div class="kon"></div>
<div align="center">
<table width="96%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#c5cfe0" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
    <tr align="center" bgcolor="#FFFFFF" height="20"> 
<td width="51%" height="29" align="center"  class="tdbar" >
<FORM name=sou2 action="?jle=2" method=POST style="line-height: 100%; margin-top: 0; margin-bottom: 0">
<p align="center">[姓名][用户名][关键字]：<input type="text" name="T2" size="32">
<input type="submit" value="查找" name="B1">
</form>
</td>
    
<td width="49%" height="20"  class="tdbar"  style="margin-top: 0; margin-bottom: 0">
<a href="?jle=5">未(<font color="#FF0000">ⅹ</font>)验证商家</a>---<a href="?jle=6">已(√)验证商家</a>-<font color="#0000FF">--<a href="?jle=3"><font color="#0000FF">VIP商家</font></a></font>---<a href="?jle=4">非VIP商家</a>---<a href="?">所有商家会员</a></td>
</tr>
</table>
</div>
<div class="kon"></div>
<div align="center">
<table width="96%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#c5cfe0" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
    <tr align="center" bgcolor="#FFFFFF" height="20"> 
<td align="center" height="29"  class="tdbar">
<table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#c5cfe0" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">

<FORM name=thisForm action="" method=POST style="line-height: 100%; margin-top: 0; margin-bottom: 0">
<%
dim rs,sql,k,jle,rs1
dim ThisPage,Pagesize,Allrecord,Allpage
if request("page")="" then
  ThisPage=1		
else
  ThisPage=request("page")
end if
jle=request("jle")
set rs = Server.CreateObject("ADODB.RecordSet")
set rs1 = Server.CreateObject("ADODB.RecordSet")
Select Case jle
Case "1"
sql = "select * from [jle_shop] where username like '%"&trim(request("T1"))&"%' or com like '%"&trim(request("T2"))&"%' order by lastdl desc,id desc"
Case "2"
sql = "select * from [jle_shop] where name like '%"&trim(request("T2"))&"%' or com like '%"&trim(request("T2"))&"%' or comabout like '%"&trim(request("T2"))&"%' order by lastdl desc,id desc"
Case "3"
sql = "select * from [jle_shop] where vip=1 order by lastdl desc,id desc"
Case "4"
sql = "select * from [jle_shop] where vip<>1 order by lastdl desc,id desc"
Case "5"
sql = "select * from [jle_shop] where yz=0 order by lastdl desc,id desc"
Case "6"
sql = "select * from [jle_shop] where yz=1 order by lastdl desc,id desc"
Case Else
sql="select * from [jle_shop] order by lastdl desc,id desc"
End Select
rs.open sql,conn,1,1
if rs.eof then
response.write "还没有任何用户数据！"
response.end
end if
rs.Pagesize=20
Pagesize=rs.Pagesize
Allrecord=rs.Recordcount
Allpage=rs.Pagecount
if ThisPage<1 then                           
ThisPage=1
end if
On Error Resume Next
rs.move (ThisPage-1)*Pagesize
k=0
%>
        <tr align="center" bgcolor="#FFFFFF" height="20"> 
<td align="center" height="29" class="tdbar">
<p align="center">编号</td>
<td height="30" bgcolor="#FEEEBC" class="tdbar">
<p align="center">姓名</td>
<td height="30" bgcolor="#FEEEBC" class="tdbar">
<p align="center">登录帐号</td>
<td height="30" bgcolor="#FEEEBC" class="tdbar">
<p align="center">登录次数</td>
<td height="30" bgcolor="#FEEEBC" class="tdbar">
<p align="center">积分</td>
<td height="30" bgcolor="#FEEEBC" class="tdbar" align="center">客币</td>
<td height="30" bgcolor="#FEEEBC" class="tdbar">
<p align="center">注册时间</td>
<td height="30" bgcolor="#FEEEBC" class="tdbar">
<p align="center">最后登录</td>
<td height="30" align="center" bgcolor="#FEEEBC" class="tdbar">
审核</td>
<td height="30" align="center" bgcolor="#FEEEBC" class="tdbar">
操作</td>
<td height="30" align="center" bgcolor="#FEEEBC" class="tdbar">
选择</td>
</tr>
<%
  dim id
  do while not rs.eof
  id=rs("id")
  %>
<TR bgcolor="#e4edf9" onMouseOver="this.bgColor='#dedede'" onMouseOut="this.bgColor='#e4edf9'" style="CURSOR:default"> 
<td height="24">
<p align="center"><%=k+1%></td>
<td height="24">
<p align="center"><a  title="<%=rs("name")%>" target="_blank" href="../shop/sp<%=rs("mb")%>.asp?m=<%=rs("username")%>"><%=rs("com")%></a><%if rs("vip")=1 then%><font color="#0000FF">[VIP]</font><%end if%></td>
<td height="24">
<p align="center"><%=rs("username")%></td>
<td height="24">
<p align="center"><%=rs("dlcs")%></td>
<td height="24">
<p align="center"><%=rs("jf")%></td>
<td height="24" align="center"><%=rs("hb")%>
　</td>
<td height="24">
<p align="center"><%=datevalue(rs("zcdata"))%></td>
<td height="24">
<p align="center"><%=datevalue(rs("lastdl"))%></td>
<td height="24" align="center"><%if rs("yz")="1" then%>√<%else%><b><font color="#FF0000">×</font></b><%end if%></td>
<td height="24" align="center">
<font color="#FF0000">
<span id="followImg<%=k%>" style="CURSOR: hand" onClick="loadThreadFollow(<%=k%>,5)">
管理</span></font></td>
<td height="24" align="center">
<input type="checkbox" name="selectedid" value="<%=trim(rs("username"))%>"></td>
</tr>
<tr style="display:none" id="follow<%=k%>">
<td width="99%" height="25" colspan="11" bgcolor="#E4EDF9">
<table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="100%">
<tr>

<td bgcolor="#FFFFFF">
<p align="center"><%if rs("vip")=0 then%><a href="admin_shop_vip.asp?selectedid=<%=trim(rs("username"))%>&jle=vip"><font color="#0000FF">设为VIP商家</font></a><%else%><a href="admin_shop_vip.asp?selectedid=<%=trim(rs("username"))%>"><font color="#FF0000">取消VIP</font></a><%end if%></td>
<td bgcolor="#FFFFFF"><font color="#666666"><a href="#" ONCLICK="window.open('admin_shop_edit.asp?id=<%=id%>','Sample','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=200,height=150,left=300,top=100')">修改积分/客币</a></font></td>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF">
<a target="_blank" title="最后登录IP" href="http://www.ip138.com/ips.asp?ip=<%=rs("ip")%>">
<font color="#FF0000">最后登录IP：<%=rs("ip")%></font></a></td>
<td bgcolor="#FFFFFF"><font color="#0000FF">
<a href="admin_shop_del.asp?selectedid=<%=trim(rs("username"))%>"><font color="#0000FF">删除</font></a></font></td>
<td bgcolor="#FFFFFF"><font color="#666666">
<%
dim m
set rs1=conn.execute("select count(id) from [jle_info] where username='"&rs("username")&"'")
m=rs1(0)
rs1.close
%>
<a target="_blank" href="admin_shop_edit.asp?id=<%=id%>&jle=qian">商家会员管理面板</a>[<%=m%>条信息]</font></td>
</tr>
</table>
</td>
</tr>
<%
    k=k+1
    rs.movenext
    if k>=Pagesize then exit do
	loop
	rs.close
    set rs=nothing
    set rs1=nothing
    closedb
	%>
<tr>
<td height="30" colspan="11"><p align="center">
<INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>全选&nbsp;&nbsp;<input onclick=javascript:showoperatealert(4) type="submit" value="审核" name="sh"> 
<input onclick=javascript:showoperatealert(1) type="submit" value="删除用户" name="B1"> 
<input onclick=javascript:showoperatealert(2) type="submit" value="设为VIP" name="B2" style="color: #0000FF"> 
<input onclick=javascript:showoperatealert(3) type="submit" value="取消VIP" name="B3"> 
<input onclick=javascript:showoperatealert(4) type="submit" value="取消审核" name="yz">
</td>
</tr>
</form>
</table></td></tr></table><br>
<table width="96%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#c5cfe0" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
    <tr align="center" bgcolor="#FFFFFF" height="20"> 
<td align="center" height="29"  class="tdbar">
共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录</td>
<td width="181" height="17" align="center"  class="tdbar">
共 <font color="#CC5200"><%=Allpage%></font> 页</td>
<td width="237" height="17" align="center"  class="tdbar">
现在是第 
<font color="#CC5200"><%=ThisPage%></font> 页</td>
<td width="200" height="17" align="center"  class="tdbar">
<%
if ThisPage<2 then     
response.write "<font color=""#808080"">首页</font>&nbsp;"
response.write "<font color=""#808080"">上一页</font>&nbsp;"     
else     
response.write "<a href=?page=1&t1="&trim(request("t1"))&"&jle="&jle&">首页</a>&nbsp;"
response.write "<a href=?page="&ThisPage-1&"&t1="&trim(request("t1"))&"&jle="&jle&">上一页</a>&nbsp;"     
end if
if Allpage-ThisPage<1 then     
response.write "<font color=""#808080"">下一页</font>&nbsp;"
response.write "<font color=""#808080"">尾页</font>&nbsp;"  
else     
response.write "<a href=?page="&(ThisPage+1)&"&t1="&trim(request("t1"))&"&jle="&jle&">下一页</a>&nbsp;"   
response.write "<a href=?page="&Allpage&"&t1="&trim(request("t1"))&"&jle="&jle&">尾页</a>&nbsp;"     
end if
%></td>
</tr>
</table>
</div>