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

图形图象

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ page import="com.dao.BookDAO" %>
  3. <%@ page import="com.actionForm.BookForm" %>
  4. <%@ page import="java.util.*"%>
  5. <html>
  6. <%
  7. Collection coll=(Collection)request.getAttribute("ifbook");
  8. %>
  9. <head>
  10. <title>图书馆管理系统</title>
  11. <link href="CSS/style.css" rel="stylesheet">
  12. </head>
  13. <body onLoad="clockon(bgclock)">
  14. <table width="778" border="0" align="center" cellpadding="0" cellspacing="0" class="tableBorder">
  15.   <tr>
  16.     <td height="183">
  17. <%@include file="navigation.jsp"%>
  18. </td>
  19. </tr>
  20. <td>
  21. <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  22.   <tr>
  23.     <td valign="top" bgcolor="#FFFFFF"><table width="99%" height="510"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="tableBorder_gray">
  24.   <tr>
  25.     <td height="510" valign="top" style="padding:5px;"><table width="98%" height="487"  border="0" cellpadding="0" cellspacing="0">
  26.       <tr>
  27.         <td height="22" valign="top" class="word_orange">当前位置:系统查询 &gt; 图书档案查询 &gt;&gt;&gt;</td>
  28.       </tr>
  29.       <tr>
  30.         <td align="center" valign="top">
  31. <form action="" method="post" name="form1">  
  32.  <table width="98%" height="38"  border="0" cellpadding="0" cellspacing="0" bgcolor="#E3F4F7" class="tableBorder_gray">
  33.   <tr>
  34.     <td align="center">
  35. &nbsp;<img src="Images/search.gif" width="45" height="28"></td>
  36.     <td>请选择查询依据:
  37.       <select name="f" class="wenbenkuang" id="f">
  38.         <option value="barcode">条形码</option>
  39.         <option value="typename">类别</option>
  40.         <option value="bookname" selected>书名</option>
  41.         <option value="author">作者</option>
  42.         <option value="publishing">出版社</option>
  43.         <option value="bookcasename">书架</option>
  44.                   </select>
  45.       <input name="key" type="text" id="key" size="50">
  46.       <input name="Submit" type="submit" class="btn_grey" value="查询"></td>
  47.   </tr>
  48. </table>
  49. <%
  50. if(coll==null || coll.isEmpty()){
  51. %>
  52.           <table width="100%" height="30"  border="0" cellpadding="0" cellspacing="0">
  53.             <tr>
  54.               <td height="36" align="center">暂无图书信息!</td>
  55.             </tr>
  56.           </table>
  57.           <%
  58. }else{
  59.   //通过迭代方式显示数据
  60.   Iterator it=coll.iterator();
  61.   int ID=0;
  62.   String bookname="";
  63.   String barcode="";
  64.   String typename="";
  65.   String publishing="";
  66.   String bookcase="";
  67.   int storage=0;
  68.   %>  
  69.   <table width="98%"  border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolordark="#D2E3E6" bordercolorlight="#FFFFFF">
  70.   <tr align="center" bgcolor="#e3F4F7">
  71.     <td width="13%">条形码</td>  
  72.     <td width="26%">图书名称</td>
  73.     <td width="15%">图书类型</td>
  74.     <td width="14%">出版社</td>
  75.     <td width="12%">书架</td>
  76.     <td width="9%">库存总数</td>
  77.     </tr>
  78. <%
  79.   while(it.hasNext()){
  80.     BookForm bookForm=(BookForm)it.next();
  81. ID=bookForm.getId().intValue();
  82. bookname=chStr.toChinese(bookForm.getBookName());
  83. barcode=bookForm.getBarcode();
  84. if(barcode==null) barcode="";
  85. typename=chStr.toChinese(bookForm.getTypeName());
  86. publishing=chStr.toChinese(bookForm.getPublishing());
  87. bookcase=chStr.toChinese(bookForm.getBookcaseName());
  88. storage=bookForm.getStorage();
  89. %> 
  90.   <tr>
  91.     <td style="padding:5px;">&nbsp;<%=barcode%></td>  
  92.     <td style="padding:5px;"><a href="book.do?action=bookDetail&ID=<%=ID%>"><%=bookname%></a></td>
  93.     <td style="padding:5px;">&nbsp;<%=typename%></td>  
  94.     <td style="padding:5px;">&nbsp;<%=publishing%></td>  
  95.     <td style="padding:5px;">&nbsp;<%=bookcase%></td>  
  96.     <td style="padding:5px;">&nbsp;<%=storage%>(本)</td>  
  97.     </tr>
  98. <%
  99.   }
  100. }
  101. %>  
  102. </table>
  103. </form>
  104. </td>
  105.       </tr>
  106.     </table>
  107. </td>
  108.   </tr>
  109. </table><%@ include file="copyright.jsp"%></td>
  110.   </tr>
  111. </table>
  112. </td>
  113. </table>
  114. </body>
  115. </html>