EditArticle.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:7k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <%
  5. Request m_request = new Request(request);
  6. int intArticleID = m_request.GetInt("ID");
  7. int iSysDirID = m_request.GetInt("SysDirID");
  8. if(intArticleID <1)
  9. {
  10. %>
  11. <script language="JavaScript" type="text/JavaScript">
  12. alert("请选择正确的新闻,修改失败!");
  13. history.back();
  14. </script>
  15. <%
  16. }
  17. else
  18. {
  19. Vector vt = ArticleManager.getRecordByID(intArticleID);
  20. if(vt.size()==1)
  21. {
  22. if(("," + iSysDirID + "," + SystemDirectoryManager.getSubSystemDirectoryIDs(iSysDirID) + ",").indexOf("," + ((Vector)vt.get(0)).get(11).toString() + ",")>=0)
  23. {
  24. %>
  25. <html>
  26. <head>
  27. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  28. <title>新闻管理-- GForce OA 2.0</title>
  29. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  30. <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
  31. <script language="JavaScript" src="/js/changestyle.js"></script>
  32. <script language="JavaScript" type="text/javascript">
  33. function checkEditArticle()
  34. {
  35.     if(document.editarticle.Title.value=="")
  36.     {
  37.         alert("请输入主题内容!");
  38.         document.editarticle.Title.focus();
  39.         return false;
  40.     }
  41. }
  42. </script>
  43. <style type="text/css">
  44. <!--
  45. .imgtd {
  46.     border: 1px solid #0A0A0A;
  47. }
  48. -->
  49. </style>
  50. </head>
  51. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0" onload="document.editarticle.Title.focus();">
  52. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  53.      <tr>
  54.         <td align="center" valign="top"><p>&nbsp;</p>
  55.           <table width="90%" border="0" cellpadding="0" cellspacing="0">
  56.                 <tr align="center" valign="middle">
  57.                 <th nowrap colspan=2 align="center"><font color="#000000">信&nbsp;息&nbsp;修&nbsp;改</font></th>
  58.               </tr>
  59.                <tr><td>&nbsp;</td>
  60.                 </tr>
  61.               </table>
  62.         <form name="editarticle" action="EditArticleAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkEditArticle();">
  63.         <table  border="1" cellpadding="1" cellspacing="1" width="90%">
  64.           <tr>
  65.            <td width="80" align="right" valign="middle"><font color="#0A0A0A">标&nbsp;&nbsp;&nbsp;&nbsp;题:&nbsp;</font></td>
  66.             <td colspan="3" align="left" valign="middle" nowrap>&nbsp;<input name="Title" type="text" maxlength="100" size="37" Value="<%=((Vector)vt.get(0)).get(1).toString()%>">
  67.              <input name="ID" type="hidden" Value="<%=((Vector)vt.get(0)).get(0).toString()%>">
  68.             </td>
  69.           </tr>
  70.           <tr>
  71.             <td align="right" valign="middle"><font color="#0A0A0A">作&nbsp;&nbsp;&nbsp;&nbsp;者:&nbsp;</font></td>
  72.             <td colspan="3" align="left" valign="middle" nowrap>&nbsp;<input name="Author" type="text" maxlength="50" size="20" Value="<%=((Vector)vt.get(0)).get(2).toString()%>">
  73.             </td>
  74.           </tr>
  75.           <tr>
  76.             <td align="right" valign="middle"><font color="#0A0A0A">出&nbsp;版&nbsp;社:&nbsp;</font></td>
  77.             <td colspan="3" align="left" valign="middle" nowrap>&nbsp;<input name="Publisher" type="text" maxlength="100" size="37" Value="<%=((Vector)vt.get(0)).get(3).toString()%>">
  78.             </td>
  79.           </tr>
  80.           <tr>
  81.             <td align="right" valign="middle"><font color="#0A0A0A">来源网址:&nbsp;</font></td>
  82.             <td colspan="3" align="left" valign="middle" nowrap>
  83.              &nbsp;<input name="FromURL" type="text" maxlength="150" size="37" Value="<%=((Vector)vt.get(0)).get(4).toString()%>">
  84.             <input name="PublishDate" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(5).toString(),"yyyy-MM-dd")%>">
  85.             </td>
  86.           </tr>
  87.           <tr>
  88.             <td align="right" valign="middle"><font color="#0A0A0A">内&nbsp;&nbsp;&nbsp;&nbsp;容:&nbsp;</font></td>
  89.             <td colspan="3" align="left" valign="middle" nowrap height="280">
  90.                   <IFRAME ID="WebEditor1" src="/WebEditor/WebEditor.jsp?id=Content" frameborder="0" scrolling="no" width="550" height="350"></IFRAME>
  91.                   <textarea name="Content" cols="75" rows="3" readonly="true" style="display:none;"><%=((Vector)vt.get(0)).get(6).toString()%></textarea>
  92.               <input name="ViewTimes" type="hidden"  Value="<%=((Vector)vt.get(0)).get(7).toString()%>"> </td>
  93.           </tr>
  94.           <tr>
  95.             <td align="right" valign="middle"><font color="#0A0A0A">是否热点:&nbsp;</font></td>
  96.             <td align="left" valign="middle" nowrap colspan="3"> <font color="#0A0A0A">
  97.               &nbsp;<input name="IsHot" type="radio" value="1" <%if(((Vector)vt.get(0)).get(8).toString().equalsIgnoreCase("true"))out.print("checked");%>>是&nbsp;
  98.               &nbsp;<input name="IsHot" type="radio" value="0" <%if(((Vector)vt.get(0)).get(8).toString().equalsIgnoreCase("false"))out.print("checked");%>>否</font>
  99.              </td>
  100.           </tr>
  101.           <tr>
  102.             <td align="right" valign="middle"><font color="#0A0A0A">关&nbsp;键&nbsp;字:&nbsp;</font></td>
  103.             <td align="left" valign="middle" nowrap colspan="3">&nbsp;<input name="KeyWords" type="text" maxlength="100" size="37"  Value="<%=((Vector)vt.get(0)).get(10).toString()%>">
  104.               <input name="PublishUserID" type="hidden" Value="<%=((Vector)vt.get(0)).get(12).toString()%>">
  105.             </td>
  106.           </tr>
  107.         </table>
  108.         <table width="90%" border="0">
  109.                 <tr>
  110.                     <td>&nbsp;</td>
  111.                </tr>
  112.                 <tr>
  113.                   <td>&nbsp;</td>
  114.                    <td align="right" valign="middle" nowrap>
  115.                         <td colspan="3" align="right" valign="middle" nowrap><input type="submit" value="确 定" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重 填" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="返 回" onclick="window.location='ArticleManage.jsp?SysDirID=<%=iSysDirID%>';" style="background-color: #FFFFFF; border: 1 solid #000000">
  116.                      </td>
  117.                 </tr>
  118.                 <tr>
  119.                     <td align="right" valign="middle">&nbsp;</td>
  120.                </tr>
  121.             </table>
  122.         </form>
  123.         </td>
  124.     </tr>
  125. </table>
  126. </body>
  127. </html>
  128. <%
  129. }
  130. else
  131. {
  132. %>
  133. <script language="JavaScript" type="text/JavaScript">
  134. alert("您没有权限修改此记录,修改失败!");
  135. history.back();
  136. </script>
  137. <%
  138. }
  139. }
  140. else
  141. {
  142. %>
  143. <script language="JavaScript" type="text/JavaScript">
  144. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  145. history.back();
  146. </script>
  147. <%
  148. }
  149. }
  150. %>