editArticleView.jsp~39~
上传用户: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.         }else{
  66.           String[] depids = depid.split(";");
  67.           for(int ii = 0; ii < depids.length; ii++ ){
  68.             String bmsql1 ="select deparname from deparment where id = '"+depids[ii]+"'";
  69.             String[][] bmm = dbc.getArray(bmsql1);
  70.             out.print(bmm[0][0]);
  71.           }
  72.         }
  73.         %>
  74.         </td>
  75.         <td><%=show.getString("date") %></td>
  76.         <td>
  77.         <%
  78.         Tool tl = new Tool();
  79.         out.print(tl.getTime2(show.getString("timeout")));
  80.         %>
  81.         </td>
  82.         <td>
  83.         <%
  84.         if(show.getString("type").equals("0")){
  85.           out.print("共享文章");
  86.         }else if(show.getString("type").equals("1")){
  87.           out.print("部门内文章");
  88.         }else if(show.getString("type").equals("2")){
  89.           out.print("多部门编辑文章");
  90.         }
  91.         %>
  92.         </td>
  93.       </tr>
  94.       <%
  95.     }
  96.     out.println("</table>");
  97.     out.println("<div>"+fen.controlPage("editArticleView.jsp","pageID",8)+"</div>");
  98.     %>
  99. </div>
  100. <a href="" target="_blank"></a>
  101. </body>
  102. </html>
  103. <%
  104. show.close();
  105. sql.closeDB();
  106. }else{
  107.   response.sendRedirect("userlogin.jsp");
  108.   }
  109. }catch(Exception e){
  110.   e.printStackTrace();
  111. }%>