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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312" language="java"%>
  2. <%@ page import="com.dao.BorrowDAO"%>
  3. <%@ page import="com.actionForm.BorrowForm"%>
  4. <%@ page import="java.util.*"%>
  5. <html>
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  7. <head>
  8. <title>图书馆管理系统</title>
  9. <link href="CSS/style.css" rel="stylesheet">
  10. </head>
  11. <body onLoad="clockon(bgclock)">
  12. <table width="778" border="0" align="center" cellpadding="0" cellspacing="0" class="tableBorder">
  13.   <tr>
  14.     <td height="183">
  15. <%@include file="navigation.jsp"%>
  16. </td>
  17. </tr>
  18. <td bgcolor="#FFFFFF">
  19. <%
  20. BorrowDAO borrowDAO=new BorrowDAO();
  21. Collection coll_reader=(Collection)borrowDAO.readerBorrowSort();
  22. Collection coll_book=(Collection)borrowDAO.bookBorrowSort();
  23. %>
  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 align="center" valign="top" style="padding:5px;"><table width="100%"  border="0" cellpadding="0" cellspacing="0">
  29.       <tr>
  30.         <td height="20" align="right" valign="middle" class="word_orange">当前位置:首页 &gt;&gt;&gt;&nbsp;</td>
  31.       </tr>
  32.       <tr>
  33.         <td valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
  34.           <tr>
  35.             <td height="57" background="Images/main_booksort.gif">&nbsp;</td>
  36.           </tr>
  37.           <tr>
  38.             <td height="72" valign="top" background="Images/main_booksort_1.gif"><table width="100%" height="63"  border="0" cellpadding="0" cellspacing="0">
  39.               <tr>
  40.                 <td width="2%">&nbsp;</td>
  41.                 <td width="96%" align="center" valign="top"><table width="100%"  border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolordark="#D2E3E6" bordercolorlight="#FFFFFF">
  42.                   <tr align="center">
  43.                     <td width="6%" height="25">排名</td>
  44.     <td width="11%">图书条形码</td>
  45.     <td width="17%">图书名称</td>
  46.     <td width="15%">图书类型</td>
  47.     <td width="16%">书架</td>
  48.     <td width="14%">出版社</td>
  49.     <td width="11%">作者</td>
  50.     <td colspan="2">定价(元)</td>
  51.                       </tr>
  52. <%if(coll_book!=null && !coll_book.isEmpty()){
  53.   Iterator it_book=coll_book.iterator();
  54.   int i=1;
  55.   int degree=0;
  56.   String bookname="";
  57.   String typename="";
  58.   String barcode_book="";
  59.   String bookcase="";
  60.   String pub="";
  61.   String author="";
  62.   String translator="";
  63.   Float price=new Float(0);
  64.   while(it_book.hasNext() && i<6){
  65.       BorrowForm borrowForm=(BorrowForm)it_book.next();
  66. bookname=chStr.toChinese(borrowForm.getBookName());
  67.         barcode_book=borrowForm.getBookBarcode();
  68.         typename=chStr.toChinese(borrowForm.getBookType());
  69. degree=borrowForm.getDegree();
  70. bookcase=chStr.toChinese(borrowForm.getBookcaseName());
  71.         pub=chStr.toChinese(borrowForm.getPubName());
  72.         author=chStr.toChinese(borrowForm.getAuthor());
  73.         price=borrowForm.getPrice();
  74. %> 
  75.                   <tr>
  76.                     <td height="25" align="center"><%=i%></td>
  77.     <td style="padding:5px;">&nbsp;<%=barcode_book%></td>
  78.     <td style="padding:5px;"><%=bookname%></td>
  79.     <td style="padding:5px;"><%=typename%></td>
  80.     <td align="center">&nbsp;<%=bookcase%></td>
  81.     <td align="center">&nbsp;<%=pub%></td>
  82.     <td width="11%" align="center"><%=author%></td>
  83.     <td width="8%" align="center"><%=price%></td>
  84.   </tr>
  85. <%
  86. i++;
  87. }
  88. }%>
  89.                 </table>
  90.                   <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  91.                     <tr>
  92.                       <td height="39" align="right"><a href=borrow.do?action=bookBorrowSort><img src="Images/more.GIF" width="50" height="20" border="0"></a></td>
  93.                     </tr>
  94.                   </table></td>
  95.                 <td width="2%">&nbsp;</td>
  96.               </tr>
  97.             </table></td>
  98.           </tr>
  99.           <tr>
  100.             <td height="19" background="Images/main_booksort_2.gif">&nbsp;</td>
  101.           </tr>
  102.         </table>
  103.           <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  104.             <tr>
  105.               <td height="57" background="Images/main_readersort_1.gif">&nbsp;</td>
  106.             </tr>
  107.             <tr>
  108.               <td height="72" valign="top" background="Images/main_booksort_1.gif">
  109.                 <table width="100%" height="63"  border="0" cellpadding="0" cellspacing="0">
  110.                   <tr>
  111.                     <td width="2%">&nbsp;</td>
  112.                     <td width="96%" align="center" valign="top"><table width="100%"  border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolordark="#eeeeee" bordercolorlight="#FFFFFF">
  113.                       <tr align="center" bordercolordark="#D2E3E6">
  114.                         <td width="6%" height="25" align="center">排名</td>
  115.     <td width="11%">读者条形码</td>
  116.     <td width="12%">读者姓名</td>
  117.     <td width="13%">读者类型</td>
  118.     <td width="23%">证件类型</td>
  119.     <td width="14%">证件号码</td>
  120.     <td width="12%">电话</td>
  121.     <td colspan="2">性别</td>
  122.                       </tr>
  123.   <%if(coll_book!=null && !coll_book.isEmpty()){
  124.   Iterator it_reader=coll_reader.iterator();
  125.   int j=1;
  126.   String readername="";
  127.   String typename="";
  128.   String barcode_reader="";
  129.   String paperType="";
  130.   String paperNo="";
  131.   String tel="";
  132.   String sex="";
  133.   while(it_reader.hasNext() && j<6){
  134.       BorrowForm borrowForm=(BorrowForm)it_reader.next();
  135. readername=chStr.toChinese(borrowForm.getReaderName());
  136.         barcode_reader=borrowForm.getReaderBarcode();
  137.         typename=chStr.toChinese(borrowForm.getReaderType());
  138.         paperType=chStr.toChinese(borrowForm.getPaperType());
  139.         paperNo=borrowForm.getPaperNo();
  140.         tel=borrowForm.getTel();
  141.         sex=chStr.toChinese(borrowForm.getSex());
  142. %> 
  143.                   <tr>
  144.                     <td height="25" align="center"><%=j%></td>
  145.     <td style="padding:5px;">&nbsp;<%=barcode_reader%></td>
  146.     <td style="padding:5px;"><%=readername%></td>
  147.     <td style="padding:5px;"><%=typename%></td>
  148.     <td align="center">&nbsp;<%=paperType%></td>
  149.     <td align="center">&nbsp;<%=paperNo%></td>
  150.     <td width="12%" align="center"><%=tel%></td>
  151.     <td width="7%" align="center"><%=sex%></td>
  152.                   </tr>
  153. <%
  154. j++;
  155. }
  156. }%>
  157.                     </table>
  158.                       <table width="100%" height="42"  border="0" cellpadding="0" cellspacing="0">
  159.                         <tr>
  160.                           <td height="35" align="right"><a href=borrow.do?action=readerBorrowSort><img src="Images/more.GIF" width="50" height="20" border="0"></a></td>
  161.                         </tr>
  162.                       </table></td>
  163.                     <td width="2%">&nbsp;</td>
  164.                   </tr>
  165.                 </table></td>
  166.             </tr>
  167.             <tr>
  168.               <td height="19" background="Images/main_booksort_2.gif">&nbsp;</td>
  169.             </tr>
  170.           </table></td>
  171.       </tr>
  172.     </table>
  173.       </td>
  174.   </tr>
  175. </table></td>
  176.   </tr>
  177. </table>
  178. <%@ include file="copyright.jsp"%></td>
  179.   </tr>
  180. </table>
  181. </body>
  182. </html>