⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user2.asp

📁 一个免费的绿叶网上书店请大家提宝贵意见 站长的帐号是   用户名:雨丁香  密码:200505 副站长帐号是   用户名: wangli 密码:197207
💻 ASP
字号:
<!--#include file="base.asp"-->
<%
dim id,action,sex,down
if session("adminflag")="" then Response.Redirect "default.asp"

if session("class")<>"会员管理" and session("adminflag")>2 then Call PrintMsg(NotAdmin)
%>
<html>
<head>
<title>Untitled Document</title>
<script language="JavaScript">
function check(){
     if(form1.search.value=="")
{
        alert("请输入搜索关键字!!");
	return false;
    } 
}
function confirmDel(id){

if ( confirm("你确定要删除吗?")) {
window.location.href = "userdel.asp?id="+id
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
 <%   if request.form("search")<>"" then
           if request("myselect")=1 then
        	 sql="select * from member where username like '%" & request.form("search") & "%'"
          elseif request("myselect")=2 then
		  sex=request.form("search")
		  if sex="男" or sex="先生" then
             sql="select * from member where sex=true order by id desc" 
			 else
			 sql="select * from member where sex=false order by id desc"
			 end if
                            
		else
			sql="select * from member order by id desc"
			end if
			end if
			 rs.open sql,conn,1,3
			 'response.end
		       %><!--#include file="../include/pages1.inc"-->
<body bgcolor="#FFFFFF" text="#000000">
<div align="center"> 
  <h3><font color="#0000FF">会员资料管理</font></h3>
  <table border="1" cellspacing="0" cellpadding="0" height="61" width="544" bordercolorlight="#000000" bordercolordark="#FFFFFF">
    <tr bgcolor="#FF9900"> 
      <td width="129" height="27"> <div align="center"><font color="#0000FF" size="2">客户名</font></div></td>
      <td width="48" height="27"> <div align="center"><font color="#0000FF" size="2">性别</font></div></td>
      <td width="147" height="27"> <div align="center"><font color="#0000FF" size="2">电话</font></div></td>
      <td width="154"><div align="center"><font color="#0000FF" size="2">Email</font></div></td>
      <td width="54"><div align="center"><font color="#0000FF" size="2">删除</font></div></td>
    </tr>
    <%For i = 1 to rs.pagesize 
     if rs.eof then exit For
 'on error resume next %>
    <tr> 
      <td width="129"> <div align="center"><font color="#0000FF" size="2"><a href="userfind.asp?id=<%=rs("id")%>"><%=rs("username")%></a></font></div></td>
      <td width="48"> <div align="center"><font color="#0000FF" size="2"> 
          <% if rs("sex")=true then
	    response.write "先生"
		else 
		response.write "女士"
		end if  %>
          </font></div></td>
      <td width="147"> <div align="center"><font color="#0000FF" size="2"> <%=rs("phone")%></font></div></td>
      <td width="154"><font color="#0000FF" size="2"><%=rs("email")%></font></td>
      <td width="54"><div align="center"><font color="#0000FF" size="2"><a href='javascript:confirmDel(<%=rs("id")%>)'>删除</a></font></div></td>
    </tr>
    <%
	rs.MoveNext
	next
%>
  </table>
  <p><br>
    <%Call ShowPageNavigator(pageno,"user2.asp")%>
    <br>
    <br>
    <font size="2">程序员提示:点击用户名可以看到用户的详细资料。</font> </p>
  <form name="form1" method="post" action="user2.asp" onSubmit="return check();">
    <table width="565" border="1" cellpadding="3" cellspacing="0" bordercolordark="#000000" bordercolorlight="#FFFFFF">
      <tr valign="middle" bgcolor="#FF9900"> 
        <td width="80"> <div align="center"><font color="#0000FF" size="2">用户搜索</font></div></td>
        <td width="110"> <div align="center"><font size="2"><font color="#0000FF"> 
            <select name="myselect" id="myselect">
              <option selected>您还没选择</option>
              <option value="1">姓名</option>
              <option value="2">性别</option>
              <option value="3">是否下载</option>
            </select>
            </font></font></div></td>
        <td width="367"> <div align="center"><font color="#0000FF" size="2">请输入关键字</font><font size="2"> 
            <input name="search" type="text" id="search" size="16">&nbsp;
            <input type="submit" name="Submit" value="提交">
            </font></div></td>
      </tr>
    </table>
  </form>
  <p>&nbsp; </p>
  <h3><a href="index.asp"><img src="../images/agree4.gif" width="100" height="32" border="0"></a></h3>
</div>
</body>
</html><%  rs.close  %>

⌨️ 快捷键说明

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