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

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 = "cn.js.fan.web.*"%>
  6. <%@ page import = "com.redmoon.oa.book.*"%>
  7. <%@ page import = "com.redmoon.oa.dept.*"%>
  8. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <title>图书添加</title>
  13. <link href="../common.css" rel="stylesheet" type="text/css">
  14. <script language="JavaScript" type="text/JavaScript">
  15. <!--
  16. function findObj(theObj, theDoc)
  17. {
  18.   var p, i, foundObj;
  19.   
  20.   if(!theDoc) theDoc = document;
  21.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  22.   {
  23.     theDoc = parent.frames[theObj.substring(p+1)].document;
  24.     theObj = theObj.substring(0,p);
  25.   }
  26.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  27.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  28.     foundObj = theDoc.forms[i][theObj];
  29.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  30.     foundObj = findObj(theObj,theDoc.layers[i].document);
  31.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  32.   
  33.   return foundObj;
  34. }
  35. var GetDate=""; 
  36. function SelectDate(ObjName,FormatDate){
  37. var PostAtt = new Array;
  38. PostAtt[0]= FormatDate;
  39. PostAtt[1]= findObj(ObjName);
  40. GetDate = showModalDialog("../util/calendar/calendar.htm", PostAtt ,"dialogWidth:286px;dialogHeight:221px;status:no;help:no;");
  41. }
  42. function SetDate()
  43. findObj(ObjName).value = GetDate; 
  44. }
  45. //-->
  46. </script>
  47. <style type="text/css">
  48. <!--
  49. .style2 {font-size: 14px}
  50. -->
  51. </style>
  52. </head>
  53. <body>
  54. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  55. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  56. <%
  57. String priv = "book.all";
  58. if (!privilege.isUserPrivValid(request, priv)) {
  59. out.println(SkinUtil.makeErrMsg(request, SkinUtil.LoadString(request, "pvg_invalid")));
  60. return;
  61. }
  62. %>
  63. <%@ include file="book_inc_menu_top.jsp"%>
  64. <br>
  65. <table width="494" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF" class="tableframe">
  66. <form action="book_do.jsp?op=add" name="form1" method="post">
  67. <tr>
  68.   <td colspan="4" class="right-title">&nbsp;添加图书</td>
  69.   </tr>
  70. <tr>
  71.   <td width="68">图书编号:</td>
  72.   <td width="171"><input type="text" name="bookNum" id="bookNum" value="" maxlength="110">
  73.     <font color=red>*</font></td>
  74.  <td width="70">书名:  </td>
  75.   <td width="167"><input type="text" name="bookName" id="bookName" value="" maxlength="100">
  76.     <font color=red>*</font></td>
  77. </tr>
  78. <tr>
  79.  <td>图书类别:</td>
  80.  <td><%
  81.   BookTypeDb btd = new BookTypeDb();
  82.   String opts = "";
  83.   Iterator ir = btd.list().iterator();
  84.   while (ir.hasNext()) {
  85.     btd = (BookTypeDb)ir.next();
  86.     opts += "<option value='" + btd.getId() + "'>" + btd.getName() + "</option>";
  87.   }
  88.   %>
  89.    <select name="typeId" id="typeId" >
  90.      <option selected>-----请选择-----</option>
  91.      <%=opts%>
  92.    </select>
  93.    <font color=red>*</font></td>
  94.  <td>图书归属:</td>
  95.  <td width="167">
  96.  <select name="deptCode">
  97.  <%
  98. DeptMgr dm = new DeptMgr();
  99. DeptDb lf = dm.getDeptDb(DeptDb.ROOTCODE);
  100. DeptView dv = new DeptView(lf);
  101. dv.ShowDeptAsOptions(out, lf, lf.getLayer()); 
  102.  %>
  103.  </select></td>
  104. </tr>
  105. <tr>
  106.   <td>作者:  </td>
  107.   <td><input type="text" name="author" id="author" value="" maxlength="100"></td>
  108.  <td>价格:(¥)</td>
  109.   <td><input type="text" name="price" id="price" maxlength="100"><font color=red>*</font></td>
  110. </tr>
  111. <tr>
  112.   <td>出版社:</td>
  113.   <td><input type="text" name="pubHouse" id="pubHouse"value="" maxlength="100"></td>
  114.  <td>出版日期:  </td>
  115.   <td><input type="text" name="pubDate" id="pubDate"value="1900-01-01" maxlength="100">
  116.   <img style="CURSOR: hand" onClick="SelectDate('pubDate', 'yyyy-MM-dd')" src="../images/form/calendar.gif" align="absMiddle" border="0" width="26" height="26"></td>
  117. </tr><tr> 
  118.       <td align="left" nowrap>内容简介:</td>
  119.       <td colspan="3"> <textarea  name="brief"  id="brief" style="width:100%" rows="8"></textarea>      </td>
  120.     </tr><tr>
  121.   
  122.   <td colspan="4" align="center">
  123.      <input name="submit" type="submit" class="button1"  value=" 确  定 " > 
  124.      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  125.      <input type="reset" class="button1"  value=" 重  置 " >  </td>
  126. </tr>
  127. </form>
  128. </table>
  129. </body>
  130. </html>