editArticleView.jsp~47~
上传用户: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="gxArticle.jsp">返回共享日志查看页面 </a>&nbsp;<br /><br />
  14. <%
  15. try{
  16.   String ud = (String)session.getAttribute("UD");
  17.   String udid = (String)session.getAttribute("UDID");
  18.   String un = (String)session.getAttribute("UN");
  19.   String uid = (String)session.getAttribute("UID");
  20.   String pp = (String)session.getAttribute("POPE");
  21.   String login = (String)session.getAttribute("LOGIN");
  22.   if(login!=null&&login.equals("OK")){
  23.   String where = "type = '2' ";
  24. Connection conn=sql.getSQL2005conn("dbconfig.xml");
  25. if(request.getParameter("pageID")==null){
  26. }else{
  27.   fen.setpages(request.getParameter("pageID"));
  28. }
  29. String select = fen.getPageinfsql(12,"article","id","desc",where);
  30. //out.print(select);
  31. ResultSet show = sql.getStatement(select);
  32. %>
  33. <div align="center">
  34.   <table cellpadding="0" cellspacing="0" border="1" width="95%">
  35.     <tr>
  36.       <td>用户</td>
  37.       <td>文章标题</td>
  38.       <td>发布部门</td>
  39.       <td>可编辑部门</td>
  40.       <td>发布时间</td>
  41.       <td>截止时间</td>
  42.     </tr>
  43.     <%
  44.     DBConn dbc = new DBConn();
  45.     String bmsql = "";
  46.     while(show.next()){
  47.       bmsql = "";
  48.       %>
  49.       <tr>
  50.         <td><%=show.getString("users") %></td>
  51.         <td><a href=showarticle.jsp?id=<%=show.getString("id")%> ><%=show.getString("title") %></a> </td>
  52.         <td><%
  53.           bmsql ="select deparname from deparment where id = '"+show.getString("depar")+"'";
  54.           String[][] bm = dbc.getArray(bmsql);
  55.           out.print(bm[0][0]);
  56.         %></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>
  74.         <%
  75.         Tool tl = new Tool();
  76.         out.print(tl.getTime2(show.getString("timeout")));
  77.         %>
  78.         </td>
  79.         <td>
  80.         <%
  81.         if(show.getString("type").equals("0")){
  82.           out.print("共享文章");
  83.         }else if(show.getString("type").equals("1")){
  84.           out.print("部门内文章");
  85.         }else if(show.getString("type").equals("2")){
  86.           out.print("多部门编辑文章");
  87.         }
  88.         %>
  89.         </td>
  90.       </tr>
  91.       <%
  92.     }
  93.     out.println("</table>");
  94.     out.println("<div>"+fen.controlPage("editArticleView.jsp","pageID",8)+"</div>");
  95.     %>
  96. </div>
  97. <a href="" target="_blank"></a>
  98. </body>
  99. </html>
  100. <%
  101. show.close();
  102. sql.closeDB();
  103. }else{
  104.   response.sendRedirect("userlogin.jsp");
  105.   }
  106. }catch(Exception e){
  107.   e.printStackTrace();
  108. }%>