📄 admin_admin.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../conn/conn.asp" -->
<!--#include file="../../Inc/Commoncode.asp" -->
<!--#include file="../checkvalid.asp"-->
<!--#include file="../../inc/md5.asp"-->
<%
'#########################################################
'
' Software name: Finereason HRCMS 6.0
' 软件名称:嘉缘人才网站内容管理系统 V6.0
' Email: service@finereason.com . QQ:109530926
' Web: http://www.finereason.com http://www.yjys.net
' Copyright (C) FineSincere Inc. All Rights Reserved.
' 版权所有 嘉挚科技 未经嘉挚公司授权不得用于任何商业用途
'
'#########################################################
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.ExpiresAbsolute = Now() - 1
Dim Action
Dim FoundErr,ErrMsg
Dim rs,sql,rs2,sql2
Dim JOB_id,UserPass,UserPass2,UserLevel,UserPurview
Dim page,i
Dim totalPut
const MaxPerpage=20
Const strFileName="admin_admin.asp"
page=Trim(Request("page"))
If page<>"" And IsNumeric(page) Then
If page<1 Or Len(page)>10 Then
page=1
Else
page=CLng(page)
End If
Else
page=1
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta content="noindex,nofollow" name="robots" />
<title>Finereason HRCMS 6.0 后台管理系统</title>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/JavaScript">
function ConfirmDel(JOB_id,UserName)
{
if(confirm("您确定要删除用户【"+UserName+"】吗?\n\n警告:此操作不可恢复,请慎重操作!"))
location.href="<%=strFileName%>?Action=Del&JOB_id="+JOB_id
}
function unSelectAll()
{
if(document.form1.chkAll.checked){
document.form1.chkAll.checked = document.form1.chkAll.checked&0;
}
}
function SelectAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.Name != "chkAll"&&e.disabled==false)
e.checked = form.chkAll.checked;
}
}
</script></head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
<tr class="topbg">
<th height="22" colspan="2" align="center" class=tableHeaderText><strong >后 台 用 户 管 理</strong></th>
</tr>
<tr>
<td width="70" height="30"><strong>管理导航:</strong></td>
<td height="30"> <a href="<%=strFileName%>?Action=Add">添加后台用户</a> | <a href="<%=strFileName%>">管理后台用户</a></td>
</tr>
</table>
<%
Action=trim(Request("Action"))
Select Case Action
Case "Add"
If Not FRAdminLevel(205) Then
Call ErrorMsg()
End If
Call ShowData()
Case "Modify"
If Not FRAdminLevel(206) Then
Call ErrorMsg()
End If
Call ShowData()
Case "SaveData"
Call SaveData()
Case "Del"
If Not FRAdminLevel(206) Then
Call ErrorMsg()
End If
Call Del()
Case Else
If Not FRAdminLevel(206) Then
Call ErrorMsg()
End If
Call main()
End Select
if FoundErr=True then
call ShowErr()
end if
Conn.Close
Set Conn=Nothing
%>
<%
sub main()
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from JOB_admin order by JOB_id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>暂无任何用户,请添加后再进行管理!</li>"
exit sub
else
totalPut=rs.recordcount
if (page-1)*MaxPerpage>totalput then
if (totalPut mod MaxPerpage)=0 then
page= totalPut \ MaxPerpage
else
page= totalPut \ MaxPerpage + 1
end if
end if
if page=1 then
Call MainInfo()
else
if (page-1)*MaxPerpage<totalPut then
rs.move (page-1)*MaxPerpage
dim bookmark
bookmark=rs.bookmark
Call MainInfo()
else
page=1
Call MainInfo()
end if
end if
end if
rs.close
set rs=nothing
End Sub
%>
<%Sub MainInfo()%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder mt10">
<form name="form1" method="Post" action="<%=strFileName%>">
<tr>
<th width="5%" height="22" class=tableHeaderText><strong>选中</strong></th>
<th width="6%" class=tableHeaderText><strong>编号</strong></th>
<th class=tableHeaderText><strong>帐号</strong></th>
<th width="8%" class=tableHeaderText><strong>属性</strong></th>
<th width="15%" class=tableHeaderText><strong>操作选项</strong></th>
</tr>
<%
do while not rs.eof
%>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'" align="center">
<td><input name="JOB_id" type="checkbox" class="checkbox" value="<%=rs("JOB_id")%>"></td>
<td><%=rs("JOB_id")%></td>
<td><%=rs("JOB_user")%></td>
<td><%If rs("JOB_type")="manage" Then Response.Write "<font color=""#FF0000"">超级</font>" Else Response.Write "普通"%></td>
<td>
<%If rs("JOB_id")>=2 Then%>
<a href="<%=strFileName%>?Action=Modify&JOB_id=<%=rs("JOB_id")%>">编辑</a>
| <a href="javascript:ConfirmDel(<%=rs("JOB_id")%>,'<%=rs("JOB_user")%>');">删除</a>
<%End If%> </td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<tr>
<td width="50%" height="30" colspan="5">
<input name="chkAll" type="checkbox" class="checkbox" onClick="SelectAll(this.form)" value="checkbox">
<input name="Action" type="hidden" value="Del">
全选 <input name="submit" type="submit" class="inputs" value="批量删除"> </td>
</tr>
<tr>
<td height="30" colspan="5"><%
If totalput>0 Then
call showpage(strFileName,totalput,MaxPerPage,false,true,"个用户")
End If
%></td>
</tr>
</form>
</table>
<%End Sub%>
<%
Sub ShowData()
JOB_id=trim(request.QueryString("JOB_id"))
If JOB_id<>"" Then
If IsNumeric(JOB_id)=False Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>参数错误!</li>"
Exit Sub
End If
sql="select * from JOB_admin where JOB_id=" & JOB_id
set rs=server.CreateObject ("Adodb.recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>此用户不存在或者已经删除!</li>"
Exit Sub
else
UserName=rs("JOB_user")
UserLevel=rs("JOB_type")
UserPurview=rs("JOB_flag")
end if
rs.Close
Set rs=Nothing
End If
%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder mt10">
<form name="form1" method="post" action="<%=strFileName%>">
<tr class="title">
<th height="22" colspan="2" align="center" ><strong><%If JOB_id<>"" Then%> 修 改 <%Else%> 添 加 <%End If%>用 户</strong></th>
</tr>
<tr class="tdbg">
<td width="23%" align="right"><strong>帐号:</strong></td>
<td><input name="UserName" type="text" value="<%=UserName%>" style="width:150px"></td>
</tr>
<tr class="tdbg">
<td align="right"><strong>密码:</strong></td>
<td><input name="UserPass" type="password" style="width:150px"><%If JOB_id<>"" Then%> <font color="#0000FF">不修改密码此处请留空!</font><%End If%></td>
</tr>
<tr class="tdbg">
<td align="right"><strong>确认密码:</strong></td>
<td><input name="UserPass2" type="password" style="width:150px"><%If JOB_id<>"" Then%> <font color="#0000FF">不修改密码此处请留空!</font><%End If%></td>
</tr>
<tr class="tdbg">
<td align="right"><strong>权限设置:</strong></td>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="105"><input name="UserLevel" type="radio" class="checkbox" onClick="PurviewDetail.style.display='none';SmallPurview.style.display='none';" value="manage" <%If UserLevel="manage" Or UserLevel="" Then Response.Write " checked"%>>
超级管理员:</td>
<td valign="bottom">拥有所有权限。</td>
</tr>
<tr>
<td><input name="UserLevel" type="radio" class="checkbox" onClick="PurviewDetail.style.display='';SmallPurview.style.display='';" value="submanage" <%If UserLevel="submanage" Then Response.Write " checked"%>>
普通管理员:</td>
<td valign="bottom">需要详细指定每一项管理权限。</td>
</tr>
</table>
</td>
</tr>
<tr id="PurviewDetail" style="display:">
<td colspan="2">
<div class="au">
<div class="aub">栏目权限</div>
<ul><!-- af-adminflag 更新于2007年5月13日 Mr.Hou -->
<li><input name="UserPurview" type="checkbox" class="checkbox" onClick="if (this.checked){af1.style.display=''}else{af1.style.display='none'}" value="1" <%=chkPurview("1")%>>
系统设置</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" onClick="if (this.checked){af2.style.display=''}else{af2.style.display='none'}" value="2" <%=chkPurview("2")%>>
会员管理</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" onClick="if (this.checked){af3.style.display=''}else{af3.style.display='none'}" value="3" <%=chkPurview("3")%>>
频道管理</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" onClick="if (this.checked){af4.style.display=''}else{af4.style.display='none'}" value="4" <%=chkPurview("4")%>>
模板风格</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" onClick="if (this.checked){af5.style.display=''}else{af5.style.display='none'}" value="5" <%=chkPurview("5")%>>
数据维护</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" onClick="if (this.checked){af6.style.display=''}else{af6.style.display='none'}" value="6" <%=chkPurview("6")%>>
文件管理</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" onClick="if (this.checked){af7.style.display=''}else{af7.style.display='none'}" value="7" <%=chkPurview("7")%>>
插件管理</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" onClick="if (this.checked){af8.style.display=''}else{af8.style.display='none'}" value="8" <%=chkPurview("8")%>>
系统相关</li>
</ul>
</div>
</td>
</tr>
<tr id="SmallPurview" style="display:">
<td colspan="2">
<div class="au">
<div class="aub">详细权限</div>
</div>
<div class="au" id="af1" style="display:">
<ul>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="101" <%=chkPurview("101")%>>
网站信息配置</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="102" <%=chkPurview("102")%>>
系统区域设置</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="103" <%=chkPurview("103")%>>
系统行业设置</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="104" <%=chkPurview("104")%>>
系统专业设置</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="105" <%=chkPurview("105")%>>
系统岗位设置</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="106" <%=chkPurview("106")%>>
网站广告管理</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="107" <%=chkPurview("107")%>>
网站公告管理</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="108" <%=chkPurview("108")%>>
友情链接管理</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="109" <%=chkPurview("109")%>>
网站留言管理</li>
</ul>
</div>
<div class="au" id="af2" style="display:">
<ul>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="201" <%=chkPurview("201")%>>
用户资料管理</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="202" <%=chkPurview("202")%>>
审核新用户</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="203" <%=chkPurview("203")%>>
用户组管理</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="204" <%=chkPurview("204")%>>
用户等级管理</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="205" <%=chkPurview("205")%>>
管理员添加</li>
<li><%If session("admin_type")<>"manage" Then Response.Write("<!--")%><input name="UserPurview" type="checkbox" class="checkbox" value="206" <%=chkPurview("206")%>>
管理员管理<%If session("admin_type")<>"manage" Then Response.Write("-->")%></li>
</ul>
</div>
<div class="au" id="af3" style="display:">
<ul>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="301" <%=chkPurview("301")%>>
系统频道设置</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="302" <%=chkPurview("302")%>>
个人求职管理</li>
<li><input name="UserPurview" type="checkbox" class="checkbox" value="303" <%=chkPurview("303")%>>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -