editArticleView.jsp
资源名称:bangong.rar [点击查看]
上传用户:dlqqsh
上传日期:2021-11-13
资源大小:7840k
文件大小:3k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=GBK" import="java.sql.*,java.lang.*,officeol.mc.tools.*" %>
- <%request.setCharacterEncoding("gbk");%>
- <jsp:useBean id="sql" scope="page" class="control.sqlcontrol"></jsp:useBean>
- <jsp:useBean id="fen" scope="page" class="control.Textcontrol.Pagecontrol"></jsp:useBean>
- <html>
- <head>
- <title>
- 天津市河东区经济贸易委员会内部办公网
- </title>
- <h4>多部门编辑文章列表</h4>
- </head>
- <body bgcolor="#ffffff">
- <a href="gxArticle.jsp">返回共享日志查看页面 </a> <br /><br />
- <%
- try{
- String ud = (String)session.getAttribute("UD");
- String udid = (String)session.getAttribute("UDID");
- String un = (String)session.getAttribute("UN");
- String uid = (String)session.getAttribute("UID");
- String pp = (String)session.getAttribute("POPE");
- String login = (String)session.getAttribute("LOGIN");
- if(login!=null&&login.equals("OK")){
- String where = "type = '2' ";
- Connection conn=sql.getSQL2005conn("dbconfig.xml");
- if(request.getParameter("pageID")==null){
- }else{
- fen.setpages(request.getParameter("pageID"));
- }
- String select = fen.getPageinfsql(12,"article","id","desc",where);
- //out.print(select);
- ResultSet show = sql.getStatement(select);
- %>
- <div align="center">
- <table cellpadding="0" cellspacing="0" border="1" width="95%">
- <tr>
- <td>用户</td>
- <td>文章标题</td>
- <td>发布部门</td>
- <td>可编辑部门</td>
- <td>发布时间</td>
- <td>截止时间</td>
- <td>文章类型</td>
- </tr>
- <%
- DBConn dbc = new DBConn();
- String bmsql = "";
- while(show.next()){
- bmsql = "";
- %>
- <tr>
- <td><%=show.getString("users") %></td>
- <td><a href=showarticle.jsp?id=<%=show.getString("id")%> ><%=show.getString("title") %></a> </td>
- <td><%
- bmsql ="select deparname from deparment where id = '"+show.getString("depar")+"'";
- String[][] bm = dbc.getArray(bmsql);
- out.print(bm[0][0]);
- %></td>
- <td>
- <%
- String depid = show.getString("edit");
- if(depid.equals("all")){
- out.print("全部部门可编辑");
- }else{
- String[] depids = depid.split(";");
- for(int ii = 0; ii < depids.length; ii++ ){
- String bmsql1 ="select deparname from deparment where id = '"+depids[ii]+"'";
- String[][] bmm = dbc.getArray(bmsql1);
- out.print(bmm[0][0]+" ");
- }
- }
- %>
- </td>
- <td><%=show.getString("date") %></td>
- <td>
- <%
- Tool tl = new Tool();
- out.print(tl.getTime2(show.getString("timeout")));
- %>
- </td>
- <td>
- <%
- if(show.getString("type").equals("0")){
- out.print("共享文章");
- }else if(show.getString("type").equals("1")){
- out.print("部门内文章");
- }else if(show.getString("type").equals("2")){
- out.print("多部门编辑文章");
- }
- %>
- </td>
- </tr>
- <%
- }
- out.println("</table>");
- out.println("<div>"+fen.controlPage("editArticleView.jsp","pageID",8)+"</div>");
- %>
- </div>
- <a href="" target="_blank"></a>
- </body>
- </html>
- <%
- show.close();
- sql.closeDB();
- }else{
- response.sendRedirect("userlogin.jsp");
- }
- }catch(Exception e){
- e.printStackTrace();
- }%>