book.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("book");
  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%"  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. if(coll==null || coll.isEmpty()){
  32. %>
  33.           <table width="100%" height="30"  border="0" cellpadding="0" cellspacing="0">
  34.             <tr>
  35.               <td height="36" align="center">暂无图书信息!</td>
  36.             </tr>
  37.           </table>
  38.           <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  39.   <tr>
  40.     <td>
  41.       <a href="book_add.jsp">添加图书信息</a> </td>
  42.   </tr>
  43. </table>
  44.  <%
  45. }else{
  46.   //通过迭代方式显示数据
  47.   Iterator it=coll.iterator();
  48.   int ID=0;
  49.   String bookname="";
  50.   String barcode="";
  51.   String typename="";
  52.   String publishing="";
  53.   String bookcase="";
  54.   int storage=0;
  55.   %>
  56.  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  57.   <tr>
  58.     <td width="87%">&nbsp;      </td>
  59. <td width="13%">
  60.       <a href="book_add.jsp">添加图书信息</a></td>   
  61.   </tr>
  62. </table>  
  63.   <table width="98%"  border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolordark="#D2E3E6" bordercolorlight="#FFFFFF">
  64.   <tr align="center" bgcolor="#e3F4F7">
  65.     <td width="13%">条形码</td>  
  66.     <td width="26%">图书名称</td>
  67.     <td width="15%">图书类型</td>
  68.     <td width="14%">出版社</td>
  69.     <td width="12%">书架</td>
  70.     <td width="9%">库存总数</td>
  71.     <td width="6%">修改</td>
  72.     <td width="5%">删除</td>
  73.   </tr>
  74. <%
  75.   while(it.hasNext()){
  76.     BookForm bookForm=(BookForm)it.next();
  77. ID=bookForm.getId().intValue();
  78. bookname=chStr.toChinese(bookForm.getBookName());
  79. barcode=chStr.nullToString(bookForm.getBarcode(),"&nbsp;");
  80. typename=chStr.toChinese(bookForm.getTypeName());
  81. publishing=chStr.toChinese(bookForm.getPublishing());
  82. bookcase=chStr.nullToString(chStr.toChinese(bookForm.getBookcaseName()),"&nbsp;");
  83. storage=bookForm.getStorage();
  84. %> 
  85.   <tr>
  86.     <td style="padding:5px;">&nbsp;<%=barcode%></td>  
  87.     <td style="padding:5px;"><a href="book.do?action=bookDetail&ID=<%=ID%>"><%=bookname%></a></td>
  88.     <td style="padding:5px;">&nbsp;<%=typename%></td>  
  89.     <td style="padding:5px;">&nbsp;<%=publishing%></td>  
  90.     <td style="padding:5px;">&nbsp;<%=bookcase%></td>  
  91.     <td style="padding:5px;">&nbsp;<%=storage%>(本)</td>  
  92.     <td align="center"><a href="book.do?action=bookModifyQuery&ID=<%=ID%>">修改</a></td>
  93.     <td align="center"><a href="book.do?action=bookDel&ID=<%=ID%>">删除</a></td>
  94.   </tr>
  95. <%
  96.   }
  97. }
  98. %>  
  99. </table></td>
  100.       </tr>
  101.     </table>
  102. </td>
  103.   </tr>
  104. </table><%@ include file="copyright.jsp"%></td>
  105.   </tr>
  106. </table>
  107. </td>
  108.   </table>
  109. </body>
  110. </html>