www.gusucode.com > 星云DJ舞曲 4.5a源码程序 > admin/admin_usermana.asp

    <!--#include file="conn.asp"-->
<!--#include file="checkadmin.inc"-->
<%
list=request("list")
if not isempty(request("page")) then
	currentPage=cint(request("page"))
else
	currentPage=1
end if
%>
<html>
<head>
<title>迪吧后台管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Admin_Style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" id="AutoNumber2">
  <tr class="topbg"> 
    <td height="22" colspan="8" align="center"><strong>注 册 用 户 管 理</strong></td>
  </tr>
  </tr>
    <tr class="tdbg"> 
      <td width="50%" height="30" align="center"><form name=form1 method=post action=admin_usersearch.asp>     
<p>搜索: 
<select name="stype" size="1">
<option value="username" selected>注 册 名</option>
<option value="truename">真实姓名</option>
<option value="email">电子信箱</option>
<option value="oicq">OICQ</option>
<option value="Address">所在地区</option>
</select>
<input size=10 type="text" value="输入关键字" onClick="Javascript:this.value=''" onFocus=this.select() onMouseOver=this.focus() name=keyword maxlength="30">
<input type="submit" align="absmiddle" width="20" height="20" title="查询" id=Image1 name=Image1 value="搜索">
<select size="1" name="list" onchange=window.open('admin_userlist.asp?list='+this.options[this.selectedIndex].value,'_self')>
<option>请选择查询类型</option>
<option value="all">所有会员</option>
<option value="novip">普通会员</option>
<option value="loginsy">登陆次数</option>
<option value="pointsy">会员积分</option>
<option value="Downloadsy">下载次数</option>
<option value="vip">VIP会员</option>
<option value="1">男会员</option>
<option value="0">女会员</option>
</select></p></td></form>
    </tr>
</table>
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" id="AutoNumber3">
  <tr class="title"> 
    <td height="22" colspan="13" align="center">
    <div align="center">
      <center>
<%
set rs=server.createobject("adodb.recordset")
if list="1" then
sql="select * from user where sex='1'"
elseif list="0" then
sql="select * from user where sex='0'"
elseif list="vip" then
sql="select * from user where isvip=true"
elseif list="loginsy" then
sql="select * from user where logins>1 order by logins desc"
elseif list="pointsy" then
sql="select * from user where points>1 order by points desc"
elseif list="Downloadsy" then
sql="select * from user where Downloads>1 order by Downloads desc"
elseif list="novip" then
sql="select * from user where isvip<>true"
elseif list="" or list="all" then
sql="select * from user order by id desc"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then 
	response.write "<p align='center'>暂时没有用户注册</p>" 
else 
	MaxPerPage=20
	PageUrl="admin_UserMana.asp"
	totalPut=rs.recordcount 
	if currentpage<1 then currentpage=1
	if (currentpage-1)*MaxPerPage>totalput then 
		if (totalPut mod MaxPerPage)=0 then 
			currentpage= totalPut \ MaxPerPage 
		else 
			currentpage= totalPut \ MaxPerPage + 1 
		end if 
	end if 
	if currentPage=1 then 
		showContent 
		showpage totalput,MaxPerPage,PageUrl
	else 
		if (currentPage-1)*MaxPerPage<totalPut then 
			rs.move  (currentPage-1)*MaxPerPage 
			dim bookmark 
			bookmark=rs.bookmark 
			showContent 
			showpage totalput,MaxPerPage,PageUrl
		else 
			currentPage=1 
			showContent 
			showpage totalput,MaxPerPage,PageUrl
		end if 
	end if 
end if 
rs.close 
sub showContent 
%>
      <table border="0" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
        <tr>
                <td width="5%" align=center>ID</td>
                <td width="15%" align=center>用户名</td>
                <td width="15%" align=center>注册时间</td>
                <td width="5%" align=center>登陆</td>
                <td width="5%" align=center>积分</td>
                <td width="5%" align=center>下载</td>
                <td width="10%" align=center>省份</td>
                <td width="15%" align=center">登陆IP</td>
                <td width="10%" align=center">加点</td>
                <td width="5%" align=center">修改</td>
                <td width="5%" align=center">锁定</td>
                <td width="5%" align=center">删除</td>
        </tr>
</table></center></div></td></tr>
<%
do while not rs.eof
	i=i+1
