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

📄 hr_inputpx.asp

📁 网络办公系统源码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<%
if  ChkAdmin("oa_hrpeixun")=False then
   call message("您没有管理培训信息的权限","back")
   call endexit()
end if
%>
<!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">
<title>无标题文档</title>
<SCRIPT language=JavaScript src="../../inc/meizzDate.js"></SCRIPT>
<link href="../img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
.style2 {color: #CC0000}
-->
</style>
</head>
<%
act=request.QueryString("act")
companyid=Session("companyid")'公司id
p_name=replace(trim(request.Form("sendto"))," ","")
p_title=replace(trim(request.Form("p_title")),"'","")
p_danwei=replace(trim(request.Form("p_danwei")),"'","")
p_time1=replace(trim(request.Form("p_time1"))," ","")
p_time2=replace(trim(request.Form("p_time2")),"'","")
p_txt=replace(trim(request.Form("p_txt")),"'","")

insql="insert oa_peixun(p_name,p_title,p_danwei,p_time1,p_time2,p_txt,companyid) "& _
"values('"&p_name&"','"&p_title&"','"&p_danwei&"','"&p_time1&"','"&p_time2&"','"&p_txt&"',"&companyid&")"

upsql="update oa_peixun set p_name='"&p_name&"',p_title='"&p_title&"',p_danwei='"&p_danwei&"',p_time1='"&p_time1&"',p_time2='"&p_time2&"',p_txt='"&p_txt&"' where id="&request.Form("modid")
	if act="add" then
		conn.execute(insql)
		call Message("发布成功","hr_peixun.asp")
	elseif act="edit" then
		conn.execute(upsql)
		call Message("修改成功","hr_peixun.asp")
	end if
%>
<body>
<%if act="" then%>
<form name="form1" method="post" onSubmit="return CheckForm();">
<input type="hidden" name="username" value="所有人">
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <tr align="center" bgcolor="#CC0000">
    <td height="25" colspan="2"><span class="style1"> 培训信息设置  </span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td width="13%" height="25" align="center">参加培训人</td>
    <td width="87%" height="25" align="left"><input name="sendto" type="text" class="tabel1" id="sendto" size="50" >
      <span class="style2">
      <select name="uname" id="uname">
        <option value="所有人">所有人</option>
        <%
	  	sql="select id, truename from oa_Admin where companyid="&session("companyid")
		set rs=conn.execute(sql)
		do while not rs.eof
	  %>
        <option value="<%=rs("truename")%>"><%=rs("truename")%></option>
        <%
	  rs.movenext
	  loop
	  rs.close
	  set rs=nothing
	  %>
      </select>
      <input name="button" type="button" class="bon" onClick="addsendtouser()" value="增加">
      <input name="Submit4" type="button" class="bon" onclick="document.form1.sendto.value=''" value="清除">
      *</span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 培训项目 </td>
    <td height="25" align="left"><input name="p_title" type="text" class="tabel1" id="p_title" size="50" >
      <span class="style2">*</span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 培训单位</td>
    <td height="25" align="left"><input name="p_danwei" type="text" class="tabel1" id="p_danwei" size="50"></td>
    </tr>
  
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 开始日期</td>
    <td height="25" align="left"><span class="TableRow2">
      <input name="p_time1" type="text" class="tabel1" id="p_time1" value="<%=date()%>" onFocus="setday(this)">
      </span></td>
    </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 结束日期 </td>
    <td height="25" align="left"><span class="TableRow2">
      <input name="p_time2" type="text" class="tabel1" id="p_time2" value="<%=date()%>" onFocus="setday(this)">
    </span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 备注 </td>
    <td height="25" align="left"><textarea name="p_txt" cols="40" rows="6" class="tabel1">免费版不支持此功能,请购买正式版。
网址:http://www.hokilly.com
演示:http://www.hokilly.com/demo/hokilly_oa90/
咨询QQ:15916190
电话:13915064582</textarea></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">&nbsp;</td>
    <td height="25" align="left"> 
 
   
  <input name="Submit2" type="submit" class="bon" value="提交">
 
  <input name="Submit3" type="reset" class="bon" value="重置">
 
<input name="Submit32" type="button" class="bon" value="返回" onClick="window.history.go(-1)"></td>
  </tr>
</table>
</form>
<%
elseif act="edits" then
id=request.QueryString("id")
sql="select * from oa_peixun where id="&id
set rs1=conn.execute(sql)
if not rs1.eof then
 	sendto1=trim(rs1("p_name"))
 	p_title1=trim(rs1("p_title"))
	p_danwei1=trim(rs1("p_danwei"))
	p_time11=trim(rs1("p_time1"))
	p_time21=trim(rs1("p_time2"))
	p_txt1=trim(rs1("p_txt"))
end if
rs1.close
set rs1=nothing
%>
<form name="form1" method="post" action="hr_inputpx.asp?act=edit" onSubmit="return CheckForm();">
<input type="hidden" name="username" value="所有人">
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <tr align="center" bgcolor="#CC0000">
    <td height="25" colspan="2"><span class="style1"> 培训信息修改</span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td width="13%" height="25" align="center">参加培训人</td>
    <td width="87%" height="25" align="left"><input name="sendto" type="text" class="tabel1" id="sendto" size="50" value="<%=sendto1%>">
      <span class="style2">
      <select name="uname" id="uname">
        <option value="所有人">所有人</option>
        <%
	  	sql="select id, truename from oa_Admin where companyid="&session("companyid")
		set rs=conn.execute(sql)
		do while not rs.eof
	  %>
        <option value="<%=rs("truename")%>"><%=rs("truename")%></option>
        <%
	  rs.movenext
	  loop
	  rs.close
	  set rs=nothing
	  %>
      </select>
      <input name="button" type="button" class="bon" onClick="addsendtouser()" value="增加">
      <input name="Submit4" type="button" class="bon" onclick="document.form1.sendto.value=''" value="清除">
      *</span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 培训项目 </td>
    <td height="25" align="left"><input name="p_title" type="text" class="tabel1" id="p_title" size="50" value="<%=p_title1%>">
      <span class="style2">*</span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 培训单位</td>
    <td height="25" align="left"><input name="p_danwei" type="text" class="tabel1" id="p_danwei" size="50" value="<%=p_danwei1%>"></td>
    </tr>
  
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 开始日期</td>
    <td height="25" align="left"><span class="TableRow2">
      <input name="p_time1" type="text" class="tabel1" id="p_time1" value="<%=p_time11%>" onFocus="setday(this)">
      </span></td>
    </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 结束日期 </td>
    <td height="25" align="left"><span class="TableRow2">
      <input name="p_time2" type="text" class="tabel1" id="p_time2" value="<%=p_time21%>" onFocus="setday(this)">
    </span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 备注 </td>
    <td height="25" align="left"><textarea name="p_txt" cols="40" rows="6" class="tabel1"><%=p_txt1%></textarea></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">&nbsp;</td>
    <td height="25" align="left"> 
 
   
  <input name="Submit2" type="submit" class="bon" value="提交">
 
  <input name="Submit3" type="reset" class="bon" value="重置">
 
<input name="Submit32" type="button" class="bon" value="返回" onClick="window.history.go(-1)">
<input name="modid" type="hidden" id="modid" value="<%=id%>"></td>
  </tr>
</table>
</form>
<%
elseif act="view" then
id=request.QueryString("id")
sql="select * from oa_peixun where id="&id
set rs1=conn.execute(sql)
if not rs1.eof then
 	sendto1=replace(trim(rs1("p_name")),"|"," ")
 	p_title1=trim(rs1("p_title"))
	p_danwei1=trim(rs1("p_danwei"))
	p_time11=trim(rs1("p_time1"))
	p_time21=trim(rs1("p_time2"))
	p_txt1=trim(rs1("p_txt"))
end if
rs1.close
set rs1=nothing
%>
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <tr align="center" bgcolor="#CC0000">
    <td height="25" colspan="2"><span class="style1"> 培训信息</span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td width="13%" height="25" align="center">参加培训人</td>
    <td width="87%" height="25" align="left"><%=sendto1%></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 培训项目 </td>
    <td height="25" align="left"><%=p_title1%></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 培训单位</td>
    <td height="25" align="left"><%=p_danwei1%></td>
  </tr>
  
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 开始日期</td>
    <td height="25" align="left"><%=p_time11%></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 结束日期 </td>
    <td height="25" align="left"><%=p_time21%></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 备注 </td>
    <td height="25" align="left"><%=p_txt1%></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">&nbsp;</td>
    <td height="25" align="left"><input name="Submit322" type="button" class="bon" value="返回" onClick="window.history.go(-1)"></td>
  </tr>
</table>
<%end if%>
</body>
</html>
<%
	set conn=nothing
%>
<script language="javascript">
function CheckForm()
{
    var objFrm=document.form1;
	if(objFrm.sendto.value=="")
	{
		alert("请输入参加人员!");
		objFrm.sendto.focus();
		return false;
	}
	if(objFrm.p_title.value=="")
	{
		alert("请输入培训项目!");
		objFrm.p_title.focus();
		return false;
	}
	return true;

}
</script>

<script Language="JavaScript">
function addsendtouser()
{
	var sendtouserstr,sendtouserstr1;
	sendtouserstr='|'+document.form1.uname.value;
	sendtouserstr1='|'+'所有人';
	if (document.form1.sendto.value.indexOf(sendtouserstr)==-1)
	{
		if (document.form1.uname.value=="所有人") 
		{	document.form1.sendto.value=document.form1.sendto.value+'|'+document.form1.uname.value;
		}
		else if (document.form1.uname.value!="所有人" && document.form1.sendto.value.indexOf(sendtouserstr1)==-1)
		{
document.form1.sendto.value=document.form1.sendto.value+'|'+document.form1.uname.value;
		document.form1.sendto.value=document.form1.sendto.value;
		}
		else
		{
			alert("该发送目标已包含在所有人中!");
		}
	}
	else
	{
		alert("该发送目标已经存在!");
	}
}
</script>

⌨️ 快捷键说明

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