reader.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.ReaderDAO" %>
  3. <%@ page import="com.actionForm.ReaderForm" %>
  4. <%@ page import="java.util.*"%>
  5. <html>
  6. <%
  7. Collection coll=(Collection)request.getAttribute("reader");
  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="reader_add.jsp">添加读者信息</a> </td>
  42.   </tr>
  43. </table>
  44.  <%
  45. }else{
  46.   //通过迭代方式显示数据
  47.   Iterator it=coll.iterator();
  48.   int ID=0;
  49.   String name="";
  50.   String typename="";
  51.   String barcode="";
  52.   String paperType="";
  53.   String paperNO="";
  54.   String tel="";
  55.   String email="";
  56.   %>
  57.  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  58.   <tr>
  59.     <td width="87%">&nbsp;      </td>
  60. <td width="13%">
  61.       <a href="reader_add.jsp">添加读者信息</a></td>   
  62.   </tr>
  63. </table>  
  64.   <table width="95%"  border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolordark="#D2E3E6" bordercolorlight="#FFFFFF">
  65.   <tr align="center" bgcolor="#e3F4F7">
  66.     <td width="13%">条形码</td>  
  67.     <td width="10%">姓名</td>
  68.     <td width="8%">读者类型</td>
  69.     <td width="12%">证件类型</td>
  70.     <td width="20%">证件号码</td>
  71.     <td width="12%">电话</td>
  72.     <td width="15%">Email</td>
  73.     <td width="5%">修改</td>
  74.     <td width="5%">删除</td>
  75.   </tr>
  76. <%
  77.   while(it.hasNext()){
  78.     ReaderForm readerForm=(ReaderForm)it.next();
  79. ID=readerForm.getId().intValue();
  80. name=chStr.toChinese(readerForm.getName());
  81. barcode=readerForm.getBarcode();
  82. typename=chStr.nullToString(chStr.toChinese(readerForm.getTypename()),"&nbsp;");
  83. paperType=chStr.toChinese(readerForm.getPaperType());
  84. paperNO=chStr.nullToString(readerForm.getPaperNO(),"&nbsp;");
  85. tel=chStr.nullToString(readerForm.getTel(),"&nbsp;");
  86. email=chStr.nullToString(readerForm.getEmail(),"&nbsp;");
  87. %> 
  88.   <tr>
  89.     <td style="padding:5px;"><%=barcode%></td>  
  90.     <td style="padding:5px;"><a href="reader.do?action=readerDetail&ID=<%=ID%>"><%=name%></a></td>
  91.     <td style="padding:5px;"><%=typename%></td>
  92.     <td align="center"><%=paperType%></td>
  93.     <td align="center"><%=paperNO%></td>
  94.     <td align="center"><%=tel%></td>
  95.     <td align="center"><%=email%></td>
  96.     <td align="center"><a href="reader.do?action=readerModifyQuery&ID=<%=ID%>">修改</a></td>
  97.     <td align="center"><a href="reader.do?action=readerDel&ID=<%=ID%>">删除</a></td>
  98.   </tr>
  99. <%
  100.   }
  101. }
  102. %>  
  103. </table></td>
  104.       </tr>
  105.     </table>
  106. </td>
  107.   </tr>
  108. </table><%@ include file="copyright.jsp"%></td>
  109.   </tr>
  110. </table>
  111. </td>
  112.   
  113. </table>
  114. </body>
  115. </html>