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

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="lib/cls_main.asp" -->
  4. <!--#include file="../../FS_Inc/Function.asp"-->
  5. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  6. <!--#include file="../../FS_InterFace/NS_Function.asp" -->
  7. <!--#include file="../../FS_Inc/Func_page.asp" -->
  8. <%'Copyright (c) 2006 Foosun Inc. Code by Simpwind.Xie
  9. Dim Conn,User_Conn
  10. Dim CharIndexStr
  11. Dim Fs_news,obj_news_rs,obj_news_rs_1,isUrlStr,str_Href,obj_cnews_rs,news_count,str_Href_title,str_action,str_ClassID,news_SQL
  12. Dim obj_newslist_rs,newslist_sql,strpage,str_showTF,str_ClassID_1,str_Editor,str_Keyword,str_GetKeyword,str_ktype
  13. Dim select_count,select_pagecount,i,Str_GetPopID,Str_PopID,str_check,str_UrlTitle,icNum,str_addType,str_addType_1
  14. Dim str_Rec,str_isTop,str_hot,str_pic,str_highlight,str_bignews,str_filt,str_Constr,str_Top,tmp_pictf
  15. Dim str_s_classIDarray,tmp_splitarrey_id,tmp_splitarrey_Classid,tmp_i,str_Move_type,str_t_classID,C_NewsIDarrey,Tmp_rs,Tmp_TF_Rs
  16. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo
  17. Dim StrSql,ArrSql(),temp_j,str_rep_type,str_rep_select_type,str_AdvanceTF,str_s_Content,str_t_Content,str_start_char,str_end_char,f_PLACE_OBJ
  18. Dim str_SpecialEname,SQL_SpecialEname,str_Get_Special,sp_i
  19. Dim fso_tmprs_,NewsSavePath
  20. int_RPP=30 '设置每页显示数目
  21. int_showNumberLink_=8 '数字导航显示数目
  22. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  23. str_nonLinkColor_="#999999" '非热链接颜色
  24. toF_="<font face=webdings title=""首页"">9</font>"   '首页
  25. toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
  26. toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
  27. toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
  28. toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
  29. toL_="<font face=webdings title=""最后一页"">:</font>"
  30. MF_Default_Conn
  31. MF_User_Conn
  32. MF_Session_TF
  33. set Fs_news = new Cls_News
  34. Fs_News.GetSysParam()
  35. If Not Fs_news.IsSelfRefer Then response.write "非法提交数据":Response.end
  36. str_ClassID = NoSqlHack(Request.QueryString("ClassID"))
  37. str_SpecialEname = NoSqlHack(Request.QueryString("specialEname"))
  38. if Request("Action")="makehtml" then
  39. if not Get_SubPop_TF(str_ClassID,"NS011","NS","news") then Err_Show
  40. response.Redirect "Get_NewsHtml.asp?Id="&server.URLEncode(Replace(request.Form("C_NewsID")," ",""))&"&ClassId="&Request.QueryString("ClassId")&"&type=makenews"
  41. End if
  42. if Request("Action")="Toold" then
  43. response.Redirect "Get_OldNews.asp?Id="&server.URLEncode(Replace(request.Form("C_NewsID")," ",""))&"&ClassId="&Request.QueryString("ClassId")&""
  44. end if
  45. if Request("Action") = "signDel" then
  46. if not Get_SubPop_TF(str_ClassID,"NS003","NS","news") then Err_Show
  47. Dim strShowErr
  48. if fs_news.ReycleTF = 1 then
  49. Conn.execute("Update FS_NS_News set isRecyle = 1 where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
  50. strShowErr = "<li>"& Fs_news.allInfotitle &"已经删除</li><li>"& Fs_news.allInfotitle &"已经临时放到回收站中</li>"
  51. Else
  52. strShowErr = "<li>"& Fs_news.allInfotitle &"已经彻底删除</li>"
  53. ''===============
  54. ''删除图片文件
  55. set fso_tmprs_ = Conn.execute("select NewsPicFile from FS_NS_News where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
  56. if not fso_tmprs_.eof then
  57. fso_DeleteFile(fso_tmprs_(0))
  58. end if
  59. fso_tmprs_.close
  60. ''小图
  61. set fso_tmprs_ = Conn.execute("select NewsSmallPicFile from FS_NS_News where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
  62. if not fso_tmprs_.eof then
  63. fso_DeleteFile(fso_tmprs_(0))
  64. end If
  65. '删除静态文件
  66. set fso_tmprs_ = Conn.execute("select FS_NS_News.SaveNewsPath,FS_NS_News.FileName,FS_NS_News.FileExtName,FS_NS_NewsClass.SavePath,FS_NS_NewsClass.ClassEName from FS_NS_News,FS_NS_NewsClass where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"' and FS_NS_News.IsURL=0 and FS_NS_NewsClass.ClassID=FS_NS_News.ClassID")
  67. If G_VIRTUAL_ROOT_DIR = "" Then
  68. NewsSavePath = ""
  69. Else
  70. NewsSavePath = "/" & G_VIRTUAL_ROOT_DIR
  71. End If
  72. If Not fso_tmprs_.eof Then
  73. NewsSavePath=NewsSavePath&fso_tmprs_("SavePath")&"/"&fso_tmprs_("ClassEName")&fso_tmprs_("SaveNewsPath")&"/"&fso_tmprs_("FileName")&"."&fso_tmprs_("FileExtName")
  74. fso_DeleteFile(NewsSavePath)
  75. End If
  76. '删除静态文件结束
  77. fso_tmprs_.close
  78. ''===============
  79. Conn.execute("Delete From FS_NS_News where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
  80. '删除浏览权限新闻,以防产生垃圾信息
  81. Conn.execute("Delete From  FS_MF_Pop  where InfoID='"& NoSqlHack(Request.QueryString("NewsID"))&"' and PopType='NS'")
  82. '删除静态文件
  83. End if
  84. set conn=nothing:set user_conn=nothing
  85. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  86. Response.end
  87. End if
  88. if Request("Action") = "singleCheck" then
  89. if not Get_SubPop_TF(str_ClassID,"NS004","NS","news") then Err_Show
  90. Conn.execute("Update FS_NS_News set isLock = 0 where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
  91. strShowErr = "<li>"& Fs_news.allInfotitle &"审核成功</li>"
  92. set conn=nothing:set user_conn=nothing
  93. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  94. Response.end
  95. Elseif Request("Action") = "singleUnCheck" then
  96. if not Get_SubPop_TF(str_ClassID,"NS005","NS","news") then Err_Show
  97. Conn.execute("Update FS_NS_News set isLock = 1 where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
  98. strShowErr = "<li>"& Fs_news.allInfotitle &"锁定成功</li>"
  99. set conn=nothing:set user_conn=nothing
  100. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  101. Response.end
  102. End if
  103. if Request("Action") = "signUnTop" then
  104. if not Get_SubPop_TF(str_ClassID,"NS006","NS","news") then Err_Show
  105. Conn.execute("Update FS_NS_News set popid =0 where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
  106. strShowErr = "<li>"& Fs_news.allInfotitle &"解固成功</li>"
  107. set conn=nothing:set user_conn=nothing
  108. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  109. Response.end
  110. End if
  111. if Request("Action") = "signTop" then
  112. if not Get_SubPop_TF(str_ClassID,"NS006","NS","news") then Err_Show
  113. Conn.execute("Update FS_NS_News set popid =5 where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
  114. set conn=nothing:set user_conn=nothing
  115. strShowErr = "<li>"& Fs_news.allInfotitle &"总固顶成功</li><li>如果需要区域固顶,请在修改中设定</li>"
  116. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  117. Response.end
  118. End if
  119. If Request.Form("Action") = "Del" then
  120. if not Get_SubPop_TF(str_ClassID,"NS003","NS","news") then Err_Show
  121. Dim DelID,Str_Tmp,Str_Tmp1
  122. DelID = request.Form("C_NewsID")
  123. if DelID = "" then
  124. strShowErr = "<li>你必须选择一项再删除</li>"
  125. set conn=nothing:set user_conn=nothing
  126. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  127. Response.end
  128. End if
  129. if fs_news.ReycleTF = 1 then
  130. Conn.execute("Update FS_NS_News set isRecyle=1 where ID in ("&DelID&")")
  131. set conn=nothing:set user_conn=nothing
  132. strShowErr = "<li>"& Fs_news.allInfotitle &"已经删除</li><li>"& Fs_news.allInfotitle &"已经临时放到回收站中</li>"
  133. Else
  134. ''===============
  135. ''删除图片文件
  136. set fso_tmprs_ = Conn.execute("select NewsPicFile from FS_NS_News where ID in ("&DelID&")")
  137. do while not fso_tmprs_.eof
  138. fso_DeleteFile(fso_tmprs_(0))
  139. fso_tmprs_.movenext
  140. loop
  141. fso_tmprs_.close
  142. ''小图
  143. set fso_tmprs_ = Conn.execute("select NewsSmallPicFile from FS_NS_News where ID in ("&DelID&")")
  144. do while not fso_tmprs_.eof
  145. fso_DeleteFile(fso_tmprs_(0))
  146. fso_tmprs_.movenext
  147. loop
  148. fso_tmprs_.close
  149. ''===============
  150. '删除静态文件
  151. set fso_tmprs_ = Conn.execute("select FS_NS_News.SaveNewsPath,FS_NS_News.FileName,FS_NS_News.FileExtName,FS_NS_NewsClass.SavePath,FS_NS_NewsClass.ClassEName from FS_NS_News,FS_NS_NewsClass where FS_NS_News.ID in ("& DelID &") and FS_NS_News.IsURL=0 and FS_NS_NewsClass.ClassID=FS_NS_News.ClassID")
  152. While Not fso_tmprs_.eof
  153. If G_VIRTUAL_ROOT_DIR = "" Then
  154. NewsSavePath = ""
  155. Else
  156. NewsSavePath = "/" & G_VIRTUAL_ROOT_DIR
  157. End If
  158. NewsSavePath=NewsSavePath&fso_tmprs_("SavePath")&"/"&fso_tmprs_("ClassEName")&fso_tmprs_("SaveNewsPath")&"/"&fso_tmprs_("FileName")&"."&fso_tmprs_("FileExtName")
  159. fso_DeleteFile(NewsSavePath)
  160. fso_tmprs_.movenext
  161. Wend
  162. '删除静态文件结束
  163. Conn.execute("Delete From FS_NS_News where ID in ("&DelID&")")
  164. set conn=nothing:set user_conn=nothing
  165. strShowErr = "<li>您选择的"& Fs_news.allInfotitle &"已经彻底删除了</li>"
  166. End if
  167. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../News_manage.asp?ClassID="&Request("ClassID")&"")
  168. Response.end
  169. End if
  170. If Request.Form("Action") = "unlock" then
  171. if not Get_SubPop_TF(str_ClassID,"NS008","NS","news") then Err_Show
  172. Dim str_UnLockID
  173. str_UnLockID = request.Form("C_NewsID")
  174. if str_UnLockID = "" then
  175. set conn=nothing:set user_conn=nothing
  176. strShowErr = "<li>你必须选择一项再操作</li>"
  177. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  178. Response.end
  179. End if
  180. Conn.execute("Update FS_NS_News set isLock = 0 where ID in ("& str_UnLockID &")")
  181. strShowErr = "<li>"& Fs_news.allInfotitle &"审核成功</li>"
  182. set conn=nothing:set user_conn=nothing
  183. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  184. Response.end
  185. End if
  186. If Request.Form("Action") = "lock" then
  187. if not Get_SubPop_TF(str_ClassID,"NS005","NS","news") then Err_Show
  188. Dim str_LockID
  189. str_LockID = request.Form("C_NewsID")
  190. if str_LockID = "" then
  191. strShowErr = "<li>你必须选择一项再操作</li>"
  192. set conn=nothing:set user_conn=nothing
  193. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  194. Response.end
  195. End if
  196. Conn.execute("Update FS_NS_News set isLock = 1 where ID in ("& str_LockID &")")
  197. strShowErr = "<li>"& Fs_news.allInfotitle &"锁定成功</li>"
  198. set conn=nothing:set user_conn=nothing
  199. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  200. Response.end
  201. End if
  202. If Request.Form("Action") = "Move_News" then
  203. if not Get_SubPop_TF(str_ClassID,"NS009","NS","news") then Err_Show
  204. str_s_classIDarray =Replace(Request.Form("s_Classid")," ","")
  205. str_t_classID=Replace(Request.Form("t_Classid")," ","")
  206. str_Move_type = Trim(Replace(Request.Form("Move_type")," ",""))
  207. C_NewsIDarrey = Trim(Replace(Request.Form("C_NewsID")," ",""))
  208. '判断是否是外部栏目
  209. Set Tmp_TF_Rs = Conn.execute("select isUrl From FS_NS_NewsClass Where ClassID = '"& str_t_classID &"'")
  210. if Tmp_TF_Rs(0)=1 then
  211. set conn=nothing:set user_conn=nothing
  212. strShowErr = "<li>目标"& Fs_news.allInfotitle &"栏目不能为外部栏目</li>"
  213. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  214. Response.end
  215. End if
  216. Tmp_TF_Rs.close:set Tmp_TF_Rs =nothing
  217. if str_Move_type = "" then
  218. strShowErr = "<li>请选择转移类型</li>"
  219. set conn=nothing:set user_conn=nothing
  220. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  221. Response.end
  222. End if
  223. if  str_Move_type = "id" then
  224. if Trim(C_NewsIDarrey)="" then
  225. strShowErr = "<li>请选择要转移的"& Fs_news.allInfotitle &"!</li>"
  226. set conn=nothing:set user_conn=nothing
  227. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  228. Response.end
  229. End if
  230. tmp_splitarrey_id = split(C_NewsIDarrey,",")
  231. for tmp_i = LBound(tmp_splitarrey_id) to UBound(tmp_splitarrey_id)
  232. Set Tmp_rs=server.CreateObject(G_FS_RS)
  233. Tmp_rs.open "select Classid From [FS_NS_News] where isRecyle=0 and ID="&tmp_splitarrey_id(tmp_i)&" order by id desc",Conn,1,3
  234. if Not Tmp_rs.eof then
  235. Tmp_rs("ClassID") = str_t_classID
  236. Tmp_rs.update
  237. End if
  238. Next
  239. Elseif  str_Move_type = "ClassID" then
  240. if Trim(str_s_classIDarray)="" then
  241. strShowErr = "<li>请选择要转移栏目下的"& Fs_news.allInfotitle &"!</li>"
  242. set conn=nothing:set user_conn=nothing
  243. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  244. Response.end
  245. End if
  246. tmp_splitarrey_Classid = split(str_s_classIDarray,",")
  247. for tmp_i = LBound(tmp_splitarrey_Classid) to UBound(tmp_splitarrey_Classid)
  248. Set Tmp_rs=server.CreateObject(G_FS_RS)
  249. Tmp_rs.open "select Classid From [FS_NS_News] where isRecyle=0 and ClassID='"&tmp_splitarrey_Classid(tmp_i)&"' order by id desc",Conn,1,3
  250. do while Not Tmp_rs.eof
  251. Tmp_rs("ClassID") = str_t_classID
  252. Tmp_rs.update
  253. Tmp_rs.movenext
  254. Loop
  255. Next
  256. End if
  257. Tmp_rs.close:set Tmp_rs=nothing
  258. strShowErr = "<li>转移成功</li><li>需要重新生成才生效!</li>"
  259. set conn=nothing:set user_conn=nothing
  260. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  261. Response.end
  262. End if
  263. If Request.Form("Action") = "Replace_News" then
  264. if not Get_SubPop_TF(str_ClassID,"NS010","NS","news") then Err_Show
  265. Call Replace_News()
  266. End If
  267. If Request.Form("Action") = "Copy_News" then
  268. if not Get_SubPop_TF(str_ClassID,"NS007","NS","news") then Err_Show
  269. str_s_classIDarray =Replace(Request.Form("s_Classid")," ","")
  270. str_t_classID=Replace(Request.Form("t_Classid")," ","")
  271. str_Move_type = Trim(Replace(Request.Form("Move_type")," ",""))
  272. C_NewsIDarrey = Trim(Replace(Request.Form("C_NewsID")," ",""))
  273. '判断是否是外部栏目
  274. If str_t_classID="" Then
  275. strShowErr = "<li>请选择目标"& Fs_news.allInfotitle &"栏目</li>"
  276. set conn=nothing:set user_conn=nothing
  277. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  278. Response.End
  279. End if
  280. Set Tmp_TF_Rs = Conn.execute("select isUrl From FS_NS_NewsClass Where ClassID = '"& str_t_classID &"'")
  281. if Tmp_TF_Rs(0)=1 then
  282. set conn=nothing:set user_conn=nothing
  283. strShowErr = "<li>目标"& Fs_news.allInfotitle &"栏目不能为外部栏目</li>"
  284. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  285. Response.end
  286. End if
  287. Tmp_TF_Rs.close:set Tmp_TF_Rs =nothing
  288. if str_Move_type = "" then
  289. strShowErr = "<li>请选择复制类型</li>"
  290. set conn=nothing:set user_conn=nothing
  291. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  292. Response.end
  293. End if
  294. if  str_Move_type = "id" then
  295. if Trim(C_NewsIDarrey)="" then
  296. strShowErr = "<li>请选择要复制的"& Fs_news.allInfotitle &"!</li>"
  297. set conn=nothing:set user_conn=nothing
  298. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  299. Response.end
  300. End if
  301. tmp_splitarrey_id = split(C_NewsIDarrey,",")
  302. for tmp_i = LBound(tmp_splitarrey_id) to UBound(tmp_splitarrey_id)
  303. StrSql="INSERT INTO FS_NS_News([NewsID],[PopId],[ClassID],[SpecialEName],[NewsTitle],[CurtTitle],[NewsNaviContent],[isShowReview],[TitleColor],[titleBorder],[TitleItalic],[IsURL],[URLAddress],[Content],[isPicNews],[NewsPicFile],[NewsSmallPicFile],[Templet],[isPop],[Source],[Editor],[Keywords],[Author],[Hits],[SaveNewsPath],[FileName],[FileExtName],[NewsProperty],[TodayNewsPic],[isLock],[isRecyle],[addtime],[isdraft]) VALUES ("
  304. Set Tmp_rs=server.CreateObject(G_FS_RS)
  305. Tmp_rs.open "select * From [FS_NS_News] where isRecyle=0 and ID="&tmp_splitarrey_id(tmp_i)&" order by id desc",Conn,1,3
  306. if Not Tmp_rs.eof then
  307. StrSql=StrSql & "'"&GetRamCode(15)&"'"
  308. StrSql=StrSql & ","&NUllToStr(Tmp_rs("PopId"))&""
  309. StrSql=StrSql & ",'"&str_t_classID&"'"
  310. StrSql=StrSql & ",'"&Tmp_rs("SpecialEName")&"'"
  311. StrSql=StrSql & ",'"&Tmp_rs("NewsTitle")&"'"
  312. StrSql=StrSql & ",'"&Tmp_rs("CurtTitle")&"'"
  313. StrSql=StrSql & ",'"&Tmp_rs("NewsNaviContent")&"'"
  314. StrSql=StrSql & ","&NUllToStr(Tmp_rs("isShowReview"))&""
  315. StrSql=StrSql & ",'"&Tmp_rs("TitleColor")&"'"
  316. StrSql=StrSql & ","&NUllToStr(Tmp_rs("titleBorder"))&""
  317. StrSql=StrSql & ","&NUllToStr(Tmp_rs("TitleItalic"))&""
  318. StrSql=StrSql & ","&NUllToStr(Tmp_rs("IsURL"))&""
  319. StrSql=StrSql & ",'"&Tmp_rs("URLAddress")&"'"
  320. StrSql=StrSql & ",'"&Tmp_rs("Content")&"'"
  321. StrSql=StrSql & ","&NUllToStr(Tmp_rs("isPicNews"))&""
  322. StrSql=StrSql & ",'"&Tmp_rs("NewsPicFile")&"'"
  323. StrSql=StrSql & ",'"&Tmp_rs("NewsSmallPicFile")&"'"
  324. StrSql=StrSql & ",'"&Tmp_rs("Templet")&"'"
  325. StrSql=StrSql & ","&NUllToStr(Tmp_rs("isPop"))&""
  326. StrSql=StrSql & ",'"&Tmp_rs("Source")&"'"
  327. StrSql=StrSql & ",'"&Tmp_rs("Editor")&"'"
  328. StrSql=StrSql & ",'"&Tmp_rs("Keywords")&"'"
  329. StrSql=StrSql & ",'"&Tmp_rs("Author")&"'"
  330. StrSql=StrSql & ","&NUllToStr(Tmp_rs("Hits"))&""
  331. StrSql=StrSql & ",'"&Fs_news.SaveNewsPath(Fs_news.fileDirRule)&"'"
  332. StrSql=StrSql & ",'"&GetRamCode(4)&"'"
  333. StrSql=StrSql & ",'"&Tmp_rs("FileExtName")&"'"
  334. StrSql=StrSql & ",'"&Tmp_rs("NewsProperty")&"'"
  335. StrSql=StrSql & ","&NUllToStr(Tmp_rs("TodayNewsPic"))&""
  336. StrSql=StrSql & ","&NUllToStr(Tmp_rs("isLock"))&""
  337. StrSql=StrSql & ","&NUllToStr(Tmp_rs("isRecyle"))&""
  338. StrSql=StrSql & ",'"&Tmp_rs("addtime")&"'"
  339. StrSql=StrSql & ","&NUllToStr(Tmp_rs("isdraft"))&""
  340. StrSql=StrSql & ")"
  341. 'Response.Write(StrSql&"<br>")
  342. Conn.ExeCute(StrSql)
  343. End if
  344. Next
  345. Elseif  str_Move_type = "ClassID" then
  346. if Trim(str_s_classIDarray)="" then
  347. strShowErr = "<li>请选择要复制栏目下的"& Fs_news.allInfotitle &"!</li>"
  348. set conn=nothing:set user_conn=nothing
  349. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  350. Response.end
  351. End if
  352. tmp_splitarrey_Classid = split(str_s_classIDarray,",")
  353. for tmp_i = LBound(tmp_splitarrey_Classid) to UBound(tmp_splitarrey_Classid)
  354. Set Tmp_rs=server.CreateObject(G_FS_RS)
  355. Tmp_rs.open "select * From [FS_NS_News] where isRecyle=0 and ClassID='"&tmp_splitarrey_Classid(tmp_i)&"' order by id desc",Conn,1,3
  356. ReDim ArrSql(0)
  357. while Not Tmp_rs.eof
  358. StrSql="INSERT INTO FS_NS_News([NewsID],[PopId],[ClassID],[SpecialEName],[NewsTitle],[CurtTitle],[NewsNaviContent],[isShowReview],[TitleColor],[titleBorder],[TitleItalic],[IsURL],[URLAddress],[Content],[isPicNews],[NewsPicFile],[NewsSmallPicFile],[Templet],[isPop],[Source],[Editor],[Keywords],[Author],[Hits],[SaveNewsPath],[FileName],[FileExtName],[NewsProperty],[TodayNewsPic],[isLock],[isRecyle],[addtime],[isdraft]) VALUES ("
  359. StrSql=StrSql & "'"&GetRamCode(15)&"'"
  360. StrSql=StrSql & ","&NUllToStr(Tmp_rs("PopId"))&""
  361. StrSql=StrSql & ",'"&str_t_classID&"'"
  362. StrSql=StrSql & ",'"&Tmp_rs("SpecialEName")&"'"
  363. StrSql=StrSql & ",'"&Tmp_rs("NewsTitle")&"'"
  364. StrSql=StrSql & ",'"&Tmp_rs("CurtTitle")&"'"
  365. StrSql=StrSql & ",'"&Tmp_rs("NewsNaviContent")&"'"
  366. StrSql=StrSql & ","&NUllToStr(Tmp_rs("isShowReview"))&""
  367. StrSql=StrSql & ",'"&Tmp_rs("TitleColor")&"'"
  368. StrSql=StrSql & ","&NUllToStr(Tmp_rs("titleBorder"))&""
  369. StrSql=StrSql & ","&NUllToStr(Tmp_rs("TitleItalic"))&""
  370. StrSql=StrSql & ","&NUllToStr(Tmp_rs("IsURL"))&""
  371. StrSql=StrSql & ",'"&Tmp_rs("URLAddress")&"'"
  372. StrSql=StrSql & ",'"&Tmp_rs("Content")&"'"
  373. StrSql=StrSql & ","&NUllToStr(Tmp_rs("isPicNews"))&""
  374. StrSql=StrSql & ",'"&Tmp_rs("NewsPicFile")&"'"
  375. StrSql=StrSql & ",'"&Tmp_rs("NewsSmallPicFile")&"'"
  376. StrSql=StrSql & ",'"&Tmp_rs("Templet")&"'"
  377. StrSql=StrSql & ","&NUllToStr(Tmp_rs("isPop"))&""
  378. StrSql=StrSql & ",'"&Tmp_rs("Source")&"'"
  379. StrSql=StrSql & ",'"&Tmp_rs("Editor")&"'"
  380. StrSql=StrSql & ",'"&Tmp_rs("Keywords")&"'"
  381. StrSql=StrSql & ",'"&Tmp_rs("Author")&"'"
  382. StrSql=StrSql & ","&NUllToStr(Tmp_rs("Hits"))&""
  383. StrSql=StrSql & ",'"&Fs_news.SaveNewsPath(Fs_news.fileDirRule)&"'"
  384. StrSql=StrSql & ",'"&GetRamCode(4)&"'"
  385. StrSql=StrSql & ",'"&Tmp_rs("FileExtName")&"'"
  386. StrSql=StrSql & ",'"&Tmp_rs("NewsProperty")&"'"
  387. StrSql=StrSql & ","&NUllToStr(Tmp_rs("TodayNewsPic"))&""
  388. StrSql=StrSql & ","&NUllToStr(Tmp_rs("isLock"))&""
  389. StrSql=StrSql & ","&NUllToStr(Tmp_rs("isRecyle"))&""
  390. StrSql=StrSql & ",'"&Tmp_rs("addtime")&"'"
  391. StrSql=StrSql & ","&NUllToStr(Tmp_rs("isdraft"))&""
  392. StrSql=StrSql & ")"
  393. ArrSql(Ubound(ArrSql))=StrSql
  394. ReDim Preserve ArrSql(Ubound(ArrSql)+1)
  395. Tmp_rs.movenext
  396. Wend
  397. 'Response.Write Ubound(ArrSql)
  398. For temp_j=Lbound(ArrSql) to Ubound(ArrSql)
  399. Response.Write(ArrSql(temp_j)&temp_j&"|<br>")
  400. If ArrSql(temp_j)<>"" Then
  401. Conn.Execute(ArrSql(temp_j))
  402. End If
  403. Next
  404. Next
  405. End if
  406. Tmp_rs.close:set Tmp_rs=nothing
  407. strShowErr = "<li>复制成功</li><li>需要重新生成才生效!</li>"
  408. set conn=nothing:set user_conn=nothing
  409. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  410. Response.end
  411. End if
  412. if Request.Form("Action") = "setup_News" then
  413. if not Get_SubPop_TF(str_ClassID,"NS002","NS","news") then Err_Show
  414. Dim str_set_type,C_Set_NewsIDarrey
  415. Dim str_NewsProperty_Rec,str_NewsProperty_mar,str_NewsProperty_rev,str_NewsProperty_constr,str_NewsProperty_tt,str_NewsProperty_hots,str_NewsProperty_jc,str_NewsProperty_unr,str_NewsProperty_ann,str_NewsProperty_filt,str_NewsProperty_Remote
  416. Dim str_NewsProperty_Rec_1,str_NewsProperty_mar_1,str_NewsProperty_rev_1,str_NewsProperty_constr_1,str_NewsProperty_tt_1,str_NewsProperty_hots_1,str_NewsProperty_jc_1,str_NewsProperty_unr_1,str_NewsProperty_ann_1,str_NewsProperty_filt_1,str_NewsProperty_Remote_1
  417. str_s_classIDarray =Replace(Request.Form("s_Classid")," ","")
  418. str_set_type = Trim(Replace(Request.Form("set_type")," ",""))
  419. C_Set_NewsIDarrey = Trim(Replace(Request.Form("Set_NewsID")," ",""))
  420. str_NewsProperty_Rec = Trim(Request.Form("NewsProperty_Rec"))
  421. str_NewsProperty_mar = Trim(Request.Form("NewsProperty_mar"))
  422. str_NewsProperty_rev = Trim(Request.Form("NewsProperty_rev"))
  423. str_NewsProperty_constr =  Trim(Request.Form("NewsProperty_constr"))
  424. str_NewsProperty_tt =   Trim(Request.Form("NewsProperty_tt"))
  425. str_NewsProperty_hots=   Trim(Request.Form("NewsProperty_hots"))
  426. str_NewsProperty_jc=   Trim(Request.Form("NewsProperty_jc"))
  427. str_NewsProperty_unr = Trim(Request.Form("NewsProperty_unr"))
  428. str_NewsProperty_ann = Trim(Request.Form("NewsProperty_ann"))
  429. str_NewsProperty_filt = Trim(Request.Form("NewsProperty_filt"))
  430. str_NewsProperty_Remote = Trim(Request.Form("NewsProperty_Remote"))
  431. if str_set_type = "" then
  432. strShowErr = "<li>请选择是选定的"& Fs_news.allInfotitle &"批量设置还是栏目下"& Fs_news.allInfotitle &"批量设置</li>"
  433. set conn=nothing:set user_conn=nothing
  434. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  435. Response.end
  436. End if
  437. If isnumeric(Trim(Request.Form("hits"))) =false then
  438. strShowErr = "<li>请正确填写点击率</li>"
  439. set conn=nothing:set user_conn=nothing
  440. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  441. Response.end
  442. End if
  443. If isdate(Trim(Request.Form("addtime"))) =false then
  444. strShowErr = "<li>请填写正确的时间格式</li>"
  445. set conn=nothing:set user_conn=nothing
  446. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  447. Response.end
  448. End if
  449. if  str_set_type = "newsid" then
  450. if Trim(C_Set_NewsIDarrey)="" then
  451. strShowErr = "<li>请选择要设置的"& Fs_news.allInfotitle &"ID!</li>"
  452. set conn=nothing:set user_conn=nothing
  453. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  454. Response.end
  455. End if
  456. tmp_splitarrey_id = split(C_Set_NewsIDarrey,",")
  457. for tmp_i = LBound(tmp_splitarrey_id) to UBound(tmp_splitarrey_id)
  458. Set Tmp_rs=server.CreateObject(G_FS_RS)
  459. Tmp_rs.open "select Classid,isUrl,NewsProperty,Templet,PopID,isShowReview,Keywords,hits,addtime,FileExtName From [FS_NS_News] where isRecyle=0 and ID="&tmp_splitarrey_id(tmp_i)&" order by id desc",Conn,1,3
  460. if Not Tmp_rs.eof then
  461. '开始更新新闻数据
  462. if Tmp_rs("isurl") <>1 then
  463. '得到新闻类型参数
  464. if str_NewsProperty_Rec <>"" then:str_NewsProperty_Rec_1 = 1:else:str_NewsProperty_Rec_1 = 0:End if
  465. if str_NewsProperty_mar <>"" then:str_NewsProperty_mar_1 = 1:else:str_NewsProperty_mar_1 = 0:End if
  466. if str_NewsProperty_rev <>"" then:str_NewsProperty_rev_1 = 1:else:str_NewsProperty_rev_1 = 0:End if
  467. if str_NewsProperty_constr <>"" then:str_NewsProperty_constr_1 = 1:else:str_NewsProperty_constr_1 = 0:End if
  468. if str_NewsProperty_tt <>"" then:str_NewsProperty_tt_1 = 1:else:str_NewsProperty_tt_1 = 0:End if
  469. if str_NewsProperty_hots <>"" then:str_NewsProperty_hots_1 = 1:else:str_NewsProperty_hots_1 = 0:End if
  470. if str_NewsProperty_jc <>"" then:str_NewsProperty_jc_1 = 1:else:str_NewsProperty_jc_1 = 0:End if
  471. if str_NewsProperty_unr <>"" then:str_NewsProperty_unr_1 = 1:else:str_NewsProperty_unr_1 = 0:End if
  472. if str_NewsProperty_ann <>"" then:str_NewsProperty_ann_1 = 1:else:str_NewsProperty_ann_1 = 0:End if
  473. if str_NewsProperty_filt <>"" then:str_NewsProperty_filt_1 = 1:else:str_NewsProperty_filt_1 = 0:End if
  474. if str_NewsProperty_Remote <>"" then:str_NewsProperty_Remote_1 = 1:else:str_NewsProperty_Remote_1 = 0:End if
  475. Tmp_rs("NewsProperty") = str_NewsProperty_Rec_1&","&str_NewsProperty_mar_1&","&str_NewsProperty_rev_1&","&str_NewsProperty_constr_1&","&str_NewsProperty_Remote_1&","&str_NewsProperty_tt_1&","&str_NewsProperty_hots_1&","&str_NewsProperty_jc_1&","&str_NewsProperty_unr_1&","&str_NewsProperty_ann_1&","&str_NewsProperty_filt_1
  476. Tmp_rs("Templet")  = Request.Form("Templet")
  477. Tmp_rs("PopID")  = Request.Form("PopID")
  478. if Request.Form("isShowReview")<>"" then
  479. Tmp_rs("isShowReview")  = 1
  480. Else
  481. Tmp_rs("isShowReview")  = 0
  482. End if
  483. Tmp_rs("Keywords")  = Replace(Request.Form("KeywordText")," ","")
  484. Tmp_rs("hits")  = Request.Form("hits")
  485. Tmp_rs("addtime")  = Request.Form("addtime")
  486. Tmp_rs("FileExtName")  = Request.Form("FileExtName")
  487. Tmp_rs.update
  488. End if
  489. End if
  490. Next
  491. Elseif  str_set_type = "classid" then
  492. if Trim(str_s_classIDarray)="" then
  493. strShowErr = "<li>请选择要设定栏目下的"& Fs_news.allInfotitle &"!</li>"
  494. set conn=nothing:set user_conn=nothing
  495. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  496. Response.end
  497. End if
  498. tmp_splitarrey_Classid = split(str_s_classIDarray,",")
  499. for tmp_i = LBound(tmp_splitarrey_Classid) to UBound(tmp_splitarrey_Classid)
  500. Set Tmp_rs=server.CreateObject(G_FS_RS)
  501. Tmp_rs.open "select Classid,isUrl,NewsProperty,Templet,PopID,isShowReview,Keywords,hits,addtime,FileExtName From [FS_NS_News] where isRecyle=0 and ClassID='"&tmp_splitarrey_Classid(tmp_i)&"' order by id desc",Conn,1,3
  502. do while Not Tmp_rs.eof
  503. if Tmp_rs("isUrl")<>1 Then
  504. '更新数据
  505. '得到新闻类型参数
  506. if str_NewsProperty_Rec <>"" then:str_NewsProperty_Rec_1 = 1:else:str_NewsProperty_Rec_1 = 0:End if
  507. if str_NewsProperty_mar <>"" then:str_NewsProperty_mar_1 = 1:else:str_NewsProperty_mar_1 = 0:End if
  508. if str_NewsProperty_rev <>"" then:str_NewsProperty_rev_1 = 1:else:str_NewsProperty_rev_1 = 0:End if
  509. if str_NewsProperty_constr <>"" then:str_NewsProperty_constr_1 = 1:else:str_NewsProperty_constr_1 = 0:End if
  510. if str_NewsProperty_tt <>"" then:str_NewsProperty_tt_1 = 1:else:str_NewsProperty_tt_1 = 0:End if
  511. if str_NewsProperty_hots <>"" then:str_NewsProperty_hots_1 = 1:else:str_NewsProperty_hots_1 = 0:End if
  512. if str_NewsProperty_jc <>"" then:str_NewsProperty_jc_1 = 1:else:str_NewsProperty_jc_1 = 0:End if
  513. if str_NewsProperty_unr <>"" then:str_NewsProperty_unr_1 = 1:else:str_NewsProperty_unr_1 = 0:End if
  514. if str_NewsProperty_ann <>"" then:str_NewsProperty_ann_1 = 1:else:str_NewsProperty_ann_1 = 0:End if
  515. if str_NewsProperty_filt <>"" then:str_NewsProperty_filt_1 = 1:else:str_NewsProperty_filt_1 = 0:End if
  516. if str_NewsProperty_Remote <>"" then:str_NewsProperty_Remote_1 = 1:else:str_NewsProperty_Remote_1 = 0:End if
  517. Tmp_rs("NewsProperty") = str_NewsProperty_Rec_1&","&str_NewsProperty_mar_1&","&str_NewsProperty_rev_1&","&str_NewsProperty_constr_1&","&str_NewsProperty_Remote_1&","&str_NewsProperty_tt_1&","&str_NewsProperty_hots_1&","&str_NewsProperty_jc_1&","&str_NewsProperty_unr_1&","&str_NewsProperty_ann_1&","&str_NewsProperty_filt_1
  518. Tmp_rs("Templet")  = Request.Form("Templet")
  519. Tmp_rs("PopID")  = Request.Form("PopID")
  520. if Request.Form("isShowReview")<>"" then
  521. Tmp_rs("isShowReview")  = 1
  522. Else
  523. Tmp_rs("isShowReview")  = 0
  524. End if
  525. Tmp_rs("Keywords")  = Replace(Request.Form("KeywordText")," ","")
  526. Tmp_rs("hits")  = Request.Form("hits")
  527. Tmp_rs("addtime")  = Request.Form("addtime")
  528. Tmp_rs("FileExtName")  = Request.Form("FileExtName")
  529. Tmp_rs.update
  530. Tmp_rs.movenext
  531. Else
  532. Tmp_rs.movenext
  533. End if
  534. Loop
  535. Next
  536. End if
  537. Tmp_rs.close:set Tmp_rs=nothing
  538. strShowErr = "<li>批量设置成功</li><li>需要重新生成才生效!</li>"
  539. set conn=nothing:set user_conn=nothing
  540. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  541. Response.end
  542. End if
  543. %>
  544. <html xmlns="http://www.w3.org/1999/xhtml">
  545. <head>
  546. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  547. <title>新闻管理___Powered by foosun Inc.</title>
  548. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  549. <script language="JavaScript" type="text/JavaScript" src="../../FS_Inc/PublicJS.js"></script>
  550. </head>
  551. <body>
  552. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  553. <tr class="hback">
  554. <td colspan="3" class="xingmu"><a href="#" onmouseover="this.T_BGCOLOR='#404040';this.T_FONTCOLOR='#FFFFFF';return escape('<div align='center'>FoosunCMS4.0<br> Code by 谢赖堂 <BR>Copyright (c) 2006 Foosun Inc</div>')" class="sd"><strong>新闻管理</strong></a><a href="../../help?Lable=NS_News_Manage" target="_blank" style="cursor:help;'" class="sd"><img src="../Images/_help.gif" border="0"></a>
  555. <%
  556. if Trim(Request.QueryString("ClassID")) <>"" Then
  557. Response.Write "位置:<a href=""News_Manage.asp"" class=""sd""><b>新闻管理</b></a>&nbsp;>>&nbsp;"&Fs_news.GetAdd_ClassName(Request.QueryString("ClassID"))&"  ┆您选择的专题:"& server.HTMLEncode(Request.QueryString("SpecialCName"))&""
  558. Else
  559. Response.Write"位置:所有新闻管理  ┆您选择的专题:"& server.HTMLEncode(Request.QueryString("SpecialCName"))&""
  560. End if
  561. if str_ClassID<>"" then
  562. news_SQL = "Select Orderid,id,ClassID,ClassName,ClassEName,IsUrl,AddNewsType from FS_NS_NewsClass where Parentid  = '"& str_ClassID &"' and ReycleTF=0 Order by Orderid desc,ID desc"
  563. Else
  564. news_SQL = "Select Orderid,id,ClassID,ClassName,ClassEName,IsUrl,AddNewsType from FS_NS_NewsClass where Parentid  = '0'  and ReycleTF=0  Order by Orderid desc,ID desc"
  565. End if
  566. Set obj_news_rs = server.CreateObject(G_FS_RS)
  567. obj_news_rs.Open news_SQL,Conn,1,3
  568. if fs_news.addNewsType = 1 then str_addType_1 ="News_add.asp":else:str_addType_1 ="News_add_Conc.asp":end if
  569. %>
  570. </td>
  571. </tr>
  572. <tr>
  573. <form name="form1" method="post" action="">
  574. <td width="48%" height="18" class="hback">
  575. <div align="left"><a href="News_Manage.asp">首页</a>┆
  576. <%Response.Write"<a href="""& str_addType_1 &"?ClassID="& Request.QueryString("ClassID")&""">添加"& Fs_news.allInfotitle &"</a>|"%>
  577. <a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>">所有<% =  Fs_news.allInfotitle %>
  578. </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&isCheck=1&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>&SpecialEName=<%=str_SpecialEName%>">已审核</a>┆ <a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&isCheck=0&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">未审核</a>┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=Constr&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">投稿</a>
  579. <%if Request.QueryString("NewsTyp")="Constr" then%>
  580. ┆<a href="Constr_stat.asp">稿件统计</a>
  581. <%end if%>
  582. </div>
  583. </td>
  584. <td width="43%" class="hback">
  585. <div align="center"><a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=recTF">推荐 </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=isTop&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">置顶 </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=hot&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">热点 </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=pic&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">图片 </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=highlight&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">精彩 </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=bignews&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">头条 </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=filt&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">幻灯片</a>  </div>
  586. </td>
  587. <td width="9%" class="hback"><a href="Class_Rss.asp?Class=<%=Request.QueryString("ClassID")%>"><img src="../Images/rss200.png" height="15" border="0"></a></td>
  588. </form>
  589. </tr>
  590. </table>
  591. <%
  592.   if Not obj_news_rs.eof then
  593. Response.Write("<table width=""98%"" border=""0"" align=""center"" cellpadding=""2"" cellspacing=""1"" class=""table""> <tr class=""hback""><td>")
  594. Response.Write("<table width=""100%"" border=""0"" align=""center"" cellpadding=""3"" cellspacing=""1"" >")
  595. Response.Write("<tr>")
  596. icNum = 0
  597. Do while Not obj_news_rs.eof
  598. if obj_news_rs("AddNewsType") =1 then
  599. str_addType = "News_add.asp"
  600. Else
  601. str_addType ="News_add_Conc.asp"
  602. End if
  603. if obj_news_rs("IsUrl") = 1 then
  604. isUrlStr = "(<span class=""tx"">外</span>)"
  605. str_Href = ""
  606. str_Href_title = ""& obj_news_rs("ClassName") &""
  607. Else
  608. isUrlStr = ""
  609. str_Href = "<a href="& str_addType &"?ClassID="&obj_news_rs("ClassID")&"><img src=""../images/add.gif"" border=""0"" alt=""添加"& Fs_news.allInfotitle &"""></a>"
  610. str_Href_title = "<a href=""News_Manage.asp?ClassID="& obj_news_rs("ClassID") &"&SpecialEName="&str_SpecialEName&""" title=""点击进入下一级栏目"">"& obj_news_rs("ClassName") &"</a>"
  611. End if
  612. Set obj_news_rs_1 = server.CreateObject(G_FS_RS)
  613. obj_news_rs_1.Open "Select Count(ID) from FS_NS_NewsClass where ParentID='"& obj_news_rs("ClassID") &"'",Conn,1,1
  614. if obj_news_rs_1(0)>0 then
  615. str_action=  "<img src=""images/+.gif""></img>"& str_Href_title &""
  616. Else
  617. str_action=  "<img src=""images/-.gif""></img>"& str_Href_title &""
  618. End if
  619. obj_news_rs_1.close:set obj_news_rs_1 =nothing
  620. '得到新闻数量
  621. if obj_news_rs("IsUrl") = 0 then
  622. Set obj_cnews_rs = server.CreateObject(G_FS_RS)
  623. obj_cnews_rs.Open "Select ID from FS_NS_News where ClassID='"& obj_news_rs("ClassID") &"' and  isRecyle=0 and isdraft=0 ",Conn,1,1
  624. news_count = "("&obj_cnews_rs.recordcount&"/"&fs_news.GetTodayNewsCount(obj_news_rs("ClassID"))
  625. obj_cnews_rs.close:set obj_cnews_rs = nothing
  626. Else
  627. news_count = ""
  628. End if
  629. Response.Write"<td height=""22"">"
  630. Response.Write str_action&isUrlStr&news_count&str_Href
  631. Response.Write "</td>"
  632. obj_news_rs.MoveNext
  633. icNum = icNum + 1
  634. if icNum mod 4 = 0 then
  635. Response.Write("</tr><tr>")
  636. End if
  637. loop
  638. Response.Write("</tr></table></td></tr></table>")
  639. End if
  640. If Request.Form("Action") = "SetUp" then
  641. Call GetSetUp()
  642. ElseIf Request.Form("Action") = "move" then
  643. Call GetMove()
  644. Elseif Request.Form("Action") = "copy" then
  645. Call GetCopy()
  646. Elseif Request.Form("Action") = "replace" then
  647. Call Getreplace()
  648. Else
  649. Call Main()
  650. End if
  651. Sub Main()
  652. Call GetFunctionstr
  653. if Request("NewsTyp") = "recTF" Then:str_Rec=" and "& CharIndexStr &"(NewsProperty,1,1)='1'":Else:str_Rec="":End if
  654. if Request("NewsTyp") = "isTop" Then:str_isTop=" and PopID=4 or PoPID=5":Else:str_isTop="":End if
  655. if Request("NewsTyp") = "hot" Then:str_hot=" and "& CharIndexStr &"(NewsProperty,13,1)='1'":Else:str_hot="":End if
  656. if Request("NewsTyp") = "pic" Then:str_pic=" and  isPicNews=1":Else:str_pic="":End if
  657. if Request("NewsTyp") = "highlight" Then:str_highlight=" and "& CharIndexStr &"(NewsProperty,15,1)='1'":Else:str_highlight="":End if
  658. if Request("NewsTyp") = "bignews" Then:str_bignews="  and "& CharIndexStr &"(NewsProperty,11,1)='1'":Else:str_bignews="":End if
  659. if Request("NewsTyp") = "filt" Then:str_filt=" and "& CharIndexStr &"(NewsProperty,21,1)='1'":Else:str_filt="":End if
  660. if Request("NewsTyp") = "Constr" Then:str_Constr=" and "& CharIndexStr &"(NewsProperty,7,1)='1'":Else:str_Constr="":End if
  661. if Trim(Request("Editor")) <>"" then:str_Editor = " and Editor = '"& Request("Editor")&"'":Else:str_Editor = "":End if
  662. if str_ClassID<>"" and len(str_ClassID)=15 then str_ClassID_1 = " and ClassID='"& str_ClassID &"'":Else:str_ClassID_1 = "":End if
  663. if str_SpecialEname<>"" and not isnull(str_SpecialEname) then
  664. if G_IS_SQL_DB=0 then
  665. SQL_SpecialEname = " and instr(1,SpecialEName,'"&str_SpecialEname&"',1)>0"
  666. else
  667. SQL_SpecialEname = " and charindex('"&str_SpecialEname&"',SpecialEName)>0"
  668. end if
  669. Else
  670. SQL_SpecialEname=""
  671. End if
  672. if Request("isCheck") = "1" then
  673. str_check = " and islock=0"
  674. elseif Request("isCheck") = "0" then
  675. str_check = " and islock=1"
  676. Else
  677. str_Check = ""
  678. End if
  679. str_Keyword = Trim(Request("keyword"))
  680. str_ktype =  Trim(Request("ktype"))
  681. if Trim(str_Keyword) <>"" then
  682. if str_ktype = "title" then
  683. str_GetKeyword = " and NewsTitle like '%"& str_Keyword &"%'"
  684. Elseif str_ktype = "content" then
  685. str_GetKeyword = " and content like '%"& str_Keyword &"%'"
  686. Elseif str_ktype = "author" then
  687. str_GetKeyword = " and author like '%"& str_Keyword &"%'"
  688. Elseif str_ktype = "editor" then
  689. str_GetKeyword = " and editor like '%"& str_Keyword &"%'"
  690. End if
  691. Else
  692. str_GetKeyword = ""
  693. End if
  694. strpage=request("page")
  695. if isnull(strpage) or strpage="" or not isnumeric(strpage) Then:strpage=1:end if
  696. if cbool(strpage)<1 then strpage=1
  697. newslist_sql = "Select ID,NewsID,PopID,ClassID,NewsTitle,SpecialEName,IsURL,isPicNews,URLAddress,Editor,Hits,NewsProperty,isLock,isRecyle,addtime,author,source from FS_NS_News where isRecyle=0 and isdraft=0 "& str_Editor & str_Rec & str_isTop & str_hot & str_pic & str_highlight & str_bignews & str_filt & str_Constr & str_ClassID_1 & str_check & SQL_SpecialEname & str_GetKeyword &" Order by PopID desc,addtime desc,ID desc"
  698. Set obj_newslist_rs = Server.CreateObject(G_FS_RS)
  699. obj_newslist_rs.Open newslist_sql,Conn,1,1
  700. %>
  701. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  702. <form name="myForm" method="post" action="">
  703. <tr class="xingmu">
  704. <td colspan="3" class="xingmu">
  705. <div align="center"> </div>
  706. <div align="center">
  707. <% =  Fs_news.allInfotitle %>
  708. 标题</div>
  709. </td>
  710. <td width="12%" class="xingmu">
  711. <div align="center">录入者/编辑</div>
  712. </td>
  713. <td width="9%" class="xingmu">
  714. <div align="center">点击</div>
  715. </td>
  716. <td width="5%" class="xingmu">
  717. <div align="center">审核</div>
  718. </td>
  719. <td width="22%" class="xingmu">
  720. <div align="center">操作</div>
  721. </td>
  722. </tr>
  723. <%
  724. if obj_newslist_rs.eof then
  725.    obj_newslist_rs.close
  726.    set obj_newslist_rs=nothing
  727.    Response.Write"<TR  class=""hback""><TD colspan=""7""  class=""hback"" height=""40"">没有"& Fs_news.allInfotitle &"。</TD></TR>"
  728. else
  729. str_showTF = 1
  730. obj_newslist_rs.PageSize=int_RPP
  731. cPageNo=NoSqlHack(Request.QueryString("Page"))
  732. If cPageNo="" Then cPageNo = 1
  733. If not isnumeric(cPageNo) Then cPageNo = 1
  734. cPageNo = Clng(cPageNo)
  735. If cPageNo<=0 Then cPageNo=1
  736. If cPageNo>obj_newslist_rs.PageCount Then cPageNo=obj_newslist_rs.PageCount
  737. obj_newslist_rs.AbsolutePage=cPageNo
  738. for i=1 to obj_newslist_rs.pagesize
  739. if obj_newslist_rs.eof Then exit For
  740. Str_GetPopID = obj_newslist_rs("PopID")
  741. if Str_GetPopID = 5 then
  742. Str_PopID = "<IMG Src=""images/newstype/5.gif"" border=""0"" alt=""总置顶"& Fs_news.allInfotitle &",点击查看简洁内容"">"
  743. str_Top = "<a href=News_Manage.asp?NewsID="& obj_newslist_rs("NewsID")&"&Action=signUnTop  onClick=""{if(confirm('确定解除总固顶吗?')){return true;}return false;}"">解固</a>"
  744. Elseif Str_GetPopID = 4 then
  745. Str_PopID = "<IMG Src=""images/newstype/4.gif"" border=""0"" alt=""栏目置顶"& Fs_news.allInfotitle &",点击查看简洁内容"">"
  746. str_Top = "<a href=News_Manage.asp?NewsID="& obj_newslist_rs("NewsID")&"&Action=signUnTop  onClick=""{if(confirm('确定解除栏目固顶吗?')){return true;}return false;}"">解固</a>"
  747. Elseif Str_GetPopID = 3 then
  748. Str_PopID = "<IMG Src=""images/newstype/3.gif"" border=""0"" alt=""总推荐"& Fs_news.allInfotitle &",点击查看简洁内容"">"
  749. str_Top = "<a href=News_Manage.asp?NewsID="& obj_newslist_rs("NewsID")&"&Action=signTop  onClick=""{if(confirm('确定固顶吗?')){return true;}return false;}"">固顶</a>"
  750. Elseif Str_GetPopID = 2 then
  751. Str_PopID = "<IMG Src=""images/newstype/2.gif"" border=""0"" alt=""栏目推荐"& Fs_news.allInfotitle &",点击查看简洁内容"">"
  752. str_Top = "<a href=News_Manage.asp?NewsID="& obj_newslist_rs("NewsID")&"&Action=signTop onClick=""{if(confirm('确定固顶吗?')){return true;}return false;}"">固顶</a>"
  753. Elseif Str_GetPopID = 0 then
  754. Str_PopID = "<IMG Src=""images/newstype/0.gif"" border=""0"" alt=""一般"& Fs_news.allInfotitle &",点击查看简洁内容"">"
  755. str_Top = "<a href=News_Manage.asp?NewsID="& obj_newslist_rs("NewsID")&"&Action=signTop onClick=""{if(confirm('确定固顶吗?')){return true;}return false;}"">固顶</a>"
  756. End if
  757. if obj_newslist_rs("isUrl") = 1 then
  758. str_UrlTitle = "<a href="""& obj_newslist_rs("URLAddress") &""" target=""_blank""><Img src=""../images/folder/url.gif"" border=""0"" alt=""标题新闻,点击转到标题地址""></img></a>"
  759. Else
  760. str_UrlTitle = ""
  761. if obj_newslist_rs("isPicNews") = 1 then
  762. tmp_pictf="<a href=""javascript:m_PicUrl('News_Pic_Modify.asp?NewsID="&obj_newslist_rs("NewsID")&"')""><Img src=""../images/folder/img.gif"" alt=""图片新闻,点击更改图片"" border=""0""></img></a>"
  763. else
  764. tmp_pictf="<Img src=""../images/folder/folder_1.gif"" alt=""文字新闻""></img>"
  765. end if
  766. end if
  767. %>
  768. <tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
  769. <td width="3%" class="hback">
  770. <div align="center">
  771. <input name="C_NewsID" type="checkbox" id="C_NewsID" value="<% = obj_newslist_rs("ID")%>">
  772. </div>
  773. </td>
  774. <td width="3%" height="18" class="hback" id=item$pval[CatID]) style="CURSOR: hand"  onmouseup="opencat(M_Newsid<% = obj_newslist_rs("ID")%>);"  language=javascript>
  775. <% = Str_PopID %>
  776. </td>
  777. <td width="46%" class="hback">
  778. <% = str_UrlTitle %>
  779. <% = tmp_pictf %>
  780. <a href="News_edit.asp?NewsID=<% = obj_newslist_rs("NewsID")%>&ClassID=<% = obj_newslist_rs("ClassID")%>" title="添加日期:<% = obj_newslist_rs("addtime")%>">
  781. <% = GotTopic(obj_newslist_rs("Newstitle"),50)%>
  782. </a></td>
  783. <td class="hback">
  784. <div align="center"> <a href="News_Manage.asp?ClassID=<% = Request.QueryString("ClassID")%>&Editor=<% = obj_newslist_rs("Editor")%>">
  785. <% = obj_newslist_rs("Editor")%>
  786. </a> </div>
  787. </td>
  788. <td class="hback">
  789. <div align="center"> <font style="font-size:10px">
  790. <% = obj_newslist_rs("hits")%>
  791. </font> </div>
  792. </td>
  793. <td class="hback">
  794. <div align="center">
  795. <%if obj_newslist_rs("isLock")=1 then response.Write"<a href=""News_Manage.asp?NewsID="& obj_newslist_rs("NewsId") &"&Action=singleCheck"" onClick=""{if(confirm('确定通过审核吗?')){return true;}return false;}""><span class=""tx""><b>×</b></span></a>":else response.Write"<a href=""News_Manage.asp?NewsID="& obj_newslist_rs("NewsId") &"&Action=singleUnCheck"" onClick=""{if(confirm('确定锁定吗?')){return true;}return false;}""><b>√</b></a>"%>
  796. </div>
  797. </td>
  798. <td class="hback">
  799. <div align="center"><a href="News_Review.asp?NewsID=<% = obj_newslist_rs("NewsID")%>&ClassID=<% = obj_newslist_rs("ClassID")%>" target="_blank">预览</a>|
  800. <% = str_Top%>
  801. |<a href="javascript:OpenWindow('lib/Frame.asp?FileName=NewsToJs.asp&Types=PicJs&PageTitle=添加到JS&NewsID=<% = obj_newslist_rs("ID")%>',350,135,window)">加入JS</a> |<a href="News_Manage.asp?NewsID=<% = obj_newslist_rs("NewsID")%>&Action=signDel"  onClick="{if(confirm('确定要删除吗?nn如果你在系统参数设置中设置删除<% =  Fs_news.allInfotitle %>到回收站n<% =  Fs_news.allInfotitle %>将删除到回收站中!n必要时候可还原')){return true;}return false;}">删除</a></div>
  802. </td>
  803. </tr>
  804. <tr id="M_Newsid<% = obj_newslist_rs("ID")%>" style="display:none">
  805. <td height="35" colspan="7" class="hback">
  806. <table width="100%" border="0" cellspacing="0" cellpadding="5">
  807. <tr class="hback_1">
  808. <td width="45%" height="20" class="hback_1"><font style="font-size:12px">
  809. <% =  Fs_news.allInfotitle %>
  810. 类型:
  811. <%
  812. if trim(obj_newslist_rs("NewsProperty")) <>"" then
  813. if  split(obj_newslist_rs("NewsProperty"),",")(0) then Response.Write("荐|")
  814. if  split(obj_newslist_rs("NewsProperty"),",")(1) then Response.Write("滚|")
  815. if  split(obj_newslist_rs("NewsProperty"),",")(2) then Response.Write("评|")
  816. if  split(obj_newslist_rs("NewsProperty"),",")(3) then Response.Write("稿|")
  817. if  split(obj_newslist_rs("NewsProperty"),",")(4) then Response.Write("远图|")
  818. if  split(obj_newslist_rs("NewsProperty"),",")(5) then Response.Write("头|")
  819. if  split(obj_newslist_rs("NewsProperty"),",")(6) then Response.Write("热|")
  820. if  split(obj_newslist_rs("NewsProperty"),",")(7) then Response.Write("精|")
  821. if  split(obj_newslist_rs("NewsProperty"),",")(8) then Response.Write("规|")
  822. if  split(obj_newslist_rs("NewsProperty"),",")(9) then Response.Write("公|")
  823. if  split(obj_newslist_rs("NewsProperty"),",")(10) then Response.Write("幻|")
  824. else
  825. response.Write("--")
  826. End if
  827. if trim(obj_newslist_rs("SpecialEName"))<>"" then
  828. str_Get_Special = ""
  829. for sp_i = 0 to Ubound(split(obj_newslist_rs("SpecialEName"),","))
  830. dim rs_speical
  831. set rs_speical = Conn.execute("select SpecialCName,SpecialEName From FS_NS_Special where SpecialEName='"& split(obj_newslist_rs("SpecialEName"),",")(sp_i)&"'")
  832. if not rs_speical.eof then
  833. str_Get_Special = str_Get_Special & "<a href=""News_Manage.asp?SpecialEName="&rs_speical("SpecialEName")&"&SpecialCName="&server.URLEncode(rs_speical("SpecialCName"))&""">" &rs_speical("SpecialCName") &"</a>┆"
  834. rs_speical.close:set rs_speical=nothing
  835. else
  836. str_Get_Special = "无专题"
  837. rs_speical.close:set rs_speical=nothing
  838. end if
  839. next
  840. str_Get_Special = str_Get_Special
  841. else
  842. str_Get_Special = "无专题"
  843. end if
  844. %>
  845.  </font></td>
  846. <td width="22%" class="hback_1"><font style="font-size:12px">日期:
  847. <% = obj_newslist_rs("addtime")%>
  848. </font></td>
  849. <td width="14%" class="hback_1"><font style="font-size:12px">作者: <a href="../../<%=G_USER_DIR%>/showuser.asp?UserName=<% = obj_newslist_rs("author")%>" target="_blank">
  850. <% = obj_newslist_rs("author")%>
  851. </a>
  852. <%
  853. Dim username
  854. username=Fs_News.GetUserNumber(obj_newslist_rs("author"))
  855. if username<>"" then
  856. %>
  857. (<%=Fs_News.newsStat(username,0)%>/<font color="#FF0000"><%=Fs_News.newsStat(username,1)%></font>)
  858. <%End if%>
  859. </font></td>
  860. <td width="19%" class="hback_1"><font style="font-size:12px">来源:
  861. <% = obj_newslist_rs("source")%>
  862. </font></td>
  863. </tr>
  864. <tr class="hback_1">
  865.   <td height="20" class="hback_1"><font style="font-size:12px">所属专题:
  866.       <% = str_Get_Special %>
  867.   </font></td>
  868.   <td class="hback_1">&nbsp;</td>
  869.   <td class="hback_1">&nbsp;</td>
  870.   <td class="hback_1">&nbsp;</td>
  871.   </tr>
  872. </table>
  873. </td>
  874. </tr>
  875. <%
  876.   obj_newslist_rs.MoveNext
  877.   Next
  878. %>
  879. <tr>
  880. <td height="18" colspan="7" class="hback">
  881. <div align="right">
  882. <input type="checkbox" name="chkall" value="checkbox" onClick="CheckAll(this.form);">
  883. 选中/取消所有
  884. <input name="Action" type="hidden" id="Action">
  885. <input name="ClassID" type="hidden" value="<%= Request.QueryString("ClassID") %>">
  886. <input type="button" name="Submit" value="删除"  onClick="document.myForm.Action.value='Del';{if(confirm('确定清除您所选择的记录吗?')){this.document.myForm.submit();return true;}return false;}">
  887. <input type="submit" name="Submit2" value="设置属性" onClick="document.myForm.Action.value='SetUp'">
  888. <input type="submit" name="Submit3" value="移动" onClick="document.myForm.Action.value='move'">
  889. <input type="submit" name="Submit3" value="复制" onClick="document.myForm.Action.value='copy'">
  890. <input type="button" name="Submit4" value="锁定" onClick="document.myForm.Action.value='lock';{if(confirm('确定所选择的记录锁定吗?')){this.document.myForm.submit();return true;}return false;}">
  891. <input type="button" name="Submit42" value="通过审核" onClick="document.myForm.Action.value='unlock';{if(confirm('确定所选择的记录通过审核吗?')){this.document.myForm.submit();return true;}return false;}">
  892. <input type="submit" name="Submit5" value="批量替换" onClick="document.myForm.Action.value='replace'">
  893. <input type="submit" name="Submit52" value="生成HTML" onClick="document.myForm.Action.value='makehtml'">
  894. <input type="Button" name="Submit5222" value="归档" onClick="document.myForm.Action.value='Toold';{if(confirm('确定所选择的记录通过审核吗?')){this.document.myForm.submit();return true;}return false;}" <%if Request.QueryString("ClassId") = ""  then response.Write "disabled"%>>
  895. <input type="Button" name="Submit523" value="加入JS" onClick="AddToJS()">
  896. </div>
  897. </td>
  898. </tr>
  899. </form>
  900. <tr>
  901. <td height="18" colspan="7" class="hback">
  902. <table width="98%" border="0" cellspacing="0" cellpadding="0">
  903. <tr>
  904. <td width="79%" align="right">
  905. <%
  906. response.Write "<p>"&  fPageCount(obj_newslist_rs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)
  907. End if
  908. %>
  909. </td>
  910. </tr>
  911. </table>
  912. </td>
  913. </tr>
  914. </table>
  915. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  916. <tr>
  917. <td height="18" colspan="7" class="hback"> <span class="tx">说明:点<img src="images/newstype/0.gif" width="18" height="12">查看<%=Fs_news.allInfotitle %>的属性,点 <img src="../Images/Folder/img.gif" width="20" height="16">图片可以对图片<%=Fs_news.allInfotitle %>进行快捷修改 !</span></td>
  918. </tr>
  919. <tr>
  920. <form name="form2" method="post" action="News_Manage.asp">
  921. <td height="18" colspan="7" class="hback">
  922. <% =  Fs_news.allInfotitle %>
  923. 搜索:关键字
  924. <input name="keyword" type="text" id="keyword" value="<% = Request("keyword")%>" size="20">
  925. <select name="ktype" id="ktype">
  926. <option value="title" <%if Request("ktype")="title" then response.Write("selected")%>>标题</option>
  927. <option value="content" <%if Request("ktype")="content" then response.Write("selected")%>>内容</option>
  928. <option value="author" <%if Request("ktype")="author" then response.Write("selected")%>>作者</option>
  929. <option value="editor" <%if Request("ktype")="editor" then response.Write("selected")%>>录入者/编辑</option>
  930. </select>
  931. <input name="ClassID" type="hidden" id="ClassID" value="<% = str_ClassID %>">
  932. <input type="submit" name="Submit" value=" 搜 索 ">
  933. </td>
  934. </form>
  935. </tr>
  936. </table>
  937. <%
  938. End Sub
  939. Sub GetMove()
  940. Dim str_LockID_move
  941. str_LockID_move = request.Form("C_NewsID")
  942. %>
  943. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  944. <form name="form_m" method="post" action="">
  945. <tr class="xingmu">
  946. <td colspan="3" class="xingmu">请选择需要转移到的栏目 </td>
  947. </tr>
  948. <tr>
  949. <td width="100%" colspan="3" class="hback">指定 I D
  950. <input name="Move_type" type="radio" value="id" <%if trim(str_LockID_move)<>"" then response.Write("checked")%>>
  951. <input name="C_NewsID" type="text" id="C_NewsID" value="<% = Replace(str_LockID_move," ","") %>" readonly style="width:80%">
  952. </td>
  953. </tr>
  954. <tr>
  955. <td class="hback" width="45%">指定栏目
  956. <input name="Move_type" type="radio" value="ClassID"  <%if trim(str_LockID_move)="" then response.Write("checked")%>>
  957. </td>
  958. <td width="10%" rowspan="3" align="center" class="hback">转移到>>></td>
  959. <td width="45%" class="hback">选择要转移到的栏目<Br />注意:目标栏目不能为外部栏目</td>
  960. </tr>
  961. <tr>
  962. <td rowspan="2" class="hback">
  963. <select name="s_Classid" id="select" multiple style="width:100%" size="18">
  964. <%
  965.    Dim rs_movelist_rs,str_tmp_move
  966. Set rs_movelist_rs = server.CreateObject(G_FS_RS)
  967. rs_movelist_rs.Open "Select ID,ClassID,ClassName,ParentID,ReycleTF from FS_NS_NewsClass where ParentID='0'  and ReycleTF=0",Conn,1,3
  968. str_tmp_move = ""
  969. do while not rs_movelist_rs.eof
  970. str_tmp_move = str_tmp_move & "<option value="""& rs_movelist_rs ("ClassID") &""">"& rs_movelist_rs ("ClassName") &"</option>"
  971.    str_tmp_move = str_tmp_move & Fs_news.News_ChildNewsList(rs_movelist_rs("ClassID"),"")
  972.   rs_movelist_rs.movenext
  973.   Loop
  974.    Response.Write str_tmp_move
  975.   rs_movelist_rs.close:set rs_movelist_rs=nothing
  976.           %>
  977. </select>
  978. <input type="button" name="Submit" value="选定所有栏目" onClick="SelectAllClass()">
  979. <input type="button" name="Submit" value="取消选定栏目" onClick="UnSelectAllClass()">
  980. </td>
  981. <td class="hback">
  982. <select name="t_Classid" size="18" id="select"  style="width:100%">
  983. <% = str_tmp_move %>
  984. </select>
  985. </td>
  986. </tr>
  987. <tr>
  988. <td class="hback">&nbsp;</td>
  989. </tr>
  990. <tr>
  991. <td colspan="3" class="hback">
  992. <div align="center">
  993. <input name="Action" type="hidden" id="Action" value="Move_News">
  994. <input type="submit" name="Submit6" value="确定开始转移">
  995. </div>
  996. </td>
  997. </tr>
  998. </form>
  999. </table>
  1000. <%
  1001. End Sub
  1002. Sub GetCopy()
  1003. Dim str_LockID_move
  1004. str_LockID_move = request.Form("C_NewsID")
  1005. %>
  1006. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  1007. <form name="form_m" method="post" action="">
  1008. <tr class="xingmu">
  1009. <td colspan="3" class="xingmu">请选择需要复制到的栏目 </td>
  1010. </tr>
  1011. <tr>
  1012. <td width="44%" colspan="3" class="hback">指定 I D
  1013. <input name="Move_type" type="radio" value="id" <%if trim(str_LockID_move)<>"" then response.Write("checked")%>>
  1014. <input name="C_NewsID" type="text" id="C_NewsID" value="<% = Replace(str_LockID_move," ","") %>" readonly style="width:75%">
  1015. </td>
  1016. </tr>
  1017. <tr>
  1018. <td width="45%" class="hback">指定栏目
  1019. <input name="Move_type" type="radio" value="ClassID"  <%if trim(str_LockID_move)="" then response.Write("checked")%>>
  1020. </td>
  1021. <td width="10%" rowspan="3" align="center" class="hback">复制到>>></td>
  1022. <td width="45%" class="hback">选择要复制到的栏目<br />注意:目标栏目不能为外部栏目</td>
  1023. </tr>
  1024. <tr>
  1025. <td rowspan="2" class="hback">
  1026. <select name="s_Classid" id="select" multiple style="width:100%" size="18">
  1027. <%
  1028.    Dim rs_movelist_rs,str_tmp_move
  1029. Set rs_movelist_rs = server.CreateObject(G_FS_RS)
  1030. rs_movelist_rs.Open "Select ID,ClassID,ClassName,ParentID,ReycleTF from FS_NS_NewsClass where ParentID='0'  and ReycleTF=0",Conn,1,3
  1031. str_tmp_move = ""
  1032. do while not rs_movelist_rs.eof
  1033. str_tmp_move = str_tmp_move & "<option value="""& rs_movelist_rs ("ClassID") &""">"& rs_movelist_rs ("ClassName") &"</option>"
  1034.    str_tmp_move = str_tmp_move & Fs_news.News_ChildNewsList(rs_movelist_rs("ClassID"),"")
  1035.   rs_movelist_rs.movenext
  1036.   Loop
  1037.    Response.Write str_tmp_move
  1038.   rs_movelist_rs.close:set rs_movelist_rs=nothing
  1039.           %>
  1040. </select>
  1041. <input type="button" name="Submit" value="选定所有栏目" onClick="SelectAllClass()">
  1042. <input type="button" name="Submit" value="取消选定栏目" onClick="UnSelectAllClass()">
  1043. </td>
  1044. <td class="hback">
  1045. <select name="t_Classid" size="18" id="select"  style="width:100%">
  1046. <% = str_tmp_move %>
  1047. </select>
  1048. </td>
  1049. </tr>
  1050. <tr>
  1051. <td class="hback">&nbsp;</td>
  1052. </tr>
  1053. <tr>
  1054. <td colspan="3" class="hback">
  1055. <div align="center">
  1056. <input name="Action" type="hidden" id="Action" value="Copy_News">
  1057. <input type="submit" name="Submit6" value="确定开始复制">
  1058. </div>
  1059. </td>
  1060. </tr>
  1061. </form>
  1062. </table>
  1063. <%
  1064. End Sub
  1065. Sub GetSetUp()
  1066. Dim str_LockID_set
  1067. str_LockID_set = request.Form("C_NewsID")
  1068. %>
  1069. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  1070. <form name="form_m" method="post" action="">
  1071. <tr>
  1072. <td width="36%" rowspan="8" align="center" class="hback">
  1073. <div align="left">指定ID
  1074. <input name="set_type" type="radio" value="newsid" <%if trim(str_LockID_set)<>"" then response.Write("checked")%>>
  1075. <br>
  1076. 指定栏目
  1077. <input type="radio" name="set_type" value="classid" <%if trim(str_LockID_set)="" then response.Write("checked")%>>
  1078. <select name="s_Classid" id="select" multiple style="width:100%" size="18">
  1079. <%
  1080.    Dim rs_movelist_rs,str_tmp_move
  1081. Set rs_movelist_rs = server.CreateObject(G_FS_RS)
  1082. rs_movelist_rs.Open "Select ID,ClassID,ClassName,ParentID,ReycleTF from FS_NS_NewsClass where ParentID='0'  and ReycleTF=0",Conn,1,3
  1083. str_tmp_move = ""
  1084. do while not rs_movelist_rs.eof
  1085. str_tmp_move = str_tmp_move & "<option value="""& rs_movelist_rs ("ClassID") &""">"& rs_movelist_rs ("ClassName") &"</option>"
  1086.    str_tmp_move = str_tmp_move & Fs_news.News_ChildNewsList(rs_movelist_rs("ClassID"),"")
  1087.   rs_movelist_rs.movenext
  1088.   Loop
  1089.    Response.Write str_tmp_move
  1090.   rs_movelist_rs.close:set rs_movelist_rs=nothing
  1091.           %>
  1092. </select>
  1093. <input type="button" name="Submit" value="选定所有栏目" onClick="SelectAllClass()">
  1094. <input type="button" name="Submit" value="取消选定栏目" onClick="UnSelectAllClass()">
  1095. </div>
  1096. </td>
  1097. <td width="11%" rowspan="8" align="center" class="hback">
  1098. <input name="Set_NewsID" type="hidden" id="Set_NewsID" style="width:95%" value="<% = Replace(str_LockID_set," ","") %>" readonly="readonly">
  1099. 批量设置</td>
  1100. <td width="53%" height="46" class="hback"> 属 性:
  1101. <input name="NewsProperty_Rec" type="checkbox" id="NewsProperty" value="1">
  1102. 推荐
  1103. <input name="NewsProperty_mar" type="checkbox" id="NewsProperty" value="1" checked>
  1104. 滚动
  1105. <input name="NewsProperty_rev" type="checkbox" id="NewsProperty" value="1" checked>
  1106. 允许评论
  1107. <input name="NewsProperty_constr" type="checkbox" id="NewsProperty" value="1">
  1108. 投稿
  1109. <input name="NewsProperty_tt" type="checkbox" id="NewsProperty" value="1">
  1110. 头条 <br>
  1111. <input name="NewsProperty_hots" type="checkbox" id="NewsProperty" value="1">
  1112. 热点
  1113. <input name="NewsProperty_jc" type="checkbox" id="NewsProperty" value="1">
  1114. 精彩
  1115. <input name="NewsProperty_unr" type="checkbox" id="NewsProperty" value="1">
  1116. 不规则
  1117. <input name="NewsProperty_ann" type="checkbox" id="NewsProperty" value="1">
  1118. 公告 <span id="str_filt" style="display1:none" title="请注意所选新闻全是图片新闻!">
  1119. <input name="NewsProperty_filt" type="checkbox" id="NewsProperty" value="1">
  1120. 幻灯</span> </td>
  1121. </tr>
  1122. <tr>
  1123. <td class="hback">模 板:
  1124. <input type="text" name="Templet" value="<%=Replace("/"& G_TEMPLETS_DIR &"/NewsClass/news.htm","//","/")%>" style="width:60%">
  1125. <input name="Submit53" type="button" id="selNewsTemplet" value="选择模板"  onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectTemplet.asp?CurrPath=<%=Replace(G_VIRTUAL_ROOT_DIR&"/"& G_TEMPLETS_DIR,"//","/") %>',400,300,window,document.form_m.Templet);document.form_m.Templet.focus();">
  1126. </td>
  1127. </tr>
  1128. <tr>
  1129. <td class="hback">权 重:
  1130. <select name="PopID" id="PopID">
  1131. <option value="5">总置顶</option>
  1132. <option value="4">栏目置顶</option>
  1133. <option value="0" selected>一般</option>
  1134. </select>
  1135. </td>
  1136. </tr>
  1137. <tr>
  1138. <td class="hback"> 评 论:
  1139. <input name="isShowReview" type="checkbox" id="isShowReview" value="1">
  1140. 标题后显示&quot;评论&quot;字样</td>
  1141. </tr>
  1142. <tr>
  1143. <td class="hback"> 关键字:
  1144. <input name="KeywordText" type="text" id="KeywordText" size="15" maxlength="255">
  1145. <input name="KeyWords" type="hidden" id="KeyWords">
  1146. <select name="selectKeywords" id="selectKeywords" style="width:120px" onChange=Dokesite_s(this.options[this.selectedIndex].value)>
  1147. <option value="" selected>选择关键字</option>
  1148. <option value="Clean" style="color:red">清空</option>
  1149. <%=Fs_news.GetKeywordslist("",1)%>
  1150. </select>
  1151. </td>
  1152. </tr>
  1153. <tr>
  1154. <td class="hback">点击数:
  1155. <input name="hits" type="text" id="hits" value="0" size="30">
  1156. </td>
  1157. </tr>
  1158. <tr>
  1159. <td class="hback">日 期:
  1160. <input name="addtime" type="text" id="addtime" value="<% = now()%>" size="30">
  1161. </td>
  1162. </tr>
  1163. <tr>
  1164. <td class="hback"> 扩展名:
  1165. <select name="FileExtName" id="FileExtName">
  1166. <option value="html" <%if fs_news.fileExtName = 1 then response.Write("selected")%>>.html</option>
  1167. <option value="htm" <%if fs_news.fileExtName = 0 then response.Write("selected")%>>.htm</option>
  1168. <option value="shtml" <%if fs_news.fileExtName = 2 then response.Write("selected")%>>.shtml</option>
  1169. <option value="shtm" <%if fs_news.fileExtName = 3 then response.Write("selected")%>>.shtm</option>
  1170. <option value="asp" <%if fs_news.fileExtName = 4 then response.Write("selected")%>>.asp</option>
  1171. </select>
  1172. </td>
  1173. </tr>
  1174. <tr>
  1175. <td colspan="3" class="hback">说明:如果为标题
  1176. <% =  Fs_news.allInfotitle %>
  1177. 此设置不起作用</td>
  1178. </tr>
  1179. <tr>
  1180. <td colspan="3" class="hback">
  1181. <div align="center">
  1182. <input name="Action" type="hidden" id="Action" value="setup_News">
  1183. <input type="submit" name="Submit6" value="确定开始设置">
  1184. <input type="reset" name="Submit7" value="重新设定">
  1185. </div>
  1186. </td>
  1187. </tr>
  1188. </form>
  1189. </table>
  1190. <%
  1191. End Sub
  1192. Sub Getreplace()
  1193. Dim str_LockID_rep
  1194. str_LockID_rep = request.Form("C_NewsID")
  1195. %>
  1196. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  1197. <form name="form_m" method="post" action="">
  1198. <tr>
  1199. <td width="36%" rowspan="10" align="center" valign="top" class="hback">
  1200. <div align="left">指定ID
  1201. <input name="rep_type" type="radio" value="newsid" <%if trim(str_LockID_rep)<>"" then response.Write("checked")%>>
  1202. <br>
  1203. 指定栏目
  1204. <input type="radio" name="rep_type" value="classid" <%if trim(str_LockID_rep)="" then response.Write("checked")%>>
  1205. <select name="s_Classid" id="select" multiple style="width:100%" size="20">
  1206. <%
  1207.    Dim rs_movelist_rs,str_tmp_move
  1208. Set rs_movelist_rs = server.CreateObject(G_FS_RS)
  1209. rs_movelist_rs.Open "Select ID,ClassID,ClassName,ParentID,ReycleTF from FS_NS_NewsClass where ParentID='0' and ReycleTF=0",Conn,1,3
  1210. str_tmp_move = ""
  1211. do while not rs_movelist_rs.eof
  1212. str_tmp_move = str_tmp_move & "<option value="""& rs_movelist_rs ("ClassID") &"""  multiple>"& rs_movelist_rs ("ClassName") &"</option>"
  1213.    str_tmp_move = str_tmp_move & Fs_news.News_ChildNewsList(rs_movelist_rs("ClassID"),"")
  1214.   rs_movelist_rs.movenext
  1215.   Loop
  1216.    Response.Write str_tmp_move
  1217.   rs_movelist_rs.close:set rs_movelist_rs=nothing
  1218.           %>
  1219. </select>
  1220. <input type="button" name="Submit" value="选定所有栏目" onClick="SelectAllClass()">
  1221. <input type="button" name="Submit" value="取消选定栏目" onClick="UnSelectAllClass()">
  1222. </div>
  1223. </td>
  1224. <td width="11%" rowspan="10" align="center" class="hback">
  1225. <input name="rep_NewsID" type="hidden" id="rep_NewsID" style="width:95%" value="<% = Replace(str_LockID_rep," ","") %>" readonly="readonly">
  1226. 批量替换</td>
  1227. <td width="53%" height="20" class="hback">
  1228. <input name="rep_select_type" type="checkbox" id="rep_select_type" value="title">
  1229. 标题
  1230. <input name="rep_select_type" type="checkbox" id="rep_select_type" value="Content" checked>
  1231. 内容 </td>
  1232. </tr>
  1233. <tr>
  1234. <td class="hback">
  1235. <input name="AdvanceTF" type="radio" id="radio" onClick="SwitchNewsType('snews');" value="snews" checked>
  1236. 一般替换
  1237. <input name="AdvanceTF" type="radio" id="AdvanceTF" value="adnews" onClick="SwitchNewsType('adnews');">
  1238. 高级替换</td>
  1239. </tr>
  1240. <tr  id="rep_1" style="display:">
  1241. <td class="hback">要替换的字符<br>
  1242. <textarea name="s_Content" rows="8" id="s_Content" style="width:95%"></textarea>
  1243. </td>
  1244. </tr>
  1245. <tr>
  1246. <td class="hback">替换后的字符</td>
  1247. </tr>
  1248. <tr>
  1249. <td class="hback">
  1250. <textarea name="t_Content" rows="8" id="t_Content" style="width:95%"></textarea>
  1251. </td>
  1252. </tr>
  1253. <tr id="rep_2" style="display:none">
  1254. <td class="hback">开始字符串<br>
  1255. <textarea name="start_char" rows="8" id="start_char" style="width:95%"></textarea>
  1256. </td>
  1257. </tr>
  1258. <tr id="rep_3" style="display:none">
  1259. <td class="hback">结束字符串<br>
  1260. <textarea name="end_char" rows="8" id="end_char" style="width:95%"></textarea>
  1261. </td>
  1262. </tr>
  1263. <tr>
  1264. <td colspan="3" class="hback">
  1265. <div align="center">
  1266. <input name="Action" type="hidden" id="Action" value="Replace_News">
  1267. <input type="submit" name="Submit6" value="确定开始替换">
  1268. <input type="reset" name="Submit7" value="重新设定">
  1269. </div>
  1270. </td>
  1271. </tr>
  1272. </form>
  1273. </table>
  1274. <script language="JavaScript" type="text/JavaScript">
  1275. function SwitchNewsType(AdvanceTF)
  1276. {
  1277. switch (AdvanceTF)
  1278. {
  1279. case "snews":
  1280. document.getElementById('rep_1').style.display='';
  1281. document.getElementById('rep_2').style.display='none';
  1282. document.getElementById('rep_3').style.display='none';
  1283. break;
  1284. case "adnews":
  1285. document.getElementById('rep_1').style.display='none';
  1286. document.getElementById('rep_2').style.display='';
  1287. document.getElementById('rep_3').style.display='';
  1288. }
  1289. }
  1290. </script>
  1291. <%End Sub%>
  1292. </body>
  1293. </html>
  1294. <%
  1295. set obj_newslist_rs = nothing
  1296. obj_news_rs.close
  1297. set obj_news_rs =nothing
  1298. set Fs_news = nothing
  1299. %>
  1300. <script language="javascript" type="text/javascript" src="../../FS_Inc/wz_tooltip.js"></script>
  1301. <script language="JavaScript" type="text/JavaScript" src="js/Public.js"></script>
  1302. <script language="JavaScript" type="text/JavaScript">
  1303. function opencat(cat)
  1304. {
  1305.   if(cat.style.display=="none"){
  1306.      cat.style.display="";
  1307.   } else {
  1308.      cat.style.display="none";
  1309.   }
  1310. }
  1311. function SelectAllClass(){
  1312.   for(var i=0;i<document.form_m.s_Classid.length;i++){
  1313.     document.form_m.s_Classid.options[i].selected=true;}
  1314. }
  1315. function UnSelectAllClass(){
  1316.   for(var i=0;i<document.form_m.s_Classid.length;i++){
  1317.     document.form_m.s_Classid.options[i].selected=false;}
  1318. }
  1319. function CheckAll(form)
  1320.   {
  1321.   for (var i=0;i<form.elements.length;i++)
  1322.     {
  1323.     var e = myForm.elements[i];
  1324.     if (e.name != 'chkall')
  1325.        e.checked = myForm.chkall.checked;
  1326.     }
  1327. }
  1328. function m_PicUrl(gotoURL) {
  1329.    var open_url = gotoURL;
  1330.    window.open(open_url,'','status=0,directories=0,resizable=0,toolbar=0,location=0,scrollbars=1,width=550,height=480');
  1331. }
  1332. function AddToJS()
  1333. {
  1334. var SelectedNews='';
  1335. var ListObjArray=document.myForm.C_NewsID
  1336. for (i=0;i<ListObjArray.length;i++)
  1337. {
  1338. if (ListObjArray[i].checked==true)
  1339. {
  1340. if (ListObjArray[i].value!=null)
  1341. {
  1342. if (!isNaN(ListObjArray[i].value))
  1343. {
  1344. if (SelectedNews=='') SelectedNews=ListObjArray[i].value;
  1345. else  SelectedNews=SelectedNews+'***'+ListObjArray[i].value;
  1346. }
  1347. }
  1348. }
  1349. }
  1350. if (SelectedNews!='') OpenWindow('lib/Frame.asp?FileName=NewsToJs.asp&Types=PicJs&PageTitle=添加到JS&NewsID='+SelectedNews,350,135,window);
  1351. else alert('请选择新闻');
  1352. }
  1353. </script>
  1354. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->
  1355. <%
  1356. Sub Replace_News()
  1357. str_s_classIDarray =Replace(Request.Form("s_Classid")," ","")
  1358. str_rep_type = Trim(Replace(Request.Form("rep_type")," ",""))
  1359. C_NewsIDarrey = Trim(Replace(Request.Form("rep_NewsID")," ",""))
  1360. str_rep_select_type = Trim(Replace(Request.Form("rep_select_type")," ",""))
  1361. str_AdvanceTF = Trim(Replace(Request.Form("AdvanceTF")," ",""))
  1362. str_s_Content = Trim(Replace(Request.Form("s_Content")," ",""))
  1363. str_t_Content = Trim(Replace(Request.Form("t_Content")," ",""))
  1364. str_start_char = Trim(Replace(Request.Form("start_char")," ",""))
  1365. str_end_char = Trim(Replace(Request.Form("end_char")," ",""))
  1366. If str_rep_type = "" Then
  1367. strShowErr = "<li>请选择按 ID/栏目 替换</li>"
  1368. End If
  1369. If str_rep_select_type = "" Then
  1370. strShowErr = strShowErr & "<li>请选择替换 标题/内容</li>"
  1371. End If
  1372. If str_AdvanceTF = "snews" Then
  1373. If str_s_Content="" Then
  1374. strShowErr = strShowErr & "<li>请填写要替换的字符</li>"
  1375. End If
  1376. ElseIf str_AdvanceTF = "adnews" Then
  1377. If str_start_char="" Then
  1378. strShowErr = strShowErr & "<li>请填写要替换的开始字符串</li>"
  1379. End If
  1380. If str_end_char="" Then
  1381. strShowErr = strShowErr & "<li>请填写要替换的结束字符串</li>"
  1382. End If
  1383. Else
  1384. If str_t_Content="" Then
  1385. strShowErr = strShowErr & "<li>请选择 一般/高级 替换</li>"
  1386. End If
  1387. End If
  1388. If str_t_Content="" Then
  1389. strShowErr = strShowErr & "<li>请填写替换后的字符</li>"
  1390. End If
  1391. If strShowErr<>"" Then
  1392. set conn=nothing:set user_conn=nothing
  1393. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  1394. Response.End
  1395. End If
  1396. If str_rep_type = "newsid" then
  1397. If Trim(C_NewsIDarrey)="" Then
  1398. strShowErr = "<li>请选择要替换的"& Fs_news.allInfotitle &"!</li>"
  1399. set conn=nothing:set user_conn=nothing
  1400. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  1401. Response.end
  1402. End if
  1403. 'tmp_splitarrey_id = split(C_NewsIDarrey,",")
  1404. 'for tmp_i = LBound(tmp_splitarrey_id) to UBound(tmp_splitarrey_id)
  1405. Set Tmp_rs=server.CreateObject(G_FS_RS)
  1406. Tmp_rs.open "select NewsTitle,Content From [FS_NS_News] where isRecyle=0 and ID IN ("&C_NewsIDarrey&") order by id desc",Conn,1,3
  1407. While Not Tmp_rs.eof
  1408. If str_AdvanceTF = "snews" Then
  1409. If InStr(str_rep_select_type,"title")>0 Then Tmp_rs("NewsTitle")=Replace(Tmp_rs("NewsTitle"),str_s_Content,str_t_Content)
  1410. If InStr(str_rep_select_type,"Content")>0 Then Tmp_rs("Content")=Replace(Tmp_rs("Content"),str_s_Content,str_t_Content)
  1411. Else
  1412. Set f_PLACE_OBJ = New RegExp
  1413. f_PLACE_OBJ.Pattern = str_start_char&"(.*)"&str_end_char
  1414. f_PLACE_OBJ.IgnoreCase = True
  1415. f_PLACE_OBJ.Global = True
  1416. f_PLACE_OBJ.Multiline = True
  1417. If InStr(str_rep_select_type,"title")>0 Then Tmp_rs("NewsTitle")=f_PLACE_OBJ.Replace(Tmp_rs("NewsTitle"),str_t_Content)
  1418. If InStr(str_rep_select_type,"Content")>0 Then Tmp_rs("Content")=f_PLACE_OBJ.Replace(Tmp_rs("Content"),str_t_Content)
  1419. Set f_PLACE_OBJ = Nothing
  1420. End If
  1421. Tmp_rs.Update
  1422. Tmp_rs.MoveNext
  1423. Wend
  1424. Tmp_rs.close:set Tmp_rs=nothing
  1425. 'Next
  1426. Elseif str_rep_type = "classid" then
  1427. if Trim(str_s_classIDarray)="" then
  1428. strShowErr = "<li>请选择要替换的"& Fs_news.allInfotitle &"栏目!</li>"
  1429. set conn=nothing:set user_conn=nothing
  1430. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  1431. Response.end
  1432. End if
  1433. tmp_splitarrey_Classid = split(str_s_classIDarray,",")
  1434. for tmp_i = LBound(tmp_splitarrey_Classid) to UBound(tmp_splitarrey_Classid)
  1435. Set Tmp_rs=server.CreateObject(G_FS_RS)
  1436. Tmp_rs.open "select ID,NewsTitle,Content From [FS_NS_News] where isRecyle=0 and ClassID='"&tmp_splitarrey_Classid(tmp_i)&"' order by id desc",Conn,1,3
  1437. While Not Tmp_rs.eof
  1438. If str_AdvanceTF = "snews" Then
  1439. If InStr(str_rep_select_type,"title")>0 Then Tmp_rs("NewsTitle")=Replace(Tmp_rs("NewsTitle"),str_s_Content,str_t_Content)
  1440. If InStr(str_rep_select_type,"Content")>0 Then Tmp_rs("Content")=Replace(""&Tmp_rs("Content"),str_s_Content,str_t_Content)
  1441. Else
  1442. Set f_PLACE_OBJ = New RegExp
  1443. f_PLACE_OBJ.Pattern = str_start_char&"(.*)"&str_end_char
  1444. f_PLACE_OBJ.IgnoreCase = True
  1445. f_PLACE_OBJ.Global = True
  1446. f_PLACE_OBJ.Multiline = True
  1447. If InStr(str_rep_select_type,"title")>0 Then Tmp_rs("NewsTitle")=f_PLACE_OBJ.Replace(Tmp_rs("NewsTitle"),str_t_Content)
  1448. If InStr(str_rep_select_type,"Content")>0 Then Tmp_rs("Content")=f_PLACE_OBJ.Replace(""&Tmp_rs("Content"),str_t_Content)
  1449. Set f_PLACE_OBJ = Nothing
  1450. End If
  1451. Tmp_rs.Update
  1452. Tmp_rs.MoveNext
  1453. Wend
  1454. Next
  1455. Tmp_rs.close:set Tmp_rs=nothing
  1456. End if
  1457. strShowErr = "<li>替换成功</li><li>需要重新生成才生效!</li>"
  1458. set conn=nothing:set user_conn=nothing
  1459. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  1460. Response.end
  1461. End Sub
  1462. Function NUllToStr(num)
  1463. If IsNull(num) Then
  1464. NUllToStr=Null
  1465. Else
  1466. NUllToStr=num
  1467. End if
  1468. End Function
  1469. %>