📄 w_user.asp
字号:
<%
'功能:带分配人员
'作者:董力勤
'日期:2003-12-2 20:07
'最后修改:展亮 2004-1-10 20:26
%>
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/const.asp"-->
<!--#include file="../inc/md5.asp"-->
<%
'修改员工部门职务
if request.form("addedit_subed3")="1" then
department=request.form("Sdep")
role=trim(request.form("srole"))
if len(role)>1 then
role=left(role,len(role)-1)
else
role=""
end if
infoid=request.form("infoid")
sqlstr="update tbioauser set department="&department&",roleid='"&role&"' where id="&infoid
oConn.Execute sqlstr
response.write "<script>location='W_user.asp'</script>"
end if
'恢复员工口令
if request("repass")="1" then
UserID=trim(request("UserID"))
sqlstr="update tbioauser set Pwd='"&md5("123")&"' where id="&UserID
oConn.Execute sqlstr
end if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function change_role(userid){
Re_str = showModalDialog("change_role.asp?userid="+userid, "", "dialogWidth:32em; dialogHeight:18em; center: Yes; scroll:No; resizable: No; status: No; help: No;");
if (Re_str!='') {
document.form3.Sdep.value=Re_str.split("|")[0];
document.form3.srole.value=Re_str.split("|")[2];
document.form3.infoid.value=Re_str.split("|")[1];
document.form3.addedit_subed3.value='1';
form3.submit();
}
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td width="100%" class="tdTop2" nowrap><img src="../images/icon_title.gif" align="left"> 待分配人员</td>
<td width="60" class="tdTop2" nowrap>
<img src="../images/icon_close.gif" width="16" height="16" border="0" align="absmiddle">
<a href="#" class="LinkTop" onClick="MM_openBrWindow('../reg/main.asp?Department=<%=id%>','','scrollbars=yes,width=600,height=600,left=150,top=95')">增加 </a>
</td>
</tr>
<tr>
<td colspan="2" valign="top" class="td1">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<%sqlstr="select * from tbioauser where department=0"
set rsA=Server.CreateObject("ADODB.RECORDSET")
rsA.open sqlstr,oconn,1,1
do while not rsA.eof%>
<tr class="td2">
<td nowrap><a href="userdetail.asp?strid=<%=rsA("id")%>"><%=rsA("loginName")%></a></td>
<td nowrap><%=rsA("name")%></td>
<td nowrap><%if rsA("sex")=0 then response.write"男" else response.write"女"%></td>
<td width="20" nowrap>
<%if rsA("pwd")<>md5("123") then%>
<a href="?repass=1&UserID=<%=rsA("id")%>" onClick='return window.confirm("你确定要恢复该人员口令为默认口令吗?")'>
<img src="../images/resetpwd.gif" alt="恢复口令为默认口令" width="16" height="16" border="0" align="absmiddle"></a>
<%else%>
<img src="../images/resetpwd.gif" alt="已为默认口令" width="16" height="16" border="0" align="absmiddle" style="filter:xray">
<%end if%>
</td>
<td width="20" nowrap>
<a href="#" onClick="MM_openBrWindow('../reg/MAIN.ASP?SelectID=<%=rsA("id")%>&Department=<%=id%>','','scrollbars=yes,width=600,height=600,left=150,top=95')">
<img src="../images/icon_edit.gif" alt="修改员工信息" width="16" height="16" border="0" align="absmiddle"></a>
</td>
<td width="20" nowrap>
<a href="#" onClick='if (window.confirm("真的要删除吗?\n该操作不可逆。")) document.location="deluser.asp?strID=<%=rsA("id")%>&strDepID=<%=id%>";'>
<img src="../images/icon_dele1.gif" alt="删除员工" width="16" height="16" border="0" align="absmiddle"></a>
</td>
<td width="20" nowrap><a href="javascript:change_role(<%=rsA("id")%>)"><img src="../images/rs_move.gif" alt="人事调动" width="16" height="16" border="0" align="absmiddle"></a>
</td>
</tr>
<%rsA.movenext
loop
rsA.close%>
</table>
<form name="form3" method="post" action="">
<input name="Sdep" type="hidden" id="Sdep" value="">
<input name="srole" type="hidden" id="srole" value="">
<input type=hidden name="addedit_subed3" value="0">
<input name="infoid" type=hidden id="infoid" value="">
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -