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

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=GBK" import="officeol.mc.tools.*,java.sql.*,java.lang.*" %>
  2. <%request.setCharacterEncoding("gbk"); %>
  3. <html>
  4. <head>
  5. <title>
  6. newarticle
  7. </title><link href="css/div11.css" rel="stylesheet" type="text/css">
  8. </head>
  9. <jsp:useBean id="sql" scope="page" class="control.sqlcontrol" />
  10. <body bgcolor="#ffffff">
  11. <%
  12. try{
  13.   sql.getSQL2005conn("dbconfig.xml");
  14.   String id = request.getParameter("id");
  15.   ResultSet art = sql.getStatement("select * from radio where id="+id+";");art.next();
  16.   String ud = (String)session.getAttribute("UD");
  17.   String udid = (String)session.getAttribute("UDID");
  18.   String un = (String)session.getAttribute("UN");
  19.   String uid = (String)session.getAttribute("UID");
  20.   String pp = (String)session.getAttribute("POPE");
  21.   String login = (String)session.getAttribute("LOGIN");
  22.   if(login!=null&&login.equals("OK")){
  23.     %>
  24.     <div align="center">
  25.       <form action="changeradio_do.jsp" method="post" name="myform">
  26.       <input type="hidden" value="<%=id%>" name="id" />
  27.       <table cellpadding="0" cellspacing="0" border="1" width="96%">
  28.         <tr>
  29.           <td>公告名:<input type="text" onBlur="makefull()" onFocus="makeempty();" value="<%=art.getString("title")%>" name="title" size="50" /></td>
  30.         </tr>
  31.         <tr>
  32.           <td>类型:
  33.             <select name="type">
  34.             <%
  35.             String type = art.getString("type");
  36.             if(pp.equals("all")){
  37.               if(type.equals("1")){
  38.                 out.println("<option value='1' selected='selected'>全局公告</option>");
  39.                 out.println("<option value='0'>内部公告</option>");
  40.               }else{
  41.                 out.println("<option value='0' selected='selected'>内部公告</option>");
  42.                 out.println("<option value='1'>全局公告</option>");
  43.               }
  44.             }else{
  45.               if(type.equals("0")){
  46.                 out.println("<option value='0' selected='selected'>内部公告</option>");
  47.               }
  48.             }
  49.             %>
  50.             </select>
  51.           </td>
  52.         </tr>
  53.         <tr>
  54.           <td>
  55.             <textarea id="my_Editor1" onBlur="makefull1()" onFocus="makeempty1()" name="context" cols="60" rows="8" ><%=art.getString("context")%></textarea>
  56.           </td>
  57.         </tr>
  58.         <% if(pp.equals("all")){
  59.         %>
  60.         <tr>
  61.           <td>
  62.             &nbsp; &nbsp; &nbsp; <a onClick="fileDivShow()" href="#">添加已上传文件下载链接</a>
  63.           </td>
  64.         </tr>
  65. <tr>
  66.   <td width="300">
  67.     &nbsp; &nbsp; &nbsp; <a onClick="articleDivShow()" href="#">添加多部门编辑文章链接(可编辑)</a>
  68.   </td>
  69. </tr>
  70. <tr>
  71.   <td width="300">
  72.     &nbsp; &nbsp; &nbsp; <a onClick="garticleDivShow()" href="#">添加共享文章链接(只查看)</a>
  73.   </td>
  74. </tr>
  75.         <%
  76.         }
  77.         %>
  78.         <tr>
  79.           <td align="center"><input type="submit" value="保存" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重新设定" /></td>
  80.         </tr>
  81.       </table>
  82.       </form>
  83.     </div>
  84.     <%if(pp.equals("all")){ %>
  85.     <div id="article" align="justify" >
  86.       <div align="right"><a href="#" onclick="adh()">关闭</a></div>
  87.       <%
  88.       DBConn dbc = new DBConn();
  89.       String asql = "select top(20) * from article where type = '2' order by id desc";
  90.       String[][] art1 = dbc.getArray(asql);
  91.       if(art1==null){
  92.       }else{
  93.         for(int i = 0; i < art1.length; i++){
  94.           %>
  95.           &nbsp;&nbsp;&nbsp; <a href="#" id="href<%=i%>" onClick="writeHref('<%=art1[i][0] %>','<%=art1[i][3] %>','href<%=i%>')"><%=art1[i][3] %> &nbsp;&nbsp;&nbsp; <%=art1[i][1]%> </a>  &nbsp;<br />
  96.           <%
  97.           }
  98.         }
  99.         %>
  100.         </div>
  101.         <div id="garticle" align="justify" >
  102.           <div align="right"><a href="#" onclick="gh()">关闭</a></div>
  103.           <%
  104.           String gasql = "select top(20) * from article where type = '2' or type = '0' order by id desc";
  105.           String[][] gart = dbc.getArray(gasql);
  106.           if(gart==null){
  107.           }else{
  108.             for(int i = 0; i < gart.length; i++){
  109.               %>
  110.               &nbsp;&nbsp;&nbsp; <a href="#" id="ghref<%=i%>" onClick="writegHref('<%=gart[i][0] %>','<%=gart[i][3] %>','ghref<%=i%>')"><%=gart[i][3] %> &nbsp;&nbsp;&nbsp; <%=gart[i][1]%> </a>  &nbsp;<br />
  111.               <%
  112.               }
  113.             }
  114.             %>
  115.             </div>
  116.             <div id="file" style="display:none" align="justify" >
  117.               <div align="right"><a href="#" onclick="fh()">关闭</a></div>
  118.               <%
  119.               String fsql = "select top(20) * from files order by id desc";
  120.               String[][] file = dbc.getArray(fsql);
  121.               if(art1==null){
  122.               }else{
  123.                 for(int i = 0; i < file.length; i++){
  124.                   %>
  125.                   &nbsp;&nbsp;<a href="#" id="fhref<%=i%>" onClick="writeFHref('<%=file[i][6] %>','<%=file[i][1] %>','fhref<%=i%>')"><%=file[i][1]%></a> <br />
  126.                   <%
  127.                   }
  128.                 }
  129.                 %>
  130.                 </div>
  131.                 <script language="javascript" type="text/javascript">
  132.                 function garticleDivShow(){
  133.                   document.getElementById("garticle").style.display="block";
  134.                 }
  135.                 function garticleDivHide(){
  136.                   setTimeout("gh()",500);
  137.                 }//延迟0.5秒后关掉层
  138.                 function gh(){
  139.                   document.getElementById("garticle").style.display="none";
  140.                 }
  141.                 function writegHref(gaid,gatit,ghrefn){
  142.                   document.myform.context.value=document.myform.context.value+'<br /><br /><a href=showarticle.jsp?id='+gaid+'>点击查看文章 '+gatit+'</a>';
  143.                   document.getElementById(ghrefn).style.display='none';
  144.                 }
  145.                 function articleDivShow(){
  146.                   document.getElementById("article").style.display="block";
  147.                 }
  148.                 function articleDivHide(){
  149.                   setTimeout("adh()",500);
  150.                 }//延迟0.5秒后关掉层
  151.                 function adh(){
  152.                   document.getElementById("article").style.display="none";
  153.                 }
  154.                 function writeHref(aid,atit,hrefn){
  155.                   document.myform.context.value=document.myform.context.value+'<br /><br /><a href=changearticle.jsp?id='+aid+'>点击进入文章 '+atit+'</a>';
  156.                   document.getElementById(hrefn).style.display='none';
  157.                 }
  158.                 function fileDivShow(){
  159.                   document.getElementById("file").style.display="block";
  160.                 }
  161.                 function fileDivHide(){
  162.                   setTimeout("fh()",500);
  163.                 }//延迟0.5秒后关掉层
  164.                 function fh(){
  165.                   document.getElementById("file").style.display="none";
  166.                 }
  167.                 function writeFHref(aid1,atit1,hrefn1){
  168.                   document.myform.context.value=document.myform.context.value+'<br /><br /><a href=download.jsp?fn='+aid1+'>点击下载文件 '+atit1+'</a>';
  169.                   document.getElementById(hrefn1).style.display='none';
  170.                 }
  171.                 function makeempty(){
  172.                   if(document.myform.title.value=='输入公告名称'){
  173.                     document.myform.title.value='';
  174.                   }
  175.                 }
  176.                 function makefull(){
  177.                   if(document.myform.title.value==''){
  178.                     document.myform.title.value='输入公告名称';
  179.                   }
  180.                 }
  181.                 function makeempty1(){
  182.                   if(document.myform.context.value=='在此处输入具体内容(不超过200字)'){
  183.                     document.myform.context.value='';
  184.                   }
  185.                 }
  186.                 function makefull1(){
  187.                   if(document.myform.context.value==''){
  188.                     document.myform.context.value='在此处输入具体内容(不超过200字)';
  189.                   }
  190.                 }
  191.                 </script>
  192.                 <%
  193.                 }else{
  194.                 }
  195.                 %>
  196.                 <%
  197.                 art.close();
  198.                 sql.closeDB();
  199.               }else{
  200.                 response.sendRedirect("userlogin.jsp");
  201.               }
  202.             }catch(Exception ex){
  203.               ex.printStackTrace();
  204.             }
  205.             %>
  206.             </body>
  207. </html>