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

数据库编程

开发平台:

ASP/ASPX

  1. <!--#include file="../../FS_Inc/Const.asp" -->
  2. <!--#include file="../../FS_Inc/Function.asp"-->
  3. <!--#include file="inc/Function.asp"-->
  4. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  5. <%
  6. Dim Conn,CollectConn
  7. MF_Default_Conn
  8. MF_Collect_Conn
  9. MF_Session_TF
  10. Dim RsEditObj,EditSql,SiteID
  11. Dim NewsLinkStr
  12. Set RsEditObj = Server.CreateObject ("ADODB.RecordSet")
  13. SiteID = Request("SiteID")
  14. if SiteID <> "" then
  15. EditSql="Select * from FS_Site where ID=" & SiteID
  16. RsEditObj.Open EditSql,CollectConn,1,3
  17. if RsEditObj.Eof then
  18. Response.write"<script>alert(""没有修改的站点"");location.href=""javascript:history.back()"";</script>"
  19. Response.end
  20. end if
  21. else
  22. Response.write"<script>alert(""没有修改的站点"");location.href=""javascript:history.back()"";</script>"
  23. Response.end
  24. end if
  25. Dim PageTitleHeadSetting,PageTitleFootSetting,PagebodyHeadSetting,PagebodyFootSetting
  26. Dim OtherNewsPageHeadSetting,OtherNewsPageFootSetting
  27. Dim AuthorHeadSetting,AuthorFootSetting
  28. Dim SourceHeadSetting,SourceFootSetting
  29. Dim AddDateHeadSetting,AddDateFootSetting
  30. Dim HandSetAuthor,HandSetSource,HandSetAddDate
  31. Dim TextTF,IsStyle,IsDiv,IsA,IsClass,IsFont,IsSpan,IsObjectTF,IsIFrame,IsScript
  32. Dim PageTitleSetting,PagebodySetting,OtherNewsPageSetting,AuthorSetting,SourceSetting,AddDateSetting
  33. If InStr(Request.Form("PageTitleSetting"),"[标题]") = 0 Then
  34. Response.Write "<script>alert('新闻标题没有设置或设置不正确!');history.back();</script>"
  35. Response.End 
  36. End If
  37. If InStr(Request.Form("PagebodySetting"),"[内容]") = 0 Then
  38. Response.Write "<script>alert('新闻内容没有设置或设置不正确!');history.back();</script>"
  39. Response.End 
  40. End if
  41. PageTitleSetting = Split(Request.Form("PageTitleSetting"),"[标题]",-1,1)
  42. PageTitleHeadSetting = PageTitleSetting(0)
  43. PageTitleFootSetting = PageTitleSetting(1)
  44. PagebodySetting = Split(Request.Form("PagebodySetting"),"[内容]",-1,1)
  45. PagebodyHeadSetting = PagebodySetting(0)
  46. PagebodyFootSetting = PagebodySetting(1)
  47. If InStr(Request.Form("OtherNewsPageSetting"),"[分页新闻]")<>0 then
  48. OtherNewsPageSetting = Split(Request.Form("OtherNewsPageSetting"),"[分页新闻]",-1,1)
  49. OtherNewsPageHeadSetting = OtherNewsPageSetting(0)
  50. OtherNewsPageFootSetting = OtherNewsPageSetting(1)
  51. End If
  52. If InStr(Request.Form("AuthorSetting"),"[作者]")<>0 then
  53. AuthorSetting = Split(Request.Form("AuthorSetting"),"[作者]",-1,1)
  54. AuthorHeadSetting = AuthorSetting(0)
  55. AuthorFootSetting = AuthorSetting(1)
  56. End If 
  57. If InStr(Request.Form("SourceSetting"),"[来源]")<>0 then
  58. SourceSetting = Split(Request.Form("SourceSetting"),"[来源]",-1,1)
  59. SourceHeadSetting = SourceSetting(0)
  60. SourceFootSetting = SourceSetting(1)
  61. End If
  62. If InStr(Request.Form("AddDateSetting"),"[加入时间]")<>0 then
  63. AddDateSetting = Split(Request.Form("AddDateSetting"),"[加入时间]",-1,1)
  64. AddDateHeadSetting = AddDateSetting(0)
  65. AddDateFootSetting = AddDateSetting(1)
  66. End If 
  67. HandSetAuthor = Request.Form("HandSetAuthor")
  68. HandSetSource = Request.Form("HandSetSource")
  69. HandSetAddDate = Request.Form("HandSetAddDate")
  70. if Request.Form("Result") = "Edit" then
  71.     Dim RsAddObj,sql
  72. Set RsAddObj = Server.CreateObject ("ADODB.RecordSet")
  73. Sql = "select * from FS_Site where id=" & Request.Form("SiteID")
  74. RsAddObj.Open Sql,CollectConn,1,3
  75. TextTF = RsAddObj("TextTF")
  76. IsStyle = RsAddObj("IsStyle")
  77. IsDiv = RsAddObj("IsDiv")
  78. IsA = RsAddObj("IsA")
  79. IsClass = RsAddObj("IsClass")
  80. IsFont = RsAddObj("IsFont")
  81. IsSpan = RsAddObj("IsSpan")
  82. IsObjectTF = RsAddObj("IsObject")
  83. IsIFrame = RsAddObj("IsIFrame")
  84. IsScript = RsAddObj("IsScript")
  85. RsAddObj("PagebodyHeadSetting") = PagebodyHeadSetting
  86. RsAddObj("PagebodyFootSetting") = PagebodyFootSetting
  87. RsAddObj("PageTitleHeadSetting") = PageTitleHeadSetting
  88. RsAddObj("PageTitleFootSetting") = PageTitleFootSetting
  89. RsAddObj("OtherNewsPageHeadSetting") = OtherNewsPageHeadSetting
  90. RsAddObj("OtherNewsPageFootSetting") = OtherNewsPageFootSetting
  91. RsAddObj("AuthorHeadSetting") = AuthorHeadSetting
  92. RsAddObj("AuthorFootSetting") = AuthorFootSetting
  93. RsAddObj("SourceHeadSetting") = SourceHeadSetting
  94. RsAddObj("SourceFootSetting") = SourceFootSetting
  95. RsAddObj("AddDateHeadSetting") = AddDateHeadSetting
  96. RsAddObj("AddDateFootSetting") = AddDateFootSetting
  97. RsAddObj("HandSetAuthor") = HandSetAuthor
  98. RsAddObj("HandSetSource") = HandSetSource
  99. if IsDate(HandSetAddDate) then
  100. RsAddObj("HandSetAddDate") = HandSetAddDate
  101. end if
  102. RsAddObj.update
  103. RsAddObj.close
  104. Set RsAddObj = Nothing
  105. end if
  106. NewsLinkStr = Request("NewsLinkStr")
  107. Dim ResponseAllStr,TitleStr,NewsBodyStr,AuthorStr,SourceStr,AddDateStr
  108. ResponseAllStr = GetPageContent(NewsLinkStr)
  109. TitleStr = GetOtherContent(ResponseAllStr,PageTitleHeadSetting,PageTitleFootSetting)
  110. NewsBodyStr = GetOtherContent(ResponseAllStr,PagebodyHeadSetting,PagebodyFootSetting)
  111. NewsBodyStr = ReplaceContentStr(NewsBodyStr)
  112. if HandSetAuthor <> "" then
  113. AuthorStr = HandSetAuthor
  114. else
  115. if AuthorHeadSetting <> "" And AuthorFootSetting <> "" then 
  116. AuthorStr = GetOtherContent(ResponseAllStr,AuthorHeadSetting,AuthorFootSetting)
  117. end if
  118. end if
  119. if HandSetSource <> "" then
  120. SourceStr = HandSetSource
  121. else
  122. if SourceHeadSetting <> "" And SourceFootSetting <> "" then 
  123. SourceStr = GetOtherContent(ResponseAllStr,SourceHeadSetting,SourceFootSetting)
  124. end if
  125. end if
  126. if HandSetAddDate <> "" then
  127. if Not IsDate(HandSetAddDate) then
  128. AddDateStr = Now
  129. else
  130. AddDateStr = HandSetAddDate
  131. end if
  132. else
  133. if AddDateHeadSetting <> "" And AddDateFootSetting <> "" then 
  134. AddDateStr = GetOtherContent(ResponseAllStr,AddDateHeadSetting,AddDateFootSetting)
  135. end if
  136. end if
  137. NewsBodyStr = Replace(Replace(NewsBodyStr,"""","%22"),"'","%27")
  138. %>
  139. <html>
  140. <head>
  141. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  142. <title>自动新闻采集—站点设置</title>
  143. </head>
  144. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  145. <script language="JavaScript" src="js/PublicJS.js"></script>
  146. <body leftmargin="2" topmargin="2">
  147. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  148.   <tr class="hback"> 
  149.     <td height="26" colspan="5" valign="middle">
  150.       <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
  151.         <tr>
  152.             <td width="50" style="cursor:hand" align="center" alt="第四步" onClick="window.location.href='javascript:history.go(-1)';" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">上一步</td>
  153. <td width=2 class="Gray">|</td>
  154.             <td width="35" style="cursor:hand" align="center" alt="完成" onClick="window.location.href='Site.asp';" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">完成</td>
  155. <td width=2 class="Gray">|</td>
  156.     <td width="35" style="cursor:hand" align="center" alt="后退" onClick="history.back();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">后退</td>
  157.             <td><input type="hidden" name="NewsBodyStr" value="<% = NewsBodyStr %>"> &nbsp;</td>
  158.         </tr>
  159.       </table>
  160.     </td>
  161.   </tr>
  162. </table>
  163. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  164.   <tr class="hback">
  165.     <td height="26">
  166. <div align="center"><strong><font size="3"><% = TitleStr %></font></strong></div></td>
  167.   </tr>
  168. <tr class="hback">
  169.   
  170.     <td height="26">
  171. <div align="center"><strong>作者</strong>: 
  172.         <% = AuthorStr %>
  173.         &nbsp;&nbsp;<strong>来源</strong>: 
  174.         <% = SourceStr %>
  175.         &nbsp;&nbsp;<strong>时间</strong>: 
  176.         <% = AddDateStr %></div></td>
  177. </tr>
  178. <tr class="hback">
  179.   <td><iframe frameborder="1" name="PreviewArea" src="about:blank" ID="PreviewArea" MARGINHEIGHT="1" MARGINWIDTH="1" height="480" width="100%" scrolling="yes"></iframe></td>
  180. </tr>
  181. </table>
  182. </body>
  183. </html>
  184. <%
  185. Set CollectConn = Nothing
  186. Set Conn = Nothing
  187. Set RsEditObj = Nothing
  188. %>
  189. <script language="JavaScript">
  190. function document.onreadystatechange()
  191. {
  192. frames["PreviewArea"].document.write(unescape(document.all.NewsBodyStr.value));
  193. }
  194. </script>