changeradiolist.jsp~31~
上传用户: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.     while(show.next()){
  50.       %>
  51.       <tr>
  52.         <td><%=show.getString("title") %></td>
  53.         <td><%=show.getString("depar") %></td>
  54.         <td><%=show.getString("date") %></td>
  55.         <td><%=show.getString("type").equals("1")?"全局公告":"部门内公告" %></td>
  56.         <td><a href=changeradio.jsp?id=<%=show.getString("id")%> target="_blank" >修改此公告</a></td>
  57.         <td><a href=deleteradio.jsp?deleteid=<%=show.getString("id")%> >删除记录</a></td>
  58.       </tr>
  59.       <%
  60.       }
  61.       %>
  62.       </table>
  63.       <%
  64.       out.println("<div>"+fen.controlPage("changeradiolist.jsp","pageID",8)+"</div>");
  65.       %>
  66.       </div>
  67. </body>
  68. </html>
  69. <%
  70. show.close();
  71. sql.closeDB();
  72. }
  73. }else{
  74.   out.print("请登录!");
  75.   %>
  76.   <br /><a href="userlogin.jsp" target="mainFrame">用户登录</a>
  77.   <%
  78.   }
  79. }catch(Exception e){
  80.   e.printStackTrace();
  81. } %>