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

📄 admin_admin.asp

📁 嘉缘人才6.0精简 ,很好用的人才系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
						企业招聘管理</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="304" <%=chkPurview("304")%>>
						高级人才管理</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="305" <%=chkPurview("305")%>>
						兼职人才管理</li>
					  <li><input name="UserPurview" type="checkbox" class="checkbox" value="306" <%=chkPurview("306")%>>
						网站留言管理</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="307" <%=chkPurview("307")%>>
						文章系统管理</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="308" <%=chkPurview("308")%>>
						通用页面管理</li>
					</ul>
				</div>
				<div class="au" id="af4" style="display:">
					<ul>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="401" <%=chkPurview("401")%>>
						模板方案管理</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="402" <%=chkPurview("402")%>>
						网站模板管理</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="403" <%=chkPurview("403")%>>
						风格样式管理</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="404" <%=chkPurview("404")%>>
						通用标签管理</li>
					</ul>
				</div>
				<div class="au" id="af5" style="display:">
					<ul>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="501" <%=chkPurview("501")%>>
						备份数据库</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="502" <%=chkPurview("502")%>>
						恢复数据库</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="503" <%=chkPurview("503")%>>
						压缩数据库</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="504" <%=chkPurview("504")%>>
						执行SQL语句</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="505" <%=chkPurview("505")%>>
						系统空间占用</li>
					</ul>
				</div>
				<div class="au" id="af6" style="display:">
					<ul>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="602" <%=chkPurview("602")%>>
						企业LOGO管理</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="603" <%=chkPurview("603")%>>
						个人照片管理</li>
					</ul>
				</div>
				<div class="au" id="af7" style="display:">
					<ul>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="701" <%=chkPurview("701")%>>
						在线支付设置</li>
					</ul>
				</div>
				<div class="au" id="af8" style="display:">
					<ul>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="801" <%=chkPurview("801")%>>
						清除系统缓存</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="802" <%=chkPurview("802")%>>
						前台日志管理</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="803" <%=chkPurview("803")%>>
						后台日志管理</li>
						<li><input name="UserPurview" type="checkbox" class="checkbox" value="804" <%=chkPurview("804")%>>
						系统帮助管理</li>
					</ul>
				</div>
		  </td>
		</tr>
		<tr class="tdbg"> 
			<td height="40" colspan="2" align="center">
				<input name="JOB_id" type="hidden" value="<%=JOB_id%>">
				<input name="Action" type="hidden" value="SaveData">
				<input name="btnSave" type="submit" class="inputs" style="cursor:pointer;" value="<%If JOB_id<>"" Then%> 修 改 <%Else%> 添 加 <%End If%>">
				&nbsp; <input name="btnCancel" type="button" class="inputs" style="cursor:pointer;" onClick="window.location.href='<%=strFileName%>'" value=" 取 消 ">
			</td>
		</tr>
	</form>
</table>
<%End Sub%>
<script>
<%If UserLevel="submanage" Then%>
PurviewDetail.style.display=''
SmallPurview.style.display=''
if (document.form1.UserPurview(0).checked)
{af1.style.display=''}
else
{af1.style.display='none'}

if (document.form1.UserPurview(1).checked)
{af2.style.display=''}
else
{af2.style.display='none'}

if (document.form1.UserPurview(2).checked)
{af3.style.display=''}
else
{af3.style.display='none'}

if (document.form1.UserPurview(3).checked)
{af4.style.display=''}
else
{af4.style.display='none'}

if (document.form1.UserPurview(4).checked)
{af5.style.display=''}
else
{af5.style.display='none'}

if (document.form1.UserPurview(5).checked)
{af6.style.display=''}
else
{af6.style.display='none'}

if (document.form1.UserPurview(6).checked)
{af7.style.display=''}
else
{af7.style.display='none'}

if (document.form1.UserPurview(7).checked)
{af8.style.display=''}
else
{af8.style.display='none'}

