changeradiolist.jsp~32~
上传用户:dlqqsh
上传日期:2021-11-13
资源大小:7840k
文件大小:2k
源码类别:

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. articlelist
  9. </title>
  10. </head>
  11. <body bgcolor="#ffffff">
  12. <%
  13. try{
  14.   String ud = (String)session.getAttribute("UD");
  15.   String udid = (String)session.getAttribute("UDID");
  16.   String un = (String)session.getAttribute("UN");
  17.   String uid = (String)session.getAttribute("UID");
  18.   String pp = (String)session.getAttribute("POPE");
  19.   String login = (String)session.getAttribute("LOGIN");
  20.   if(login.equals("OK")){
  21.     Connection conn=sql.getSQL2005conn("dbconfig.xml");
  22.     if(request.getParameter("pageID")==null){
  23.     }else{
  24.       fen.setpages(request.getParameter("pageID"));
  25.     }
  26.     if(pp.equals("com")){//普通权限
  27.     out.print("你没有权限查看这个页面!");
  28.   }else{
  29.     String where = "";
  30.     if(pp.equals("dep")){//部门权限
  31.     where ="type='0'";
  32.   }else if(pp.equals("all")){//全局权限
  33.   where ="";
  34. }
  35. String select = fen.getPageinfsql(12,"radio","id","desc",where);
  36. ResultSet show = sql.getStatement(select);
  37. %>
  38. <div align="center">
  39.   <table width="90%" border="1">
  40.     <tr>
  41.       <td>公告名称</td>
  42.       <td>公告部门</td>
  43.       <td>公告日期</td>
  44.       <td>公告类型</td>
  45.       <td>修改公告</td>
  46.       <td>删除公告</td>
  47.     </tr>
  48.     <%
  49.     DBConn dbc = new DBConn();
  50.     while(show.next()){
  51.       %>
  52.       <tr>
  53.         <td><%=show.getString("title") %></td>
  54.         <td><%=show.getString("depar") %></td>
  55.         <td><%=show.getString("date") %></td>
  56.         <td><%=show.getString("type").equals("1")?"全局公告":"部门内公告" %></td>
  57.         <td><a href=changeradio.jsp?id=<%=show.getString("id")%> target="_blank" >修改此公告</a></td>
  58.         <td><a href=deleteradio.jsp?deleteid=<%=show.getString("id")%> >删除记录</a></td>
  59.       </tr>
  60.       <%
  61.       }
  62.       %>
  63.       </table>
  64.       <%
  65.       out.println("<div>"+fen.controlPage("changeradiolist.jsp","pageID",8)+"</div>");
  66.       %>
  67.       </div>
  68. </body>
  69. </html>
  70. <%
  71. show.close();
  72. sql.closeDB();
  73. }
  74. }else{
  75.   out.print("请登录!");
  76.   %>
  77.   <br /><a href="userlogin.jsp" target="mainFrame">用户登录</a>
  78.   <%
  79.   }
  80. }catch(Exception e){
  81.   e.printStackTrace();
  82. } %>