%>
    <tr class="tdbg"> 
                <td align=center width="5%"><a href="Admin_UIpList.asp?list=<%=rs("id")%>" title="查看此用户宣传记录"><%=rs("id")%></a></td>
                <td align=center width="15%"><a href="admin_UserModify.asp?id=<%=rs("id")%>" title="用户资料:&#13;&#10;密码:<%=rs("Password")%>&#13;&#10;信箱:<%=rs("Email")%>&#13;&#10;OICQ:<%=rs("oicq")%>&#13;&#10;真实姓名:<%=rs("TrueName")%>&#13;&#10;省份:<%=rs("Address")%>&#13;&#10;联系地址:<%=rs("ContactAddress")%>&#13;&#10;收听:<%=rs("Listens")%>&#13;&#10;登陆:<%=rs("logins")%>&#13;&#10;登陆IP:<%=rs("LoginIP")%>&#13;&#10;最后登陆:<%=rs("lastlogin")%>&#13;&#10;注册时间:<%=rs("addDate")%>&#13;&#10;个人说明:<%=rs("sign")%>"><%=rs("UserName")%></a> &nbsp; <%if rs("isvip")=true then%><font color=FF0000>VIP</font><%end if%></td>
                <td align=center width="15%"><%=rs("addDate")%></td>
                <td align=center width="5%"><%=rs("logins")%></td>
                <td align=center width="5%"><%=rs("points")%></td>
                <td align=center width="5%"><%=rs("Downloads")%></td>
                <td align=center width="10%"><%=rs("Address")%></td>
                <td align=center width="15%"><%=rs("loginip")%></td>
                <td align=center width="10%"><a href="Admin_sc1100add.asp?id=<%=rs("id")%>" onClick="if(!confirm('确认给(<%=rs("UserName")%>)加50元=1100点吗?')){return false;}">50元</a>  /  <a href="Admin_sc2500add.asp?id=<%=rs("id")%>" onClick="if(!confirm('确认给(<%=rs("UserName")%>)加100元=2500点吗?')){return false;}">100元</a></td>
                <td align=center width="5%"><input type=button name=edit value=修改 onclick="javascript:window.open('admin_UserModify.asp?id=<%=rs("id")%>','_self','')"></td>
                <td align=center width="5%"><input type=button name=lock value=<%if rs("lockuser")=false then%>"锁定"<%else%>"开锁"<%end if%> onclick="javascript:window.open('admin_UserSave.asp?id=<%=rs("id")%>&act=lock','_self','')"></td>
                <td align=center width="5%"><input type=button name=del value=删除 onclick="javascript:window.open('admin_Usersave.asp?id=<%=rs("id")%>&act=del','_self','')"></td>
    </tr>
<%
	if i>=MaxPerPage then exit do
rs.movenext
loop
%>
  <tr class="title"> 
    <td height="22" colspan="13" align="center">
    <div align="center">
      <center>
      <table border="0" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
        <tr>
      <td width="100%" align=center></td>
        </tr>
</table></center></div></td></tr>
    </table><br>
      </center>
    </div>
<%
end sub 
function showpage(totalnumber,maxperpage,filename)
if totalnumber mod maxperpage=0 then
	n= totalnumber \ maxperpage
else
	n= totalnumber \ maxperpage+1
end if
%>
<form method=Post action="<%=filename%>">
  <center>
  <p>共<font color="red"><b><%=totalnumber%></b></font>位用户
<%if CurrentPage<2 then%> &nbsp;首页 上一页&nbsp;
<%else%> &nbsp;<a href="<%=filename%>?page=1&list=<%=list%>">首页</a>&nbsp;
  <a href="<%=filename%>?page=<%=CurrentPage-1%>&list=<%=list%>">
  上一页</a>&nbsp;
<%
end if
if n-currentpage<1 then
%> 下一页 末页
<%else%>
  <a href="<%=filename%>?page=<%=CurrentPage+1%>&list=<%=list%>">
  下一页</a>
  <a href="<%=filename%>?page=<%=n%>&list=<%=list%>">
  末页</a>
<%end if%> &nbsp;页次:<strong><font color="red"><%=CurrentPage%>/<%=n%></font></strong>页 
  转到:<select name="page" size="1" onchange="javascript:submit()">
<%for i = 1 to n%>           
  <option value="<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>
  第<%=i%>页</option>   
<%next%>   
  </select> </p>
</form>        
<%end function%>
    <div align="center">
      <center>
    <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" id="AutoNumber2">
 <form method="POST" action="admin_usersave.asp?act=deldate&page=<%=CurrentPage%>" id=form1 name=form1>
  <tr class="topbg"> 
    <td height="22" colspan="2" align="center"><strong>删 除 过 期 用 户</strong></td>
  </tr>
    <tr class="tdbg"> 
      <td width="50%" align="right"><strong>最后登陆间隔天数大于:</strong></td>
      <td width="50%" height="30"><input type="text" name="selectdate" size="20"></td>
    </tr>
    <tr class="tdbg"> 
      <td width="50%" align="right"><strong>登陆次数小于:</strong></td>
      <td width="50%" height="30"><input type="text" name="selecttimes" size="20"></td>
    </tr>
    <tr class="tdbg"> 
      <td height="22" colspan="2" align="center" class="title">
             <input type="submit" value=" 确定 " name="cmdok">&nbsp; 
             <input type="reset" value=" 清 除 "  name="cmdcancel">
        </td>
    </tr>
</table>
      </center>
    </div>
</td>
  </tr>
  </table>
  </center>
</div>
</td>
      </tr>
    </table>
    </td>
  </tr>
  </table>
  </center>
<%
set rs=nothing
conn.close
set conn=nothing
%>
</div>
</body> 
</html>