bookRenew.jsp~2~
上传用户:toby828
上传日期:2015-06-26
资源大小:8558k
文件大小:8k
源码类别:

Jsp/Servlet

开发平台:

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="966"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="tableBorder_gray">
  27.   <tr>
  28.     <td height="966" 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.inputkey.value==""){
  43. alert("请输入查询关键字!");form.inputkey.focus();return;
  44. }
  45. if(form.number.value-form.borrowNumber.value<=0){
  46. alert("您不能再借阅其他图书了!");return;
  47. }
  48. form.submit();
  49. }
  50. </script>
  51. <form name="form1" method="post" action="borrow.do?action=bookrenew">
  52. <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableBorder_gray">
  53.    <tr>
  54.      <td valign="top"><table width="100%" border="0" cellpadding="02" cellspacing="2" bordercolor="#E3F4F7">
  55.        <tr>
  56.          <td height="27" bgcolor="#E3F4F7">&nbsp;<img src="Images/bookrenew.jpg" width="73" height="23"></td>
  57.        </tr>
  58.        <tr>
  59.          <td valign="top" bgcolor="#E3F4F7">
  60. <%
  61. int ID=0;
  62. String name="";
  63. String sex="";
  64. String barcode="";
  65. String birthday="";
  66. String paperType="";
  67. String paperNO="";
  68. int number=0;
  69. String typename="";
  70. if(readerForm!=null){
  71. ID=readerForm.getId().intValue();
  72. name=chStr.toChinese(readerForm.getName());
  73. sex=chStr.toChinese(readerForm.getSex());
  74. barcode=readerForm.getBarcode();
  75. birthday=readerForm.getBirthday();
  76. paperType=chStr.toChinese(readerForm.getPaperType());
  77. paperNO=readerForm.getPaperNO();
  78. number=readerForm.getNumber();
  79. typename=chStr.toChinese(readerForm.getTypename());
  80. }
  81. %>
  82.  <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  83.            <tr>
  84.              <td width="33%"><table width="100%" height="74" border="0" cellpadding="0" cellspacing="0">
  85.                <tr>
  86.                  <td height="27" colspan="2" align="center"><table width="90%" height="21" border="0" cellpadding="0" cellspacing="0">
  87.                    <tr>
  88.                      <td background="Images/reader_checkbg.jpg">&nbsp;读者验证</td>
  89.                    </tr>
  90.                  </table></td>
  91.                </tr>
  92.                <tr>
  93.                  <td width="8%" height="27">&nbsp;</td>
  94.                  <td width="92%">读者条形码:</td>
  95.                </tr>
  96.                <tr>
  97.                  <td height="27" colspan="2" align="center"><input name="barcode" type="text" id="barcode" value="<%=barcode%>" size="24">
  98.                    &nbsp;
  99.                    <input name="Button" type="button" class="btn_grey" value="确定" onClick="checkreader(form1)"></td>
  100.                </tr>
  101.              </table></td>
  102.              <td width="1%" align="center" valign="bottom"><img src="Images/borrow_fg.gif" width="18" height="111"></td>
  103.              <td width="66%" align="right">
  104.  <table width="96%" border="0" cellpadding="0" cellspacing="0">
  105.                <tr>
  106.                  <td height="27">姓&nbsp;&nbsp;&nbsp;&nbsp;名:
  107.                        <input name="readername" type="text" id="readername" value="<%=name%>"></td>
  108.                  <td>性&nbsp;&nbsp;&nbsp;&nbsp;别:
  109.                    <input name="sex" type="text" id="sex" value="<%=sex%>"></td>
  110.                </tr>
  111.                <tr>
  112.                  <td height="27">证件类型:
  113.                    <input name="paperType" type="text" id="paperType" value="<%=paperType%>"></td>
  114.                  <td>证件号码:
  115.                    <input name="paperNo" type="text" id="paperNo" value="<%=paperNO%>"></td>
  116.                </tr>
  117.                <tr>
  118.                  <td height="27">读者类型:
  119.                    <input name="readerType" type="text" id="readerType" value="<%=typename%>"></td>
  120.                  <td>可借数量:
  121.                    <input name="number" type="text" id="number" value="<%=number%>" size="17">
  122.                    册
  123.                    &nbsp;</td>
  124.                </tr>
  125.              </table>  </td>
  126.            </tr>
  127.          </table>
  128.  </td>
  129.        </tr>
  130.        <tr>
  131.          <td valign="top"><table width="100%" height="35" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#D2E3E6" bgcolor="#FFFFFF">
  132.                    <tr align="center" bgcolor="#e3F4F7">
  133.                      <td width="24%" height="25" bgcolor="#F0FAFB">图书名称</td>
  134.                      <td width="12%" bgcolor="#F0FAFB">借阅时间</td>
  135.                      <td width="13%" bgcolor="#F0FAFB">应还时间</td>
  136.                      <td width="14%" bgcolor="#F0FAFB">出版社</td>
  137.                      <td width="12%" bgcolor="#F0FAFB">书架</td>
  138.                      <td bgcolor="#F0FAFB">定价(元)</td>
  139.                      <td width="12%" bgcolor="#F0FAFB"><input name="Button22" type="button" class="btn_grey" value="完成继借" onClick="window.location.href='bookRenew.jsp'"></td>
  140.                    </tr>
  141. <%
  142. int id=0;
  143. String bookname="";
  144. String borrowTime="";
  145. String backTime="";
  146. Float price=new Float(0);
  147. String pubname="";
  148. String bookcase="";
  149. if(coll!=null && !coll.isEmpty()){
  150. borrowNumber=coll.size();
  151. Iterator it=coll.iterator();
  152. while(it.hasNext()){
  153. BorrowForm borrowForm=(BorrowForm)it.next();
  154.         id=0;
  155. bookname=chStr.toChinese(borrowForm.getBookName());
  156. borrowTime=borrowForm.getBorrowTime();
  157. backTime=borrowForm.getBackTime();
  158. price=borrowForm.getPrice();
  159. pubname=chStr.toChinese(borrowForm.getPubName());
  160. bookcase=chStr.toChinese(borrowForm.getBookcaseName());
  161. %>
  162.                    <tr>
  163.                      <td height="25" style="padding:5px;">&nbsp;<%=bookname%></td>
  164.                      <td style="padding:5px;">&nbsp;<%=borrowTime%></td>
  165.                      <td style="padding:5px;">&nbsp;<%=backTime%></td>
  166.                      <td align="center">&nbsp;<%=pubname%></td>
  167.                      <td align="center">&nbsp;<%=bookcase%></td>
  168.                      <td width="13%" align="center">&nbsp;<%=price%></td>
  169.                      <td width="12%" align="center">继借&nbsp;</td>
  170.                    </tr>
  171. <% }%>
  172. <tr><td>
  173.  <input name="borrowNumber" type="hidden" id="borrowNumber" value="<%=borrowNumber%>">
  174. </td>
  175. </tr>
  176. <%}%>
  177.                  </table>
  178.                  </td>
  179.        </tr>
  180.      </table></td>
  181.    </tr>
  182. </table>
  183.  </form>
  184.  </td>
  185.       </tr>
  186.     </table>
  187. </td>
  188.   </tr>
  189. </table></td>
  190.   </tr>
  191. </table>
  192. </td>
  193. </tr>
  194. </table>
  195. </body>
  196. </html>