usearch.asp

来自「国内第一数字点卡销售程序。功能强大。 完整无错!数据文件经MD5加密!经严格测」· ASP 代码 · 共 139 行

ASP
139
字号
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
%>
<%
if session("admin_rank")<>1 and session("admin_rank")<>2 then
response.write("<script>alert('您无权查看本页,SORRY!');window.location=('login.asp')</script>")
response.end
end if
%>
<head>
<link rel="stylesheet" type="text/css" href="css.css">
</head>

<%
if request("action")="del" then
    sql="select * from [user] where user_id="&int(request("user_id"))
    rs.open sql,conn,3,3
    if rs.eof then
        response.redirect "deluser.asp"
    else
    rs.delete
    rs.update
    end if
    rs.close
response.write("<script>alert('您已删除成功!');window.location=('deluser.asp')</script>")
response.end
end if
%>
<body style="background-color: #F0FBF1">
<div align="center">
<table border="0" width="98%" cellspacing="1" height="10" bordercolorlight="#2F94F9" bordercolordark="#E8F4FF">
               <tr> 
                <form method="POST" action="usearch.asp?soutype=1">
                  
      <td style="padding-left: 10px"> 会员查询&nbsp;
        <input type="text" name="keywords" size="12" class=ipt>
        <input type="image" border="0" name="b12" src="../IMAGES/search.jpg" width="81" height="20">
        <br>
      </td>
                </form>
              </tr>
  <%
	dim keyword
	keywords=srequest(trim(request("keywords")),0)
        response.write "<font color=red>"
        response.write keywords
        response.write "</font>"
soutype=int(trim(request("soutype")))
select case soutype
case 0
  sql="select * from [user] order by user_id desc"
case 1
  sql="select * from [user] where user_name like '%"&keywords&"%' or user_namec like '%"&keywords&"%' order by user_id desc"
case 2
  sql="select * from [user] where user_vip like '%"&keywords&"%' order by user_id desc"
case 3
  sql="select * from [user] where user_money like '%"&keywords&"%' order by user_id desc"
end select

  rs.open sql,conn,3,3
  if rs.eof then
      response.write "暂且没有相关用户资料!"
      response.end
  end if
      rs.pagesize=15
      page = cint(request("page"))
      if page = "" then page = 1
      if not(isnumeric(page)) then page=1
      if page<1 then page=1
      if page >= rs.pagecount then page = rs.pagecount
      rs.absolutepage = page
  %>
  <tr>
    <td width="90%" style="padding-left: 10px">
  <table border="1" width="100%" bordercolorlight="#C0C0C0" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" height="73">
		<tr>
			<td width="60" align="center" height="36">用户名</td>
			<td width="69" align="center" height="36">真实姓名</td>
			<td width="88" align="center" height="36">会员级别</td>
			<td width="64" align="center" height="36">密码</td>
			<td width="97" align="center" height="36">邮箱</td>
			<td width="62" align="center" height="36">电话</td>
			<td width="59" align="center" height="36">Q Q</td>
			<td width="55" align="center" height="36">帐上余额</td>
			<td width="57" align="center" height="36">编辑用户</td>
			<td width="65" align="center" height="36">删除用户</td>
			<td width="60" align="center" height="36">查看消费</td>
		</tr>
<%
for i=1 to rs.pagesize
%>
		<tr>
			<td width="60" align="center" height="35"><%=rs("user_name")%> </td>
			<td width="69" align="center" height="35"><%=rs("user_namec")%></td>
			<td width="88" align="center" height="35"><%=rs("user_vip")%> </td>
			<td width="64" align="center" height="35"><%=rs("user_pass")%></td>
			<td width="97" align="center" height="35"><%=rs("user_mail")%></td>
			<td width="62" align="center" height="35"><%=rs("user_tel")%></td>
			<td width="59" align="center" height="35"><%=rs("user_qq")%>&nbsp; </td>
			<td width="55" align="center" height="35"><%=formatcurrency(rs("user_money"))%></td>
			<td width="57" align="center" height="35"><a href="edituser.asp?user_id=<%=rs("user_id")%>">
<font color="#FF0000">编辑</font></a></td>
			<td width="65" align="center" height="35"> 
			<a href="deluser_jp.asp?user_id=<%=rs("user_id")%>&action=del" onClick="return confirm('您确定进行删除操作吗?')">
      <font color="#FF0000">删除此用户</font></a></td>
			<td width="60" align="center" height="35"><a href="lookxf.asp?user_name=<%=rs("user_name")%>">
      <font color="#FF0000">查看</font></a></td>
		</tr>
<%
rs.movenext
if rs.eof then exit for
next
%>
	</table>
         </td>     
   </tr> 
  <tr>         
                    <td width="90%" style="padding-left: 10px">        
                    <p align="center">共有记录<%=rs.recordcount%>条&nbsp;                   
                    <%=page%>/<%=rs.pagecount%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A href="<%request.servervariables("document_name")%>?page=<%=page-1%>">上一页</A> <A href="<%request.servervariables("document_name")%>?page=<%=page+1%>">下一页</A>&nbsp;&nbsp;&nbsp; 转到第 <SELECT onchange="window.location='?page='+this.value" name=gopage>              
                    <%for x=1 to rs.pagecount%>
                    <OPTION <%if x=page then%>selected<%end if%> value=<%=x%>><%=x%></OPTION>
                    <%next%>      
                    </SELECT> 页        
                    </div>
                    <%rs.close%>  
    </td>     
                  </tr>  

  </table>
</div>

<%
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?