<!--#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_user_del.asp";
			thisForm.submit();
		}
		}
		if (id==2)
        {

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

		{
		  	thisForm.target='_self';
			thisForm.action="admin_user_vip.asp";
			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 align="center" height="29"  class="tdbar">
<FORM name=sou1 action="?jle=1" method=POST style="line-height: 100%; margin-top: 0; margin-bottom: 0">
<p align="center">用户名：<input type="text" name="T1" size="10">
<input type="submit" value="查找" name="B1">
</form>
</td>
<td width="27%"  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="10">
<input type="submit" value="查找" name="B1">
</form>
</td>
<td width="33%" class="tdbar">
<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> 
    <td height="20" bgcolor="#D9E8FB" align="center">
<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 [user] where username like '%"&trim(request("T1"))&"%' order by zcdata desc,id desc"
Case "2"
sql = "select * from [user] where name like '%"&trim(request("T2"))&"%' order by zcdata desc,id desc"
Case "3"
sql = "select * from [user] where vip=1 order by zcdata desc,id desc"
Case "4"
sql = "select * from [user] where vip<>1 order by zcdata desc,id desc"
Case Else
sql="select * from [user] order by zcdata desc,id desc"
End Select
rs.open sql,conn,1,1
if rs.eof then
response.write "<li>还没有用户数据！"
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="30"> 

<td  bgcolor="#C5D5E4" width="7%"> <div align="center">编号</div> </td>
<td   bgcolor="#C5D5E4" width="10%"> <div align="center">姓名</div></td>
<td   bgcolor="#C5D5E4" width="16%"> <div align="center">登录帐号</div></td>
<td  bgcolor="#C5D5E4" width="9%"><div align="center">登录次数</div></td>
<td  bgcolor="#C5D5E4" width="8%"><div align="center">积分</div></td>
<td   bgcolor="#C5D5E4" width="7%"><div align="center">客币</div></td>
<td  bgcolor="#C5D5E4" width="13%"><div align="center">注册日期</div></td>
<td   bgcolor="#C5D5E4" width="13%"><div align="center">最后登录</td>
<td  align="center"  bgcolor="#C5D5E4" width="7%">操作</td>
<td  align="center"  bgcolor="#C5D5E4" width="7%">选择</td>
</tr>
<%
  dim id
  do while not rs.eof
  id=rs("id")
  %>
<TR bgcolor="#e4edf9" onMouseOver="this.bgColor='#ffffff'" onMouseOut="this.bgColor='#e4edf9'" style="CURSOR:default"> 
<td width="7%" height="24" bgcolor="#EAF0FC">
<p align="center"><%=k+1%></td>
<td width="10%" bgcolor="#EAF0FC">
<p align="center"><%=rs("name")%><%if rs("vip")=1 then%><font color="#0000FF">[VIP]</font><%end if%></td>
<td width="16%" bgcolor="#EAF0FC">
<p align="center"><%=rs("username")%></td>
<td width="9%" bgcolor="#EAF0FC">
<p align="center"><%=rs("dlcs")%></td>
<td width="8%" bgcolor="#EAF0FC">
<p align="center"><%=rs("jf")%></td>
<td width="7%" align="center" bgcolor="#EAF0FC"><%=rs("hb")%>
　</td>
<td width="13%" align="center" bgcolor="#EAF0FC">
<p align="center"><%=datevalue(rs("zcdata"))%></td>
<td width="13%" bgcolor="#EAF0FC">
<p align="center"><%=datevalue(rs("lastdl"))%></td>
<td width="7%" align="center" bgcolor="#EAF0FC">
<font color="#FF0000">
<span id="followImg<%=k%>" style="CURSOR: hand" onClick="loadThreadFollow(<%=k%>,5)">
管理</span></font></td>
<td width="7%" align="center" bgcolor="#EAF0FC">
<input type="checkbox" name="selectedid" value="<%=trim(rs("username"))%>"></td>
</tr>
<tr style="display:none" id="follow<%=k%>">
<td colspan="10" class="tdbar">
<table border="0" cellpadding="0" width="100%">
<tr>

<td  width="197">
<p align="center"><%if rs("vip")=0 then%><a href="admin_user_vip.asp?selectedid=<%=trim(rs("username"))%>&jle=vip"><font color="#0000FF">设为VIP会员</font></a><%else%><a href="admin_user_vip.asp?selectedid=<%=trim(rs("username"))%>"><font color="#FF0000">取消VIP</font></a><%end if%></td>
<td ><font color="#666666"><a href="#" ONCLICK="window.open('admin_user_edit.asp?id=<%=id%>','Sample','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=489,height=330,left=300,top=100')">修改资料</a></font></td>
<td >
<a target="_blank" title="最后登录IP" href="http://www.ip138.com/ips.asp?ip=<%=rs("ip")%>">
<font color="#FF0000">最后登录IP：<%=rs("ip")%></a></td>
<td ><font color="#0000FF">
<a href="admin_user_del.asp?selectedid=<%=trim(rs("username"))%>"><font color="#0000FF">删除</font></a></font></td>
<td ><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_user_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 colspan="10" height="30"><p align="center">
<INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>选中所有记录&nbsp;&nbsp; 
<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">
          
</td>
</tr>
</form>
</table></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 height="17" width="151" align="center"  class="tdbar">
共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录</td>
<td height="17" width="181" align="center"  class="tdbar">
共 <font color="#CC5200"><%=Allpage%></font> 页</td>
<td height="17" width="237" align="center"  class="tdbar">
现在是第 
<font color="#CC5200"><%=ThisPage%></font> 页</td>
<td height="17" width="200" 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"))&">首页</a>&nbsp;"
response.write "<a href=?page="&ThisPage-1&"&t1="&trim(request("t1"))&">上一页</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"))&">下一页</a>&nbsp;"   
response.write "<a href=?page="&Allpage&"&t1="&trim(request("t1"))&">尾页</a>&nbsp;"     
end if
%></td>
</tr>
</table></div>