📄 editallpersoninf.asp
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css.css">
<meta http-equiv="expires" content="no-cache">
<script language="javascript">
function checkform()
{
if(document.form1.file1.value!="")
{
str= document.form1.file1.value;
strs=str.toLowerCase();
lens=strs.length;
extname=strs.substring(lens-4,lens);
if(extname!=".gif" && extname!=".jpg")
{
alert("上传相片请选择JPG或GIF文件!");
return (false);
}
}
return (true);
}
</script>
<title>企业办公自动化IE37-OA系统</title>
</head>
<body bgcolor="#ffffff" topmargin="5" leftmargin="5">
f<%response.expires=0%>
<!--#include file="asp/sqlstr.asp"-->
<!--#include file="asp/bgsub.asp"-->
<!--#include file="asp/opendb.asp"-->
<!--#include file="asp/checked.asp"-->
<!--#include file="asp/getpopedom.asp"-->
<%
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='default.asp';")
response.write("</script>")
response.end
end if
popedom=getpopedom("allow_edit_all_personinf",oabusyusername)
if popedom<>"" then
response.redirect "asp/disperrorinfo.asp?errorinfo="&popedom
response.end
end if
if request.form("submit")="删除" then
username=request("username")
userdept=request("userdept")
set conn=opendb("oabusy","conn","accessdsn")
sql="delete from personinf where username=" & sqlstr(username)
conn.execute sql
response.redirect "workerinfo.asp?username="&username&"&userdept="&userdept
end if
if request.form("submit")="编辑" then
username=request.form("username")
userdept=request.form("userdept")
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select * from userinf where username="&sqlstr(username)
rs.open sql,conn,1
if rs.eof and rs.bof then
conn.close
set rs=nothing
response.write("<script language=""javascript"">")
response.write("alert(""对不起,没有这个用户!"");")
response.write("history.go(-1);")
response.write("</script>")
response.end
end if
name=rs("name")
%>
<center>
<table align="center">
<tr>
<td>
<b>编辑<%=name%>的个人基本档案</b>
</td><form method="post" action="workerinfo.asp?username=<%=username%>&userdept=<%=userdept%>"><td>
<input type="submit" value="返回">
</td>
</form>
<form method="post" action="editallpersoninf.asp?username=<%=username%>&userdept=<%=userdept%>"><td>
<input type="submit" name="submit" value="删除" onclick="return window.confirm('您真的要删除<%=name%>的个人基本档案吗?');">
</td>
</form>
</tr>
</table>
</center>
<%
dim a(33)
'打开数据库,读出个人档案
set rs=server.createobject("adodb.recordset")
sql="select * from personinf where username=" & sqlstr(username)
rs.open sql,conn,1
if not rs.eof and not rs.bof then
for i=1 to 33
a(i)=rs("a" & i)
next
inputdate=rs("inputdate")
updatedate=rs("updatedate")
havephoto=rs("havephoto")
else
for i=1 to 33
a(i)=""
next
a(26)="请填清楚单位、地址、电话"
a(30)="请按亲属关系、姓名、性别、工作单位及职务、地址顺序填写"
a(32)="请按关系、姓名、地址、电话顺序填写"
inputdate=""
updatedate=""
havephoto="no"
end if
%>
<center>
<br>
<form method="post" ENCTYPE="multipart/form-data" action="editallpersoninfdb.asp" name="form1" onsubmit="return checkform()">
<input type="hidden" name="username" value="<%=username%>">
<input type="hidden" name="userdept" value="<%=userdept%>">
<table border="0" cellpadding="5" cellspacing="0" width="95%">
<tr>
<td width="33%"><b>员工编号:</b><input type=text size=10 name=a1 value="<%=a(1)%>"></td>
<td width="33%"></td>
<td align="right"></td>
</tr>
</table>
<table border="1" cellpadding="5" cellspacing="0" width="95%" bordercolorlight="#808080" bordercolordark="#D4D0C8">
<tr>
<td align="center" style="border-left: 2 solid #cccccc; border-right: 1 solid #cccccc; border-top: 2 solid #cccccc; border-bottom: 1 solid #cccccc" width="15%" height="20"><b>姓
名</b></td>
<td style="border-right: 1 solid #cccccc; border-top: 2 solid #cccccc; border-bottom: 1 solid #cccccc" width="35%"><%=name%></td>
<td align="center" style="border-right: 1 solid #cccccc; border-top: 2 solid #cccccc; border-bottom: 1 solid #cccccc" width="15%"><b>曾
用 名</b></td>
<td style="border-right: 2 solid #cccccc; border-top: 2 solid #cccccc; border-bottom: 1 solid #cccccc" width="35%"><input type=text size=10 name=a2 value="<%=a(2)%>" maxlength="12"></td>
</tr>
<tr>
<td align="center" style="border-left: 2 solid #cccccc; border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc" height="20"><b>性
别</b></td>
<td style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc"><select name=a3 size=1><option value="男" <%=selected(a(3),"男")%>>男 </option><option value="女" <%=selected(a(3),"女")%>>女</option></select></td>
<td align="center" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc"><b>民
族</b></td>
<td style="border-right: 2 solid #cccccc; border-bottom: 1 solid #cccccc"><input type=text size=10 name=a4 value="<%=a(4)%>" maxlength="12"></td>
</tr>
<tr>
<td align="center" style="border-left: 2 solid #cccccc; border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc" height="20"><b>所属部门</b></td>
<td style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc"><%=oabusyuserdept%></td>
<td align="center" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc"><b>职
务</b></td>
<td style="border-right: 2 solid #cccccc; border-bottom: 1 solid #cccccc"><%=oabusyuserlevel%></td>
</tr>
<tr>
<td align="center" style="border-left: 2 solid #cccccc; border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc" height="20"><b>职
称</b></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -