editArticleView.jsp~42~
上传用户: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. <html>
  6. <head>
  7. <title>
  8. 天津市河东区经济贸易委员会内部办公网
  9. </title>
  10. <h4>多部门编辑文章列表</h4>
  11. </head>
  12. <body bgcolor="#ffffff">
  13. <a href="myArticleView.jsp">个人文章查看  </a>&nbsp;
  14. <a href="depArticleView.jsp">部门文章查看  </a>&nbsp;
  15. <a href="allArticleView.jsp">全局文章查看 </a>&nbsp;
  16. <a href="editArticleView.jsp">多部门编辑文章查看</a>&nbsp;&nbsp;<br />
  17. <%
  18. try{
  19.   String ud = (String)session.getAttribute("UD");
  20.   String udid = (String)session.getAttribute("UDID");
  21.   String un = (String)session.getAttribute("UN");
  22.   String uid = (String)session.getAttribute("UID");
  23.   String pp = (String)session.getAttribute("POPE");
  24.   String login = (String)session.getAttribute("LOGIN");
  25.   if(login!=null&&login.equals("OK")){
  26.   String where = "type = '2' ";
  27. Connection conn=sql.getSQL2005conn("dbconfig.xml");
  28. if(request.getParameter("pageID")==null){
  29. }else{
  30.   fen.setpages(request.getParameter("pageID"));
  31. }
  32. String select = fen.getPageinfsql(12,"article","id","desc",where);
  33. out.print(select);
  34. ResultSet show = sql.getStatement(select);
  35. %>
  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.     String bmsql = "";
  50.     while(show.next()){
  51.       bmsql = "";
  52.       %>
  53.       <tr>
  54.         <td><%=show.getString("users") %></td>
  55.         <td><a href=showarticle.jsp?id=<%=show.getString("id")%> ><%=show.getString("title") %></a> </td>
  56.         <td><%
  57.           bmsql ="select deparname from deparment where id = '"+show.getString("depar")+"'";
  58.           String[][] bm = dbc.getArray(bmsql);
  59.           out.print(bm[0][0]);
  60.         %></td>
  61.         <td>
  62.         <%
  63.         String depid = show.getString("edit");
  64.         if(depid.equals("all")){
  65.           out.print("全部部门可编辑");
  66.         }else{
  67.           String[] depids = depid.split(";");
  68.           for(int ii = 0; ii < depids.length; ii++ ){
  69.             String bmsql1 ="select deparname from deparment where id = '"+depids[ii]+"'";
  70.             String[][] bmm = dbc.getArray(bmsql1);
  71.             out.print(bmm[0][0]+" ");
  72.           }
  73.         }
  74.         %>
  75.         </td>
  76.         <td><%=show.getString("date") %></td>
  77.         <td>
  78.         <%
  79.         Tool tl = new Tool();
  80.         out.print(tl.getTime2(show.getString("timeout")));
  81.         %>
  82.         </td>
  83.         <td>
  84.         <%
  85.         if(show.getString("type").equals("0")){
  86.           out.print("共享文章");
  87.         }else if(show.getString("type").equals("1")){
  88.           out.print("部门内文章");
  89.         }else if(show.getString("type").equals("2")){
  90.           out.print("多部门编辑文章");
  91.         }
  92.         %>
  93.         </td>
  94.       </tr>
  95.       <%
  96.     }
  97.     out.println("</table>");
  98.     out.println("<div>"+fen.controlPage("editArticleView.jsp","pageID",8)+"</div>");
  99.     %>
  100. </div>
  101. <a href="" target="_blank"></a>
  102. </body>
  103. </html>
  104. <%
  105. show.close();
  106. sql.closeDB();
  107. }else{
  108.   response.sendRedirect("userlogin.jsp");
  109.   }
  110. }catch(Exception e){
  111.   e.printStackTrace();
  112. }%>