edepArticle.jsp~16~
上传用户:dlqqsh
上传日期:2021-11-13
资源大小:7840k
文件大小:3k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=GBK" import="java.sql.*,java.lang.*,officeol.mc.tools.*" %>
  2. <%request.setCharacterEncoding("gbk");%>
  3. <jsp:useBean id="sql" scope="page" class="control.sqlcontrol"></jsp:useBean>
  4. <jsp:useBean id="fen" scope="page" class="control.Textcontrol.Pagecontrol"></jsp:useBean>
  5. <%
  6. try{
  7.   String ud = (String)session.getAttribute("UD");
  8.   String udid = (String)session.getAttribute("UDID");
  9.   String un = (String)session.getAttribute("UN");
  10.   String uid = (String)session.getAttribute("UID");
  11.   String pp = (String)session.getAttribute("POPE");
  12.   String login = (String)session.getAttribute("LOGIN");
  13.   if(login!=null&&login.equals("OK")){
  14.     String where = "type = '2' ";
  15. Connection conn=sql.getSQL2005conn("dbconfig.xml");
  16. if(request.getParameter("pageID")==null){
  17. }else{
  18.   fen.setpages(request.getParameter("pageID"));
  19. }
  20. String select = fen.getPageinfsql(12,"article","id","desc",where);
  21. ResultSet show = sql.getStatement(select);
  22. //out.print(select);
  23. %>
  24. <html>
  25. <head>
  26. <title>
  27. 天津市河东区经济贸易委员会内部办公网
  28. </title>
  29. </head>
  30. <body bgcolor="#ffffff"><br />
  31. <a href="myArticle.jsp">个人日志管理</a>
  32. <a href="depArticle.jsp">部门内日志管理</a>
  33. <a href="allArticle.jsp">全局日志管理</a>
  34. <a href="edepArticle.jsp">多部门编辑日志管理</a><br /><br />
  35. <h4>多部门编辑日志管理</h4>
  36. <div align="center">
  37.    <table cellpadding="0" cellspacing="0" border="1" width="95%">
  38.   <tr>
  39.     <td>用户名</td>
  40.     <td>日志标题</td>
  41.     <td>发布部门</td>
  42.     <td>可编辑部门</td>
  43.     <td>发布日期</td>
  44.     <td>截止时间</td>
  45.     <td>编辑日志</td>
  46.   </tr>
  47.       <%
  48.       DBConn dbc = new DBConn();
  49.       while(show.next()){
  50.         String bmsql = "";%>
  51.   <tr>
  52.     <td><%= show.getString("users")%> </td>
  53.     <td><%=show.getString("title") %></td>
  54.     <td><% bmsql ="select deparname from deparment where id = '"+show.getString("depar")+"'";
  55.           String[][] bm1 = dbc.getArray(bmsql);
  56.           out.print(bm1[0][0]); %></td>
  57.           <td>
  58.         <%
  59.         String depid = show.getString("edit");
  60.         if(depid.equals("all")){
  61.           out.print("全部部门可编辑");
  62.         }else{
  63.           String[] depids = depid.split(";");
  64.           for(int ii = 0; ii < depids.length; ii++ ){
  65.             String bmsql1 ="select deparname from deparment where id = '"+depids[ii]+"'";
  66.             String[][] bmm = dbc.getArray(bmsql1);
  67.             out.print(bmm[0][0]+" ");
  68.           }
  69.         }
  70.         %>
  71.         </td>
  72.     <td><%=show.getString("date") %></td>
  73.     <td><%if(show.getString("type").equals("0")){
  74.           out.print("共享文章");
  75.         }else if(show.getString("type").equals("1")){
  76.           out.print("部门内文章");
  77.         }else if(show.getString("type").equals("2")){
  78.           out.print("多部门编辑文章");
  79.         }  %></td>
  80.     <td><a href=changearticle.jsp?id=<%=show.getString("id")%>  >修改此日志</a></td>
  81.   </tr>
  82. <%
  83.       }
  84.       %>
  85.       </table>
  86.  <% out.println("<div>"+fen.controlPage("edepArticle.jsp","pageID",8)+"</div>");
  87.   %>
  88.   </div>
  89. </body>
  90. </html>
  91. <%
  92. show.close();
  93. sql.closeDB();
  94. }else{
  95.   response.sendRedirect("userlogin.jsp");
  96.   }
  97. }catch(Exception e){
  98.   e.printStackTrace();
  99. } %>