<%Else%>
PurviewDetail.style.display='none'
SmallPurview.style.display='none'
af1.style.display='none'
af2.style.display='none'
af3.style.display='none'
af4.style.display='none'
af5.style.display='none'
af6.style.display='none'
af7.style.display='none'
af8.style.display='none'
<%End If%>
</script></body>
</html>
<%
sub SaveData()
	JOB_id=trim(request("JOB_id"))
	if JOB_id<>"" And IsNumeric(JOB_id)=False then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>参数错误!</li>"
		Exit Sub
		JOB_id=CLng(JOB_id)
	end if
	UserName=Trim(Request.Form("UserName"))
	UserPass=Request.Form("UserPass")
	UserPass2=Request.Form("UserPass2")
	UserLevel=Trim(Request.Form("UserLevel"))
	UserPurview=Trim(Request.Form("UserPurview"))
	UserPurview=Replace(UserPurview," ","")
	If UserName="" Then
		ErrMsg=ErrMsg &"<br><li>帐号不能为空!</li>"
		FoundErr=True
	End If
	If JOB_id="" Then
		If UserPass="" Then
			ErrMsg=ErrMsg &"<br><li>密码不能为空!</li>"
			FoundErr=True
		End If
		If UserPass2="" Then
			ErrMsg=ErrMsg &"<br><li>确认密码不能为空!</li>"
			FoundErr=True
		End If
		If UserPass<>UserPass2 Then
			ErrMsg=ErrMsg &"<br><li>密码和确认密码不一致!</li>"
			FoundErr=True
		End If
	End If
	If UserLevel="" Then
		ErrMsg=ErrMsg &"<br><li>请选择管理员类型!</li>"
		FoundErr=True
	End If
	If UserLevel="submanage" Then
		If UserPurview="" Then
			ErrMsg=ErrMsg &"<br><li>请至少选择一项用户权限!</li>"
			FoundErr=True
		End If
	End If
	
	If FoundErr=True Then
		Exit Sub
	End If

	set rs=Server.CreateObject("ADODB.RecordSet")
	If JOB_id<>"" Then
		sql="select * from JOB_admin Where JOB_id="&JOB_id
	Else
		sql="select * from JOB_admin"
	End If
	rs.open sql,conn,1,3
	If JOB_id="" Then
		rs.AddNew
	End If
	If UserPass<>"" Then
		rs("JOB_pass")=md5(UserPass)
	End If
	rs("JOB_user")=UserName
	rs("JOB_type")=UserLevel
	rs("JOB_flag")=UserPurview
	session("admin_flag")=UserPurview
	rs.update
	rs.close
	set rs=nothing
	If JOB_id="" Then
		Call ShowOK("添加用户成功!")
	Else
		Call ShowOK("修改用户成功!")
	End If
end sub
%>

<%
sub Del()
	JOB_id=trim(Request("JOB_id"))
	if JOB_id="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>参数不足!</li>"
		exit sub
	end if
	sql="select * from JOB_admin where JOB_id In("& JOB_id &")"
    set rs=server.CreateObject ("Adodb.recordset")
	rs.open sql,conn,1,3
	if rs.bof and rs.eof then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>用户不存在或者已被删除!</li>"
		exit sub
	else
		Dim htmlFile,picFile
		Do While Not(rs.Eof)
			rs.delete
			rs.update
			rs.MoveNext
		Loop
	end if
	rs.close
	set rs=nothing
    response.redirect strFileName
	response.End()
end sub
%>
<%
Function chkPurview(sValue)
	chkPurview=""
	If UserPurview="" Or IsNull(UserPurview) Then Exit Function
	sValue=Lcase(sValue)
	If Instr(","&UserPurview&",",","&sValue&",")>0 Then
		chkPurview="checked"
	End If
End Function
%>
<%
Function JoinChar(strUrl)
	if strUrl="" then
		JoinChar=""
		exit function
	end if
	if InStr(strUrl,"?")<len(strUrl) then 
		if InStr(strUrl,"?")>1 then
			if InStr(strUrl,"&")<len(strUrl) then 
				JoinChar=strUrl & "&"
			else
				JoinChar=strUrl
			end if
		else
			JoinChar=strUrl & "?"
		end if
	else
		JoinChar=strUrl
	end if
End Function

Function showpage(sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnit)
	dim n, i,strTemp,strUrl
	if totalnumber mod maxperpage=0 then
    	n= totalnumber \ maxperpage
  	else
    	n= totalnumber \ maxperpage+1
  	end if
  	strTemp= "<table align=""center""><tr><td>"& vbCrLf
	strTemp=strTemp & "共 <font color=""#0000FF""><b>" & totalnumber & "</b></font> " & strUnit & "&nbsp;&nbsp;&nbsp;"
	strUrl=JoinChar(sfilename)
  	if Page<2 then
    	strTemp=strTemp & "首页 上一页&nbsp;"
  	else
		strTemp=strTemp & "<a href=""" & strUrl & "page=1"">首页</a>&nbsp;"
		strTemp=strTemp & "<a href=""" & strUrl & "page=" & (Page-1) & """>上一页</a>&nbsp;"
	end if

  	if n-Page<1 then
    	strTemp=strTemp & "下一页 尾页"
  	else
		strTemp=strTemp & "<a href=""" & strUrl & "page=" & (Page+1) & """>下一页</a>&nbsp;"
		strTemp=strTemp & "<a href=""" & strUrl & "page=" & n & """>尾页</a>"
  	end if
   	strTemp=strTemp & "&nbsp;页次:<strong><font color=""#FF0000"">" & Page & "</font>/" & n & "</strong>页 "
    strTemp=strTemp & "&nbsp;<b>" & maxperpage & "</b>" & strUnit & "/页"& vbCrLf
	if ShowAllPages=True then
		strTemp=strTemp & "&nbsp;转到:<select name=""page"" size=""1"" onchange=""javascript:window.location='" & strUrl & "page=" & "'+this.options[this.selectedIndex].value;"">"& vbCrLf
		for i = 1 to n   
			strTemp=strTemp & "<option value=""" & i & """"
			if cint(Page)=cint(i) then strTemp=strTemp & " selected "
			strTemp=strTemp & ">第" & i & "页</option>"   
		next
		strTemp=strTemp & "</select>"& vbCrLf
	end if
	strTemp=strTemp & "</td></tr></table>"& vbCrLf
	response.write strTemp
End Function
%>

<%
Function ShowErr()
	dim strErr
	strErr=strErr & "<table cellpadding=2 cellspacing=1 border=0 width=100% class='tableBorder' align=center>" & vbcrlf
	strErr=strErr & "  <tr align='center'><td height='22' class='title'><strong>错误信息</strong></td></tr>" & vbcrlf
	strErr=strErr & "  <tr><td height='100' class='tdbg' valign='top'><b>产生错误的可能原因:</b><br>" & ErrMsg &"</td></tr>" & vbcrlf
	strErr=strErr & "  <tr align='center' class='tdbg'><td><input name='goBack' type='button' class='inputs' value=' 返 回 ' onClick='javascript:history.back()'></td></tr>" & vbcrlf
	strErr=strErr & "</table>" & vbcrlf
	response.write strErr
End Function

Function ShowOK(SuccessMsg)
	dim strSuccess
	strSuccess=strSuccess & "<table cellpadding=2 cellspacing=1 border=0 width=100% class='tableBorder' align=center>" & vbcrlf
	strSuccess=strSuccess & "  <tr align='center' class='title'><td height='22'><strong>恭喜你!</strong></td></tr>" & vbcrlf
	strSuccess=strSuccess & "  <tr class='tdbg'><td height='100' valign='top' style='padding-left:10px;'><br>" & SuccessMsg &"</td></tr>" & vbcrlf
	strSuccess=strSuccess & "  <tr align='center' class='tdbg'><td><input name='goBack' type='button' class='inputs' value=' 返 回 ' onClick='javascript:history.back()'></td></tr>" & vbcrlf
	strSuccess=strSuccess & "</table>" & vbcrlf
	response.write strSuccess
End Function
%>

⌨️ 快捷键说明

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