📄 empmain_userright.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/EmpMain.asp" -->
<!--#include file="EmpMain_CheckRight.asp"-->
<%
if (request.Cookies("UserName") <> "admin") then
response.Write("没有权限访问该页!")
response.end
end if
%>
<%
Dim UR
Dim UR_numRows
Set UR = Server.CreateObject("ADODB.Recordset")
UR.ActiveConnection = MM_EmpMain_STRING
UR.Source = "SELECT UserName,ID FROM UserRight"
UR.CursorType = 0
UR.CursorLocation = 2
UR.LockType = 1
UR.Open()
UR_numRows = 0
%>
<%
if request.QueryString("UserID") <> "" then
Dim URight
Dim URight_numRows
Set URight = Server.CreateObject("ADODB.Recordset")
URight.ActiveConnection = MM_EmpMain_STRING
URight.Source = "SELECT * FROM UserRight where id = " & request.QueryString("UserID")
URight.CursorType = 0
URight.CursorLocation = 2
URight.LockType = 1
URight.Open()
URight_numRows = 0
username = URight("UserName")
password = URight("password")
PayList = URight("PayList")
EmpList = URight("EmpList")
holList= URight("holList")
OverView= URight("OverView")
Generalinfo= URight("Generalinfo")
MarrInfo= URight("MarrInfo")
EduInfo= URight("EduInfo")
EvenWork= URight("EvenWork")
Family= URight("Family")
Work= URight("Work")
HpInfo= URight("HpInfo")
HolInfo= URight("HolInfo")
PayInfo= URight("PayInfo")
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>帐号信息</title>
<link rel="stylesheet" href="CSS/SellWellWeb.css" type="text/css">
<script language="javascript" src="js_Lib/fnCheckForm.js"></script>
<script>
function doReload(obj){
window.location = "Empmain_UserRight.asp?UserID="+obj.options[obj.selectedIndex].value
}
function fnDoDelete(){
if(document.form1.UserID.value==""){
alert("请选择一个用户!")
return
}
if(document.form1.textfield.selectedIndex==1){
alert("不能删除管理员帐号!")
return
}
if(confirm("您确认要删除该用户?")){
window.location = "Empmain_DeleteUser.asp?UserID=<%=request.QueryString("UserID")%>"
}
}
</script>
</head>
<body bgcolor="#EAF4FF" topmargin="2" class="body">
<form method="POST" action="EmpMain_UserRight_Process.asp" name="form1">
<fieldset style="padding: 2" class="fiedset"><legend><font size="2">用户列表</font></legend>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber1" align="center">
<tr>
<td width="29%" class="Caption">
<div align="right"><font size="2">用户名:</font></div>
</td>
<td width="71%" class="ValueArea">
<select name="textfield" class="Text" onChange="doReload(this)">
<option>新增用户</option>
<%while not UR.EOF%>
<option <%if request("UserID") <> "" then%><%if Cint(request("UserID")) = Cint(UR("ID")) then%>selected<%end if%><%end if%> value="<%=UR("ID")%>"><%=UR("UserName")%></option>
<%
UR.movenext
wend
%>
</select>
</td>
</tr>
</table>
</fieldset>
<fieldset style="padding: 2" class="fiedset"><legend><font size="2">帐号信息</font></legend>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber1" align="center">
<tr>
<td width="29%" nowrap class="Caption">
<div align="right"><font color="#FF0000" size="2"><strong>*</strong></font><font size="2">用户名:</font></div>
</td>
<td width="71%" class="ValueArea">
<input name="UserName" type="text" class="Text" id="UserName" Need="1" value="<%=username%>" <%if trim(request("UserID")) <> "" then%>readonly<%end if%>></td>
</tr>
<tr>
<td width="29%" nowrap class="Caption">
<div align="right"><font color="#FF0000" size="2"><strong>*</strong></font><font size="2"></font><font size="2">密码:</font></div>
</td>
<td width="71%" class="ValueArea">
<input name="password" type="Password" class="Text" id="password" value="<%=password%>" Need="1" <%if trim(request("UserID")) <> "" then%>readonly<%end if%>>
</td>
</tr>
</table>
</fieldset> <fieldset style="padding: 2" class="fiedset"> <legend><font size="2">权限信息</font></legend>
<table border="1" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber2" align="center">
<tr>
<td width="50%" align="center" class="listTitle"><font size="2">模块</font></td>
<td width="25%" align="center" class="listTitle"><font size="2">只读</font></td>
<td width="25%" align="center" class="listTitle"><font size="2">可写</font></td>
</tr>
<tr>
<td align="center" class="ListValueGray"><font size="2">薪资统计</font></td>
<td align="center" class="ListValueGray"><font size="2">
<input name="payList" type="checkbox" id="payList" value="1" <%if instr(PayList,"1") then%>checked<%end if%>>
</font></td>
<td align="center" class="ListValueGray"><font size="2">
<input name="payList" type="checkbox" id="payList" value="2" <%if instr(PayList,"2") then%>checked<%end if%>>
</font></td>
</tr>
<tr>
<td align="center" class="ListValueWhite"><font size="2">考勤统计</font></td>
<td align="center" class="ListValueWhite"><font size="2">
<input name="HolList" type="checkbox" id="HolList" value="1" <%if instr(HolList,"1") then%>checked<%end if%>>
</font></td>
<td align="center" class="ListValueWhite"><font size="2">
<input name="HolList" type="checkbox" id="HolList" value="2" <%if instr(HolList,"2") then%>checked<%end if%>>
</font></td>
</tr>
<tr>
<td width="50%" align="center" class="ListValueGray"> <p align="center"><font size="2">员工列表</font>
</td>
<td width="25%" align="center" class="ListValueGray"> <p align="center"><font size="2">
<input name="EmpList" type="checkbox" id="EmpList" value="1" <%if instr(EmpList,"1") then%>checked<%end if%>>
</font> </td>
<td width="25%" align="center" class="ListValueGray"> <p align="center"><font size="2">
<input name="EmpList" type="checkbox" id="EmpList" value="2" <%if instr(EmpList,"2") then%>checked<%end if%>>
</font> </td>
</tr>
<tr>
<td align="center" class="ListValueWhite"><font size="2">总览</font></td>
<td align="center" class="ListValueWhite"><font size="2">
<input name="overview" type="checkbox" id="overview" value="1" <%if instr(overview,"1") then%>checked<%end if%>>
</font></td>
<td align="center" class="ListValueWhite"><font size="2">
<input name="overview" type="checkbox" id="overview" value="2" <%if instr(overview,"2") then%>checked<%end if%>>
</font></td>
</tr>
<tr>
<td width="50%" align="center" class="ListValueGray"><font size="2">基本信息</font></td>
<td width="25%" align="center" class="ListValueGray"> <p align="center"><font size="2">
<input name="General" type="checkbox" id="General" value="1" <%if instr(Generalinfo,"1") then%>checked<%end if%>>
</font> </td>
<td width="25%" align="center" class="ListValueGray"> <p align="center"><font size="2">
<input name="General" type="checkbox" id="General" value="2" <%if instr(Generalinfo,"2") then%>checked<%end if%>>
</font> </td>
</tr>
<tr>
<td width="50%" align="center" class="ListValueWhite"><font size="2">婚姻状况</font></td>
<td width="25%" align="center" class="ListValueWhite"> <p align="center"><font size="2">
<input name="MarrInfo" type="checkbox" id="MarrInfo" value="1" <%if instr(MarrInfo,"1") then%>checked<%end if%>>
</font> </td>
<td width="25%" align="center" class="ListValueWhite"> <p align="center"><font size="2">
<input name="MarrInfo" type="checkbox" id="MarrInfo" value="2" <%if instr(MarrInfo,"2") then%>checked<%end if%>>
</font> </td>
</tr>
<tr>
<td width="50%" align="center" class="ListValueGray"><font size="2">教育状况</font></td>
<td width="25%" align="center" class="ListValueGray"> <p align="center"><font size="2">
<input name="EduInfo" type="checkbox" id="EduInfo" value="1" <%if instr(EduInfo,"1") then%>checked<%end if%>>
</font> </td>
<td width="25%" align="center" class="ListValueGray"> <p align="center"><font size="2">
<input name="EduInfo" type="checkbox" id="EduInfo" value="2" <%if instr(EduInfo,"2") then%>checked<%end if%>>
</font> </td>
</tr>
<tr>
<td width="50%" align="center" class="ListValueWhite"><font size="2">工作经历</font></td>
<td width="25%" align="center" class="ListValueWhite"> <p align="center"><font size="2">
<input name="EvenWork" type="checkbox" id="EvenWork" value="1" <%if instr(EvenWork,"1") then%>checked<%end if%>>
</font> </td>
<td width="25%" align="center" class="ListValueWhite"> <p align="center"><font size="2">
<input name="EvenWork" type="checkbox" id="EvenWork" value="2" <%if instr(EvenWork,"2") then%>checked<%end if%>>
</font> </td>
</tr>
<tr>
<td width="50%" align="center" class="ListValueGray"><font size="2">家庭状况</font></td>
<td width="25%" align="center" class="ListValueGray"> <p align="center"><font size="2">
<input name="Family" type="checkbox" id="Family" value="1" <%if instr(Family,"1") then%>checked<%end if%>>
</font> </td>
<td width="25%" align="center" class="ListValueGray"> <p align="center"><font size="2">
<input name="Family" type="checkbox" id="Family" value="2" <%if instr(Family,"2") then%>checked<%end if%>>
</font> </td>
</tr>
<tr>
<td width="50%" align="center" class="ListValueWhite"><font size="2">工作动态</font></td>
<td width="25%" align="center" class="ListValueWhite"> <p align="center"><font size="2">
<input name="Work" type="checkbox" id="Work" value="1" <%if instr(Work,"1") then%>checked<%end if%>>
</font> </td>
<td width="25%" align="center" class="ListValueWhite"> <p align="center"><font size="2">
<input name="Work" type="checkbox" id="Work" value="2" <%if instr(Work,"2") then%>checked<%end if%>>
</font> </td>
</tr>
<tr>
<td width="50%" align="center" class="ListValueGray"><font size="2">奖惩记录</font></td>
<td width="25%" align="center" class="ListValueGray"> <p align="center"><font size="2">
<input name="HpInfo" type="checkbox" id="HpInfo" value="1" <%if instr(HpInfo,"1") then%>checked<%end if%>>
</font> </td>
<td width="25%" align="center" class="ListValueGray"> <p align="center"><font size="2">
<input name="HpInfo" type="checkbox" id="HpInfo" value="2" <%if instr(HpInfo,"2") then%>checked<%end if%>>
</font> </td>
</tr>
<tr>
<td width="50%" align="center" class="ListValueWhite"><font size="2">考勤记录</font></td>
<td width="25%" align="center" class="ListValueWhite"> <p align="center"><font size="2">
<input name="HolInfo" type="checkbox" id="HolInfo" value="1" <%if instr(HolInfo,"1") then%>checked<%end if%>>
</font> </td>
<td width="25%" align="center" class="ListValueWhite"> <p align="center"><font size="2">
<input name="HolInfo" type="checkbox" id="HolInfo" value="2" <%if instr(HolInfo,"2") then%>checked<%end if%>>
</font> </td>
</tr>
<tr>
<td width="50%" align="center" class="ListValueGray"><font size="2">薪资</font></td>
<td width="25%" align="center" class="ListValueGray"> <p align="center"><font size="2">
<input name="PayInfo" type="checkbox" id="PayInfo" value="1" <%if instr(PayInfo,"1") then%>checked<%end if%>>
</font> </td>
<td width="25%" align="center" class="ListValueGray"> <p align="center"><font size="2">
<input name="PayInfo" type="checkbox" id="PayInfo" value="2" <%if instr(PayInfo,"2") then%>checked<%end if%>>
</font> </td>
</tr>
</table>
</fieldset><p>
<input type="hidden" name="UserID" value="<%=trim(request("UserID"))%>">
<input type="button" value="提交" name="B1" class="button" onclick="fnCheckForm()">
<input type="reset" value="重置" name="B2" class="button">
<input type="button" value="删除" name="B2" class="button" onclick="fnDoDelete()">
</p>
</form>
</body>
</html>
<%
UR.Close()
Set UR = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -