reader_add.jsp
上传用户:ycdfsj258
上传日期:2022-08-04
资源大小:1094k
文件大小:5k
源码类别:

图形图象

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ page import="com.dao.ReaderDAO" %>
  3. <%@ page import="com.dao.ReaderTypeDAO" %>
  4. <%@ page import="com.actionForm.ReaderForm" %>
  5. <%@ page import="com.actionForm.ReaderTypeForm"%>
  6. <%@ page import="java.util.*"%>
  7. <html>
  8. <%
  9. String str=null;
  10. ReaderTypeDAO readerTypeDAO=new ReaderTypeDAO();
  11. Collection coll=(Collection)readerTypeDAO.query(str);
  12. if(coll==null || coll.isEmpty()){
  13. out.println("<script>alert('请先录入读者类型信息!');history.back(-1);</script>");
  14. }else{
  15.   Iterator it=coll.iterator();
  16.   int ID=0;
  17.   String name="";
  18. %>
  19. <script language="jscript">
  20. function check(form){
  21. if(form.name.value==""){
  22. alert("请输入读者姓名!");form.name.focus();return false;
  23. }
  24. if(form.barcode.value==""){
  25. alert("请输入条形码!");form.barcode.focus();return false;
  26. }
  27. if(form.paperNO.value==""){
  28. alert("请输入证件号码!");form.paperNO.focus();return false;
  29. }
  30. }
  31. </script>
  32. <head>
  33. <title>图书馆管理系统</title>
  34. <link href="CSS/style.css" rel="stylesheet">
  35. </head>
  36. <body onLoad="clockon(bgclock)">
  37. <table width="778" border="0" align="center" cellpadding="0" cellspacing="0" class="tableBorder">
  38.   <tr>
  39.     <td height="183">
  40. <%@include file="navigation.jsp"%>
  41. </td>
  42. </tr>
  43. <td>
  44. <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  45.   <tr>
  46.     <td valign="top" bgcolor="#FFFFFF"><table width="99%" height="510"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="tableBorder_gray">
  47.   <tr>
  48.     <td height="510" valign="top" style="padding:5px;"><table width="98%" height="487"  border="0" cellpadding="0" cellspacing="0">
  49.       <tr>
  50.         <td height="22" valign="top" class="word_orange">当前位置:读者管理 &gt; 读者档案管理 &gt; 添加读者信息 &gt;&gt;&gt;</td>
  51.       </tr>
  52.       <tr>
  53.         <td align="center" valign="top"><table width="100%" height="493"  border="0" cellpadding="0" cellspacing="0">
  54.   <tr>
  55.     <td align="center" valign="top">
  56. <form name="form1" method="post" action="reader.do?action=readerAdd">
  57. <table width="600" height="432"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  58.       <tr>
  59.         <td width="173" align="center">姓名:</td>
  60.         <td width="427" height="39">
  61.           <input name="name" type="text"> 
  62.           *         </td>
  63.       </tr>
  64.       <tr>
  65.         <td width="173" align="center">性别:</td>
  66.         <td height="35"><input name="sex" type="radio" class="noborder" id="radiobutton" value="男" checked>
  67.           <label for="radiobutton">男 </label>
  68.           <label>
  69.           <input name="sex" type="radio" class="noborder" value="女">
  70.           女</label></td>
  71.       </tr>
  72.       <tr>
  73.         <td align="center">条形码:</td>
  74.         <td><input name="barcode" type="text" id="barcode">
  75. * </td>
  76.       </tr>
  77.       <tr>
  78.         <td align="center">读者类型:</td>
  79.         <td>
  80. <select name="typeid" class="wenbenkuang" id="typeid">
  81. <%
  82.   while(it.hasNext()){
  83.     ReaderTypeForm readerTypeForm=(ReaderTypeForm)it.next();
  84. ID=readerTypeForm.getId().intValue();
  85. name=chStr.toChinese(readerTypeForm.getName());
  86. %> 
  87.           <option value="<%=ID%>"><%=name%></option>
  88. <%}%> 
  89.         </select>        </td>
  90.       </tr>
  91.       <tr>
  92.         <td align="center">职业:</td>
  93.         <td><input name="vocation" type="text" id="vocation"></td>
  94.       </tr>
  95.       <tr>
  96.         <td align="center">出生日期:</td>
  97.         <td><input name="birthday" type="text" id="birthday"></td>
  98.       </tr>
  99.       <tr>
  100.         <td align="center">有效证件:</td>
  101.         <td><select name="paperType" class="wenbenkuang" id="paperType">
  102.           <option value="身份证" selected>身份证</option>
  103.           <option value="学生证">学生证</option>
  104.           <option value="军官证">军官证</option>
  105.           <option value="工作证">工作证</option>
  106.                         </select></td>
  107.       </tr>
  108.       <tr>
  109.         <td align="center">证件号码:</td>
  110.         <td><input name="paperNO" type="text" id="paperNO"> 
  111.           * </td>
  112.       </tr>
  113.       <tr>
  114.         <td align="center">电话:</td>
  115.         <td><input name="tel" type="text" id="tel"></td>
  116.       </tr>
  117.       <tr>
  118.         <td align="center">Email:</td>
  119.         <td><input name="email" type="text" id="email" size="50">
  120.           <input name="operator" type="hidden" id="operator" value="<%=chStr.toChinese(manager)%>"></td>
  121.       </tr>
  122.       <tr>
  123.         <td align="center">备注:</td>
  124.         <td><textarea name="remark" cols="50" rows="5" class="wenbenkuang" id="remark"></textarea></td>
  125.       </tr>
  126.       <tr>
  127.         <td align="center">&nbsp;</td>
  128.         <td><input name="Submit" type="submit" class="btn_grey" value="保存" onClick="return check(form1)">
  129. &nbsp;
  130. <input name="Submit2" type="button" class="btn_grey" value="返回" onClick="history.back()"></td>
  131.       </tr>
  132.     </table>
  133. </form>
  134. </td>
  135.   </tr>
  136. </table></td>
  137.       </tr>
  138.     </table>
  139. </td>
  140.   </tr>
  141. </table><%@ include file="copyright.jsp"%></td>
  142.   </tr>
  143. </table>
  144. </td>
  145. </table>
  146. <%}%>
  147. </body>
  148. </html>