filedown2.jsp~25~
资源名称:bangong.rar [点击查看]
上传用户:dlqqsh
上传日期:2021-11-13
资源大小:7840k
文件大小:3k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=GBK" import="officeol.mc.tools.*,control.Textcontrol.*" %>
- <%request.setCharacterEncoding("GBK"); %>
- <html>
- <head>
- <title>
- 天津市河东区经济贸易委员会内部办公网
- </title>
- </head>
- <body bgcolor="#ffffff">
- <h4>
- 文件下载
- </h4>
- <%try{
- String message = request.getAttribute("msg")==null?"":request.getAttribute("msg").toString();
- out.print(message);
- 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");
- String bmm = request.getParameter("bm");
- if(login!=null&&login.equals("OK")){
- DBConn dbc = new DBConn();
- Pagecontrol pct = new Pagecontrol();
- if(request.getParameter("pageID")==null){
- }else{
- pct.setpages(request.getParameter("pageID"));
- }
- String bms = "select id from deparment where dnmd5 ='"+bmm+"'";
- String bm1[][] = dbc.getArray(bms);
- String sql = " select f.*,u.username,d.deparname from files as f inner join [user] as u on u.id = f.upuserid inner join deparment as d on d.id = f.upuserdeparid and f.filetype = 1 and upuserdeparid = '"+bm1[0][0]+"' order by filetype ";
- String sql1 = "";
- sql = pct.getPageinfsql(20,"files","id","desc","filetype=0 and upuserdeparid = '"+bm1[0][0]+"'");
- boolean temp = true;
- if(pp.equals("com")){//普通权限
- }else if(pp.equals("dep")){//部门权限
- }else if(pp.equals("all")){//全局权限
- }else{//没有权限
- temp = false;
- }
- if(temp){
- //out.print(sql);
- String[][] df = dbc.getArray(sql);
- if(df!=null){
- %>
- <table border="1">
- <tr>
- <td colspan="7">文件下载列表</td>
- </tr>
- <tr>
- <td>上传文件名</td>
- <td>上传文件说明</td>
- <td>上传日期</td>
- <td>上传人</td>
- <td>上传部门</td>
- <td>文件类型</td>
- <td>下载文件</td>
- </tr>
- <%
- for(int i = 0; i < df.length; i++){
- %>
- <tr>
- <td><%=df[i][1] %></td>
- <td><%=df[i][4] %></td>
- <td><%=df[i][2] %></td>
- <td><%=df[i][8] %></td>
- <td><%=df[i][9] %></td>
- <td><%if(df[i][7]!=null)out.print(df[i][7].equals("0")?"部门内":"共享"); %></td>
- <td>
- <a href="download.jsp?fn=<%=df[i][6] %>">下载文件</a>
- </td>
- <%
- }
- }
- }else{
- out.print("你没有权限查看这个页面!");
- }
- }else{
- response.sendRedirect("userlogin.jsp");
- }
- }catch(Exception ex){
- }
- %>
- </body>
- </html>