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

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="../../FS_Inc/Function.asp"-->
  4. <!--#include file="inc/Function.asp"-->
  5. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  6. <%
  7. Dim Conn,CollectConn
  8. MF_Default_Conn
  9. MF_Collect_Conn
  10. MF_Session_TF
  11. Dim RsEditObj,EditSql,SiteID
  12. Dim ListHeadSetting,ListFootSetting,OtherPageFootSetting,OtherPageHeadSetting,OtherType,IndexRule,StartPageNum,EndPageNum,HandPageContent
  13. Set RsEditObj = Server.CreateObject ("ADODB.RecordSet")
  14. SiteID = Request("SiteID")
  15. if SiteID <> "" then
  16. EditSql="Select * from FS_Site where ID=" & SiteID
  17. RsEditObj.Open EditSql,CollectConn,1,3
  18. if RsEditObj.Eof then
  19. Response.write"<script>alert(""没有修改的站点"");location.href=""javascript:history.back()"";</script>"
  20. Response.end
  21. else
  22. ListHeadSetting = RsEditObj("ListHeadSetting")
  23. ListFootSetting = RsEditObj("ListFootSetting")
  24. OtherPageFootSetting = RsEditObj("OtherPageFootSetting")
  25. OtherPageHeadSetting = RsEditObj("OtherPageHeadSetting")
  26. IndexRule = RsEditObj("IndexRule")
  27. StartPageNum = RsEditObj("StartPageNum")
  28. EndPageNum = RsEditObj("EndPageNum")
  29. HandPageContent = RsEditObj("HandPageContent")
  30. OtherType = RsEditObj("OtherType")
  31. end if
  32. else
  33. Response.write"<script>alert(""没有修改的站点"");location.href=""javascript:history.back()"";</script>"
  34. Response.end
  35. end if
  36. Set RsEditObj = Nothing
  37. if Request.Form("Result") = "Edit" then
  38.     Dim RsAddObj,sql
  39.     if Request.Form("SiteName")=""  or Request.Form("objURL")="" then
  40. Response.write"<script>alert(""请填写完整!"");location.href=""javascript:history.back()"";</script>"
  41. Response.end
  42. end if
  43. Set RsAddObj = Server.CreateObject ("ADODB.RecordSet")
  44. Sql = "select * from FS_Site where id=" & Request.Form("SiteID")
  45. RsAddObj.Open Sql,CollectConn,1,3
  46. RsAddObj("SiteName") = Request.Form("SiteName")
  47. RsAddObj("objURL") = Request.Form("objURL")
  48. if Request.Form("IsIFrame") = "1" then
  49. RsAddObj("IsIFrame") = True
  50. else
  51. RsAddObj("IsIFrame") = False
  52. end if
  53. if Request.Form("IsScript") = "1" then
  54. RsAddObj("IsScript") = True
  55. else
  56. RsAddObj("IsScript") = False
  57. end if
  58. if Request.Form("IsClass") = "1" then
  59. RsAddObj("IsClass") = True
  60. else
  61. RsAddObj("IsClass") = False
  62. end if
  63. if Request.Form("IsFont") = "1" then
  64. RsAddObj("IsFont") = True
  65. else
  66. RsAddObj("IsFont") = False
  67. end if
  68. if Request.Form("IsSpan") = "1" then
  69. RsAddObj("IsSpan") = True
  70. else
  71. RsAddObj("IsSpan") = False
  72. end if
  73. if Request.Form("IsObject") = "1" then
  74. RsAddObj("IsObject") = True
  75. else
  76. RsAddObj("IsObject") = False
  77. end if
  78. if Request.Form("IsStyle") = "1" then
  79. RsAddObj("IsStyle") = True
  80. else
  81. RsAddObj("IsStyle") = False
  82. end if
  83. if Request.Form("IsDiv") = "1" then
  84. RsAddObj("IsDiv") = True
  85. else
  86. RsAddObj("IsDiv") = False
  87. end if
  88. if Request.Form("IsA") = "1" then
  89. RsAddObj("IsA") = True
  90. else
  91. RsAddObj("IsA") = False
  92. end if
  93. if Request.Form("Audit") = "1" then
  94. RsAddObj("Audit") = True
  95. else
  96. RsAddObj("Audit") = False
  97. end if
  98. if Request.Form("TextTF") = "1" then
  99. RsAddObj("TextTF") = True
  100. else
  101. RsAddObj("TextTF") = False
  102. end if
  103. if Request.Form("SaveRemotePic") = "1" then
  104. RsAddObj("SaveRemotePic") = True
  105. else
  106. RsAddObj("SaveRemotePic") = False
  107. end if
  108. if Request.Form("Islock") <> "" then
  109. RsAddObj("Islock") = True
  110. else
  111. RsAddObj("Islock") = False
  112. end if
  113. RsAddObj.update
  114. RsAddObj.close
  115. Set RsAddObj = Nothing
  116. end if
  117. %>
  118. <html>
  119. <head>
  120. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  121. <title>自动新闻采集—站点设置</title>
  122. </head>
  123. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  124. <script language="JavaScript" src="js/PublicJS.js"></script>
  125. <body leftmargin="2" topmargin="2">
  126. <form name="form1" method="post" action="SiteThreeStep.asp" id="Form1">
  127. <table width="98%" height="20" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  128.         <tr class="hback" >
  129.             <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>
  130.     <td width="50" style="cursor:hand" align="center" alt="第三步" onClick="document.form1.submit();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">下一步</td>
  131.   <td width="35" align="center" alt="后退" onClick="history.back();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">后退</td>
  132.             <td>&nbsp; <input name="SiteID" type="hidden" id="SiteID2" value="<% = SiteID %>"> 
  133.               <input name="Result" type="hidden" id="Result2" value="Edit"></td>
  134.         </tr>
  135.       </table>  
  136.   <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  137.     <tr class="hback" > 
  138.       <td width="10%" bgcolor="#F5F5F5"> 
  139.         <div align="center">列表内容</div></td>
  140.       <td> &nbsp;&nbsp;输入区域:
  141. <span onClick="if(document.Form1.ListSetting.rows>2)document.Form1.ListSetting.rows-=1" style='cursor:hand'><b>缩小</b></span>
  142. <span onClick="document.Form1.ListSetting.rows+=1" style='cursor:hand'><b>扩大</b></span>
  143.   &nbsp;&nbsp;可用标签:<font onmouseover="getActiveText(document.form1.ListSetting);" onClick="addTag('[列表内容]')" style="CURSOR: hand"><b>[列表内容]</b></font>&nbsp;&nbsp;&nbsp;<font onmouseover="getActiveText(document.form1.ListSetting);" onClick="addTag('[变量]')" style="CURSOR: hand"><b>[变量]</b></font><br>
  144. <textarea onDblClick="getActiveText(this)" onClick="getActiveText(this)"  onchange="getActiveText(this)" name="ListSetting" rows="10" id="ListSetting" style="width:100%;"><%=ListHeadSetting%>[列表内容]<%=ListFootSetting%></textarea></td>
  145.     </tr>
  146.     <tr class="hback" > 
  147.       <td height="36" colspan="2">
  148. <div align="center"></div>
  149.         <div align="center">
  150.           <input onClick="ChangeCutPara(0);" <% if OtherType = 0 then Response.Write("checked") %> name="OtherType" type="radio" value="0">
  151.           不分页 
  152.           <input type="radio" onClick="ChangeCutPara(1);" name="OtherType" <% if OtherType = 1 then Response.Write("checked") %> value="1">
  153.           标记分页设置 
  154.           <input type="radio" onClick="ChangeCutPara(2);" <% if OtherType = 2 then Response.Write("checked") %> name="OtherType" value="2">
  155.           索引分页设置 
  156.           <input type="radio" onClick="ChangeCutPara(3);" <% if OtherType = 3 then Response.Write("checked") %> name="OtherType" value="3">
  157.           手工分页设置 </div></td>
  158.     </tr>
  159.     <tr class="hback"  id="TagCutPage" style="display:<% if OtherType <> 1 then Response.Write("none") %>;"> 
  160.       <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  161.           <tr class="hback" > 
  162.             <td width="10%" bgcolor="#F5F5F5"> 
  163.               <div align="center">其他页面</div></td>
  164.             <td>&nbsp;&nbsp;输入区域:
  165. <span onClick="if(document.Form1.OtherPageSetting.rows>2)document.Form1.OtherPageSetting.rows-=1" style='cursor:hand'><b>缩小</b></span>
  166. <span onClick="document.Form1.OtherPageSetting.rows+=1" style='cursor:hand'><b>扩大</b></span>
  167. &nbsp;&nbsp;可用标签:<font onmouseover="getActiveText(document.form1.OtherPageSetting);" onClick="addTag('[其他页面]')" style="CURSOR: hand"><b>[其他页面]</b></font>&nbsp;&nbsp;&nbsp;<font onmouseover="getActiveText(document.form1.OtherPageSetting);" onClick="addTag('[变量]')" style="CURSOR: hand"><b>[变量]</b></font>
  168.               <table width="95%" border="0" cellspacing="0" cellpadding="0">
  169.                 <tr class="hback" >
  170.                   <td height="5"></td>
  171.                 </tr>
  172.               </table>
  173.               <textarea onDblClick="getActiveText(this)" onClick="getActiveText(this)"  onchange="getActiveText(this)" name="OtherPageSetting" rows="4" style="width:100%;"><%=OtherPageHeadSetting%>[其他页面]<%=OtherPageFootSetting%></textarea></td>
  174.           </tr>
  175.         </table></td>
  176.     </tr>
  177.     <tr class="hback"  id="IndexCutPage" style="display:<% if OtherType <> 2 then Response.Write("none") %>;"> 
  178.       <td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
  179.           <tr class="hback" > 
  180.             <td width="10%" bgcolor="#F5F5F5"> 
  181.               <div align="center">索引规则 </div></td>
  182.             <td>&nbsp;&nbsp;输入区域: <span onClick="if(document.Form1.IndexRule.rows>2)document.Form1.IndexRule.rows-=1" style='cursor:hand'><b>缩小</b></span> 
  183.               <span onClick="document.Form1.IndexRule.rows+=1" style='cursor:hand'><b>扩大</b></span> 
  184.               <table width="95%" border="0" cellspacing="0" cellpadding="0">
  185.                 <tr class="hback" > 
  186.                   <td height="5"></td>
  187.                 </tr>
  188.               </table>
  189.               <textarea name="IndexRule" rows="3" id="IndexRule" style="width:100%;"><% = IndexRule %></textarea></td>
  190.           </tr>
  191.           <tr class="hback" > 
  192.             <td height="26" bgcolor="#F5F5F5"> 
  193.               <div align="center">页码</div></td>
  194.             <td>页码开始: 
  195.               <input name="StartPageNum" type="text" id="StartPageNum" size="10" maxlength="3" value="<% = StartPageNum %>">
  196.               页码结束 
  197.               <input name="EndPageNum" type="text" id="EndPageNum" size="10" maxlength="3" value="<% = EndPageNum %>"></td>
  198.           </tr>
  199.         </table></td>
  200.     </tr>
  201.     <tr class="hback"  id="HandCutPage" style="display:<% if OtherType <> 3 then Response.Write("none") %>;"> 
  202.       <td width="10%" bgcolor="#F5F5F5"> 
  203.         <div align="center">分页内容</div></td>
  204.       <td height="26">&nbsp;&nbsp;输入区域: <span onClick="if(document.Form1.HandPageContent.rows>2)document.Form1.HandPageContent.rows-=1" style='cursor:hand'><b>缩小</b></span> 
  205.         <span onClick="document.Form1.HandPageContent.rows+=1" style='cursor:hand'><b>扩大</b></span> 
  206.         <table width="95%" border="0" cellspacing="0" cellpadding="0">
  207.           <tr class="hback" > 
  208.             <td height="5"></td>
  209.           </tr>
  210.         </table> 
  211.         <textarea name="HandPageContent" rows="6" id="HandPageContent" style="width:100%;"><% = HandPageContent %></textarea></tr>
  212. </table>
  213. </form>
  214. </body>
  215. </html>
  216. <%
  217. Set CollectConn = Nothing
  218. %>
  219. <script language="JavaScript">
  220. function ChangeCutPara(Flag)
  221. {
  222. switch (Flag)
  223. {
  224. case 0 :
  225. document.all.TagCutPage.style.display='none';
  226. document.all.IndexCutPage.style.display='none';
  227. document.all.HandCutPage.style.display='none';
  228. break;
  229. case 1 :
  230. document.all.TagCutPage.style.display='';
  231. document.all.IndexCutPage.style.display='none';
  232. document.all.HandCutPage.style.display='none';
  233. break;
  234. case 2 :
  235. document.all.TagCutPage.style.display='none';
  236. document.all.IndexCutPage.style.display='';
  237. document.all.HandCutPage.style.display='none';
  238. break;
  239. case 3 :
  240. document.all.TagCutPage.style.display='none';
  241. document.all.IndexCutPage.style.display='none';
  242. document.all.HandCutPage.style.display='';
  243. break;
  244. default :
  245. document.all.TagCutPage.style.display='none';
  246. document.all.IndexCutPage.style.display='none';
  247. document.all.HandCutPage.style.display='none';
  248. break;
  249. }
  250. }
  251. currObj = "uuuu";
  252. function getActiveText(obj)
  253. {
  254. obj.focus();
  255. currObj = obj;
  256. }
  257. function addTag(code)
  258. {
  259. addText(code);
  260. }
  261. function addText(ibTag)
  262. {
  263. var isClose = false;
  264. var obj_ta = currObj;
  265. //alert("ok");
  266. if (obj_ta.isTextEdit)
  267. {
  268. //alert("nooooo");
  269. obj_ta.focus();
  270. var sel = document.selection;
  271. var rng = sel.createRange();
  272. rng.colapse;
  273. if((sel.type == "Text" || sel.type == "None") && rng != null)
  274. {
  275. rng.text = ibTag;
  276. }
  277. obj_ta.focus();
  278. return isClose;
  279. }
  280. else
  281. return false;
  282. }
  283. -->
  284. </script>