archive_profession_add.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:5k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "java.net.URLEncoder"%>
  3. <%@ page import = "java.util.*"%>
  4. <%@ page import = "cn.js.fan.util.*"%>
  5. <%@ page import = "com.redmoon.oa.archive.*"%>
  6. <%@ page import = "com.redmoon.oa.person.*"%>
  7. <%@ page import = "cn.js.fan.web.*"%>
  8. <%@ page import = "com.redmoon.oa.BasicDataMgr"%>
  9. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. <title>添加专业技能</title>
  14. <link href="../common.css" rel="stylesheet" type="text/css">
  15. <script language="JavaScript" type="text/JavaScript">
  16. <!--
  17. function findObj(theObj, theDoc)
  18. {
  19.   var p, i, foundObj;
  20.   
  21.   if(!theDoc) theDoc = document;
  22.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  23.   {
  24.     theDoc = parent.frames[theObj.substring(p+1)].document;
  25.     theObj = theObj.substring(0,p);
  26.   }
  27.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  28.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  29.     foundObj = theDoc.forms[i][theObj];
  30.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  31.     foundObj = findObj(theObj,theDoc.layers[i].document);
  32.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  33.   
  34.   return foundObj;
  35. }
  36. var GetDate=""; 
  37. function SelectDate(ObjName,FormatDate){
  38. var PostAtt = new Array;
  39. PostAtt[0]= FormatDate;
  40. PostAtt[1]= findObj(ObjName);
  41. GetDate = showModalDialog("../util/calendar/calendar.htm", PostAtt ,"dialogWidth:286px;dialogHeight:221px;status:no;help:no;");
  42. }
  43. function SetDate()
  44. findObj(ObjName).value = GetDate; 
  45. }
  46. function chkContent(){
  47.    if(form1.userName.value == ""){
  48.      alert("用户名不能为空!")
  49.  form1.userName.focus();
  50.  return false
  51.    }
  52. }
  53. function setPerson(deptCode, deptName, user, userRealName)
  54. {
  55. form1.userName.value = user;
  56. form1.userRealName.value = userRealName;
  57. }
  58. //-->
  59. </script>
  60. <style type="text/css">
  61. <!--
  62. .style2 {font-size: 14px}
  63. -->
  64. </style>
  65. </head>
  66. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  67. <jsp:useBean id="archivePrivilege" scope="page" class="com.redmoon.oa.archive.ArchivePrivilege"/>
  68. <% 
  69. String userName = ParamUtil.get(request,"userName");
  70.     if (!privilege.isUserPrivValid(request, "archive.profession")||!archivePrivilege.canAdminUser(request,userName)) {
  71. out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request, "pvg_invalid")));
  72. return;
  73. }
  74. String op = ParamUtil.get(request,"op");
  75. if (op.equals("add")) {
  76.    UserProfessionMgr upm = new UserProfessionMgr();
  77.    boolean re = false;
  78.    try {  
  79.  re = upm.create(request);
  80.    }
  81.    catch(ErrMsgException e){
  82.  out.print(StrUtil.Alert(e.getMessage()));
  83.    }
  84.    if (re) {
  85.  out.print(StrUtil.Alert_Redirect(SkinUtil.LoadString(request,"res.module.archive", "success_add_profession"),"archive_profession_list.jsp?userName=" + userName));
  86.    } 
  87. }
  88. %>
  89. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  90. <%@ include file="archive_inc_menu_top.jsp"%>
  91. <%
  92. UserInfoDb uid = new UserInfoDb();
  93. uid = uid.getUserInfoDb(userName);
  94. String userRealName = uid.getUserRealName();
  95. BasicDataMgr bdm = new BasicDataMgr("archive");
  96. String options = "";
  97. %>
  98. <br>
  99. <table class="main" cellSpacing="1" cellPadding="2" width="600" align="center" border="0">
  100. <form action="?op=add" name="form1" method="post">
  101.   <tbody>
  102.     <tr>
  103.       <td colspan="2" noWrap class="right-title">添加专业技能信息</td>
  104.     </tr>
  105.     <tr>
  106.       <td class="TableContent" noWrap>用户名称:</td>
  107.         <td colSpan="2"><input maxLength="100" name="userRealName" size="20" readonly value="<%=userRealName%>"><input name="userName" type="hidden" value="<%=userName%>"></td>
  108.       </tr>
  109.     </tr>
  110.     <tr>
  111.       <td class="TableContent" noWrap>专业技术职务:</td>
  112.       <td class="TableData">
  113.    <%options = bdm.getOptionsStr("profession");%>
  114. <select name="profession">
  115. <%=options%>
  116.         </select>
  117.   </td>
  118.     </tr>
  119.     <tr>
  120.       <td class="TableContent" noWrap>证书名称:</td>
  121.       <td class="TableData"><input name="name" id="name" size="36" maxLength="200"></td>
  122.     </tr>
  123.     <tr>
  124.       <td class="TableContent" noWrap>证书编号:</td>
  125.       <td class="TableData"><input name="cnum" id="cnum" size="36" maxLength="200"></td>
  126.     </tr>
  127.     <tr>
  128.       <td class="TableContent" noWrap>获取时间:</td>
  129.       <td class="TableData"><input name="myDate" id="myDate" size="20" readonly>
  130.         <img style="CURSOR: hand" onClick="SelectDate('myDate', 'yyyy-MM-dd')" src="../images/form/calendar.gif" align="absMiddle" border="0" width="26" height="26">日期格式形如 1999-1-2</td>
  131.     </tr>
  132.     <tr>
  133.       <td class="TableContent" noWrap>专长:</td>
  134.       <td class="TableData"><input name="special" id="special" size="36" maxLength="200"></td>
  135.     </tr>
  136.     
  137.     <tr>
  138.       <td class="TableContent" noWrap>备注:</td>
  139.       <td class="TableData"><textarea name="remark" cols="45" rows="3" wrap="yes" class="BigINPUT" id="remark"></textarea></td>
  140.     </tr>
  141.     <tr class="TableControl" align="middle">
  142.       <td colSpan="2" align="center" noWrap><input name="submit" type="submit" class="BigButton" value="提交" onClick="return chkContent()">
  143.         &nbsp;&nbsp;
  144.           <input name="button" type="reset" class="BigButton" value="重填">
  145.         &nbsp;&nbsp;</td>
  146.     </tr>
  147.   </tbody>
  148.   </form>
  149. </table>
  150. </body>
  151. </html>