allArticle.jsp~35~
资源名称: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>
- <%
- 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");
- %> <html>
- <head>
- <title>
- 天津市河东区经济贸易委员会内部办公网
- </title>
- </head>
- <body bgcolor="#ffffff">
- <a href="myArticle.jsp">个人日志管理</a>
- <a href="depArticle.jsp">部门内日志管理</a>
- <a href="allArticle.jsp">全局日志管理</a><br />
- <h2>
- 全局日志管理
- </h2>
- <%
- if(login.equals("OK")){
- String where = "";
- if(pp.equals("com")){//普通权限
- out.print("你没有权限查看这个页面!");
- }else{
- if(pp.equals("dep")){//部门权限
- where = " depar = '"+ud+"' ";
- 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);
- ResultSet show = sql.getStatement(select);
- out.print(select);
- %>
- <div align="center">
- <table cellpadding="0" cellspacing="0" border="1" width="80%">
- <tr>
- <td>用户名</td>
- <td>日志标题</td>
- <td>用户部门</td>
- <td>发布日期</td>
- <td>日志类型</td>
- <td>修改日志</td>
- <td>删除日志</td>
- </tr>
- <% while(show.next()){%>
- <tr>
- <td><%= show.getString("users")%> </td>
- <td><%=show.getString("title") %></td>
- <td><%=show.getString("depar") %></td>
- <td><%=show.getString("date") %></td>
- <td><%out.print(show.getString("type").equals("0")?"共享日志":"部门内日志" ); %></td>
- <td><a href=changearticle.jsp?id="+show.getString("id")+" >修改此日志</a></td>
- <td><a href=deletearticle_do.jsp?deleteid="+show.getString("id")+" >删除</a></td>
- </tr>
- <%
- }
- %>
- </table>
- <% out.println("<div>"+fen.controlPage("articlelist.jsp","pageID",8)+"</div>");
- %>
- </div>
- <%
- show.close();
- sql.closeDB();
- }else if(pp.equals("all")){//全局权限
- DBConn dbc = new DBConn();
- String udd = "select deparname from deparment";
- String[][] bm = dbc.getArray(udd);
- if(bm == null){
- out.print("没有部门!");
- }else{
- out.print("请选择要部门:<br />");
- for(int i = 0; i < bm.length; i++){
- %>
- <a href="changearticlelist.jsp?bm=<%=bm[i][0] %>"><%=bm[i][0] %></a><br />
- <%
- }
- }
- }
- }
- }else{
- out.print("请登录!");
- %>
- <br /><a href="userlogin.jsp" target="mainFrame">用户登录</a>
- <%
- }
- }catch(Exception e){
- e.printStackTrace();
- } %>
- </body>
- </html>