📄 hire.asp
字号:
<!--#include file="../includes/keepHouse.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>WebOffice</title>
<script language="javaScript">
function validate(){
var PERSON_NAME = document.FormHire.PERSON_NAME.value;
var DEPT_ID = document.FormHire.DEPT_ID.value;
var POSITION_ID = document.FormHire.POSITION_ID.value;
if (PERSON_NAME==""){
alert("姓名不能为空");
return false;
}
if (DEPT_ID==""){
alert("请选择安插部门");
return false;
}
if (POSITION_ID==""){
alert("请选择职位");
return false;
}
}
</script>
</head>
<body>
<%
call insureID()
dim rsDepartment
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="40">
<tr>
<td width="100%"></td>
</tr>
</table>
<center>
<form name="FormHire" method="POST" action="saveHM.asp" onSubmit="javaScript:return validate();">
<table border="0" width="75%" cellspacing="0" cellpadding="0">
<tr>
<td width="5%" bgcolor="#0000FF" height="35" align=left><img border="0" src="../images/back.gif"></td>
<td width="65%" bgcolor="#0000FF" height="35" align=center>
<b><font color="#FFFFFF"><%=session("DEPARTMENT")%>部门职员添加</font></b></td>
<td width="5%" bgcolor="#0000FF" height="35" align=right><img border="0" src="../images/Close2.gif"></td>
</tr>
</table>
<table border="1" width="75%" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0">
<tr>
<td width="20%" bgcolor="#FCFCFC" height="19">职员姓名</td>
<td width="55%" bgcolor="#FCFCFC" height="19"><input type="text" name="PERSON_NAME" size="20"></td>
</tr>
<tr>
<td width="20%" bgcolor="#FCFCFC" height="19">职员性别 </td>
<td width="55%" bgcolor="#FCFCFC" height="19">
<select size="1" name="GENDER">
<option value="" selected>--请选择--</option>
<option value="Male">男</option>
<option value="Female">女</option>
</select>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#FCFCFC" height="19">安插部门</td>
<td width="55%" bgcolor="#FCFCFC" height="19">
<%
if session("POSITION_ID")=4 then
response.write"<input type=""hidden"" value="""&session("DEPT_ID")&""" name=""DEPT_ID"">"
response.write session("DEPARTMENT")
elseif session("POSITION_ID")=1 then
response.write "<select size=""1"" name=""DEPT_ID"">"
response.write "<option value="""" selected>--请选择--</option>"
set rsDepartment=Server.CreateObject("Adodb.Recordset")
sql="SELECT * FROM Department"
call openDB()
rsDepartment.open sql,conn,1,1
while not rsDepartment.eof
response.write "<option value="""&rsDepartment("DEPT_ID") _
&""">"&rsDepartment("DEPARTMENT")&"</option>"
rsDepartment.MoveNext
wend
response.write "</selecte>"
set rsDepartment=nothing
end if
%>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#FCFCFC" height="17">职位</td>
<td width="55%" bgcolor="#FCFCFC" height="17"><select size="1" name="POSITION_ID">
<option value="" selected>--请选择--</option>
<%
sql="SELECT * FROM Position ORDER BY POSITION_ID DESC"
rs.open sql,conn,1,1
while not rs.eof
if session("POSITION_ID")=4 then
if rs("POSITION_ID")<=session("POSITION_ID") then
rs.MoveNext
else
response.write"<option value="""&rs("POSITION_ID")&""">"&rs("POSITION_NAME")&"</option>"
rs.MoveNext
end if
elseif session("POSITION_ID")=1 then
if rs("POSITION_ID")=1 or rs("POSITION_ID")>4 then
rs.MoveNext
else
response.write"<option value="""&rs("POSITION_ID")&""">"&rs("POSITION_NAME")&"</option>"
rs.MoveNext
end if
else
response.redirect "../ManageSYS/LogIn.asp"
end if
wend
call closeDB()
%>
</select></td>
</tr>
<tr>
<td width="75%" height="50" colspan="2" bgcolor="#EFEFEF"align=center>
<input type="hidden" value="Hire" name="action">
<input type="submit" value="提交" name="B1"></td>
</tr>
</table>
</form>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -