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

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