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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ page import="com.dao.BookCaseDAO" %>
  3. <%@ page import="com.actionForm.BookCaseForm" %>
  4. <%@ page import="java.util.*"%>
  5. <html>
  6. <%
  7. Collection coll=(Collection)request.getAttribute("bookcase");
  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. 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="#" onClick="window.open('bookcase_add.jsp','','width=292,height=175')">添加书架信息</a> </td>
  42.   </tr>
  43. </table>
  44.  <%
  45. }else{
  46.   //通过迭代方式显示数据
  47.   Iterator it=coll.iterator();
  48.   int ID=0;
  49.   String name="";
  50.   %>
  51.  <table width="91%"  border="0" cellspacing="0" cellpadding="0">
  52.   <tr>
  53.     <td width="84%">&nbsp;      </td>
  54. <td width="16%" align="right">
  55.       <a href="#" onClick="window.open('bookcase_add.jsp','','width=292,height=175')">添加书架信息</a> </td>   
  56.   </tr>
  57. </table>  
  58.   <table width="91%"  border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolordark="#D2E3E6" bordercolorlight="#FFFFFF">
  59.   <tr align="center" bgcolor="#e3F4F7">
  60.     <td width="70%">书架名称</td>
  61.     <td width="16%">修改</td>
  62.     <td width="14%">删除</td>
  63.   </tr>
  64. <%
  65.   while(it.hasNext()){
  66.     BookCaseForm bookCaseForm=(BookCaseForm)it.next();
  67. ID=bookCaseForm.getId().intValue();
  68. name=chStr.toChinese(bookCaseForm.getName());
  69. %> 
  70.   <tr>
  71.     <td style="padding:5px;"><%=name%></td>
  72.     <td align="center"><a href="#" onClick="window.open('bookCase.do?action=bookCaseModifyQuery&ID=<%=ID%>','','width=292,height=175')">修改</a></td>
  73.     <td align="center"><a href="bookCase.do?action=bookCaseDel&ID=<%=ID%>">删除</a></td>
  74.   </tr>
  75. <%
  76.   }
  77. }
  78. %>  
  79. </table></td>
  80.       </tr>
  81.     </table>
  82. </td>
  83.   </tr>
  84. </table><%@ include file="copyright.jsp"%></td>
  85.   </tr>
  86. </table>
  87. </td>
  88.   </tr>
  89. </table>
  90. </body>
  91. </html>