📄 admin_user.asp
字号:
<!--#include file="admin_conn.asp"-->
<!--#include file="../include/admin_setting.asp"-->
<!--#include file="admin_function.asp"-->
<!--#include file="../include/md5.asp"-->
<%'==============================================================
'程序名称:茂盛网站管理系统(Maoin CSM)
'当前版本:Maosin CMS Version 1.1 Powered by maosin.com
'程序作者:阿茂(李胜茂)
'网站地址:www.maosin.com www.maosin.net
' QQ:57861417
'电子邮箱:maosin@163.com maosin@maosin.com
'--------------------------------------------------------------
'Copyright (C) 2006 maosin.com All Rights Reserved.
'免费版本请在程序首页保留(Powered by:Maosin CMS)版权链接信息;
'您可以对此版本进行修改,美化,但请保留此ASP文件内的版权信息;
'茂盛设计网保留此软件的法律追究权利
'==============================================================
Call admin_top()
Call navMenu()
Select Case LCase(Request("action"))
Case LCase("adminlockSet")
if cint(adminInfo(4))=1 then
Call adminLockSet()
else
popedomMsg
end if
Case LCase("adminList")
if cint(adminInfo(4))=1 then
Call adminList()
else
popedomMsg
end if
Case LCase("addAdminUser")
if cint(adminInfo(4))=1 then
Call addAdminUser()
else
popedomMsg
end if
Case LCase("editAdminUser")
if cint(adminInfo(4))=1 then
Call editAdminUser()
else
popedomMsg
end if
Case LCase("saveAddadminUser")
if cint(adminInfo(4))=1 then
Call saveAddadminUser()
else
popedomMsg
end if
Case LCase("saveMdfAdminUser")
if cint(adminInfo(4))=1 then
Call saveModifyAdminUser()
else
popedomMsg
end if
Case LCase("delAdmin")
if cint(adminInfo(4))=1 then
Call delAdmin()
else
popedomMsg
end if
Case LCase("mdfPass")
Call modifyPass()
Case LCase("addUser")
Call addUser()
Case LCase("editUser")
Call editUser()
Case LCase("saveAddUser")
Call saveAddUser()
Case LCase("saveMdfUser")
Call saveModifyUser()
Case LCase("operateUser")
Call operateUser()
Case LCase("fileAdmin")
if cint(adminInfo(4))=1 then
Call accessories("../"&userUpPath)
else
Call popedomMsg()
end if
Case Lcase("delfile")
if cint(adminInfo(4))=1 then
Call deletefile("../"&userUpPath)
else
Call popedomMsg()
end if
Case Else
Call userList()
End Select
Call admin_foot()
Sub navMenu()%>
<table width="100%" border="0" cellpadding="4" cellspacing="1" class="text table_border mainTable">
<tr><td colspan="2" class="td_titleM">用户管理</td></tr>
<tr><td width="95" height="30" class="td_bgcolor">管理快捷导航:</td><td class="td_bgcolor">
<a href="admin_user.asp?">用户管理</a> |
<a href="admin_user.asp?action=addUser">添加新用户</a> |
<a href="admin_user.asp?action=adminList">管理员管理</a> |
<a href="admin_user.asp?action=addAdminUser">添加管理员</a> |
<a href="admin_user.asp?action=mdfPass">管理员密码修改</a> |
<a href="admin_user.asp?action=fileAdmin">用户上传文件管理</a>
</td></tr>
</table>
<%table(5)
End Sub
Sub userList()%>
<table width="100%" border="0" cellpadding="4" cellspacing="1" class="text table_border mainTable">
<tr valign="middle">
<td height="18" colspan="11" valign="middle" class="td_titleT">会员管理 | 提示:“√”表示正常,“×”表示已锁定。</td>
</tr>
<tr class="td_topT" valign="middle" align="center">
<td width="30" height="24">选择</td>
<td width="*">用户名</td>
<td width="60">用户级别</td>
<td width="28">性别</td>
<td width="58"><%=pointName%></td>
<td width="58"><%=moneyName%></td>
<td width="62">登录次数</td>
<td width="90">最后登录IP</td>
<td width="110">最后登录时间</td>
<td width="60">状态设置</td>
<td width="65">操作选项</td>
</tr>
<form name="userform" action="?action=operateUser" method="post">
<%
dim rs,strTemp,stateStr
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open "select * from ms_user",connstr,1,1
if not rs.eof and not rs.bof then
nextpage=pagetitle(rs,20,"admin_user.asp?","个会员")
lineNo=1
do while not rs.eof and lineNo<=rs.PageSize
if rs("islock")=1 then
stateStr="<a href=""?action=operateUser&operateOption=unlock&userID="&rs("user_id")&""" title=""立即激活"">激活</a>(<font color=""#ff4400"" title=""已锁定""><b>×</b></font>)"
else
stateStr="<a href=""?action=operateUser&operateOption=lock&userID="&rs("user_id")&""" title=""立即锁定"">锁定</a>(<font color=""#00648A"" title=""正常""><b>√</b></font>)"
end if
strTemp=strTemp&"<tr class=""td_bgcolor"" valign=""middle"" align=""center"" onMouseOver=""mouseOver(this)"" onMouseOut=""mouseOut(this)"">"&_
"<td height=""24""><input type=""checkbox"" name=""userID"" id=""userID"" value="""&rs("user_id")&"""></td>"&_
"<td title=""用户名:"&rs("user_name")&" 真实姓名:"&rs("linkman")&" 注册时间:"&rs("reg_date")&""">"&rs("user_name")&"</td>"&_
"<td>"&reUserType(rs("user_type"))&"</td>"&_
"<td>"&rs("sex")&"</td>"&_
"<td>"&rs("user_point")&"</td>"&_
"<td>"&rs("user_money")&"</td>"&_
"<td>"&rs("logon_num")&"</td>"&_
"<td>"&rs("last_ip")&"</td>"&_
"<td>"&rs("last_time")&"</td>"&_
"<td>"&stateStr&"</td>"&_
"<td><a href=""?action=editUser&userID="&rs("user_id")&""">编辑</a> <a href=""javascript:"" onclick=""javascript:{if(confirm('您确定要删除此用户吗?')){window.location.href='?action=operateUser&operateOption=deluser&userID="&rs("user_id")&"';}return false;}"">删除</a></td>"&_
"</tr>"&_
rs.movenext
lineNo=lineNo+1
loop
response.write(strTemp)
strTemp=""
%>
<tr>
<td class="td_bottomT" height="22" colspan="11" valign="middle"> <input type="checkbox" name="checkall" id="checkall" onclick="checkalldele(this.form)"><label for="checkall">全选</label> <input type="hidden" name="operateOption"><input type="submit" onClick="javascript:{if(confirm('您确定要执行删除此选项吗?')){this.form.operateOption.value='deluser';return true;}return false;}" name="del" value="删除"> <input type="submit" name="dd" onClick="this.form.operateOption.value='unlock'" value="激活"> <input type="submit" onClick="this.form.operateOption.value='lock'" value="锁定"> 转为:<select name="maosinlevel"><option>请选择级别</option><option value="1">普通会员</option><option value="2">VIP会员</option><option value="3">管理员</option></select> <input type="submit" onClick="this.form.operateOption.value='tranlevel'" value="执行"></td>
</tr>
</form>
<tr>
<td class="td_titleB" height="22" colspan="11" valign="middle"> <%=(nextpage)%></td>
</tr>
<%else%>
<tr>
<td class="td_bgcolor" height="30" colspan="11" valign="middle"> 当前还没有没有用户</td>
</tr>
<%end if%>
</table>
<script type="text/javascript">
function checkalldele(obj){
var len=obj.elements.length;
for(var i=0;i<len-7;i++){
obj.elements(i).checked=obj.checkall.checked;
}
}
</script>
<%
rs.close
set rs=nothing
End Sub
Sub adminList()
%>
<table width="100%" border="0" cellpadding="4" cellspacing="1" class="text table_border mainTable">
<tr valign="middle">
<td height="21" colspan="8" class="td_titleT">管理员管理 | 提示:“√”表示正常,“×”表示已锁定。</td>
</tr>
<tr align="center" valign="middle" class="td_topT">
<td width="100" height="23">管理员名称</td>
<td width="*">前台用户名</td>
<td width="100">管理权限</td>
<td width="90">登录次数</td>
<td width="120">最后登录IP</td>
<td width="130">最后登录时间</td>
<td width="80">状态设置</td>
<td width="110">操作选项</td>
</tr>
<%
dim rs,strTemp,stateStr
Set rs=conn.Execute("select adminID,adminName,user_name,adminStatus,lastLogonTime,lastLogonIp,isLock,logonNum from ms_admin")
do while not rs.eof
if rs(6)=1 then
stateStr="<a href=""admin_user.asp?action=adminlockSet&isLock=no&adminID="&rs(0)&""" title=""立即激活"">激活</a>(<font color=""#ff4400"" title=""已锁定""><b>×</b></font>)"
else
stateStr="<a href=""admin_user.asp?action=adminlockSet&isLock=yes&adminID="&rs(0)&""" title=""立即锁定"">锁定</a>(<font color=""#00648A"" title=""正常""><b>√</b></font>)"
end if
strTemp=strTemp&"<tr class=""td_bgcolor"" align=""center"" valign=""middle"" onMouseOver=""mouseOver(this)"" onMouseOut=""mouseOut(this)"">"&_
"<td height=""26"">"&rs(1)&"</td>"&_
"<td>"&rs(2)&"</td>"&_
"<td>"&reAdminStatus(rs(3))&"</td>"&_
"<td>"&rs(7)&"</td>"&_
"<td>"&rs(5)&"</td>"&_
"<td>"&rs(4)&"</td>"&_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -