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

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="../../FS_Inc/Function.asp"-->
  4. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  5. <!--#include file="../../FS_InterFace/NS_Function.asp" -->
  6. <!--#include file="lib/cls_main.asp" -->
  7. <%'CopyRight (c) 2006 Fooun Inc. Code by Simpwind.Xie
  8. Dim Conn,User_Conn,strShowErr
  9. MF_Default_Conn
  10. MF_User_Conn
  11. 'session判断
  12. MF_Session_TF 
  13. '权限判断
  14. 'Call MF_Check_Pop_TF("NS_Class_000001")
  15. '得到会员组列表
  16. dim Fs_news
  17. set Fs_news = new Cls_News
  18. Fs_News.GetSysParam()
  19. If Not Fs_news.IsSelfRefer Then response.write "非法提交数据":Response.end
  20. if Request.Form("actionType") = "xml" then
  21. Response.Write("生成xml")
  22. Response.end
  23. Elseif Request.Form("actionType") = "html" then
  24. Response.Write("生成html")
  25. Response.end
  26. End if
  27. if Request("Action") = "makeXML" then
  28. if not Get_SubPop_TF("","NS022","NS","class") then Err_Show
  29. dim cid
  30. cid=NoSqlHack(Replace(Request("Cid")," ",""))
  31. if trim(cid)=empty then
  32. strShowErr = "<li>请选择栏目</li>"
  33. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  34. Response.end
  35. end if
  36. Response.Redirect "Class_makerss.asp?cid="& cid &""
  37. Response.end
  38. End if
  39. %> 
  40. <html>
  41. <head>
  42. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  43. <title>栏目管理___Powered by foosun Inc.</title>
  44. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  45. </head>
  46. <body>
  47. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  48.   <tr class="hback"> 
  49.     <td class="xingmu">栏目管理<a href="../../help?Lable=NS_Class_Action" target="_blank" style="cursor:help;'" class="sd"><img src="../Images/_help.gif" border="0"></a></td>
  50.   </tr>
  51.   <tr> 
  52.     <td height="18" class="hback"><div align="left"><a href="Class_Manage.asp">管理首页</a>┆<a href="Class_add.asp?ClassID=&Action=add">添加根栏目</a>┆<a href="Class_Action.asp?Action=one">一级栏目排序</a>┆<a href="Class_Action.asp?Action=n">N级栏目排序</a>┆<a href="Class_Action.asp?Action=reset"   onClick="{if(confirm('确认复位所有栏目?nn如果选择确定,所有的栏目将设置为一级分类!!')){return true;}return false;}">复位所有栏目</a>┆<a href="Class_Action.asp?Action=unite">栏目合并</a>┆<a href="Class_Action.asp?Action=allmove">栏目转移</a>┆<a href="Class_Action.asp?Action=clearClass"  onClick="{if(confirm('确认清空所有栏目里的数据吗?nn如果选择确定,所有的栏目的新闻将被放到回收站中!!')){return true;}return false;}">删除所有栏目</a> 
  53.         <a href="../../help?Lable=NS_Class_Action_1" target="_blank" style="cursor:help;'" class="sd"><img src="../Images/_help.gif" border="0"></a></div></td>
  54.   </tr>
  55. </table>
  56. <%
  57. Dim str_Action,obj_news_rs,obj_news_rs_1,isUrlStr
  58. str_Action = Request("Action")
  59. Select Case str_Action
  60. Case "one"
  61. Call OrderOne()
  62. Case "n"
  63. Call OrderN()
  64. Case "Order_one"
  65. Call UpdateOrderID()
  66. Case "Order_n"
  67. Call UpdateOrderIDN()
  68. Case "del"
  69. Call delclass()
  70. Case "reset"
  71. Call resetClass()
  72. Case "unite"
  73. Call Classunite()
  74. Case "Saveunite"
  75. Call Saveunite()
  76. Case "allmove"
  77. Call allmove()
  78. Case "clearClass"
  79. Call clearClass()
  80. Case "clear"
  81. Call one_clear()
  82. Case "SaveAllmove"
  83. Call allmove_save()
  84. End Select
  85. Sub OrderOne()
  86. %>
  87. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  88.   <tr class="hback"> 
  89.     <td height="22" class="xingmu">栏目名称</td>
  90.     <td height="22" class="xingmu"><div align="center">ID</div></td>
  91.     <td class="xingmu"><div align="center">操作</div></td>
  92.   </tr>
  93.   <%
  94. Set obj_news_rs = server.CreateObject(G_FS_RS)
  95. obj_news_rs.Open "Select Orderid,id,ClassID,ParentID,ClassName from FS_NS_NewsClass where Parentid  = '0' Order by Orderid desc,ID desc",Conn,1,3
  96. Do while Not obj_news_rs.eof 
  97. %>
  98.   <form name="ClassForm" method="post" action="Class_Action.asp">
  99.     <tr class="hback"> 
  100.       <td width="39%" height="31" class="hback"><img src="images/%2B.gif" width="15" height="15"> 
  101.         <% = obj_news_rs("ClassName") %> </td>
  102.       <td width="21%" class="hback"><div align="center"> 
  103.           <% = obj_news_rs("ID") %>
  104.         </div></td>
  105.       <td width="40%" class="hback"><div align="center"> 
  106.           <input name="OrderID" type="text" id="OrderID" value="<% = obj_news_rs("OrderID") %>" size="4" maxlength="3">
  107.           <input name="ClassID" type="hidden" id="ClassID" value="<% = obj_news_rs("ClassID") %>">
  108.           <input name="Action" type="hidden" id="ClassID" value="Order_one">
  109.           <input type="submit" name="Submit" value="更新权重(排列序号)">
  110.         </div></td>
  111.     </tr>
  112.   </form>
  113.   <%
  114. obj_news_rs.MoveNext
  115. loop
  116. %>
  117. </table>
  118. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  119.   <tr>
  120.     <td class="hback">说明:权重(排列序号)数字越大排得越靠前.如果权重(排列序号)数字相同,就根据ID来排列</td>
  121.   </tr>
  122. </table>
  123. <%
  124. obj_news_rs.close
  125. set obj_news_rs =nothing
  126. End Sub
  127. Sub OrderN()
  128. %>
  129. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  130.   <tr class="hback"> 
  131.     <td height="22" class="xingmu">栏目名称</td>
  132.     <td height="22" class="xingmu"><div align="center">ID</div></td>
  133.     <td class="xingmu"><div align="center">操作</div></td>
  134.   </tr>
  135.   <%
  136. Set obj_news_rs = server.CreateObject(G_FS_RS)
  137. obj_news_rs.Open "Select Orderid,id,ClassID,ParentID,ClassName from FS_NS_NewsClass where Parentid  = '0' Order by Orderid desc,ID desc",Conn,1,3
  138. Do while Not obj_news_rs.eof 
  139. %>
  140.     <tr class="hback"> 
  141.       
  142.     <td width="39%" height="28" class="hback"><img src="images/%2B.gif" width="15" height="15"> 
  143.       <% = obj_news_rs("ClassName") %> </td>
  144.       <td width="21%" class="hback"><div align="center"> 
  145.           <% = obj_news_rs("ID") %>
  146.         </div></td>
  147.       <td width="40%" class="hback"><div align="center"> </div></td>
  148.     </tr>
  149.   <%
  150.    Response.Write(Fs_news.GetChildNewsList_order(obj_news_rs("ClassID"),""))
  151. obj_news_rs.MoveNext
  152. loop
  153. %>
  154. </table>
  155. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  156.   <tr>
  157.     <td class="hback">说明:权重(排列序号)数字越大排得越靠前.如果权重(排列序号)数字相同,就根据ID来排列</td>
  158.   </tr>
  159. </table>
  160. <%
  161. obj_news_rs.close
  162. set obj_news_rs =nothing
  163. End Sub
  164. Dim obj_unite_rs,tmp_str_list
  165. Sub Classunite()
  166. Set obj_unite_rs = server.CreateObject(G_FS_RS)
  167. obj_unite_rs.Open "Select Orderid,id,ClassID,ClassName,ParentID from FS_NS_NewsClass where Parentid  = '0' and ReycleTF=0 Order by Orderid desc,ID desc",Conn,1,1
  168. %>
  169. <form name="form1" method="post" action="Class_Action.asp">
  170.   <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  171.     <tr class="hback"> 
  172.       <td height="22" colspan="2" class="xingmu"><div align="center">源栏目</div></td>
  173.       <td height="22" colspan="2" class="xingmu"><div align="center">目标栏目</div></td>
  174.     </tr>
  175.     <tr class="hback"> 
  176.       <td width="45%" height="28" class="hback"> <div align="center">
  177. <select name="SourceClassID" id="SourceClassID" style="width:80%">
  178.             <%
  179.   tmp_str_list  = ""
  180.   do while Not obj_unite_rs.eof 
  181.             tmp_str_list = tmp_str_list &"<option value="""& obj_unite_rs("ClassID") &","& obj_unite_rs("ParentID") &""">+"& obj_unite_rs("ClassName") &"</option>"& Chr(13) & Chr(10)
  182. tmp_str_list = tmp_str_list &Fs_news.UniteChildNewsList(obj_unite_rs("ClassID"),"")
  183.  obj_unite_rs.movenext
  184.  Loop
  185.  obj_unite_rs.close
  186.  set obj_unite_rs = nothing
  187.  Response.Write tmp_str_list
  188.  %>
  189.           </select>
  190.         </div></td>
  191.       <td colspan="2" class="hback"> <div align="center">合并到&gt;&gt;&gt; </div></td>
  192.       <td width="46%" class="hback"><select name="TargetClassID" id="SourceClassID" style="width:80%">
  193.           <%= tmp_str_list%> </select></td>
  194.     </tr>
  195.     <tr class="hback"> 
  196.       <td height="28" colspan="4" class="hback"><div align="center"> 
  197.           <input type="button" name="Submit2" value="确定合并栏目" onClick="{if(confirm('确定合并吗?nn合并后将不能还原!!!')){this.document.form1.submit();return true;}return false;}">
  198.           <input name="Action" type="hidden" id="Action" value="Saveunite">
  199.         </div></td>
  200.     </tr>
  201.   </table>
  202. </form>
  203. <%End Sub%>
  204. <%
  205. Sub allmove()
  206. Set obj_unite_rs = server.CreateObject(G_FS_RS)
  207. obj_unite_rs.Open "Select Orderid,id,ClassID,ClassName,ParentID from FS_NS_NewsClass where Parentid  = '0' and ReycleTF=0 Order by Orderid desc,ID desc",Conn,1,1
  208. %>
  209. <form name="form1" method="post" action="Class_Action.asp">
  210.   <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  211.     <tr class="hback"> 
  212.       <td height="22" colspan="2" class="xingmu"><div align="center">源栏目</div></td>
  213.       <td height="22" colspan="2" class="xingmu"><div align="center">目标栏目</div></td>
  214.     </tr>
  215.     <tr class="hback"> 
  216.       <td width="45%" height="28" class="hback"> <div align="center">
  217. <select name="SourceClassID" id="SourceClassID" style="width:80%">
  218.             <%
  219.   tmp_str_list  = ""
  220.   do while Not obj_unite_rs.eof 
  221.             tmp_str_list = tmp_str_list &"<option value="""& obj_unite_rs("ClassID") &","&  obj_unite_rs("ParentID") &""">+"& obj_unite_rs("ClassName") &"</option>"& Chr(13) & Chr(10)
  222. tmp_str_list = tmp_str_list &Fs_news.UniteChildNewsList(obj_unite_rs("ClassID"),"")
  223.  obj_unite_rs.movenext
  224.  Loop
  225.  obj_unite_rs.close
  226.  set obj_unite_rs = nothing
  227.  Response.Write tmp_str_list
  228.  %>
  229.           </select>
  230.         </div></td>
  231.       <td colspan="2" class="hback"> <div align="center">转移到&gt;&gt;&gt;</div></td>
  232.       <td width="46%" class="hback"><select name="TargetClassID" id="SourceClassID" style="width:80%">
  233.           <option value="0000000000">转移到根目录</option>
  234.           <%= tmp_str_list%> </select></td>
  235.     </tr>
  236.     <tr class="hback"> 
  237.       <td height="28" colspan="4" class="hback"><div align="center"> 
  238.           <input type="button" name="Submit2" value="确定转移栏目" onClick="{if(confirm('确定转移栏目吗?')){this.document.form1.submit();return true;}return false;}">
  239.           <input name="Action" type="hidden" id="Action" value="SaveAllmove">
  240.         </div></td>
  241.     </tr>
  242.   </table>
  243. </form>
  244. <%End Sub%>
  245. </body>
  246. </html>
  247. <%
  248. sub UpdateOrderID()
  249. if not Get_SubPop_TF(NoSqlHack(Request.QueryString("ClassID")),"NS024","NS","class") then Err_Show
  250. Dim ClassID,OrderID
  251. ClassID = Request.Form("ClassID")
  252. OrderID = Request.Form("OrderID")
  253. if ClassID="" then
  254. strShowErr = "<li>错误参数:ClassID</li>"
  255. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  256. Response.end
  257. else
  258. ClassID=ClassID
  259. end if
  260. if isnumeric(OrderID)= false then
  261. strShowErr = "<li>错误参数:排列序号请填写正确的数字</li>"
  262. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  263. Response.end
  264. End if
  265. if OrderID="" then
  266. strShowErr = "<li>错误参数:OrderID</li>"
  267. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  268. Response.end
  269. end if
  270. Conn.execute "update FS_NS_NewsClass set OrderID=" & OrderID & " where ClassID='" & ClassID &"'"
  271. Response.Redirect "Class_Action.asp?Action=one"
  272. end sub
  273. sub UpdateOrderIDN()
  274. if not Get_SubPop_TF(NoSqlHack(Request.QueryString("ClassID")),"NS024","NS","class") then Err_Show
  275. Dim N_ClassID,N_OrderID
  276. N_ClassID = Request.Form("ClassID")
  277. N_OrderID = Request.Form("OrderID")
  278. if N_ClassID="" then
  279. strShowErr = "<li>错误参数:ClassID</li>"
  280. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  281. Response.end
  282. else
  283. N_ClassID=N_ClassID
  284. end if
  285. if isnumeric(N_OrderID)= false then
  286. strShowErr = "<li>错误参数:排列序号请填写正确的数字</li>"
  287. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  288. Response.end
  289. End if
  290. if N_OrderID="" then
  291. strShowErr = "<li>错误参数:OrderID</li>"
  292. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  293. Response.end
  294. end if
  295. Conn.execute "update FS_NS_NewsClass set OrderID=" & N_OrderID & " where ClassID='" & N_ClassID &"'"
  296. Response.Redirect "Class_Action.asp?Action=n"
  297. end sub
  298. Sub delclass()
  299. if not Get_SubPop_TF(NoSqlHack(Request.QueryString("ClassID")),"NS021","NS","class") then Err_Show
  300. Dim str_delClassID,str_tmp_DelclassTF
  301. str_delClassID = Request.QueryString("ClassID")
  302. if str_delClassID="" then
  303. strShowErr = "<li>错误参数:没有栏目ClassID</li>"
  304. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  305. Response.end
  306. end if
  307. if fs_news.ReycleTF = 1 then
  308. Conn.execute("Update FS_NS_NewsClass set ReycleTF=1 Where ClassID='"& str_delClassID &"'")
  309. Conn.execute("Update FS_NS_News set isRecyle =1 Where ClassID='"& str_delClassID &"'")
  310. str_tmp_DelclassTF = 1
  311. Else
  312. Conn.execute("Delete From FS_NS_NewsClass Where ClassID='"& str_delClassID &"'")
  313. Conn.execute("Delete From FS_NS_News Where ClassID='"& str_delClassID &"'")
  314. str_tmp_DelclassTF=0
  315. End if
  316. dim returnvalues
  317. returnvalues = fso_DeleteFile("../../FS_InterFace/xml/NS/"&str_delClassID&".xml")
  318. Call Makexml("0")
  319. if returnvalues = true then:returnvalues = "同时更新了xml文件":else:returnvalues = "同时更新了xml文件。状态:更新不成功.可能是您的目录不支持写入权限":end if
  320. If str_tmp_DelclassTF =1 then
  321. strShowErr = "<li>栏目删除已经删除到回收站</li><li>"& returnvalues &"</li>" 
  322. Call MF_Insert_oper_Log("删除栏目","删除栏目ClassID:"& str_delClassID &"及子类栏目,同时删除了此栏目下的所有信息,删除到回收站中",now,session("admin_name"),"NS")
  323. Else
  324. strShowErr = "<li>栏目已经彻底删除成功</li><li>"& returnvalues &"</li>"
  325. Call MF_Insert_oper_Log("删除栏目","删除栏目ClassID:"& str_delClassID &"及子类栏目,同时删除了此栏目下的所有信息,彻底删除",now,session("admin_name"),"NS")
  326. End if
  327. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Class_Manage.asp")
  328. Response.end
  329. End Sub
  330. Sub resetClass()
  331. if not Get_SubPop_TF(NoSqlHack(Request.QueryString("ClassID")),"NS018","NS","class") then Err_Show
  332. Conn.Execute("Update FS_NS_NewsClass Set ParentID ='0'")
  333. '插入操作日志
  334. Call MF_Insert_oper_Log("复位栏目","把所有栏目复位为一级栏目",now,session("admin_name"),"NS")
  335. strShowErr = "<li>复位所有栏目成功</li><li>所有的栏目已经设置为一级分类</li>"
  336. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Class_Manage.asp")
  337. Response.end
  338. End Sub
  339. '合并目录
  340. Sub Saveunite()
  341. if not Get_SubPop_TF(NoSqlHack(Request.QueryString("ClassID")),"NS019","NS","class") then 
  342. Response.Redirect("lib/error.asp?ErrCodes=缺少权限&ErrorUrl=")
  343. Response.end
  344. End if
  345. Dim str_SourceClassID,str_TargetClassID
  346. str_SourceClassID = Trim(Request.Form("SourceClassID"))
  347. str_TargetClassID = Trim(Request.Form("TargetClassID"))
  348. if split(str_SourceClassID,",")(0) = split(str_TargetClassID,",")(0) then
  349. strShowErr = "<li>源目录和目标目录不能一样</li>"
  350. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  351. Response.end
  352. End if
  353. Dim obj_Url_rs
  354. set obj_Url_rs = Conn.execute("select isUrl from FS_NS_NewsClass where ClassID='"& split(str_TargetClassID,",")(0) &"'")
  355. if obj_Url_rs("isUrl") = 1 then
  356. strShowErr = "<li>不能把栏目合并到外部栏目!</li>"
  357. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  358. Response.end
  359. End if
  360. Conn.execute("Update FS_NS_News set ClassID='"& split(str_TargetClassID,",")(0)&"'  where ClassID ='"& split(str_SourceClassID,",")(0)&"'")
  361. '更新其他相关数据库
  362. 'Conn.execute("Delete From  FS_NS_NewsPop  where ClassID ='"& split(str_SourceClassID,",")(0)&"'")
  363. '删除源栏目表
  364. Conn.execute("Delete From FS_NS_NewsClass  where ClassID ='"& split(str_SourceClassID,",")(0)&"'")
  365. Dim ob_Tmp_rs
  366. set ob_Tmp_rs = Conn.execute("select ClassID,ParentID From FS_NS_NewsClass Where ParentID='"& split(str_SourceClassID,",")(0) &"' order by id desc")
  367. if Not ob_Tmp_rs.eof then
  368. do while Not ob_Tmp_rs.eof 
  369. Conn.execute("Update FS_NS_NewsClass Set ParentID ='"&  split(str_SourceClassID,",")(1) &"' where ClassID ='"& ob_Tmp_rs("ClassID")&"'")
  370. ob_Tmp_rs.movenext
  371. Loop
  372. End if
  373. ob_Tmp_rs.close:set ob_Tmp_rs = nothing
  374. '更新所有数据
  375. '******************保留
  376. Call MF_Insert_oper_Log("合并栏目","把栏目ClassID:"&  split(str_SourceClassID)(0)&"合并到ClassID:"&  split(str_TargetClassID)(0) &"中",now,session("admin_name"),"NS")
  377. strShowErr = "<li>合并栏目成功</li>"
  378. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Class_Manage.asp")
  379. Response.end
  380. End Sub
  381. '移动栏目
  382. Sub allmove_save()
  383. if not Get_SubPop_TF(NoSqlHack(Request.QueryString("ClassID")),"NS020","NS","class") then Err_Show
  384. Dim str_SourceClassID_move,str_TargetClassID_move
  385. str_SourceClassID_move = Trim(Request.Form("SourceClassID"))
  386. str_TargetClassID_move = Trim(Request.Form("TargetClassID"))
  387. if split(str_SourceClassID_move,",")(0) = split(str_TargetClassID_move,",")(0) then
  388. strShowErr = "<li>源目录和目标目录不能一样</li>"
  389. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  390. Response.end
  391. End if
  392. if str_TargetClassID_move ="0000000000" then
  393. Conn.execute("Update FS_NS_NewsClass Set ParentID ='0' where ClassID ='"&  split(str_SourceClassID_move,",")(0)&"'")
  394. Else
  395. Dim obj_Url_rs_1
  396. set obj_Url_rs_1 = Conn.execute("select isUrl from FS_NS_NewsClass where ClassID='"& split(str_TargetClassID_move,",")(0) &"'")
  397. if obj_Url_rs_1("isUrl") = 1 then
  398. strShowErr = "<li>不能把栏目转到外部栏目!</li>"
  399. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  400. Response.end
  401. End if
  402. Conn.execute("Update FS_NS_NewsClass Set ParentID ='"&  split(str_TargetClassID_move,",")(0) &"' where ClassID ='"&  split(str_SourceClassID_move,",")(0)&"'")
  403. Dim ob_Tmp_rs_1
  404. set ob_Tmp_rs_1 = Conn.execute("select ClassID,ParentID From FS_NS_NewsClass Where ParentID='"& split(str_SourceClassID_move,",")(0) &"' order by id desc")
  405. if Not ob_Tmp_rs_1.eof then
  406. do while Not ob_Tmp_rs_1.eof 
  407. Conn.execute("Update FS_NS_NewsClass Set ParentID ='"&  split(str_SourceClassID_move,",")(1) &"' where ClassID ='"& ob_Tmp_rs_1("ClassID")&"'")
  408. ob_Tmp_rs_1.movenext
  409. Loop
  410. End if
  411. ob_Tmp_rs_1.close:set ob_Tmp_rs_1 = nothing
  412. End if
  413. '更新所有数据
  414. '******************保留
  415. Call MF_Insert_oper_Log("转移栏目","把栏目ClassID:"& split(str_SourceClassID_move)(0) &"转移到ClassID:"& split(str_TargetClassID_move)(0)&"中",now,session("admin_name"),"NS")
  416. strShowErr = "<li>栏目转移成功!</li>"
  417. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Class_Manage.asp")
  418. Response.end
  419. End Sub
  420. Sub clearClass()
  421. if not Get_SubPop_TF(NoSqlHack(Request.QueryString("ClassID")),"NS021","NS","class") then Err_Show
  422. Conn.execute("Delete From FS_NS_NewsClass")
  423. Conn.execute("Update FS_NS_News  set  isRecyle =1")
  424. Conn.execute("Update FS_NS_News  set  ClassID ='0'")
  425. Call MF_Insert_oper_Log("删除所有栏目","删除整个站点栏目",now,session("admin_name"),"NS")
  426. strShowErr = "<li>所有删除栏目成功</li><li>所有的栏目下新闻已经放到回收站中</li><li>如果要删除所有新闻,请到回收站中清除</li>"
  427. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Class_Manage.asp")
  428. Response.end
  429. End Sub
  430. Sub one_clear()
  431. if not Get_SubPop_TF(NoSqlHack(Request.QueryString("ClassID")),"NS023","NS","class") then 
  432. Response.Redirect("lib/error.asp?ErrCodes=缺少权限&ErrorUrl=")
  433. Response.end
  434. End if
  435. Conn.execute("Delete From FS_NS_News where ClassID = '"& NoSqlHack(Request.QueryString("ClassID"))&"'")
  436. Call MF_Insert_oper_Log("清除新闻","清除了Classid:"& Request.QueryString("ClassID") &"下的所有新闻",now,session("admin_name"),"NS")
  437. strShowErr = "<li>栏目下的新闻清除成功</li>"
  438. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  439. Response.end
  440. End Sub
  441. set Fs_news = nothing
  442. %>