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

📄 admin_userlist.asp

📁 后台登陆admin.asp
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="mdb.asp"-->
<%Admin="UserSee"%>
<!--#include file="check.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/FORMAT.asp"-->
<!--#include file="inc/md5.asp"-->
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="inc/admin.css" type=text/css rel=StyleSheet>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
<TITLE>管理系统——会员管理</TITLE>
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey)) >
<%

'****************************************************
if session("adminlogin")<>sessionvar then
  Response.Write("<script language=javascript>alert('您尚未登陆或登陆超时,请重新登陆!!');this.top.location.href='admin.asp';</script>")
  response.end
else
if request.QueryString("hx66")="checkinfo" then
dim j,selUserID
if not isempty(request("selUserID")) then
   selUserID=request("selUserID")
   set rs=server.createobject("adodb.recordset")
       if request("action")="会员删除" then
	  Conn.execute("delete from [User] where UserID in ("&selUserID&")")
       elseif request("action")="会员激活" then
	  Conn.execute("update [User] set userlock=0 where UserID in ("&selUserID&")")
       elseif request("action")="会员锁定" then
	  Conn.execute("update [User] set userlock=1 where UserID in ("&selUserID&")")
       elseif request("action")="设为普通" then
	  Conn.execute("update [User] set UserGrade=0 where UserID in ("&selUserID&")")
       elseif request("action")="设为VIP" then
	  Conn.execute("update [User] set UserGrade=1 where UserID in ("&selUserID&")")
          conn.execute("update [User] set VipinDate=date() where UserID in ("&selUserID&")")
          conn.execute("update [User] set VipendDate=date()+'"&viptime&"' where UserID in ("&selUserID&")")
       
       else
	   response.write "无效参数!"
	 response.end
       end if	
    response.Write"<script language=javascript>alert(' 恭 喜 您 ! 设 置 成 功 !');this.location.href='admin_userlist.asp';</script>"		
end if
end if
if request.QueryString("hx66")="Modifyinfo" then
   userid=clng(request.QueryString("userid"))
   if request("password")=request("pswpassword") then
        password=request("password")
   else
        password=md5(request("password"))
   end if
   if request("psw")="" then
        psw=request("pswpassword")
   else
        psw=md5(request("psw"))
   end if
   if request("answer")=request("oldanswer") then
        answer=request("answer")
   else
        answer=md5(request("answer"))
   end if
   if password<>psw then
	response.write"<SCRIPT language=JavaScript>alert(' 两 次 输 入 的 密 码 不 一 致, 请 返 回 ! ');"
	response.write"javascript:history.go(-1)</SCRIPT>"
   response.end
   end if
   if trim(request.Form("vipindate"))<>"" and trim(request.Form("vipenddate"))<>"" then
      if not(isdate(request.Form("vipindate")) and isdate(request.Form("vipenddate"))) then
          response.write"<SCRIPT language=JavaScript>alert(' 您选择的不是一个有效的日期格式。');"
	  response.write"javascript:history.go(-1)</SCRIPT>"
	  response.end
      end if
   end if
	sql="select * from [User] where userid="&userid
  	set rs=server.createobject("adodb.recordset")
  	rs.open sql,conn,1,3
	rs("Password")=Password
	rs("Question")=trim(request.Form("Question"))
	rs("Answer")=Answer
	rs("Email")=trim(request.Form("Email"))
	rs("sex")=request.Form("sex")
	rs("Homepage")=trim(request.Form("Homepage"))
	rs("QQ")=trim(request.Form("QQ"))
	rs("points")=trim(request.Form("points"))
	rs("UserPhoto")=trim(request.Form("UserPhoto"))
	rs("UserSign")=trim(request.Form("UserSign"))
        if trim(request.Form("vipindate"))<>"" and trim(request.Form("vipenddate"))<>"" then
	rs("vipindate")=trim(request.Form("vipindate"))
	rs("vipenddate")=trim(request.Form("vipenddate"))
        end if
	rs.update
	rs.close
	set rs=nothing
	response.Write"<script language=javascript>alert(' 恭 喜 您 ! 资 料 修 改 成 功 !');this.location.href='admin_userlist.asp';</script>"
end if

if request.QueryString("hx66")="deluser" then
   uid=clng(request.QueryString("id"))
   Conn.Execute "DELETE * FROM [User] WHERE userid="&uid
   conn.execute("update allcount set usercount = usercount - 1")
end if

if request.QueryString("hx66")="zf" and isInteger(request.form("keyword")) then'==积分管理
   dim akeyword,point,Grade,SQLFiltrate
   akeyword=int(request.form("keyword"))
   point=Trim(Request("point"))
   Grade=cint(request.form("Grade"))
   if Grade=1 then
      SQLFiltrate="WHERE UserGrade=0"
   elseif Grade=2 then
      SQLFiltrate="WHERE UserGrade=1"
   else
      SQLFiltrate=""
   end if
   if point=0 then'===增加积分
      sql="UPDATE [user] SET points = points + "&akeyword&" "&SQLFiltrate&""
      conn.execute (sql)
   elseif point=1 then'===减少积分
      sql="UPDATE [user] SET points = points - "&akeyword&" "&SQLFiltrate&""
      conn.execute (sql)
   elseif point=2 then'===重计积分
      sql="UPDATE [user] SET points = "&akeyword&" "&SQLFiltrate&""
      conn.execute (sql)
   elseif point=3 then'===初始积分
      datafile=""&mdb&""  
      Set Conn=Server.CreateObject("ADODB.Connection")
      connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&datafile&"")
      conn.Open connstr
      on error resume next '忽略错误
      conn.execute("ALTER TABLE [user] ALTER COLUMN [points] int default "&akeyword&"")
   end if
   conn.close
   set conn=nothing
   response.Write"<script language=javascript>alert(' 恭 喜 您 ! 更 新 成 功 !');this.location.href='admin_userlist.asp';</script>"		
end if

sub uSearch()%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
<form name="keyword" method="POST" action="admin_userlist.asp" target="main">
<tr class=Hxcmsss>
     <td width="100%" height="23" colspan="2">
      <a href="?"><font color=#FFFFFF>会员列表</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="?hx66=uSearch"><font color=#FFFFFF>会员搜索</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="?hx66=upoints"><font color=#FFFFFF>积分管理</font></a></td>
    </tr>
    <tr class=Hxcmsds>
    <td>&nbsp;&nbsp;用户搜索:<input type="radio" name="hx66" value="username" checked class='inuptCG'>名称&nbsp;<input type='radio' name='hx66' value='LastLoginIP' class='inuptCG'>IP&nbsp;<input type='radio' name='hx66' value='Email' class='inuptCG'>E-mail&nbsp;&nbsp;<input type="text" name="keyword" size="25">&nbsp;<input type="submit" value="搜索用户" name="submit"></td>
  </tr>
</form>
</table>
<%end sub

sub upoints()%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
<tr class=Hxcmsss>
     <td width="100%" height="23">
      <a href="?"><font color=#FFFFFF>会员列表</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="?hx66=uSearch"><font color=#FFFFFF>会员搜索</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="?hx66=upoints"><font color=#FFFFFF>积分管理</font></a></td>
    </tr>
  <form name="keyword" method="POST" action="admin_userlist.asp?hx66=zf" target="main">
   <tr class=Hxcmsds>
    <td>
&nbsp;&nbsp;用户积分管理:<input type="radio" name="point" value="0" checked>增加积分&nbsp;<input type="radio" name="point" value="1">减少积分&nbsp;<input type="radio" name="point" value="2">重计积分&nbsp;<input type="radio" name="point" value="3">新注册初始积分&nbsp;&nbsp;<input type="text" name="keyword" size="10">&nbsp;<select name="Grade" id="Grade">
<option value="0" selected>全体会员</option><option value="1">普通用户</option><option value="2">VIP 用户</option></select>  <input type="submit" value="点击更新" name="submit"><BR><font color="#FF6600">⑴ 用户积分设置,必须输入正整数数字。<BR>⑵ 重计积分和新注册初始积分设定时,数字不能为空。<BR>⑴ 重计积分,是指已注册会员的现有积分全部重新设定为你的输入值。请慎操作!<BR>⑵ 以上操作都是对指定等级会员的批量操作!</font>
    </td>
  </tr>
 </form>
</table>
<%end sub

Dim CurPage,Url_Add
Url_Add="?"
If Request.QueryString("Page")<>"" Then
   Curpage=Request.QueryString("Page")
   If IsInteger(Curpage)=False OR Curpage<0 Then Curpage=1
Else
   Curpage=1
End If
if request.QueryString("hx66")="adminedit" then
     call Modifyinfo()
elseif request.QueryString("hx66")="uSearch" then
     call uSearch()
elseif request.QueryString("hx66")="upoints" then
     call upoints()
elseif request.QueryString("hx66")="users" then
     Url_Add=Url_Add&"hx66=users&"
     sql="select * from [User] where UserGrade=0 order by LoginTimes desc"
     set rs=server.createobject("adodb.recordset")
     rs.open sql,conn,1,1
     call userlist()
elseif request.QueryString("hx66")="vips" then
     Url_Add=Url_Add&"hx66=vips&"
     sql="select * from [User] where UserGrade=1 order by LoginTimes desc"
     set rs=server.createobject("adodb.recordset")
     rs.open sql,conn,1,1
     call userlist()

elseif request.QueryString("hx66")="ulock" then
     Url_Add=Url_Add&"hx66=ulock&"
     sql="select * from [User] where userlock=0 order by LoginTimes desc"
     set rs=server.createobject("adodb.recordset")
     rs.open sql,conn,1,1
     call userlist()
elseif request.QueryString("hx66")="vlock" then
     Url_Add=Url_Add&"hx66=vlock&"
     sql="select * from [User] where userlock=1 order by LoginTimes desc"
     set rs=server.createobject("adodb.recordset")
     rs.open sql,conn,1,1
     call userlist()
elseif request.QueryString("hx66")="plock" then
     Url_Add=Url_Add&"hx66=plock&"
     sql="select * from [User] where userlock=2 order by LoginTimes desc"
     set rs=server.createobject("adodb.recordset")

⌨️ 快捷键说明

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