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

📄 empmain_userright.asp

📁 客户管理模块:随着计算机的普及和网络的迅猛发展
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/EmpMain.asp" -->
<!--#include file="EmpMain_CheckRight.asp"-->
<%
if fncheckupart(1)=true or fncheckupart(2)=true or fncheckupart(3)=true then
else
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 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("发货记录")
overview = URight("跟踪记录")
user_right=URight("权限")
shenf=URight("地区")

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 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("请选择一个用户!")
		return
	}
	if(document.form1.textfield.selectedIndex==1){
	  alert("不能删除管理员帐号!")
	  return
	}
	if(confirm("您确认要删除该用户?")){
		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>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
</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">帐号信息</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="不修改,请留空!" 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">权限:</font></div>
      </td>
      <td width="71%" class="ValueArea"> <select name="user_right"   title="请选择权限!" >
	  <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 %>>
        总经理 </option>
        <option value="3" <%if instr(user_right,3) then%> selected <%end if %>>
        部门经理 </option>
        <option  value="4" <%if instr(user_right,4) then%> selected <%end if %>>
        地区主管</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">地区:</font></div>
      </td>
      <td width="71%" class="ValueArea">
        <input name="shenf" type="text" class="Text" id="shenf"   title="请点击选择地区!" 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">权限信息</font></legend> 
  <table border="1" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber2" align="center">
    <tr bgcolor="#990099"> 
      <td width="50%" align="center" bgcolor="#9900FF"><span class="style1"><font size="2">模块</font></span></td>
      <td width="25%" align="center" bgcolor="#9900FF"><span class="style1"><font size="2">只读</font></span></td>
      <td width="25%" align="center" bgcolor="#9900FF"><span class="style1"><font size="2">可写</font></span></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>
*管理员、总经理为最高权限,部门经理可查看各地区信息,并修改信息。<br>
*地区主管,操作员仅根据地区授权及只读与可写权限。<br>
*<font color="#FF0000">请慎用员工添加权限! </font>
</body>

</html>
<%
UR.Close()
Set UR = Nothing
%>

⌨️ 快捷键说明

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