?? empmain_userright.asp
字號(hào):
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/EmpMain.asp" -->
<!--#include file="EmpMain_CheckRight.asp"-->
<%'本系統(tǒng)由5blogs.com修改為客戶關(guān)系管理系統(tǒng),界面來自于網(wǎng)絡(luò)
'-----我博客:http://www.5blogs.com ,歡迎各位前來注冊(cè)使用博客服務(wù)。
'你在使用中有任何問題請(qǐng)?jiān)L問站長(zhǎng)博客:www.5blogs.com/wxtwxt留 言!
'請(qǐng)保留 以上信息
if fncheckupart(1)=true or fncheckupart(2)=true or fncheckupart(3)=true then
else
response.Write("沒有權(quán)限訪問該頁!<br>請(qǐng)?jiān)L問http://www.5blogs.com/")
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 user where ispass=true"
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 user where ispass=true and id = " & request.QueryString("UserID")
URight.CursorType = 0
URight.CursorLocation = 2
URight.LockType = 1
URight.Open()
URight_numRows = 0
username = URight("UserName")
password = URight("userpass")
PayList = URight("客戶信息")
EmpList = URight("員工添加")
HolList = URight("發(fā)貨記錄")
overview = URight("跟蹤記錄")
user_right=URight("權(quán)限")
shenf=URight("地區(qū)")
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>帳號(hào)信息</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 showopen(obj,w,h){
var arr = showModalDialog(obj, window, "dialogWidth:"+w+"px; dialogHeight:"+h+"px; help: no; scroll: yes; status: no");
if ((arr != null))
{
insertHTML(str);
}
}
function fnDoDelete(){
if(document.form1.UserID.value==""){
alert("請(qǐng)選擇一個(gè)用戶!")
return
}
if(document.form1.textfield.selectedIndex==1){
alert("不能刪除管理員帳號(hào)!")
return
}
if(confirm("您確認(rèn)要?jiǎng)h除該用戶?")){
window.location = "Empmain_DeleteUser.asp?UserID=<%=request.QueryString("UserID")%>"
}
}
function ifdisabled(obj){
var str=this.value;
if (str==1 && str==2 && str==3){
document.form1.shenf.disabled=true;
}
}
</script>
</head>
<body bgcolor="#EAF4FF" topmargin="2" class="body">
<form method="POST" action="EmpMain_UserRight_Process.asp" name="form1" id="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">帳號(hào)信息</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%>" ></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" title="不修改,請(qǐng)留空!" id="password" value="" Need="1" >
</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">權(quán)限:</font></div>
</td>
<td width="71%" class="ValueArea"> <select name="user_right" title="請(qǐng)選擇權(quán)限!" >
<option />
<option value="1" <%if instr(user_right,1) then%> selected <%end if %>>管理員 </option>
<option value="2" <%if instr(user_right,2) then%> selected <%end if %>>
總經(jīng)理 </option>
<option value="3" <%if instr(user_right,3) then%> selected <%end if %>>
部門經(jīng)理 </option>
<option value="4" <%if instr(user_right,4) then%> selected <%end if %>>
地區(qū)主管</option>
<option value="5" <%if instr(user_right,5) then%> selected <%end if %>>
操作員</option></select></td>
</tr>
<tr>
<td width="29%" nowrap class="Caption">
<div align="right"><font color="#FF0000" size="2"><strong>*</strong></font><font size="2">地區(qū):</font></div>
</td>
<td width="71%" class="ValueArea">
<input name="shenf" type="text" class="Text" id="shenf" title="請(qǐng)點(diǎn)擊選擇地區(qū)!" value="<%=shenf%>" Need="1" readonly onClick="showopen('Empmain_dq.asp?id=<%=request("UserID")%>',400,400)">
</td>
</tr>
</table>
</fieldset> <fieldset style="padding: 2" class="fiedset"> <legend><font size="2">權(quán)限信息</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>
</table>
</fieldset><p>
<input type="hidden" name="UserID" value="<%=trim(request("UserID"))%>">
<input type="button" value="提交" name="B1" class="button" onclick="fnCheckForm()">
<input type="button" value="刪除" name="B2" class="button" onclick="fnDoDelete()">
</p>
</form>
*管理員、總經(jīng)理為最高權(quán)限,部門經(jīng)理可查看各地區(qū)信息,并修改信息。<br>
*地區(qū)主管,操作員僅根據(jù)地區(qū)授權(quán)及只讀與可寫權(quán)限。<br>
*<font color="#FF0000">請(qǐng)慎用員工添加權(quán)限! </font>
</body>
</html>
<%
UR.Close()
Set UR = Nothing
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -