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

图形图象

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ page import="com.dao.BorrowDAO" %>
  3. <%@ page import="com.actionForm.BorrowForm" %>
  4. <%@ page import="com.actionForm.ReaderForm" %>
  5. <%@ page import="java.util.*"%>
  6. <html>
  7. <%
  8. ReaderForm readerForm=(ReaderForm)request.getAttribute("readerinfo");
  9. Collection coll=(Collection)request.getAttribute("borrowinfo");
  10. int borrowNumber=0;
  11. %>
  12. <head>
  13. <title>图书馆管理系统</title>
  14. <link href="CSS/style.css" rel="stylesheet">
  15. </head>
  16. <body onLoad="clockon(bgclock)">
  17. <table width="778" border="0" align="center" cellpadding="0" cellspacing="0" class="tableBorder">
  18.   <tr>
  19.     <td height="183">
  20. <%@include file="navigation.jsp"%>
  21. </td>
  22. </tr>
  23. <td>
  24. <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  25.   <tr>
  26.     <td valign="top" bgcolor="#FFFFFF"><table width="99%" height="510"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="tableBorder_gray">
  27.   <tr>
  28.     <td height="510" align="center" valign="top" style="padding:5px;"><table width="98%" height="487"  border="0" cellpadding="0" cellspacing="0">
  29.       <tr>
  30.         <td height="22" valign="top" class="word_orange">当前位置:图书借还 &gt; 图书借阅 &gt;&gt;&gt;</td>
  31.       </tr>
  32.       <tr>
  33.         <td align="center" valign="top">
  34. <script language="javascript">
  35. function checkreader(form){
  36. if(form.barcode.value==""){
  37. alert("请输入读者条形码!");form.barcode.focus();return;
  38. }
  39. form.submit();
  40. }
  41. function checkbook(form){
  42. if(form.barcode.value==""){
  43. alert("请输入读者条形码!");form.barcode.focus();return;
  44. }
  45. if(form.inputkey.value==""){
  46. alert("请输入查询关键字!");form.inputkey.focus();return;
  47. }
  48. if(form.number.value-form.borrowNumber.value<=0){
  49. alert("您不能再借阅其他图书了!");return;
  50. }
  51. form.submit();
  52. }
  53. </script>
  54. <form name="form1" method="post" action="borrow.do?action=bookborrow">
  55. <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableBorder_gray">
  56.    <tr>
  57.      <td valign="top"><table width="100%" border="0" cellpadding="02" cellspacing="2" bordercolor="#E3F4F7">
  58.        <tr>
  59.          <td height="27" bgcolor="#E3F4F7">&nbsp;<img src="Images/bookBorrow.jpg" width="73" height="23"></td>
  60.        </tr>
  61.        <tr>
  62.          <td valign="top" bgcolor="#E3F4F7">
  63. <%
  64. int ID=0;
  65. String name="";
  66. String sex="";
  67. String barcode="";
  68. String birthday="";
  69. String paperType="";
  70. String paperNO="";
  71. int number=0;
  72. String typename="";
  73. if(readerForm!=null){
  74. ID=readerForm.getId().intValue();
  75. name=chStr.toChinese(readerForm.getName());
  76. sex=chStr.toChinese(readerForm.getSex());
  77. barcode=readerForm.getBarcode();
  78. birthday=readerForm.getBirthday();
  79. paperType=chStr.toChinese(readerForm.getPaperType());
  80. paperNO=readerForm.getPaperNO();
  81. number=readerForm.getNumber();
  82. typename=chStr.toChinese(readerForm.getTypename());
  83. }
  84. %>
  85.  <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  86.            <tr>
  87.              <td width="33%"><table width="100%" height="74" border="0" cellpadding="0" cellspacing="0">
  88.                <tr>
  89.                  <td height="27" colspan="2" align="center"><table width="90%" height="21" border="0" cellpadding="0" cellspacing="0">
  90.                    <tr>
  91.                      <td background="Images/reader_checkbg.jpg">&nbsp;读者验证</td>
  92.                    </tr>
  93.                  </table></td>
  94.                </tr>
  95.                <tr>
  96.                  <td width="8%" height="27">&nbsp;</td>
  97.                  <td width="92%">读者条形码:</td>
  98.                </tr>
  99.                <tr>
  100.                  <td height="27" colspan="2" align="center"><input name="barcode" type="text" id="barcode" value="<%=barcode%>" size="24">
  101.                    &nbsp;
  102.                    <input name="Button" type="button" class="btn_grey" value="确定" onClick="checkreader(form1)"></td>
  103.                </tr>
  104.              </table></td>
  105.              <td width="1%" align="center" valign="bottom"><img src="Images/borrow_fg.gif" width="18" height="111"></td>
  106.              <td width="66%" align="right">
  107.  <table width="96%" border="0" cellpadding="0" cellspacing="0">
  108.                <tr>
  109.                  <td height="27">姓&nbsp;&nbsp;&nbsp;&nbsp;名:
  110.                        <input name="readername" type="text" id="readername" value="<%=name%>"></td>
  111.                  <td>性&nbsp;&nbsp;&nbsp;&nbsp;别:
  112.                    <input name="sex" type="text" id="sex" value="<%=sex%>"></td>
  113.                </tr>
  114.                <tr>
  115.                  <td height="27">证件类型:
  116.                    <input name="paperType" type="text" id="paperType" value="<%=paperType%>"></td>
  117.                  <td>证件号码:
  118.                    <input name="paperNo" type="text" id="paperNo" value="<%=paperNO%>"></td>
  119.                </tr>
  120.                <tr>
  121.                  <td height="27">读者类型:
  122.                    <input name="readerType" type="text" id="readerType" value="<%=typename%>"></td>
  123.                  <td>可借数量:
  124.                    <input name="number" type="text" id="number" value="<%=number%>" size="17">
  125.                    册                   </td>
  126.                </tr>
  127.              </table>  </td>
  128.            </tr>
  129.          </table>
  130.  </td>
  131.        </tr>
  132.        <tr>
  133.          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  134.            <tr>
  135.              <td height="55" valign="top" bgcolor="#E3F4F7"><table width="100%" height="88" border="0" cellpadding="0" cellspacing="0">
  136.                <tr>
  137.                  <td height="38">&nbsp;添加的依据:
  138.                    <input name="f" type="radio" class="noborder" value="barcode" checked>
  139.                    图书条形码 &nbsp;&nbsp;
  140.                    <input name="f" type="radio" class="noborder" value="bookname">
  141. 图书名称&nbsp;&nbsp;
  142. <input name="inputkey" type="text" id="inputkey" size="50">
  143.                    <input name="Submit2" type="button" class="btn_grey" value="确定" onClick="checkbook(form1)">
  144.                    <input name="operator" type="hidden" id="operator" value="<%=chStr.toChinese(manager)%>">
  145.   <input name="Button" type="button" class="btn_grey" value="完成借阅" onClick="window.location.href='bookBorrow.jsp'">
  146.                    </td>
  147.                </tr>
  148.                <tr>
  149.                  <td align="center"><table width="99%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#D2E3E6" bgcolor="#FFFFFF">
  150.                    <tr align="center" bgcolor="#e3F4F7">
  151.                      <td width="29%" height="25" bgcolor="#F0FAFB">图书名称</td>
  152.                      <td width="12%" bgcolor="#F0FAFB">借阅时间</td>
  153.                      <td width="14%" bgcolor="#F0FAFB">应还时间</td>
  154.                      <td width="17%" bgcolor="#F0FAFB">出版社</td>
  155.                      <td width="14%" bgcolor="#F0FAFB">书架</td>
  156.                      <td colspan="2" bgcolor="#F0FAFB">定价(元)</td>
  157.                    </tr>
  158. <%
  159. String bookname="";
  160. String borrowTime="";
  161. String backTime="";
  162. Float price=new Float(0);
  163. String pubname="";
  164. String bookcase="";
  165. if(coll!=null && !coll.isEmpty()){
  166. borrowNumber=coll.size();
  167. Iterator it=coll.iterator();
  168. while(it.hasNext()){
  169. BorrowForm borrowForm=(BorrowForm)it.next();
  170. bookname=chStr.toChinese(borrowForm.getBookName());
  171. borrowTime=borrowForm.getBorrowTime();
  172. backTime=borrowForm.getBackTime();
  173. price=borrowForm.getPrice();
  174. pubname=chStr.toChinese(borrowForm.getPubName());
  175. bookcase=chStr.toChinese(borrowForm.getBookcaseName());
  176. %>
  177.                    <tr>
  178.                      <td height="25" style="padding:5px;">&nbsp;<%=bookname%></td>
  179.                      <td style="padding:5px;">&nbsp;<%=borrowTime%></td>
  180.                      <td style="padding:5px;">&nbsp;<%=backTime%></td>
  181.                      <td align="center">&nbsp;<%=pubname%></td>
  182.                      <td align="center">&nbsp;<%=bookcase%></td>
  183.                      <td width="14%" align="center">&nbsp;<%=price%></td>
  184.                    </tr>
  185. <% }
  186. }%>
  187. <tr><td>
  188.  <input name="borrowNumber" type="hidden" id="borrowNumber" value="<%=borrowNumber%>">
  189. </td>
  190. </tr>
  191.                  </table>
  192.                   </td>
  193.                </tr>
  194.              </table></td>
  195.            </tr>
  196.          </table></td>
  197.        </tr>
  198.      </table></td>
  199.    </tr>
  200. </table>
  201.  </form>
  202.  </td>
  203.       </tr>
  204.     </table>
  205. </td>
  206.   </tr>
  207. </table><%@ include file="copyright.jsp"%></td>
  208.   </tr>
  209. </table>
  210. </td>
  211. </tr>
  212. </table>
  213. </body>
  214. </html>