📄 zhiweiopen.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="DataBase/conn.asp" -->
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from tb_ZhiWei where id="&request("id")
rs.open sql,conn,1,1
select case request("post")
case "rename"
set rs1=server.CreateObject("adodb.recordset")
sq1l="select * from tb_ZhiWei where id="&request("id")
rs1.open sql,conn,1,3
rs1("zhiwei")=request("zhiwei")
rs1.update
rs1.close
response.Write("<script language=javascript>alert('修改成功');opener.location.reload();window.close()</script>")
case "del"
on error resume next
if request("id")=2 then
response.Write("<script>alert('此职位不能删除');location='javascript:history.go(-1)'</script>")
response.End()
end if
sql2="update tb_Employee set zhiwei=null,suoshu=null,kong=0 where zhiwei='"&request("id")&"'"
conn.execute(sql2)
sql1="delete from tb_ZhiWei where id="&request("id")
conn.execute(sql1)
response.Write("<script language=javascript>alert('删除成功');opener.location.reload();window.close()</script>")
end select
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改职位名称</title>
<style type="text/css">
<!--
body {
background-color: #efefef;
}
body,td,th {
font-size: 12px;
}
-->
</style></head>
<body>
<form name="form1" method="post" action="" >
<table width="351" height="102" border="0" align="center" cellspacing="1">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><div align="right">职位名称:</div></td>
<td>
<input name="zhiwei" type="text" id="zhiwei" value="<%=rs("zhiwei")%>">
<input name="post" type="hidden" id="post" value></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="修改" onClick="form1.post.value='rename'">
<input type="reset" name="Submit2" value="重置">
<input type="submit" name="Submit3" value="删除" onClick="form1.post.value='del'">
</div></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -