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

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../FS_Inc/Const.asp" -->
  3. <!--#include file="../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../FS_Inc/Function.asp" -->
  5. <!--#include file="../FS_Inc/Func_page.asp" -->
  6. <%'Copyright (c) 2006 Foosun Inc. Code by Simpwind.Xie Time:2006.6
  7. Response.Buffer = True
  8. Response.Expires = -1
  9. Response.ExpiresAbsolute = Now() - 1
  10. Response.Expires = 0
  11. Response.CacheControl = "no-cache"
  12. Dim Conn
  13. MF_Default_Conn
  14. MF_Session_TF
  15. if not MF_Check_Pop_TF("MF_Public") then Err_Show
  16. %>
  17. <html xmlns="http://www.w3.org/1999/xhtml">
  18. <HEAD>
  19. <TITLE>FoosunCMS</TITLE>
  20. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
  21. </HEAD>
  22. <script language="JavaScript" src="../FS_Inc/PublicJS.js" type="text/JavaScript"></script>
  23. <script language="JavaScript" src="../FS_Inc/Prototype.js" type="text/JavaScript"></script>
  24. <script language="JavaScript" src="../FS_Inc/common.js" type="text/JavaScript"></script>
  25. <script language="JavaScript" src="../FS_Inc/coolWindowsCalendar.js" type="text/JavaScript"></script>
  26. <link href="images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  27. <style>
  28. .RefreshLen{
  29. height: 20px;
  30. width: 400px;
  31. border: 1px solid #104a7b;
  32. text-align: left;
  33. MARGIN-top:50px;
  34. margin-bottom: 5px;
  35. }
  36. </style>
  37. <BODY oncontextmenu="return false;">
  38. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  39. <tr class="xingmu">
  40. <td class="xingmu">
  41. <p>发布管理</p>
  42. </td>
  43. </tr>
  44. <tr class="hback">
  45. <td><a href="Sys_Public.asp?Type=MF">站点主页</a>┆<a href="Sys_Public.asp?Type=NS">新闻</a>┆
  46. <%if Request.Cookies("FoosunSUBCookie")("FoosunSUBMS")=1 then%>
  47. <a href="Sys_Public.asp?Type=MS">商城</a>┆
  48. <%end if%>
  49. <a href="Sys_Public.asp?Type=DS">下载</a>┆<a href="SysRefreshset.asp">自动刷新配置文件</a></td>
  50. </tr>
  51. </table>
  52. <div id="RefreshMain">
  53. <%
  54. Dim str_type
  55. str_type = trim(Request.QueryString("Type"))
  56. select  case str_type
  57. case "MF"
  58. Call MF_Refresh()
  59. case "NS"
  60. Call NS_Refresh()
  61. case "MS"
  62. Call MS_Refresh()
  63. case "IB"
  64. case "DS"
  65. Call DS_Refresh()
  66. case "Log"
  67. call pub_log()
  68. case else
  69. Call MF_Refresh()
  70. end select
  71. sub pub_log()
  72. Dim Path,FileName,EditFile,FileContent,Result,strShowErr
  73. Result = Request.Form("Action")
  74. Path = "../FS_InterFace/Public_Log"
  75. FileName = "Refresh.ini"
  76. EditFile = Server.MapPath(Path) & "" & FileName
  77. Dim FsoObj,FileObj,FileStreamObj
  78. Set FsoObj = Server.CreateObject(G_FS_FSO)
  79. Set FileObj = FsoObj.GetFile(EditFile)
  80. if Result = "" then
  81. Set FileStreamObj = FileObj.OpenAsTextStream(1)
  82. if Not FileStreamObj.AtEndOfStream then
  83. FileContent = FileStreamObj.ReadAll
  84. else
  85. FileContent = ""
  86. end if
  87. else
  88. Set FileStreamObj = FileObj.OpenAsTextStream(2)
  89. FileContent = Request.Form("ConstContent")
  90. FileStreamObj.Write FileContent
  91. if Err.Number <> 0 then
  92. strShowErr = "<li>保存失败</li><li>"& Err.Description &"</li>"
  93. Response.Redirect("Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  94. Response.end
  95. else
  96. strShowErr = "<li>全局变量保存成功</li>"
  97. Response.Redirect("Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  98. Response.end
  99. end if
  100. end if
  101. Response.Write  "<table class=""table"" width=""98%"" align=""center""><tr class=""hback""><td class=""hback"" align=""center""><textarea name=""FileFresh"" style=""width:100%"" rows=""20"">"& FileContent &"</textarea></td></tr></table>"
  102. %>
  103. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  104. <tr height="1" class="hback">
  105. <td height="25">发布任务:
  106. <%
  107. if Request.QueryString("Type")="Log" then
  108. Response.Write("任务日志查看。<span class=""tx"">注意:如果您的是虚拟主机空间或者没有安装任务执行软件,将无法使用此功能,需要手工生成</span>")
  109. elseif Request.QueryString("Type")="All" then
  110. Response.Write("发布所有")
  111. else
  112. response.Write Request.QueryString("Type")
  113. End if
  114. %>
  115. </td>
  116. </tr>
  117. <tr height="1" class="hback">
  118. <td height="25">
  119. <p>说明:<br>
  120. <strong>MF=Index</strong><br>
  121. 站点主页<br>
  122. 新闻系统 <br>
  123. <strong>NS=Index</strong><br>
  124. 新闻首页<br>
  125. <strong>NS=Class(0)[1,2,3,6,7]</strong><br>
  126. Class为刷新新闻栏目,(0)表示刷新指定ID,(1)表示刷新的ID开始和ID的结束<br>
  127. <strong>NS=Class(1)[1,7]</strong><br>
  128. Class为刷新新闻栏目,(0)表示刷新指定ID,(1)表示刷新的ID开始和ID的结束<br>
  129. <strong>NS=News(0)[1,4,5,6,8]</strong><br>
  130. News为刷新新闻浏览页面,(0)表示刷新指定ID,(1)表示刷新的ID开始和ID的结束,(2)表示开始时间和结束时间<br>
  131. <strong>NS=News(1)[1,8]</strong><br>
  132. News为刷新新闻浏览页面,(0)表示刷新指定ID,(1)表示刷新的ID开始和ID的结束,(2)表示开始时间和结束时间 <br>
  133. <strong>NS=News(2)[2005-6-7,2006-6-8]</strong><br>
  134. News为刷新新闻浏览页面,(0)表示刷新指定ID,(1)表示刷新的ID开始和ID的结束,(2)表示开始时间和结束时间 <br>
  135. <strong>NS=Special(0)[1,5,6,7,8]</strong><br>
  136. Special为刷新专题,(0)表示刷新指定ID,(1)表示刷新的ID开始和ID的结束<br>
  137. <strong>NS=Special(1)[1,8]</strong><br>
  138. Special为刷新专题,(0)表示刷新指定ID,(1)表示刷新的ID开始和ID的结束 <br>
  139. <br>
  140. ......<br>
  141. <br>
  142. 其他类似
  143. <%
  144. end sub
  145. %>
  146. </td>
  147. </tr>
  148. </table>
  149. <%Sub MF_Refresh()%>
  150. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  151. <tr>
  152. <td colspan="3" class="xingmu">发布新闻</td>
  153. </tr>
  154. <tr >
  155. <td width="13%" class="hback">
  156. <div align="right">发布所有</div>
  157. </td>
  158. <td width="87%" colspan="2" class="hback">
  159. <input type="button" onClick="Submit_Data_To_Refresh('MF','','index','');" name="Submit4" value="开始发布站点主页">
  160. </td>
  161. </tr>
  162. </table>
  163. <%End sub%>
  164. <%
  165. Sub NS_Refresh()
  166. Dim rs,str_ClassList
  167. str_ClassList =""
  168. set rs=Conn.execute("select ClassId,ClassName From FS_NS_NewsClass where ParentId = '0' and ReycleTF=0 order by OrderId desc,id desc")
  169. do while not rs.eof
  170. str_ClassList = str_ClassList & "<option value="""&rs("ClassId")&""">"&rs("ClassName")&"</option>"
  171. str_ClassList = str_ClassList & get_ChildClassList(rs("ClassId"),"┝")
  172. rs.movenext
  173. loop
  174. rs.close:set rs=nothing
  175. %>
  176. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  177. <tr>
  178. <td colspan="3" class="xingmu">发布新闻主页</td>
  179. </tr>
  180. <tr>
  181. <td width="13%" class="hback">
  182. <div align="right">发布新闻主页</div>
  183. </td>
  184. <td colspan="2" class="hback">
  185. <input type="button" onClick="Submit_Data_To_Refresh('NS','','index','');" name="Submit" value="开始发布">
  186. </td>
  187. </tr>
  188. <tr>
  189. <td colspan="3" class="xingmu">发布新闻</td>
  190. </tr>
  191. <tr>
  192. <td width="13%" class="hback">
  193. <div align="right">发布所有</div>
  194. </td>
  195. <td colspan="2" class="hback">
  196. <input type="button" onClick="Submit_Data_To_Refresh('NS','FS_NS_News','nsallnews','');" name="Submit" value="开始发布">
  197. </td>
  198. </tr>
  199. <form name="Public_form_NS_ID_News" method="post" action="">
  200. <tr >
  201. <td class="hback">
  202. <div align="right">按照ID发布</div>
  203. </td>
  204. <td colspan="2" class="hback">
  205. <input name="startId" type="text" id="startId" value="1" size="10" maxlength="8">
  206. <input name="endId" type="text" id="endId" value="100" size="10" maxlength="10">
  207. <input type="button" onClick="Submit_Data_To_Refresh('NS','FS_NS_News','nsidnews',this.form);" name="Submit5" value="开始发布">
  208. </td>
  209. </tr>
  210. </form>
  211. <form name="Public_form_NS_Last_News" method="post" action="">
  212. <tr >
  213. <td class="hback">
  214. <div align="right">发布最新</div>
  215. </td>
  216. <td colspan="2" class="hback">
  217. <input name="LastNews" type="text" id="LastNews" value="10" size="10" maxlength="5">
  218. <input type="button" onClick="Submit_Data_To_Refresh('NS','FS_NS_News','nslastnews',this.form);" name="Submit6" value="开始发布">
  219. </td>
  220. </tr>
  221. </form>
  222. <form name="Public_form_NS_Date_News" method="post" action="">
  223. <tr >
  224. <td class="hback">
  225. <div align="right">按照日期发布</div>
  226. </td>
  227. <td colspan="2" class="hback">
  228. <input name="startTime" type="text" id="startTime" value="<%=date()-1%>" size="20" maxlength="30" readonly>
  229. <img src="../sys_images/calendar.gif" width="34" onClick="OpenWindowAndSetValue('CommPages/SelectDate.asp',280,150,window,document.Public_form_NS_Date_News.startTime);document.Public_form_NS_Date_News.startTime.focus();" style="cursor:hand;">
  230. <input name="endTime" type="text" id="endTime" value="<%=date()%>" size="20" maxlength="30" readonly>
  231. <img src="../sys_images/calendar.gif" width="34" onClick="OpenWindowAndSetValue('CommPages/SelectDate.asp',280,150,window,document.Public_form_NS_Date_News.endTime);document.Public_form_NS_Date_News.endTime.focus();" style="cursor:hand;">
  232. <input type="button" onClick="Submit_Data_To_Refresh('NS','FS_NS_News','nsdatenews',this.form);" name="Submit7" value="开始发布">
  233. </td>
  234. </tr>
  235. </form>
  236. <form name="Public_form_NS_Class_News" method="post" action="">
  237. <tr >
  238. <td class="hback">
  239. <div align="right">按照栏目发布</div>
  240. </td>
  241. <td width="29%" class="hback">
  242. <div align="center">
  243. <select name="ClassID" size="12" multiple id="ClassID" style="width:98%">
  244. <%=str_ClassList%>
  245. </select>
  246. </div>
  247. </td>
  248. <td width="58%" class="hback">
  249. <input type="button" onClick="Submit_Data_To_Refresh('NS','FS_NS_News','nsclassnews',this.form);" name="Submit8" value="开始发布">
  250. </td>
  251. </tr>
  252. <tr >
  253. <td colspan="3" class="xingmu">发布栏目</td>
  254. </tr>
  255. </form>
  256. <tr >
  257. <td class="hback">
  258. <div align="right">发布栏目</div>
  259. </td>
  260. <td colspan="2" class="hback">
  261. <input type="button" onClick="Submit_Data_To_Refresh('NS','FS_NS_NewsClass','nsallclass','');" name="Submit222" value="发布所有栏目">
  262. </td>
  263. </tr>
  264. <form name="Public_form_NS_Class" method="post" action="">
  265. <tr >
  266. <td class="hback">
  267. <div align="right">选择栏目</div>
  268. </td>
  269. <td width="29%" class="hback">
  270. <div align="center">
  271. <select name="ClassID" size="10" multiple id="ClassID" style="width:98%">
  272. <%=str_ClassList%>
  273. </select>
  274. </div>
  275. </td>
  276. <td width="58%" class="hback">
  277. <input type="button" onClick="Submit_Data_To_Refresh('NS','FS_NS_NewsClass','nsclass',this.form);" name="Submit222" value="开始发布">
  278. </td>
  279. </tr>
  280. <tr >
  281. <td colspan="3" class="xingmu">发布专题</td>
  282. </tr>
  283. </form>
  284. <form name="Public_form_NS_Special" method="post" action="">
  285. <tr >
  286. <td class="hback">
  287. <div align="right">选择专题</div>
  288. </td>
  289. <td width="29%" class="hback">
  290. <div align="center">
  291. <select name="SpecialID" size="10" multiple id="SpecialID" style="width:98%">
  292. <%
  293.  set rs = Conn.execute("select SpecialID,SpecialCName From FS_NS_Special Where isLock=0 Order by SpecialID desc")
  294.  do while not rs.eof
  295.  response.Write"<option value="""&rs("SpecialID")&""">"&rs("SpecialCName")&"</option>"
  296.  rs.movenext
  297.  loop
  298.  rs.close:set rs=nothing
  299.   %>
  300. </select>
  301. </div>
  302. </td>
  303. <td width="58%" class="hback">
  304. <input type="button" onClick="Submit_Data_To_Refresh('NS','FS_NS_Special','nsspecial',this.form);" name="Submit222" value="开始发布">
  305. </td>
  306. </tr>
  307. <tr >
  308. <td class="hback">&nbsp;</td>
  309. <td class="hback">&nbsp;</td>
  310. <td class="hback">&nbsp;</td>
  311. </tr>
  312. </form>
  313. </table>
  314. <%
  315. End sub
  316. If str_type="NS" Then
  317. Function get_ChildClassList(TypeID,CompatStr)
  318. Dim ChildTypeListRs,ChildTypeListStr,TempStr
  319. Set ChildTypeListRs = Conn.execute("Select ParentID,ClassID,ClassName from FS_NS_NewsClass where ParentID='" & TypeID & "' and ReycleTF=0 order by OrderID desc,id desc")
  320. TempStr = CompatStr & "┉"
  321. do while Not ChildTypeListRs.Eof
  322. get_ChildClassList = get_ChildClassList &"<option value="""&ChildTypeListRs("ClassId")&""">"& TempStr
  323. get_ChildClassList = get_ChildClassList & "┉"&ChildTypeListRs("ClassName")&"</option>"
  324. get_ChildClassList = get_ChildClassList & get_ChildClassList(ChildTypeListRs("ClassID"),TempStr)
  325. ChildTypeListRs.MoveNext
  326. loop
  327. ChildTypeListRs.Close:Set ChildTypeListRs = Nothing
  328. End Function
  329. end if
  330. If str_type="MS" Then
  331. Function get_Child_S_ClassList(TypeID,CompatStr)
  332. Dim ChildTypeListRs,ChildTypeListStr,TempStr
  333. Set ChildTypeListRs = Conn.execute("Select ParentID,ClassID,ClassCName from FS_MS_ProductsClass where ParentID='" & TypeID & "' and ReycleTF=0 order by OrderID desc,id desc")
  334. TempStr = CompatStr & "┉"
  335. do while Not ChildTypeListRs.Eof
  336. get_Child_S_ClassList = get_Child_S_ClassList &"<option value="""&ChildTypeListRs("ClassId")&""">"& TempStr
  337. get_Child_S_ClassList = get_Child_S_ClassList & "┉"&ChildTypeListRs("ClassCName")&"</option>"
  338. get_Child_S_ClassList = get_Child_S_ClassList & get_Child_S_ClassList(ChildTypeListRs("ClassID"),TempStr)
  339. ChildTypeListRs.MoveNext
  340. loop
  341. ChildTypeListRs.Close:Set ChildTypeListRs = Nothing
  342. End Function
  343. end if
  344. If str_type="DS" Then
  345. Function get_Child_S_ClassList(TypeID,CompatStr)
  346. Dim ChildTypeListRs,ChildTypeListStr,TempStr
  347. Set ChildTypeListRs = Conn.execute("Select ParentID,ClassID,ClassName from FS_DS_Class where ParentID='" & TypeID & "' and ReycleTF=0 order by OrderID desc,id desc")
  348. TempStr = CompatStr & "┉"
  349. do while Not ChildTypeListRs.Eof
  350. get_Child_S_ClassList = get_Child_S_ClassList &"<option value="""&ChildTypeListRs("ClassId")&""">"& TempStr
  351. get_Child_S_ClassList = get_Child_S_ClassList & "┉"&ChildTypeListRs("ClassName")&"</option>"
  352. get_Child_S_ClassList = get_Child_S_ClassList & get_Child_S_ClassList(ChildTypeListRs("ClassID"),TempStr)
  353. ChildTypeListRs.MoveNext
  354. loop
  355. ChildTypeListRs.Close:Set ChildTypeListRs = Nothing
  356. End Function
  357. end if
  358. Sub MS_Refresh()
  359. DIM str_ClassList,Rs
  360. str_ClassList =""
  361. set rs=Conn.execute("select ClassId,ClassCName From FS_MS_ProductsClass where ParentId = '0' and ReycleTF=0 order by OrderId desc,id desc")
  362. do while not rs.eof
  363. str_ClassList = str_ClassList & "<option value="""&rs("ClassId")&""">"&rs("ClassCName")&"</option>"
  364. str_ClassList = str_ClassList & get_Child_S_ClassList(rs("ClassId"),"┝")
  365. rs.movenext
  366. loop
  367. %>
  368. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  369. <tr>
  370. <td colspan="3" class="xingmu">发布商城主页</td>
  371. </tr>
  372. <tr>
  373. <td width="13%" class="hback">
  374. <div align="right">发布商城主页</div>
  375. </td>
  376. <td colspan="2" class="hback">
  377. <input type="button" onClick="Submit_Data_To_Refresh('MS','','index','');" name="Submit" value="开始发布">
  378. </td>
  379. </tr>
  380. <tr>
  381. <td colspan="3" class="xingmu">发布商品</td>
  382. </tr>
  383. <tr >
  384. <td width="13%" class="hback">
  385. <div align="right">发布所有</div>
  386. </td>
  387. <td colspan="2" class="hback">
  388. <input type="button" onClick="Submit_Data_To_Refresh('MS','FS_MS_Products','msallproduct','');" name="Submit" value="开始发布">
  389. </td>
  390. </tr>
  391. <form name="Public_form_MS_ID_Product" method="post" action="">
  392. <tr >
  393. <td class="hback">
  394. <div align="right">按照ID发布</div>
  395. </td>
  396. <td colspan="2" class="hback">
  397. <input name="startId" type="text" id="startId" value="1" size="10" maxlength="8">
  398. <input name="endId" type="text" id="endId" value="100" size="10" maxlength="10">
  399. <input type="button" onClick="Submit_Data_To_Refresh('MS','FS_MS_Products','msidproduct',this.form);" name="Submit2" value="开始发布">
  400. </td>
  401. </tr>
  402. </form>
  403. <form name="Public_form_MS_Last_Product" method="post" action="">
  404. <tr >
  405. <td class="hback">
  406. <div align="right">发布最新</div>
  407. </td>
  408. <td colspan="2" class="hback">
  409. <input name="LastNews" type="text" id="LastNews" value="10" size="10" maxlength="5">
  410. <input type="button" onClick="Submit_Data_To_Refresh('MS','FS_MS_Products','mslastproduct',this.form);" name="Submit10" value="开始发布">
  411. </td>
  412. </tr>
  413. </form>
  414. <form name="Public_form_MS_Date_Product" method="post" action="">
  415. <tr >
  416. <td class="hback">
  417. <div align="right">按照日期发布</div>
  418. </td>
  419. <td colspan="2" class="hback">
  420. <input name="startTime" type="text" id="startTime" value="<%=date()-1%>" size="20" maxlength="30" readonly>
  421. <img src="../sys_images/calendar.gif" width="34" onClick="OpenWindowAndSetValue('CommPages/SelectDate.asp',280,150,window,document.Public_form_MS_Date_Product.startTime);document.Public_form_MS_Date_Product.startTime.focus();" style="cursor:hand;">
  422. <input name="endTime" type="text" id="endTime" value="<%=date()%>" size="20" maxlength="30" readonly>
  423. <img src="../sys_images/calendar.gif" width="34" onClick="OpenWindowAndSetValue('CommPages/SelectDate.asp',280,150,window,document.Public_form_MS_Date_Product.endTime);document.Public_form_MS_Date_Product.endTime.focus();" style="cursor:hand;">
  424. <input type="button" onClick="Submit_Data_To_Refresh('MS','FS_MS_Products','msdateproduct',this.form);" name="Submit11" value="开始发布">
  425. </td>
  426. </tr>
  427. </form>
  428. <form name="Public_form_MS_Class_Product" method="post" action="">
  429. <tr >
  430. <td class="hback">
  431. <div align="right">按照栏目发布</div>
  432. </td>
  433. <td width="29%" class="hback">
  434. <div align="center">
  435. <select name="ClassID" size="12" multiple id="ClassID" style="width:98%">
  436. <%=str_ClassList%>
  437. </select>
  438. </div>
  439. </td>
  440. <td width="58%" class="hback">
  441. <input type="button" onClick="Submit_Data_To_Refresh('MS','FS_MS_Products','msclassproduct',this.form);" name="Submit12" value="开始发布">
  442. </td>
  443. </tr>
  444. <tr >
  445. <td colspan="3" class="xingmu">发布商品栏目</td>
  446. </tr>
  447. </form>
  448. <tr >
  449. <td class="hback">
  450. <div align="right">发布商品栏目</div>
  451. </td>
  452. <td colspan="2" class="hback">
  453. <input type="button" onClick="Submit_Data_To_Refresh('MS','FS_MS_ProductsClass','msallclass','');" name="Submit222" value="发布所有栏目">
  454. </td>
  455. </tr>
  456. <form name="Public_form_MS_Class" method="post" action="">
  457. <tr >
  458. <td class="hback">
  459. <div align="right">选择栏目</div>
  460. </td>
  461. <td width="29%" class="hback">
  462. <div align="center">
  463. <select name="ClassID" size="10" multiple id="ClassID" style="width:98%">
  464. <%=str_ClassList%>
  465. </select>
  466. </div>
  467. </td>
  468. <td width="58%" class="hback">
  469. <input type="button" onClick="Submit_Data_To_Refresh('MS','FS_MS_ProductsClass','msclass',this.form);" name="Submit13" value="开始发布">
  470. </td>
  471. </tr>
  472. <tr >
  473. <td colspan="3" class="xingmu">发布专区</td>
  474. </tr>
  475. </form>
  476. <form name="Public_form_MS_Special" method="post" action="">
  477. <tr >
  478. <td class="hback">
  479. <div align="right">选择专题</div>
  480. </td>
  481. <td width="29%" class="hback">
  482. <div align="center">
  483. <select name="SpecialID" size="10" multiple id="SpecialID" style="width:98%">
  484. <%
  485.  set rs = Conn.execute("select SpecialID,SpecialCName From FS_MS_Special Where isLock=0 Order by SpecialID desc")
  486.  do while not rs.eof
  487.  response.Write"<option value="""&rs("SpecialID")&""">"&rs("SpecialCName")&"</option>"
  488.  rs.movenext
  489.  loop
  490.  rs.close:set rs=nothing
  491.   %>
  492. </select>
  493. </div>
  494. </td>
  495. <td width="58%" class="hback">
  496. <input type="button" onClick="Submit_Data_To_Refresh('MS','FS_MS_Special','msspecial',this.form);" name="Submit14" value="开始发布">
  497. </td>
  498. </tr>
  499. <tr >
  500. <td class="hback">&nbsp;</td>
  501. <td class="hback">&nbsp;</td>
  502. <td class="hback">&nbsp;</td>
  503. </tr>
  504. </form>
  505. </table>
  506. <%
  507. End Sub
  508. Sub DS_Refresh()
  509. Dim rs,str_ClassList
  510. str_ClassList =""
  511. set rs=Conn.execute("select ClassId,ClassName From FS_DS_Class where ParentId = '0' and ReycleTF=0 order by OrderId desc,id desc")
  512. do while not rs.eof
  513. str_ClassList = str_ClassList & "<option value="""&rs("ClassId")&""">"&rs("ClassName")&"</option>"
  514. str_ClassList = str_ClassList & get_Child_S_ClassList(rs("ClassId"),"┝")
  515. rs.movenext
  516. loop
  517. rs.close:set rs=nothing
  518. %>
  519. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  520. <tr>
  521. <td colspan="3" class="xingmu">发布下载首页</td>
  522. </tr>
  523. <tr >
  524. <td width="13%" class="hback">
  525. <div align="right">发布下载首页</div>
  526. </td>
  527. <td colspan="2" class="hback">
  528. <input type="button" onClick="Submit_Data_To_Refresh('DS','','index','');" name="Submit9" value="开始发布">
  529. </td>
  530. </tr>
  531. <tr>
  532. <td colspan="3" class="xingmu">发布下载</td>
  533. </tr>
  534. <tr >
  535. <td width="13%" class="hback">
  536. <div align="right">发布所有</div>
  537. </td>
  538. <td colspan="2" class="hback">
  539. <input type="button" onClick="Submit_Data_To_Refresh('DS','FS_DS_List','dsalldownload','');" name="Submit9" value="开始发布">
  540. </td>
  541. </tr>
  542. <form name="Public_form_DS_ID_Download" method="post" action="">
  543. <tr >
  544. <td class="hback">
  545. <div align="right">按照ID发布</div>
  546. </td>
  547. <td colspan="2" class="hback">
  548. <input name="startId" type="text" id="startId" value="1" size="10" maxlength="8">
  549. <input name="endId" type="text" id="endId" value="100" size="10" maxlength="10">
  550. <input type="button" onClick="Submit_Data_To_Refresh('DS','FS_DS_List','dsiddownload',this.form);" name="Submit5" value="开始发布">
  551. </td>
  552. </tr>
  553. </form>
  554. <form name="Public_form_DS_Last_Download" method="post" action="">
  555. <tr >
  556. <td class="hback">
  557. <div align="right">发布最新</div>
  558. </td>
  559. <td colspan="2" class="hback">
  560. <input name="LastNews" type="text" id="LastNews" value="10" size="10" maxlength="5">
  561. <input type="button" onClick="Submit_Data_To_Refresh('DS','FS_DS_List','dslastdownload',this.form);" name="Submit6" value="开始发布">
  562. </td>
  563. </tr>
  564. </form>
  565. <form name="Public_form_DS_Date_Download" method="post" action="">
  566. <tr >
  567. <td class="hback">
  568. <div align="right">按照日期发布</div>
  569. </td>
  570. <td colspan="2" class="hback">
  571. <input name="startTime" type="text" id="startTime" value="<%=date()-1%>" size="20" maxlength="30" readonly>
  572. <img src="../sys_images/calendar.gif" width="34" onClick="OpenWindowAndSetValue('CommPages/SelectDate.asp',280,150,window,document.Public_form_DS_Date_Download.startTime);document.Public_form_DS_Date_Download.startTime.focus();" style="cursor:hand;">
  573. <input name="endTime" type="text" id="endTime" value="<%=date()%>" size="20" maxlength="30" readonly>
  574. <img src="../sys_images/calendar.gif" width="34" onClick="OpenWindowAndSetValue('CommPages/SelectDate.asp',280,150,window,document.Public_form_DS_Date_Download.endTime);document.Public_form_DS_Date_Download.endTime.focus();" style="cursor:hand;">
  575. <input type="button" onClick="Submit_Data_To_Refresh('DS','FS_DS_List','dsdatedownload',this.form);" name="Submit7" value="开始发布">
  576. </td>
  577. </tr>
  578. </form>
  579. <form name="Public_form_DS_Class_Download" method="post" action="">
  580. <tr >
  581. <td class="hback">
  582. <div align="right">按照栏目发布</div>
  583. </td>
  584. <td width="29%" class="hback">
  585. <div align="center">
  586. <select name="ClassID" size="12" multiple id="ClassID" style="width:98%">
  587. <%=str_ClassList%>
  588. </select>
  589. </div>
  590. </td>
  591. <td width="58%" class="hback">
  592. <input type="button" onClick="Submit_Data_To_Refresh('DS','FS_DS_List','dsclassdownload',this.form);" name="Submit8" value="开始发布">
  593. </td>
  594. </tr>
  595. <tr >
  596. <td colspan="3" class="xingmu">发布栏目</td>
  597. </tr>
  598. </form>
  599. <tr >
  600. <td class="hback">
  601. <div align="right">发布栏目</div>
  602. </td>
  603. <td colspan="2" class="hback">
  604. <input type="button" onClick="Submit_Data_To_Refresh('DS','FS_DS_Class','dsallclass','');" name="Submit222" value="发布所有栏目">
  605. </td>
  606. </tr>
  607. <form name="Public_form_DS_Class" method="post" action="">
  608. <tr >
  609. <td class="hback">
  610. <div align="right">选择栏目</div>
  611. </td>
  612. <td width="29%" class="hback">
  613. <div align="center">
  614. <select name="select" size="10" multiple id="select" style="width:98%">
  615. <%=str_ClassList%>
  616. </select>
  617. </div>
  618. </td>
  619. <td width="58%" class="hback">
  620. <input type="button" onClick="Submit_Data_To_Refresh('DS','FS_DS_Class','dsclass',this.form);" name="Submit222" value="开始发布">
  621. </td>
  622. </tr>
  623. </form>
  624. </table>
  625. <%
  626. End sub
  627. %>
  628. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  629. <tr class="hback">
  630. <td><span class="tx">注意:如果您是虚拟主机用户或者您的服务器不能注册(及没注册)"发布任务"控件,将不能使用自动任务发布功能 <a href="../help?Lable=MF_PublicSite_Dll" target="_blank" style="cursor:help;"><img src="Images/_help.gif" width="50" height="17" border="0"></a></span></td>
  631. </tr>
  632. </table>
  633. </div>
  634. <div id="RefreshSchedule" style="display:none;" align="center"></div>
  635. </body>
  636. </html>
  637. <script language="JavaScript" type="text/JavaScript">
  638. var G_REFRESH_NUM_TIME=<%= G_REFRESH_NUM_TIME %>;
  639. countnum=1;
  640. function opencat(cat)
  641. {
  642.   if(cat.style.display=="none") cat.style.display="";
  643.   else cat.style.display="none"; 
  644. }
  645. function Submit_Data_To_Refresh(Sys,Table,Type,FormObj)
  646. {
  647. var Action='',Str='',Obj=null;
  648. if (typeof(FormObj)=="object"){
  649. for(var i=0;i<FormObj.length;i++)
  650. {
  651. Obj = FormObj[i];
  652. if ((Obj.tagName=='INPUT')&&(Obj.type=='text')) Str=Obj.name+':'+Obj.value;
  653. if (Obj.tagName=='SELECT') {Str=Obj.name+':'+GetSelectID(Obj);}
  654. if (Str!='')
  655. {
  656. if (Action=='') Action=Str;
  657. else Action=Action+';'+Str;
  658. }
  659. Str='';
  660. }
  661. }else{
  662. Action="";
  663. }
  664. Action=Sys+'$'+Table+'$'+Type+'$'+Action;
  665. Action="Action="+Action;
  666. $('RefreshMain').style.display="none";
  667. $('RefreshSchedule').style.display="";
  668. $('RefreshSchedule').innerHTML="<div class="RefreshLen"><div class="xingmu" id="RefreshLen"></div></div>
  669. <span id="result_str"></span><br><br>";
  670. $("RefreshLen").style.width ="0%";
  671. $("RefreshLen").innerHTML="&nbsp;<span class="xingmu">0%</span>";
  672. $('result_str').innerHTML="正在准备...&nbsp;&nbsp;";
  673. Start_Refresh('PublicSite/Public_Refresh.asp',Action);
  674. }
  675. function Start_Refresh(url,Action){
  676. var myAjax = new Ajax.Request(
  677. url,
  678. {method:'get',
  679. parameters:Action,
  680. onComplete:Refresh_Receive
  681. }
  682. );
  683. }
  684. function Refresh_Receive(OriginalRequest){
  685. var check,goback;
  686. var percent=0;
  687. //goback="<a href="返回" onclick="location.reload();return false;">返回</a>";
  688. goback="<a href="返回" onclick="$('RefreshMain').style.display='';$('RefreshSchedule').style.display='none';return false;">返回</a>";
  689. if (OriginalRequest.responseText.indexOf("$")>-1){
  690. check=OriginalRequest.responseText.split("$");
  691. switch (check[0]) {
  692. case "MF" :
  693. $("RefreshLen").style.width ="100%";
  694. $("RefreshLen").innerHTML="&nbsp;<span class="xingmu">100%</span>";
  695. $('result_str').innerHTML="首页发布结束&nbsp;&nbsp;<a href="http://<%= Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&Request.Cookies("FoosunMFCookies")("FoosunMFIndexFileName") %>" target="_blank">浏览首页</a>&nbsp;&nbsp;"+goback;
  696. countnum=1;
  697. break;
  698. case "Next" :
  699. percent=(parseInt(check[2])/parseInt(check[1]))*100;
  700. percent=Math.round(percent);
  701. $("RefreshLen").style.width =percent+"%";
  702. $("RefreshLen").innerHTML="&nbsp;<span class="xingmu">"+percent+"%</span>";
  703. $('result_str').innerHTML="总共要发布" + check[1] + "条内容,已经发布" + check[2] + "条内容...";
  704. //Start_Refresh("PublicSite/Public_Refresh.asp","");
  705. if ((countnum % G_REFRESH_NUM_TIME)==0){
  706. window.setTimeout("Start_Refresh("PublicSite/Public_Refresh.asp","")",1000);
  707. }else{
  708. Start_Refresh("PublicSite/Public_Refresh.asp","");
  709. }
  710. countnum++;
  711. break;
  712. case "End" :
  713. $("RefreshLen").style.width ="100%";
  714. $("RefreshLen").innerHTML="&nbsp;<span class="xingmu">100%</span>";
  715. $('result_str').innerHTML="总共要发布" + check[1] + "条内容,已经发布" + (check[2]-1) + "条内容...";
  716. $('result_str').innerHTML=$('result_str').innerHTML+"<br />发布结束&nbsp;&nbsp;"+goback;
  717. countnum=1;
  718. break;
  719. case "No" :
  720. $('result_str').innerHTML="没有要发布的内容&nbsp;&nbsp;"+goback;
  721. countnum=1;
  722. break;
  723. default :
  724. //alert(OriginalRequest.responseText);
  725. //$('result_str').innerHTML=OriginalRequest.responseText;
  726. //Start_Refresh("PublicSite/Public_Refresh.asp","");
  727. $('result_str').innerHTML="发布失败,请与管理员联系。&nbsp;&nbsp;"+goback+"<br>错误描述如下:ID:<span class="tx">"+check[1]+"</span>,<span class="tx">"+check[2]+"</span>";
  728. //Start_Refresh("PublicSite/Public_Refresh.asp","");
  729. }
  730. else{
  731. $('result_str').innerHTML="发布失败,请与管理员联系。&nbsp;&nbsp;"+goback+"<br>错误描述如下:"+OriginalRequest.responseText;
  732. }
  733. }
  734. function GetSelectID(Obj)
  735. {
  736. var SelectObj=null,Str='';
  737. for(var i=0;i<Obj.options.length;i++)
  738. {
  739. SelectObj=Obj.options[i];
  740. if(SelectObj.selected)
  741. {
  742. if(Str=='') Str=SelectObj.value;
  743. else Str=Str+'*'+SelectObj.value;
  744. }
  745. }
  746. return Str;
  747. }
  748. </script>
  749. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->