📄 newregister.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/MainBorder.css" rel="stylesheet" type="text/css">
<title>注册</title>
<style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
-->
</style>
</head>
<style type="text/css">
<!--
table {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
font-style: normal;
text-align: left;
}
#title {
font-size: 24px;
}
#di{
text-align:right;
font-family:Arial, Helvetica, sans-serif;
font-size:12px
}
.style2 {font-family: "华文中宋", "宋体"; }
.STYLE3 {color: #FFFFFF}
-->
</style>
<body >
<!--#include file ="Connections/auto.asp"-->
<%
id=request.form("id")
if id<>"" then
lname=request.form("lname")
part=request.form("part")
position=request.form("position")
data=request.form("data")
pc=request.form("pc")
hometel=request.form("hometel")
tel=request.form("tel")
address=request.form("address")
start=request.form("start")
history=request.form("history")
pic=request.form("pic")
part = request.form("part")
if pic <> "" then
set fso1= server.CreateObject("Scripting.FileSystemObject")
set file1= fso1.GetFile(pic)
strpath=server.MapPath("main_renshi.asp")
strpath=left(strpath,len(strpath)-15)
file1.copy strpath&"picture\Yuangong\"&file1.name
pic = file1.name
end if
%>
<%
set RS = server.CreateObject("ADODB.Recordset")
Sname="select * from Login where ID='"&id&"'"
RS.open Sname , CN
if RS.eof then
set RS = server.CreateObject("ADODB.Recordset")
set RS1 = server.CreateObject("ADODB.Recordset")
RS.open "Login" , CN ,1,4
RS1.open "Message" , CN ,1,4
RS.addnew
RS1.addnew
RS("ID")=id
RS("PWD")="000000"
RS("Part")=part
RS1("ID")=id
RS1("Name")=lname
RS1("Position")=position
RS1("Data")=data
RS1("Address")=address
RS1("Tel")=tel
RS1("Hometel")=hometel
RS1("PC")=pc
RS1("Start")=start
RS1("History")=history
RS1("Pic")=pic
RS.updatebatch
RS1.updatebatch
RS.close
RS1.close
set RS = nothing
set RS1 = nothing
%>
<script language="vbscript">
window.alert("员工信息已成功登记!")
window.navigate("newregister.asp")
</script>
<%
else
RS.close
%>
<script language="vbscript">
window.alert("注册失败,员工编号已存在!")
window.navigate("newregister.asp")
</script>
<%
end if
else
%>
<table width="200" border="0">
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<form action="newregister.asp" method="post" id="llog" name="llog">
<table width="500" border="0" cellspacing="1" bgcolor="#666699" cellpadding="0" align="center">
<tr>
<td colspan="2" align="center" ><div class="style2 STYLE3 STYLE1" id="title" >新员工信息登记</div></td>
</tr>
<tr>
<td width="169" align="right" bgcolor="#FFFFFF">员工编号: </td>
<td width="331" align="left" bgcolor="#FFFFFF"> <input type="text" name="id"></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">员工姓名: </td>
<td bgcolor="#FFFFFF"> <input type="text" name="lname"></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">所在部门: </td>
<td bgcolor="#FFFFFF"> <select name="part" class="s04">
<%
sql="select * from part"
set rs2=CN.execute(sql)
while not rs2.eof
%>
<option value="<%=rs2("epart")%>" ><%=rs2("cpart")%></option>
<%
rs2.movenext
wend
rs2.close
%>
</select>
</td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">现任职务: </td>
<td id=PPP bgcolor="#FFFFFF"> <select name="position" class="s04" >
<option value="jingli">经理</option>
<option value="mishu">秘书</option>
<option value="yuangong">员工</option>
</select></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">出生日期: </td>
<td bgcolor="#FFFFFF"> <input type="text" name="data">"####-##-##"</td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">身份证号: </td>
<td bgcolor="#FFFFFF"> <input type="text" name="pc">"18位"</td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">家庭电话: </td>
<td bgcolor="#FFFFFF"> <input type="text" name="hometel">"8位"</td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">手机号码: </td>
<td bgcolor="#FFFFFF"> <input type="text" name="tel">"11位"</td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">家庭住址: </td>
<td bgcolor="#FFFFFF"> <input type="text" name="address"></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">入公司时间: </td>
<td bgcolor="#FFFFFF"> <input type="text" name="start"> "####-##-##"</td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">员工近照: </td>
<td bgcolor="#FFFFFF"> <input name="pic" type="file" class="s04"></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF">员工介绍: </td>
<td bgcolor="#FFFFFF"> <textarea name="history" cols="40" rows="5"></textarea></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> <input name="Submit" type="submit" class="s04" value="登记员工信息">
<input name="reset" type="reset" class="s04" id="reset" value="重新填写"></td>
</tr>
</table>
</form>
<%
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -