📄 post_e.asp
字号:
<%
'************************************************************************************************
' 文件名: BackInfor.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
' 创建人 : 周秋舫
' 日 期 : 2002-05-13
' 修改历史 :
' ****年**月**日 ****** 修改内容:******************************************************************
' 功能描述 : 提供用户输入密码,比较密码是否相同
' 版 本 :
'************************************************************************************************
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>
<!-- #include file="../include/config.inc" -->
<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/debug.inc" -->
<!-- #include file="../include/db.inc" -->
<!-- #include file="../include/datahandle.inc" -->
<%
dim sSQL, crs, rs
dim pPostId : pPostId = GetParam("post_id")
if IsEmpty(pPostId) then
Response.Clear
Server.Transfer("../common/error.asp")
Response.end
end if
dim sPostName, sEmpName, sEmpSerial
'********************************************************************************************************
' 如果是提交,则更新数据库,并reload opener,然后关闭本窗口
if UCase(Request.ServerVariables("REQUEST_METHOD") = "POST") then
dim pEmpSerial : pEmpSerial = GetParam("emp_serial")
sSQL = "update t_specialpost" & _
" set emp_serial = " & pEmpSerial & _
", account_id = (select emp_id from t_employee where serial=" & pEmpSerial & ")" & _
" where post_id = " & pPostId
call ExecuteSQL(dbLocal, sSQL)
Response.Write "<script language=""javascript"">" & vbLF & _
" if (typeof(window.opener) != 'undefined')" & vbLF & _
" window.opener.location.reload();" & vbLF & _
" window.close();" & vbLF & _
"</script>"
Response.end
end if
'****************************************************************************
' 这里先取到该特殊角色的相关数据
'****************************************************************************
sSQL = "select t1.post_name, t1.emp_serial, t2.name as emp_name from t_specialpost t1" & _
" left join t_employee t2 on t1.emp_serial = t2.serial" & _
" where t1.post_id = " & pPostId
set crs = New CRecordset
set rs = crs.Open(dbLocal, sSQL)
if rs.EOF then
crs.Close()
Response.Clear
Response.Write "<script language=""javascript"">window.close();</script>"
Response.end
end if
sPostName = crs.GetValue("post_name")
sEmpName = crs.GetValue("emp_name")
sEmpSerial = crs.GetValue("emp_serial")
crs.Close()
%>
<html>
<head>
<title>设置<%=sPostName%>的人选</title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<link rel="stylesheet" href="../common/common.css" type="text/css">
</head>
<script language="JavaScript">
function doClose()
{
document.clear();
window.close();
}
function doUpdate()
{
if (FormUpdatePost.emp_serial.value != FormUpdatePost.old_emp_serial.value)
FormUpdatePost.submit(); // 有变化,则提交数据库
else
window.close(); // 没有变化,则直接关闭窗口
}
</script>
<body background="../images/bg/bg0.jpg" scroll="no" LeftMargin=0 TopMargin=0>
<form name="FormUpdatePost" action="post_e.asp" method="post">
<table cellspacing=0 cellpadding=0 border=0 width="350" align=center background="../images/bg/btmtx.gif">
<tr height="10px"><td> </td></tr>
<tr height="25px">
<td colspan=3 style="font-family:Arial, Helvetica, sans-serif;color:black" align=center>
<%=sPostName%>:
<input type="hidden" name="post_id" value="<%=pPostId%>" style="border:solid 1px gray;font-size:9pt" size=30 maxlength=20>
<input type="hidden" name="old_emp_serial" value="<%=sEmpSerial%>">
<select name="emp_serial" style="width:86">
<%=selectOptions(dbLocal, "t_employee", "serial", "name", sEmpSerial, "co_id=1 and isdummy=0 and dismissed=0")%>
</select> (<% if sEmpName = "" then Response.write "尚未指定" else Response.write "现为"&sEmpName%>)</td>
<tr height="45px">
<td colspan=3 align=center>
<img border=0 style="cursor:hand"src="../images/button/ok.gif" onclick="doUpdate();">
<img width=20 height=1>
<img border=0 style="cursor:hand" src="../images/button/cancel.gif" onclick="doClose();">
</td>
<tr height="40px">
<td colspan=3 style="font-family:Arial, Helvetica, sans-serif;color:white" align=center>上海市电信公司信息世界分公司<br> ©All rights reserved by Shanghai Telecommunication company information world Branch</td></tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -