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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8" %>
  2. <%@ page import="cn.js.fan.util.*"%>
  3. <%@ page import="cn.js.fan.db.*"%>
  4. <%@ page import="java.util.*"%>
  5. <%@ page import="cn.js.fan.web.*"%>
  6. <%@ page import="com.redmoon.oa.pvg.*"%>
  7. <%@ page import="com.redmoon.oa.meeting.*"%>
  8. <%@ page import="java.util.Calendar" %>
  9. <%@ page import="com.redmoon.oa.flow.*"%>
  10. <html><head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <link href="../common.css" rel="stylesheet" type="text/css">
  13. <%@ include file="../inc/nocache.jsp"%>
  14. <jsp:useBean id="strutil" scope="page" class="cn.js.fan.util.StrUtil"/>
  15. <title>会议室使用情况</title>
  16. <script language=JavaScript src='../scripts/formpost.js'></script>
  17. </head>
  18. <body bgcolor="#FFFFFF" text="#000000">
  19. <TABLE width="98%" BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0 class="tableframe">
  20.   <TR valign="top" bgcolor="#FFFFFF">
  21.     <TD width="" height="430" colspan="2" style="background-attachment: fixed; background-image: url(../images/bg_bottom.jpg); background-repeat: no-repeat">
  22.           <TABLE cellSpacing=0 cellPadding=0 width="100%">
  23.             <TBODY>
  24.               <TR>
  25.                 <TD class=right-title>&nbsp;会议室使用情况</TD>
  26.               </TR>
  27.             </TBODY>
  28.           </TABLE>
  29.           <table border="0" cellspacing="1" width="100%" cellpadding="2" align="center">
  30.             <tr align="center" bgcolor="#F2F2F2">
  31.               <td width="15%" height="20" align=center>申请人</td>
  32.               <td width="39%" align=center>议题</td>
  33.               <td width="16%" align=center>开始时间</td>
  34.               <td width="16%" align=center>结束时间</td>
  35.               <td width="14%" align=center>操作</td>
  36.             </tr>
  37.         </table>
  38. <table width="100%"  border="0">
  39.           <tr>
  40. <td>
  41. <%
  42. String boardroomId = ParamUtil.get(request, "boardroomId");
  43. String querystr = "";
  44. String sql = BoardroomSQLBuilder.getBoardroomSearchSql(boardroomId);
  45. querystr += "boardroomId=" + boardroomId;
  46. int pagesize = 10;
  47. Paginator paginator = new Paginator(request);
  48. int curpage = paginator.getCurPage();
  49. BoardroomApplyDb bad = new BoardroomApplyDb();
  50. ListResult lr = bad.listResult(sql, curpage, pagesize);
  51. int total = lr.getTotal();
  52. Vector v = lr.getResult();
  53. Iterator ir = null;
  54. if (v!=null)
  55. ir = v.iterator();
  56. paginator.init(total, pagesize);
  57. // 设置当前页数和总页数
  58. int totalpages = paginator.getTotalPages();
  59. if (totalpages==0)
  60. {
  61. curpage = 1;
  62. totalpages = 1;
  63. }
  64. int i = 0;
  65. while (ir!=null && ir.hasNext()) {
  66. bad = (BoardroomApplyDb)ir.next();
  67. %>
  68. <table border="0" cellspacing="1" width="100%" cellpadding="2" align="center">
  69.               <tr align="center">
  70.                 <td width="15%" height="20" align=center><%=bad.getSqren()%></td>
  71.                 <td width="39%" align=center><%=bad.getMeetingTitle()%></td>
  72.                 <td width="16%" align=center><%=DateUtil.format(bad.getStart_date(), "yyyy-MM-dd HH:mm")%></td>
  73.                 <td width="16%" align=center><%=DateUtil.format(bad.getEnd_date(), "yyyy-MM-dd HH:mm")%></td>
  74.                 <td width="14%" align=center><a href="boardroom_apply_show.jsp?flowId=<%=bad.getFlowId()%>">详细信息</a></td>
  75.               </tr>
  76.             </table>
  77. <%
  78. }
  79. %>
  80. <table width="98%" border="0" class="p9">
  81.               <tr>
  82.                 <td align="right">找到符合条件的记录 <b><%=paginator.getTotal() %></b> 条 每页显示 <b><%=paginator.getPageSize() %></b> 条 页次 <b><%=curpage %>/<%=totalpages %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  83.                 <%
  84. out.print(paginator.getCurPageBlock("listtopic.jsp?"+querystr));
  85. %>
  86.                   &nbsp;&nbsp;
  87.                 </b></td>
  88.               </tr>
  89.             </table></td>
  90.           </tr>
  91.         </table>
  92. </TD>
  93.   </TR>
  94. </TABLE>
  95. </body>
  96. <script>
  97. function findObj(theObj, theDoc)
  98. {
  99.   var p, i, foundObj;
  100.   
  101.   if(!theDoc) theDoc = document;
  102.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  103.   {
  104.     theDoc = parent.frames[theObj.substring(p+1)].document;
  105.     theObj = theObj.substring(0,p);
  106.   }
  107.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  108.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  109.     foundObj = theDoc.forms[i][theObj];
  110.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  111.     foundObj = findObj(theObj,theDoc.layers[i].document);
  112.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  113.   
  114.   return foundObj;
  115. }
  116. </script>
  117. </html>