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

📄 addrewpuninf.asp

📁 红金羚v1.5办公自动化软件是基于大型数据库系统开发的应用系统
💻 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">
<link rel="stylesheet" href="css/css.css">
<script language="javascript1.2" src="js/openwin.js"></script>
<title>红孩儿Office办公系统</title>
</head>
<body bgcolor="#ffffff" topmargin="5" leftmargin="5">
<%
call bghead()
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select name from userinf where username=" & sqlstr(request("username"))
rs.open sql,conn,1
name=rs("name")
%>
<center>
<table>
<tr>
<td>
<b>增加<%=name%>的奖惩情况</b>&nbsp;&nbsp;
</td>
<form method="post" action="punish.asp" name="form2"><td>
<input type="hidden" name="userdept" value="<%=request("userdept")%>">
<input type="hidden" name="username" value="<%=request("username")%>">
<input type="submit" value="返回">
</td>
</form>
</tr>
</table>
</center>
<%
call bgmid()
if request("submit")="增加" then
	errorinfo=""
	username=request("username")
	rewpunname=request("rewpunname")
	if strlength(rewpunname)>30 then
		errorinfo=errorinfo&"奖惩名称太长,不能超过25个汉字!<br>"
	end if
	rewpundate=request("rewpundate")
	if strlength(rewpundate)>15 then
		errorinfo=errorinfo&"奖惩日期太长,不能超过15个英文字符!<br>"
	end if
	rewpunfile=request("rewpunfile")
	if strlength(rewpunfile)>30 then
		errorinfo=errorinfo&"奖惩文号太长,不能超过25个汉字!<br>"
	end if
	rewpunsort=request("rewpunsort")
	if strlength(rewpunsort)>30 then
		errorinfo=errorinfo&"奖惩类型太长,不能超过25个汉字!<br>"
	end if
	rewpuntype=request("rewpuntype")
	if strlength(rewpuntype)>30 then
		errorinfo=errorinfo&"奖惩方式太长,不能超过25个汉字!<br>"
	end if
	remark=request("remark")
	recname=oabusyname
	updatename=oabusyname
	if errorinfo="" then
		sql = "Insert Into rewpuninf (username,rewpunname,rewpundate,rewpunfile,rewpunsort,rewpuntype,remark,recname,updatename) Values( "
		sql = sql & SqlStr(username) & ", "
		sql = sql & SqlStr(rewpunname) & ", "
		sql = sql & SqlStr(rewpundate) & ", "
		sql = sql & SqlStr(rewpunfile) & ", "
		sql = sql & SqlStr(rewpunsort) & ", "
		sql = sql & SqlStr(rewpuntype) & ", "
		sql = sql & SqlStr(remark) & ", "
		sql = sql & SqlStr(recname) & ", "
		sql = sql & SqlStr(updatename) & ")"
		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.rewpunname.value;  
	if(l1=="")  
	{  
		window.alert("奖惩名称必须填写!");  
		document.form1.rewpunname.focus();  
		return (false);  
	}  
  
	var l2=document.form1.rewpundate.value;  
	if(l2=="")  
	{  
		window.alert("奖惩日期必须填写!");  
		document.form1.rewpundate.focus();  
		return (false);  
	}  
}  
</script>  
<br>  
<center>  
<form method="post" action="addrewpuninf.asp" name="form1" onsubmit="return form_check();">  
  <table border="1" cellpadding="0" cellspacing="0" width="505" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF">  
    <tr>  
      <td height="25" width="126" align="center"><b>员工姓名</b></td>  
      <td colspan="3" width="443" bgcolor="#FFFFFF"><%=name%>  
      </td>  
    </tr>  
    <tr>  
      <td width="126" align="center"><b>奖惩名称</b></td>  
      <td colspan="3" width="443" bgcolor="#FFFFFF"><input type="text" name="rewpunname" size=59 maxlength="50"><font color=red>*</font>  
      </td>  
    </tr>  
    <tr>  
      <td width="126" align="center"><b>奖惩日期</b></td>  
      <td bgcolor="#FFFFFF" width="173"><input type="text" name="rewpundate" size=22 maxlength="15"><font color=red>*</font>  
      </td>  
      <td width="69" align="center"><b>奖惩文号</b></td>  
      <td bgcolor="#FFFFFF" width="197"><input type="text" name="rewpunfile" size=24 maxlength="50">   
      </td>  
    </tr>  
    <tr>  
      <td width="126" align="center"><b>奖惩类型</b></td>  
      <td width="173" bgcolor="#FFFFFF"><input type="text" name="rewpunsort" size=22 maxlength="50">  
      </td>  
      <td width="69" align="center"><b>奖惩方式</b></td>  
      <td bgcolor="#FFFFFF" width="197"><input type="text" name="rewpuntype" size=24 maxlength="50">   
      </td>  
    </tr>  
    <tr>  
      <td width="126" align="center"><b>奖惩原因<br>  
        备注说明</b></td>  
      <td colspan="3" width="443" bgcolor="#FFFFFF"><textarea rows="5" name="remark" cols="58"></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  
%>
         </td>
            
          <td background="<%=imgpath%>images/j5.gif" width=19 height=280></td>
          </tr>
        </table>
    </tr>
    <tr>
      <td height=19>
        <table border="0" cellpadding="0" cellspacing="0" width="610" height="19">
          <tr>
            
          <td width=18 height=20><img border="0" src="<%=imgpath%>images/j6.gif" width="18" height="19"></td>
            
          <td background="<%=imgpath%>images/j7.gif" width=100% height=20></td>
            
          <td width="19" height="20"><img border="0" src="<%=imgpath%>images/j8.gif"></td>
          </tr>
		  <tr>
          <td width="100%" height=20 colspan="3"><center>-----<a href="http://office.11k.net/" target=_blank><font color="red">Red office v1.5</font></a>-----</center></td>
		  </tr>
        </table>
      </td>
    </tr>
  </table>
<%
conn.close
set conn=nothing
%>  
</body>  
</html>

⌨️ 快捷键说明

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