Audit_Edit.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:7k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../../FS_InterFace/ns_Function.asp" -->
  5. <!--#include file="../../FS_Inc/Function.asp" -->
  6. <!--#include file="../../FS_Inc/Func_page.asp" -->
  7. <!--#include file="lib/cls_main.asp"-->
  8. <%
  9. Dim Conn,s_News,User_Conn,newsInfo_Rs,newsClass_Rs,sql_cmd,sql_class_cmd,contID,NewsTitle,CurtTitle,Content,Keywords,Author,classID,ClassName
  10. DIm Fs_News,str_CurrPath,sRootDir
  11. if G_VIRTUAL_ROOT_DIR<>"" then sRootDir="/"+G_VIRTUAL_ROOT_DIR else sRootDir=""
  12. if Session("Admin_Is_Super") = 1 then
  13. str_CurrPath = sRootDir &"/"&G_UP_FILES_DIR
  14. Else
  15. str_CurrPath = Replace(sRootDir &"/"&G_UP_FILES_DIR&"/adminfiles/"&Session("Admin_Name"),"//","/")
  16. End if
  17. if Not MF_Session_TF() then Top_Go_To_Login_Page
  18. 'MF_Check_Pop_TF()参数:文件名命名+代码
  19. 'if Not MF_Check_Pop_TF("NS_News_01") then Top_Go_To_Error_Page 
  20. MF_User_Conn
  21. MF_Default_Conn
  22. MF_Session_TF 
  23. Set Fs_News=New Cls_News
  24. contID=NoSqlHack(Request.QueryString("contid"))
  25. Set newsInfo_Rs=Server.CreateObject(G_FS_RS)
  26. Set newsClass_Rs=Server.CreateObject(G_FS_RS)
  27. '获得稿件的基本数据
  28. sql_cmd="Select ContTitle,SubTitle,ContContent,KeyWords,UserNumber,MainID,AuditTF from FS_ME_InfoContribution where contid="&contID
  29. newsInfo_Rs.open sql_cmd,User_Conn,1,1
  30. if not  newsInfo_Rs.eof then
  31. NewsTitle=newsInfo_Rs("ContTitle")
  32. CurtTitle=newsInfo_Rs("SubTitle")
  33. Content=newsInfo_Rs("ContContent")
  34. Keywords=newsInfo_Rs("KeyWords")
  35. Author=newsInfo_Rs("UserNumber")
  36. classID=newsInfo_Rs("MainID")
  37. ENd if
  38. '获得分类中文名称 
  39. sql_class_cmd="Select ClassName,Classid from  FS_NS_NewsClass where id="&classID
  40. newsClass_Rs.open sql_class_cmd,Conn,1,1 
  41. dim newsClassID
  42. if not newsClass_Rs.eof then
  43. ClassName=newsClass_Rs("ClassName")
  44. newsClassID=newsClass_Rs("Classid")
  45. End if
  46. if err.number="" then
  47. Response.Redirect("lib/error.asp?ErrCodes=<li>出现异常,请返回</li>")
  48. Response.End()
  49. End if
  50. %>
  51. <html>
  52. <head>
  53. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  54. <title>CMS4.0</title>
  55. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  56. </head>
  57. <script language="JavaScript" src="../../FS_Inc/Prototype.js"></script>
  58. <script language="JavaScript" src="js/Public.js"></script>
  59. <script language="JavaScript" src="js/CheckJs.js"></script>
  60. <script language="JavaScript" type="text/javascript" src="../../FS_Inc/Get_Domain.asp"></script>
  61. <script language="JavaScript" type="text/javascript" src="../../Editor/FS_scripts/editor.js"></script>
  62. <body class="hback">
  63. <form name="auditEdit_Form" id="auditEdit_Form" action="Constr_Action.asp?act=editaudit" method="post">
  64. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  65. <tr>
  66. <td colspan="2" class="xingmu">投稿审核前编辑</td>
  67. </tr>
  68. <tr class="hback">
  69. <td width="20%" align="right">新闻标题:</td>
  70. <td width="80%" aling="left">
  71. <input name="txt_newsTitle" type="text" size="50" id="txt_newsTitle" value="<%=NewsTitle%>">
  72. <input name="hid_contID" type="hidden" id="hid_contID" value="<%=ContID%>">
  73. <span id="span_newsTitle"></span> </td>
  74. </tr>
  75. <tr class="hback">
  76. <td align="right">新闻副标题:</td>
  77. <td aling="left">
  78. <input name="txt_curtTitle" type="text" size="50" id="txt_curtTitle" value="<%=CurtTitle%>">
  79. </td>
  80. </tr>
  81. <tr class="hback">
  82. <td align="right">正文:</td>
  83. <td aling="left">
  84. <!--编辑器开始-->
  85. <pre id="idTemporary" name="idTemporary" style="display:none"><%=Server.HTMLEncode(Content)%></pre>
  86. <script language="JavaScript">
  87. <!--
  88. var FS_Edit1 = new InnovaEditor("FS_Edit1");
  89. FS_Edit1.cmdAssetManager="modalDialogShow('../../<% = G_ADMIN_DIR %>/CommPages/SelectManageDir/SelectPic.asp?CurrPath=<% = str_CurrPath %>',670,450)";
  90. FS_Edit1.width="100%";
  91. FS_Edit1.height="400";
  92. FS_Edit1.btnFlash=true;
  93. FS_Edit1.btnMedia=true;        
  94. FS_Edit1.RENDER($("idTemporary").innerHTML);
  95. //-->
  96. </script>
  97. <textarea name="txt_content" style="display:none" ></textarea>
  98. <!--编辑器结束-->
  99. <span id="span_content"></span></td>
  100. </tr>
  101. <tr class="hback">
  102. <td align="right">关键词:</td>
  103. <td aling="left">
  104. <input name="txt_keywords" type="text" size="50" id="txt_keywords" value="<%=Keywords%>" onKeyUp="ReplaceDot('txt_keywords')">
  105. </td>
  106. </tr>
  107. <tr class="hback">
  108. <td align="right">新闻所属栏目:</td>
  109. <td aling="left">
  110. <input name="txt_classCName" type="text" size="50" id="txt_classCName" value="<%=ClassName%>">
  111. <input name="hid_ClassID" type="hidden" id="hid_ClassID" value="<% = newsClassID %>">
  112. <input type="button" name="Submit" value="选择栏目"   onClick="SelectClass();">
  113. <span id="span_ClassID"></span></td>
  114. </tr>
  115. <tr class="hback">
  116. <td align="right">选择模板:</td>
  117. <td aling="left">
  118. <input name="NewsTemplet" type="text" id="NewsTemplet" size="50" value="<%=Replace("/"& G_TEMPLETS_DIR &"/NewsClass/news.htm","//","/")%>">
  119. <input name="Submit532" type="button" id="Submit53" value="选择模板"  onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectTemplet.asp?CurrPath=<%=Replace(G_VIRTUAL_ROOT_DIR&"/"& G_TEMPLETS_DIR,"//","/") %>',400,300,window,document.auditEdit_Form.NewsTemplet);document.auditEdit_Form.NewsTemplet.focus();">
  120. <span id="span_NewsTemplet"></span></td>
  121. </tr>
  122. <tr class="hback">
  123. <td align="right">作者:</td>
  124. <td aling="left"><a href="../../user/ShowUser.asp?UserNumber=<%=Author%>" title="点击查看该用户详情" target="_blank"><%=Fs_News.GetUserName(Author)%></a>
  125. <input name="hid_Author" type="hidden" size="50" readonly="true" id="hid_Author" value="<%=Author%>">
  126. </td>
  127. </tr>
  128. <tr class="hback">
  129. <td align="right">&nbsp;</td>
  130. <td aling="left">
  131. <%if newsInfo_Rs("AuditTF")<>1 then%>
  132. <input name="sub_button" type="button" id="sub_button" value="审核" onClick="checkRight(this.form)">
  133. &nbsp;&nbsp;
  134. <%Else%>
  135. <input name="sub_button" type="button" id="sub_button" value="已审核"  disabled="disabled">
  136. <%End if%>
  137. <input type="reset" name="Submit" value="重置">
  138. <input type="button" name="bbb" onClick="window.history.back()" value="返回">
  139. </td>
  140. </tr>
  141. </table>
  142. </form>
  143. </body>
  144. <script language="JavaScript">
  145. function SelectClass()
  146. {
  147. var ReturnValue='',TempArray=new Array();
  148. ReturnValue = OpenWindow('lib/SelectClassFrame.asp',400,300,window);
  149. if (ReturnValue.indexOf('***')!=-1)
  150. {
  151. TempArray = ReturnValue.split('***');
  152. document.all("hid_ClassID").value=TempArray[0]
  153. document.all("txt_classCName").value=TempArray[1]
  154. }
  155. }
  156. function checkRight(FormObj)
  157. {
  158. FormObj.txt_content.value=FS_Edit1.getXHTMLBody();
  159. var flag1=isEmpty("txt_newsTitle","span_newsTitle");
  160. var flag2=isEmpty("txt_content","span_content");
  161. var flag3=isEmpty("hid_ClassID","span_ClassID");
  162. var flag4=isEmpty("NewsTemplet","span_NewsTemplet");
  163. if(flag1&&flag2&&flag3&&flag4)
  164. {
  165. FormObj.submit();
  166. }
  167. }
  168. </script>
  169. </html>