editArticleView.jsp~44~
上传用户: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;
  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.       <td>文章类型</td>
  43.     </tr>
  44.     <%
  45.     DBConn dbc = new DBConn();
  46.     String bmsql = "";
  47.     while(show.next()){
  48.       bmsql = "";
  49.       %>
  50.       <tr>
  51.         <td><%=show.getString("users") %></td>
  52.         <td><a href=showarticle.jsp?id=<%=show.getString("id")%> ><%=show.getString("title") %></a> </td>
  53.         <td><%
  54.           bmsql ="select deparname from deparment where id = '"+show.getString("depar")+"'";
  55.           String[][] bm = dbc.getArray(bmsql);
  56.           out.print(bm[0][0]);
  57.         %></td>
  58.         <td>
  59.         <%
  60.         String depid = show.getString("edit");
  61.         if(depid.equals("all")){
  62.           out.print("全部部门可编辑");
  63.         }else{
  64.           String[] depids = depid.split(";");
  65.           for(int ii = 0; ii < depids.length; ii++ ){
  66.             String bmsql1 ="select deparname from deparment where id = '"+depids[ii]+"'";
  67.             String[][] bmm = dbc.getArray(bmsql1);
  68.             out.print(bmm[0][0]+" ");
  69.           }
  70.         }
  71.         %>
  72.         </td>
  73.         <td><%=show.getString("date") %></td>
  74.         <td>
  75.         <%
  76.         Tool tl = new Tool();
  77.         out.print(tl.getTime2(show.getString("timeout")));
  78.         %>
  79.         </td>
  80.         <td>
  81.         <%
  82.         if(show.getString("type").equals("0")){
  83.           out.print("共享文章");
  84.         }else if(show.getString("type").equals("1")){
  85.           out.print("部门内文章");
  86.         }else if(show.getString("type").equals("2")){
  87.           out.print("多部门编辑文章");
  88.         }
  89.         %>
  90.         </td>
  91.       </tr>
  92.       <%
  93.     }
  94.     out.println("</table>");
  95.     out.println("<div>"+fen.controlPage("editArticleView.jsp","pageID",8)+"</div>");
  96.     %>
  97. </div>
  98. <a href="" target="_blank"></a>
  99. </body>
  100. </html>
  101. <%
  102. show.close();
  103. sql.closeDB();
  104. }else{
  105.   response.sendRedirect("userlogin.jsp");
  106.   }
  107. }catch(Exception e){
  108.   e.printStackTrace();
  109. }%>