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

📄 user.asp

📁 树型ASP论坛下载
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="check.asp" -->
<!--#include file="opendb.asp" -->
<%
'管理员删除删除用户-----------
if  Request.QueryString("del")<>"" then
    delsql="delete from users where userid="&Request.QueryString("del")
   conn.execute(delsql)
end if
'删除结束---------------

'管理员操作开放/停止标志-----------
if  Request.QueryString("stopflag")<>"" then
    sql="update users set stopflag="&Request.QueryString("stopflag")&" where userid="&Request.QueryString("userid")
   conn.execute(sql)
end if
'操作开放/停止标志结束---------------%>
<html>
<head>
<title>用户管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="admin.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function cform(){
 if(!confirm("您确认删除吗? 请注意删除后无法恢复!"))
 return false;
}//-->
</script>

<script>
<!--
function searchkey() {
validity=true;

 if (!check_empty(document.form_search.keyword.value))
{ validity=false;
 alert('请输入要搜索的关键字');
document.form_search.keyword.focus();
 return validity; } 

function check_empty(text) {
return (text.length > 0); // returns false if empty
}
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<div align="center"> 
  <table width="96%" border="0" align="center" class="px14">
    <tr> 
      <td>&nbsp;</td>
    </tr>
    <tr> 
      <td align="center" bgcolor="#0065CA"><font color="#FFFFFF">用户管理</font></td>
    </tr>
  </table>
  <table width="96%" border="0">
    <tr> 
      <td valign="top">
	   <% sql="select * from users order by regdate desc"
	      if request("right")<>"" then 
		     sql="select * from users where level="&request("right")&" order by regdate desc"
		     if request("keyword")<>"" then 
		       sql="select * from users where level="&request("right")&" and (nickname like '%" &trim(request("keyword"))&"%' or truename like '%" &trim(request("keyword"))&"%') order by regdate desc"
		     end if
		  end if
		  
		  set rscust=Server.Createobject("ADODB.Recordset")
          rscust.open sql,conn,1,3
           if rscust.recordcount=0 then%>
        <br>
        <br>
        <br>
        <span class="x14">未有此类会员</span><br>
        <br>
		 <% else%>
<%
rscust.pagesize=20
if request("page_code")="" then
  page=0
else
  page=clng(request("page_code"))
end if
if page<1 then page=1
if page>rscust.pagecount then page=rscust.pagecount
rscust.AbsolutePage=page
%>
        <table width="100%" border="0">
          <tr> 
            <td width="26%">共有<font color="#669900"><%=rscust.recordcount%></font>位会员 第<font color="#669900"><%=page%>/<%=rscust.pagecount%></font>页</td>
            <td width="48%" align="center"><table width="99%" border="0">
                <form name="form_search" method="post" action="" onSubmit="return searchkey()">
                  <tr> 
                    <td width="44%" align="right"><input name="keyword" type="text" class="input" onFocus="if (this.value=='请输入昵称或真名') this.value='';" value="请输入昵称或真名" size="18" maxlength="20"></td>
                    <td width="33%"><input type="submit" name="Submit" value="查找"> 
                      <input name="right" type="hidden" value="<%=request("right")%>">
				    </td>
                  </tr>
                </form>
              </table></td>
            <td width="26%" align="right"> <% if page<>1 then 
 response.write "<a href=user.asp?page_code=1&right="&request("right")&">第一页</a>"
  response.write "<a href=user.asp?page_code="&(page-1)&"&right="&request("right")&">上一页</a>"
  end if
if page<>rscust.pagecount then 
  response.write "<a href=user.asp?page_code="&(page+1)&"&right="&request("right")&">下一页</a> "
  response.write "<a href=user.asp?page_code="&rscust.pagecount&"&right="&request("right")&">最后一页</a>"
end if %> </td>
          </tr>
        </table>
        <table width="100%" border="0">
          <tr bgcolor="#FFCC00"> 
            <td width="20%">注册时间</td>
            <td width="14%">昵称</td>
            <td width="14%">真名</td>
            <td width="9%">性别</td>
            <td width="8%" align="center">状态</td>
            <td width="8%" align="center">操作</td>
            <td width="7%" align="center">修改</td>
            <td width="10%" align="center">删除</td>			
          </tr>
          <%for ipage=1 to rscust.pagesize %>
          <tr bgcolor=#F6F6F6> 
            <td><%=rscust("regdate")%> </td>
            <td><a href="user_info.asp?userid=<%=rscust("userid")%>"><%=rscust("nickname")%></a></td>
            <td><%=rscust("truename")%>&nbsp;</td>
            <td> <%if rscust("sex")=0 then%>
              <% Else %>
              <% End If %> </td>
            <td align="center"> <% If rscust("stopflag")=0 Then %> <font color="#009900">开放</font> <% Else %> <font color="#FF0000">停止</font> <% End If %> </td>
            <td align="center"> <% If rscust("stopflag")=0 Then %> <a href="?stopflag=1&userid=<%=rscust("userid")%>&page_code=<%= page %>&right=<%= request("right") %>">停止</a> 
              <% Else %> <a href="?stopflag=0&userid=<%=rscust("userid")%>&page_code=<%= page %>&right=<%= request("right")%>">开放</a> 
              <% End If %> </td>
            <td align="center"><a href="user_modi.asp?userid=<%=rscust("userid")%>&page_code=<%= page %>&right=<%= request("right") %>">修改</a></td>
            <td align="center"><a href="?del=<%=rscust("userid")%>&page_code=<%= page %>&right=<%= request("right") %>"  onclick="return cform()">删除</a></td>
		  </tr>
          <% 
  rscust.movenext
  if rscust.eof then exit for
 next
%>
        </table>
		<table width="100%" border="0">
          <tr> 
            <td width="50%">共有<font color="#669900"><%=rscust.recordcount%></font>位会员 第<font color="#669900"><%=page%>/<%=rscust.pagecount%></font>页</td>
            <td width="50%" align="right"> 
              <% if page<>1 then 
 response.write "<a href=user.asp?page_code=1&right="&request("right")&">第一页</a>"
  response.write "<a href=user.asp?page_code="&(page-1)&"&right="&request("right")&">上一页</a>"
  end if
if page<>rscust.pagecount then 
  response.write "<a href=user.asp?page_code="&(page+1)&"&right="&request("right")&">下一页</a> "
  response.write "<a href=user.asp?page_code="&rscust.pagecount&"&right="&request("right")&">最后一页</a>"
end if %>
            </td>
          </tr>
        </table>
        <% End If %>
	  </td>
    </tr>
  </table>
</div>
</body>
</html>

⌨️ 快捷键说明

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