⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addchangjob.asp

📁 很好的OA办公系统
💻 ASP
字号:
<%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/keepformat.asp"-->
<%
function strlength(inputstr)
	dim length,i
	length=0
	for i=1 to len(inputstr)
		if asc(mid(inputstr,i,1))<0 then
			length=length+2
		else
			length=length+1
		end if
	next
	strlength=length
end function
'-----------------------------------------
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

'--------------------------------------
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="expires" content="no-cache">
<link rel="stylesheet" href="css/css.css">
<title></title>
</head>
<body bgcolor="#ffffff" topmargin="5" leftmargin="5">
<%
 
'打开数据库读出用户名
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select name from userinf where username=" & sqlstr(request.form("username"))
rs.open sql,conn,1
name=rs("name")
%>
<center>
<table align="center">
<tr>
<td>
<b>增加<%=name%>的职位变动信息</b>&nbsp;&nbsp;
</td>
<form method="post" action="jobchanginf.asp" name="form2"><td>
<input type="hidden" name="userdept" value="<%=request.form("userdept")%>">
<input type="hidden" name="username" value="<%=request.form("username")%>">
<input type="submit" value="返回">
</td>
</form>
</tr>
</table>
</center>
<%
 
if request.form("submit")="增加" then
	errorinfo=""
	username=request.form("username")
	oldjob=request.form("oldjob")
	if strlength(oldjob)>30 then
		errorinfo=errorinfo&"原职务太长,不能超过15个汉字!<br>"
	end if
	changjob=request.form("changjob")
	if strlength(changjob)>30 then
		errorinfo=errorinfo&"变动职务太长,不能超过15个汉字!<br>"
	end if
	changdate=request.form("changdate")
	if strlength(changdate)>15 then
		errorinfo=errorinfo&"变动时间太长,不能超过15个英文字符!<br>"
	end if
	changfile=request.form("changfile")
	if strlength(changfile)>30 then
		errorinfo=errorinfo&"职务变动文号太长,不能超过15个汉字!<br>"
	end if
	changsort=request.form("changsort")
	if strlength(changsort)>30 then
		errorinfo=errorinfo&"职务变动类型太长,不能超过15个汉字!<br>"
	end if
	changtype=request.form("changtype")
	if strlength(changtype)>30 then
		errorinfo=errorinfo&"职务变动方式太长,不能超过15个汉字!<br>"
	end if
	changreason=request.form("changreason")
	recusername=oabusyname
	updateusername=oabusyname
	if errorinfo="" then
		sql = "Insert Into changjob (username,oldjob,changjob,changdate,changfile,changsort,changtype,changreason,recusername,updateusername) Values( "
		sql = sql & SqlStr(username) & ", "
		sql = sql & SqlStr(oldjob) & ", "
		sql = sql & SqlStr(changjob) & ", "
		sql = sql & SqlStr(changdate) & ", "
		sql = sql & SqlStr(changfile) & ", "
		sql = sql & SqlStr(changsort) & ", "
		sql = sql & SqlStr(changtype) & ", "
		sql = sql & SqlStr(changreason) & ", "
		sql = sql & SqlStr(recusername) & ", "
		sql = sql & SqlStr(updateusername) & ")"
		conn.Execute sql
%>
<br><br>
<center><font color="red" size="+1">成功增加员工职务变动信息!</font></center>
<br><br>
<%
	else
%>
<div align="center">
<table widht="80%" border="0">
<tr><td>
<center><b><font color="red" size="+1">出错了</font></b></center><br><br>
<font color="#ee0000" size="+1"><%=errorinfo%></font>
<center><input type="button" value="返回" onclick="history.go( -1 );return true;"></center>
</td></tr></table>
</div>
<%
	end if
else
%>
<script Language="JavaScript">
function form_check()
{
	var l1=document.form1.oldjob.value;
	if(l1=="")
	{
		window.alert("原职务必须填写!");
		document.form1.oldjob.focus();
		return (false);
	}

	var l2=document.form1.changjob.value;
	if(l2=="")
	{
		window.alert("变动职务必须填写!");
		document.form1.changjob.focus();
		return (false);
	}

	var l3=document.form1.changdate.value;
	if(l3=="")
	{
		window.alert("变动时间必须填写!");
		document.form1.changdate.focus();
		return (false);
	}
}
</script>
<br>
<center>
<form method="post" action="addchangjob.asp" name="form1" onsubmit="return form_check();">
  <table border="1" cellpadding="5" cellspacing="0" width="95%" bordercolorlight="#808080" bordercolordark="#D4D0C8">
    <tr>
      <td height="25" width="15%" align="center"><b>员工姓名</b></td>
      <td colspan="3" width="85%"><%=name%>
      </td>
    </tr>
    <tr>
      <td width="15%" align="center"><b>原&nbsp;职&nbsp;务</b></td>
      <td width="35%"><input type="text" name="oldjob" size=24 maxlength="30"><font color=red>*</font> 
      </td>
      <td width="15%" align="center"><b>变动职务</b></td>
      <td width="35%"><input type="text" name="changjob" size=25 maxlength="30"><font color=red>*</font>  
      </td>
    </tr>
    <tr>
      <td align="center"><b>变动时间</b></td>
      <td><input type="text" name="changdate" size=24 maxlength="15"><font color=red>*</font> 
      </td>
      <td width="15%" align="center"><b>变动文号</b></td>
      <td><input type="text" name="changfile" size=25 maxlength="30"> 
      </td>
    </tr>
    <tr>
      <td width="15%" align="center"><b>变动类型</b></td>
      <td><input type="text" name="changsort" size=24 maxlength="30">
      </td>
      <td width="15%" align="center"><b>变动方式</b></td>
      <td><input type="text" name="changtype" size=25 maxlength="30"> 
      </td>
    </tr>
    <tr>
      <td width="15%" align="center"><b>变动原因<br>
        备注说明</b></td>
      <td colspan="3" width="85%"><textarea rows="6" name="changreason" cols="68"></textarea>
      </td>
    </tr>
  </table>
<br>
<input type="hidden" name="userdept" value="<%=request("userdept")%>">
<input type="hidden" name="username" value="<%=request("username")%>">     
<font color=red>*</font>为必填项&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="submit" value="增加">     
</form>   
</center>   
<%   
end if   
%>
<table align="center">
            
 
    <tr>
      <td height=19>
        <table border="0" cellpadding="0" cellspacing="0" width="610" height="19">
		  <tr>
          <td width="100%" height=20 colspan="3">
            <p align="center"><font color="#808080">IE37 &copy; <a href="http://www.ie37.com" target="_blank">IE37.com</a></font></td>  
		  </tr>
        </table>
      </td>
    </tr>
<%
conn.close
set conn=nothing
%>   
</body>   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -