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

📄 admin_user.asp

📁 蓝色WAP建站系统,WAP源码,更多请登陆http://xywap.cn
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
'==================================
'=文 件 名:admin_user.asp
'=适用版本:游戏天府WAP网站管理系统(CMS)V1.1
'=官方版权:http://www.gotf.cn
'=文件功能:会员系统管理
'=文件作者:游戏天府
'=发行时间:2007-02-01
'==================================
%>
<!--#include file="wapls_admin_conn.asp"-->
<!--#include file="wapls_admin_top.asp"-->
<!--#include file="wapls_md5.asp"-->
<%
if session("wapls_adminlogin")<>wapls_sessionvar then	
	errmsg="您没有登陆或不是管理员。请登陆。"
response.write "<script>window.alert('"&errmsg&"');window.location='admin_login.asp';</script>"
	response.End
elseif cur_adminsuper<>1 then
	errmsg=""&cur_adminname&",您不是超级管理员,没有权限进行此操作!"
response.write "<script>window.alert('"&errmsg&"');window.location='javascript:history.go(-1);';</script>"
	response.End
end if
dim page,ddid,d_content,d_poster,d_title
if request.querystring("page")<>"" then
	page=checksql("会员系统分页",request.querystring("page"),0,8)
end if
%>
<table cellspacing="1" cellpadding="4" class="tableborder" align="center">
	<tr class="tablebody" align="center">
		<td width="50%" class="td_title"><a href="?action=list"><font color="#ffffff">会员管理</font></a></td>
		<td width="50%" class="td_title"><a href="?action=add"><font color="#ffffff">新增会员</font></a></td>
	</tr>
</table>
<br>
<%
'==================================
'=功    能:主调代码,相应功能皆有说明
'==================================
Select case request.QueryString("action")
	case "list"		'会员列表
		call list()
	case "add"		'添加会员
		call add()
	case "edit" '编辑会员
		call edit()
	case "lock"		'锁定会员
		call lock()
	case "unlock" '解锁会员
		call unlock()
	case "pass" '审核会员
		call pass()
	case "del"		'删除会员
		call del()
	case else
		call list()
End Select
'==================================
'=过 程 名:list()
'=功    能:会员列表
'==================================
sub list()
if request.form("finduser")<>"" then
	finduser=checksql("查找会员",request.form("finduser"),1,30)
else
	finduser=""
end if
if request.form("userclass")<>"" then
	userclass=checksql("查找类别",request.form("userclass"),1,30)
else
	userclass=""
end if
if request.form("searchuser")="true" then
	if userclass="会员名称" then
		if finduser="" then
			sql="select * from wapls_user order by reg_date desc"
		else
			sql="select * from wapls_user where name='"&finduser&"' order by reg_date desc"
		end if
	elseif userclass="VIP会员" then
		sql="select * from wapls_user where user_type=2 order by reg_date desc"
	elseif userclass="待审核会员" then
		sql="select * from wapls_user where passed=0 order by reg_date desc"
	elseif userclass="锁定会员" then
		sql="select * from wapls_user where lock=1 order by reg_date desc"
	elseif userclass="登录大于100会员" then
		sql="select * from wapls_user where login_num>=100 order by reg_date desc"
	elseif userclass="登录大于1000会员" then
		sql="select * from wapls_user where login_num>=1000 order by reg_date desc"
	else
		sql="select * from wapls_user order by reg_date desc"
	end if
else
	sql="select * from wapls_user order by reg_date desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
dim totaluser,totalPassuser,totalVIPuser,totalNormaluser,totalLockuser
totaluser=rs.recordcount
sql="select user_id from wapls_user where passed=0"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
totalPassuser=rs2.recordcount
rs2.close
sql="select user_id from wapls_user where lock=1"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
totalLockuser=rs2.recordcount
rs2.close
sql="select user_id from wapls_user where user_type=2"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
totalVIPuser=rs2.recordcount
rs2.close
sql="select user_id from wapls_user where user_type=1"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
totalNormaluser=rs2.recordcount
rs2.close:set rs2=nothing
%>
<table cellspacing="1" cellpadding="4" class="tableborder" align="center">
	<form name="form" method="post" action="">
	<tr class="tablebody">
		<td colspan="4" class="td_title">会员系统小计</td>
	</tr>
	<tr class="tablebody">
		<td align="center" width="13%"><strong>查找会员</strong></td>
		<td width="*" colspan="3">
		<select name="userclass">
		<option value="会员名称" <%if request.form("userclass")="会员名称" then%>style="color:#0000ff" selected<%end if%>>会员名称</option>
		<option <%if request.form("userclass")="VIP会员" then%>style="color:#0000ff" selected<%end if%> value="VIP会员">VIP会员</option>
		<option value="待审核会员" <%if request.form("userclass")="待审核会员" then%>style="color:#0000ff" selected<%end if%>>待审核会员</option>
		<option value="锁定会员" <%if request.form("userclass")="锁定会员" then%>style="color:#0000ff" selected<%end if%>>锁定会员</option>		
		<option value="登录大于100会员" <%if request.form("userclass")="登录大于100会员" then%>style="color:#0000ff" selected<%end if%>>登录大于100会员</option>
		<option value="登录大于1000会员" <%if request.form("userclass")="登录大于1000会员" then%>style="color:#0000ff" selected<%end if%>>登录大于1000会员</option>
		</select>		
		<input type="text" name="finduser" size="30" maxlength="30">&nbsp;&nbsp;<input type="submit" name="submit" value="确定"><input type="hidden" name="searchuser" value="true"></td>
	</tr>
	<tr class="tablebody">
		<td align="center"><strong>会员总数</strong></td>
		<td width="37%"><span class="current_font"><%=totaluser%></span>名</td>
		<td align="center" width="13%"><strong>待审|锁定</strong></td>
		<td width="37%"><span class="current_font"><%=totalPassuser%></span>名 | <span class="current_font"><%=totalLockuser%></span>名</td>
	</tr>
	<tr class="tablebody">
		<td align="center"><strong>VIP会员</strong></td>
		<td width="37%"><span class="current_font"><%=totalVIPuser%></span>名</td>
		<td align="center" width="13%"><strong>普通会员</strong</td>
		<td width="37%"><span class="current_font"><%=totalNormaluser%></span>名</td>
	</tr>
	</form>
</table>
<br>
<table cellspacing="1" cellpadding="4" class="tableborder" align="center">
	<tr>
		<td colspan="9" class="td_title">会员管理</td>
	</tr>
	<tr align="center" class="tablebody">
		<td>编号</td>
		<td>用户名</td>
		<td>会员类型</td>
		<td>经验值</td>
		<td>金币值</td>
		<td>审核情况</td>
		<td>会员状态</td>
		<td>登录次数</td>
		<td>操作</td>
	</tr>
<%
	if not rs.eof then
		rs.movefirst
		perpage=cint(perpage)
		rs.pagesize=perpage
		if trim(request.querystring("page"))<>"" then
			currentpage=cint(request.querystring("page"))
			if currentpage>rs.pagecount then
				currentpage=rs.pagecount
			end if
		else
			currentpage=1
		end if
		totaluser=rs.recordcount
		if currentpage<>1 then
			if(currentpage-1)*perpage<totaluser then
				rs.move(currentpage-1)*perpage
			end if
		end if
		if (totaluser mod perpage)=0 then
			totalpages=totaluser\perpage
		else
			totalpages=totaluser\perpage+1
		end if
		i=1
		do while not rs.eof and i<perpage+1
		%>
			<tr align="center" class="tablebody">
		<td><%=i%></td>
		<td><%=rs("name")%></td>
		<td><%if rs("user_type")=1 then%>普通<%elseif rs("user_type")=2 then%><span class="current_font">VIP<%else%>未知<%end if%></td>
		<td><%=rs("user_exper")%></td>
		<td><%=rs("user_money")%></td>
		<td><% if rs("passed")=1 then%><font color="green">通过</font><%else%><span class="current_font">审核中</span><%end if%></td>
		<td><% if rs("lock")=0 then%><font color="green">正常</font><%else%><span class="current_font">锁定</span><%end if%></td>
		<td><%=rs("login_num")%></td>
		<td><button onClick="window.location
='?action=edit&id=<%=rs("user_id")%>&page=<%=currentpage%>'">编辑</button>&nbsp;<button onClick="window.location
='?action=del&id=<%=rs("user_id")%>&page=<%=currentpage%>'">删除</button></td>
	</tr>
	<%
	i=i+1
	rs.movenext
	loop
	else
	if rs.eof and rs.bof then
	%>
	<tr class="tablebody">
		<td colspan="9" align="center" height="70" class="disable_font">当前还没有会员或没有搜索到满足要求的会员!</td>
	</tr>
	<%
		end if
		rs.close
		set rs=nothing
	end if
	%>
</table>
<%if totaluser>perpage then%>
<table cellspacing="1" cellpadding="4" class="tableborder" align="center">
	<form name="form" method="post" action="">
	<tr class="tablebody">
		<td align="center"><%showpage totaluser,perpage,"admin_user.asp?action=list&"%></td>
	</tr>
	</form>
</table>
<%
end if
end sub
'==================================
'=过 程 名:edit()
'=功    能:编辑会员
'==================================
sub edit()
if request.form("edituser")="true" then
	if request.querystring("page")<>"" then
		curpage=cint(request.querystring("page"))
	else
		curpage=1
	end if
	userid=checksql("会员ID",request.form("id"),0,8)
	username=checksql("会员名称",request.form("username"),1,10)
	if request.form("password")<>"" then
		password=md5(checksql("会员密码",request.form("password"),1,10))
	end if
	sex=checksql("会员性别",request.form("sex"),0,1)
	email=checksql("会员邮箱",request.form("email"),1,100)
	if request.form("qq")<>"" then
		qq=checksql("会员qq",request.form("qq"),1,20)
	else
		qq=""
	end if
	author=checksql("真实名称",request.form("author"),1,50)
	tel=checksql("联系电话",request.form("tel"),1,50)
	userlock=checksql("会员状态",request.form("lock"),0,1)
	passed=checksql("审核情况",request.form("passed"),0,1)
	usertype=checksql("会员类型",request.form("usertype"),0,1)
	userexper=checksql("会员经验值",request.form("userexper"),0,10)
	usermoney=checksql("会员金币值",request.form("usermoney"),0,10)
	if request.form("content")<>"" then
		content=checksql("管理记录",request.form("content"),1,0)
	else
		content=""
	end if
	sql="select * from wapls_user where user_id="&userid
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,1,3
	rs("name")=username
	rs("sex")=sex
	rs("email")=email
	rs("qq")=qq

⌨️ 快捷键说明

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