boardroom_m.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import="java.util.*,
  3.  java.text.*,
  4.  com.redmoon.blog.*,
  5.  cn.js.fan.db.*,
  6.  cn.js.fan.util.*,
  7.  cn.js.fan.module.cms.*,
  8.  cn.js.fan.web.*,
  9.  com.redmoon.oa.pvg.*,
  10.  com.redmoon.oa.meeting.*"
  11. %>
  12. <HTML><HEAD><TITLE>会议室列表</TITLE>
  13. <META http-equiv=Content-Type content="text/html; charset=utf-8"><LINK 
  14. href="../common.css" type=text/css rel=stylesheet>
  15. <META content="MSHTML 6.00.3790.259" name=GENERATOR>
  16. <style type="text/css">
  17. <!--
  18. .style1 { font-size: 14px;
  19. font-weight: bold;
  20. }
  21. -->
  22. </style>
  23. </HEAD>
  24. <BODY text=#000000 bgColor=#eeeeee leftMargin=0 topMargin=0>
  25. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  26. <%
  27. if (!privilege.isUserPrivValid(request, "meetingroom")) {
  28. // out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  29. // return;
  30. }
  31. %>
  32. <%
  33. int pagesize = 10;
  34. Paginator paginator = new Paginator(request);
  35. int curpage = paginator.getCurPage();
  36. BoardroomDb bd = new BoardroomDb();
  37. String sql = "select id from " + bd.getTableName();
  38. int total = bd.getObjectCount(sql);
  39. paginator.init(total, pagesize);
  40. //设置当前页数和总页数
  41. int totalpages = paginator.getTotalPages();
  42. if (totalpages==0)
  43. {
  44. curpage = 1;
  45. totalpages = 1;
  46. }
  47. %>
  48. <table width="98%" height="227" border='0' align="center" cellpadding='0' cellspacing='0' class="main">
  49.   <tr>
  50.     <td height=20 align="left" class="right-title">&nbsp;会议室列表</td>
  51.   </tr>
  52.   <tr>
  53.     <td valign="top"><br>
  54.         <table width="86%" height="24" border="0" align="center" cellpadding="0" cellspacing="0">
  55.           <tr>
  56.             <td align="right"><div>找到符合条件的记录 <b><%=paginator.getTotal() %></b> 条 每页显示 <b><%=paginator.getPageSize() %></b> 条 页次 <b><%=paginator.getCurrentPage() %>/<%=paginator.getTotalPages() %></b></div></td>
  57.           </tr>
  58.         </table>
  59.       <table width="86%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666"">
  60.           <tr align="center" bgcolor="#F1EDF3">
  61.             <td width="15%" height="22">名称</td>
  62.             <td width="20%" height="22">人数</td>
  63.             <td width="19%">地点</td>
  64.             <td width="19%">设备</td>
  65.             <td width="27%">操作</td>
  66.           </tr>
  67.           <%
  68. Vector v = bd.list(sql, (curpage-1)*pagesize, curpage*pagesize-1);
  69. Iterator ir = v.iterator();
  70. int i = 0;
  71. while (ir.hasNext()) {
  72. bd = (BoardroomDb)ir.next();
  73. i++;
  74. %>
  75.           <form id="form<%=i%>" name="form<%=i%>" action="?op=modify" method="post">
  76.             <tr align="center">
  77.               <td height="22" bgcolor="#FFFFFF"><%=bd.getName()%>              </td>
  78.               <td height="22" bgcolor="#FFFFFF"><%=bd.getPersonNum()%></td>
  79.               <td bgcolor="#FFFFFF"><%=bd.getAddress()%></td>
  80.               <td bgcolor="#FFFFFF"><%=bd.getEquipment()%></td>
  81.               <td height="22" bgcolor="#FFFFFF"><a href="boardroom_edit.jsp?id=<%=bd.getId()%>">编辑</a>&nbsp;&nbsp;<a title="删除该会议室" href="boardroom_do.jsp?op=del&id=<%=bd.getId()%>">删除</a>&nbsp;&nbsp;<a href="boardroom_status.jsp?boardroomId=<%=bd.getId()%>">使用情况</a></td>
  82.             </tr>
  83.           </form>
  84.           <%}%>
  85.       </table>
  86.       <table width="86%" border="0" cellspacing="1" cellpadding="3" align="center" class="9black">
  87.           <tr>
  88.             <td height="23"><div align="right">
  89.                 <%
  90. String querystr = "";
  91.     out.print(paginator.getCurPageBlock("?"+querystr));
  92. %>
  93.             </div></td>
  94.           </tr>
  95.       </table>
  96.       <DIV style="WIDTH: 92%" align=right>
  97.         <INPUT name="image" type=image onClick="javascript:location.href='boardroom_add.jsp'" src="../admin/images/btn_add.gif" width=80 height=20>
  98.       </DIV></td>
  99.   </tr>
  100. </table>
  101. <br>
  102. </BODY></HTML>