showarticle.jsp~19~
资源名称:bangong.rar [点击查看]
上传用户:dlqqsh
上传日期:2021-11-13
资源大小:7840k
文件大小:2k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=GBK" import="officeol.mc.tools.*,java.sql.*,java.lang.*" %>
- <jsp:useBean id="sql" scope="page" class="control.sqlcontrol"></jsp:useBean>
- <jsp:useBean id="read" scope="page" class="control.Filecontrol.Reader_Writer"></jsp:useBean>
- <%request.setCharacterEncoding("gbk"); %>
- <html>
- <head>
- <script language="javascript" type="">
- function goback(){
- history.back(-1);
- }
- </script>
- <%
- try{
- sql.getSQL2005conn("dbconfig.xml");
- String id = request.getParameter("id");
- ResultSet art = sql.getStatement("select * from article where id="+id+";");art.next();
- %>
- <title>
- show
- </title>
- </head>
- <body bgcolor="#ffffff">
- <div align="center">
- <table cellpadding="0" cellspacing="0" border="1" width="80%">
- <tr>
- <td align="center">标题:<font size="5"><%=art.getString("title") %></font></td>
- </tr>
- <tr>
- <td align="center">作者:<%=art.getString("users")%> 发布时间:<%=art.getString("date") %>
- 日志类型:<%if(art.getString("type").equals("0")){
- out.print("共享文章");
- }else if(art.getString("type").equals("1")){
- out.print("部门内文章");
- }else if(art.getString("type").equals("2")){
- out.print("多部门编辑文章");
- } %>
- </td>
- </tr>
- <tr>
- <%if(art.getString("type").equals("2")){
- %>
- <td align="center">可编辑部门:<%
- DBConn dbc = new DBConn();
- Tool tl = new Tool();
- String depid = art.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></tr>
- <tr>
- <td align="center">编辑截止时间:
- <%out.print(tl.getTime2(art.getString("timeout"))); %>
- </td></tr>
- <%
- }
- %>
- <tr>
- <td><%String path=application.getRealPath("article")+"\"+art.getString("context");out.println(read.ReadFile(path));%></td>
- </tr>
- </table>
- </div>
- </body>
- <%
- art.close();
- sql.closeDB();
- }catch(Exception e){
- e.printStackTrace();
- } %>
- </html>