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="default.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, PrivDb.PRIV_ADMIN))
  28. {
  29. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  30. return;
  31. }
  32. %>
  33. <TABLE cellSpacing=0 cellPadding=0 width="100%">
  34.   <TBODY>
  35.   <TR>
  36.     <TD class=head>会议室管理</TD>
  37.   </TR></TBODY></TABLE>
  38. <br>
  39. <%
  40. int pagesize = 10;
  41. Paginator paginator = new Paginator(request);
  42. int curpage = paginator.getCurPage();
  43. BoardroomDb bd = new BoardroomDb();
  44. String sql = "select id from " + bd.getTableName();
  45. int total = bd.getObjectCount(sql);
  46. paginator.init(total, pagesize);
  47. //设置当前页数和总页数
  48. int totalpages = paginator.getTotalPages();
  49. if (totalpages==0)
  50. {
  51. curpage = 1;
  52. totalpages = 1;
  53. }
  54. %>
  55. <table width="98%" height="227" border='0' align="center" cellpadding='0' cellspacing='0' class="frame_gray">
  56.   <tr>
  57.     <td height=20 align="center" class="thead style1">会议室列表</td>
  58.   </tr>
  59.   <tr>
  60.     <td valign="top"><br>
  61.         <table width="86%" height="24" border="0" align="center" cellpadding="0" cellspacing="0">
  62.           <tr>
  63.             <td align="right"><div>找到符合条件的记录 <b><%=paginator.getTotal() %></b> 条 每页显示 <b><%=paginator.getPageSize() %></b> 条 页次 <b><%=paginator.getCurrentPage() %>/<%=paginator.getTotalPages() %></b></div></td>
  64.           </tr>
  65.         </table>
  66.       <table width="86%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666"">
  67.           <tr align="center" bgcolor="#F1EDF3">
  68.             <td width="17%" height="22">名称</td>
  69.             <td width="22%" height="22">人数</td>
  70.             <td width="21%">地点</td>
  71.             <td width="26%">操作</td>
  72.           </tr>
  73.           <%
  74. Vector v = bd.list(sql, (curpage-1)*pagesize, curpage*pagesize-1);
  75. Iterator ir = v.iterator();
  76. int i = 0;
  77. while (ir.hasNext()) {
  78. bd = (BoardroomDb)ir.next();
  79. i++;
  80. %>
  81.           <form id="form<%=i%>" name="form<%=i%>" action="?op=modify" method="post">
  82.             <tr align="center">
  83.               <td height="22" bgcolor="#FFFFFF"><a target=_blank href="../myblog.jsp?userName"><%=bd.getName()%></a>              </td>
  84.               <td height="22" bgcolor="#FFFFFF"><%=bd.getPersonNum()%></td>
  85.               <td bgcolor="#FFFFFF"><%=bd.getAddress()%></td>
  86.               <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>
  87.             </tr>
  88.           </form>
  89.           <%}%>
  90.       </table>
  91.       <table width="86%" border="0" cellspacing="1" cellpadding="3" align="center" class="9black">
  92.           <tr>
  93.             <td height="23"><div align="right">
  94.                 <%
  95. String querystr = "";
  96.     out.print(paginator.getCurPageBlock("?"+querystr));
  97. %>
  98.             </div></td>
  99.           </tr>
  100.       </table>
  101.       <DIV style="WIDTH: 92%" align=right>
  102.         <INPUT name="image" type=image onClick="javascript:location.href='boardroom_add.jsp'" src="images/btn_add.gif" width=80 height=20>
  103.       </DIV></td>
  104.   </tr>
  105. </table>
  106. <br>
  107. </BODY></HTML>