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

    <!--#include file="conn.asp"-->
<!--#include file="checkadmin.inc"-->
<%
keyword=trim(request.form("keyword"))
keyword=replace(keyword,"'","''")
stype=request.form("stype")
if keyword="" then
	response.write "<script language=javascript>alert('查找字符不能为空,请重新输入查找的信息,按确定返回重查!!!');history.back(1);</script>"
	response.end
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">
          <%
'---------------------------search----------------------
Set rs= Server.CreateObject("ADODB.Recordset")
if stype="username" then
	sql="select * from user where username Like '%"& keyword &"%' order by id desc"
	atype="用户名"
elseif stype="truename" then 
	sql="select * from user where truename Like '%"& keyword &"%' order by id desc"
	atype="真实姓名"
elseif stype="email" then
	sql="select * from user where email Like '%"& keyword &"%' order by id desc"
	atype="电子邮件"
elseif stype="oicq" then
	sql="select * from User where oicq Like '%"& keyword &"%' order by id desc"
	atype="OICQ是"
elseif stype="Address" then
    sql="select * from User where Address Like '%"& keyword &"%' order by id desc"
    atype="所在地区"
end if
rs.open sql,conn,1,1
if not isempty(request("page")) then
	currentPage=cint(request("page"))
else
	currentPage=1
end if
if rs.eof and rs.bof then
response.write "<script language=javascript>alert('未找到"&atype&"是"&keyword&"任何会员!');history.back(1);</script>"
else
	totalPut=rs.recordcount
	MaxPerPage=100
	PageUrl="admin_usersearch.asp"
	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
		search
	else
		if (currentPage-1)*MaxPerPage<totalPut then
			rs.move  (currentPage-1)*MaxPerPage
			dim bookmark
			bookmark=rs.bookmark
			showContent
			showpage totalput,MaxPerPage,PageUrl
			search
		else
			currentPage=1
			showContent
			showpage totalput,MaxPerPage,PageUrl
			search
		end if
	end if
	rs.close
end if
sub showContent 
i=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" style="border:1px solid #424142; background-color: #FFFFFF; color:#000000; font-size:9pt">
<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" style="border:1px solid #424142; background-color: #FFFFFF; color:#000000; font-size:9pt" 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="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>
      <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>
<%
i=0
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%>?classid=<%=classid%>">
  <center>共<font color="red"><b><%=totalnumber%></b></font>位用户
<%if CurrentPage<2 then%>
  &nbsp;首页 上一页&nbsp;
<%else%>
  &nbsp<a href="<%=filename%>?page=1&keyword=<%=keyword%>">首页</a>&nbsp;
  <a href="<%=filename%>?page=<%=CurrentPage-1%>&keyword=<%=keyword%>">上一页</a>&nbsp;
<%
end if
if n-currentpage<1 then
%>
  下一页 末页
<%else%>
  <a href="<%=filename%>?page=<%=CurrentPage+1%>&keyword=<%=keyword%>">下一页</a>
  <a href="<%=filename%>?page=<%=n%>&keyword=<%=keyword%>">末页</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>        
</form>        
 <%        
end function
function Search
%>
<%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>