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

数据库编程

开发平台:

ASP/ASPX

  1. if trim(f_Id)="" then
  2. ReadNews = ""
  3. else
  4. ReadSql="select  ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
  5. ReadSql = ReadSql & ",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
  6. ReadSql = ReadSql & "From FS_NS_News where isLock=0 and NewsId='"& f_Id &"' and IsURL=0 and  isRecyle=0 and isdraft=0"
  7. Set  RsReadObj = Server.CreateObject(G_FS_RS)
  8. RsReadObj.open ReadSql,Conn,1,1
  9. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  10. if not RsReadObj.eof then
  11. ReadNews = ReadNews & getlist_news(RsReadObj,styleId,0,0,0,0,datestyle,0,MF_Domain,"readnews")
  12. else
  13. ReadNews =""
  14. end If
  15. RsReadObj.close:set RsReadObj = nothing
  16. end if
  17. ReadNews=ReadNews
  18. End Function
  19. '站点地图____________________________________________________________________
  20. Public Function SiteMap(f_Lablechar,f_type,f_Id)
  21. dim classId,cssstyle,SiteMapstr,RsClassObj,i,br_str
  22. classId = split(split(f_Lablechar,"┆")(1),"$")(1)
  23. cssstyle = split(split(f_Lablechar,"┆")(2),"$")(1)
  24. SiteMapstr = ""
  25. set RsClassObj = Conn.execute("select ClassId,ClassName,ClassEName,IsURL,ParentID From FS_NS_NewsClass where ReycleTF=0 and ParentID='0' order by OrderID desc,id desc")
  26. if Not RsClassObj.eof then
  27. i=0
  28. do while Not RsClassObj.eof
  29. if RsClassObj("ParentID")<>"0" then
  30. if i=0 then
  31. br_str=""
  32. else
  33. br_str="<br />"
  34. end if
  35. else
  36. if i=0 then
  37. br_str=""
  38. else
  39. br_str="<br />"
  40. end if
  41. end if
  42. if cssstyle<>"" then
  43. SiteMapstr = SiteMapstr & br_str & "<img src="""&m_PathDir&"sys_images/+.gif"" border=""0"" /><a href="""&get_ClassLink(RsClassObj("ClassId"))&""" class="""& cssstyle &""">"&RsClassObj("ClassName")&"</a>"&vbNewLine
  44. else
  45. SiteMapstr = SiteMapstr & br_str & "<img src="""&m_PathDir&"sys_images/+.gif"" border=""0"" /><a href="""&get_ClassLink(RsClassObj("ClassId"))&""">"&RsClassObj("ClassName")&"</a>"&vbNewLine
  46. end if
  47. SiteMapstr = SiteMapstr & get_ClassList(RsClassObj("ClassId"),"&nbsp;",cssstyle)
  48. RsClassObj.movenext
  49. i=i+1
  50. loop
  51. RsClassObj.close:set RsClassObj=nothing
  52. else
  53. SiteMapstr = ""
  54. RsClassObj.close:set RsClassObj=nothing
  55. end if
  56. SiteMap = SiteMapstr
  57. End Function
  58. '得到搜索表单________________________________________________________________
  59. Public Function Search(f_Lablechar,f_type)
  60. dim Searchstr,showdate,showClass,rs,select_str,datestr,classstr,MF_Domain
  61. showdate = split(split(f_Lablechar,"┆")(1),"$")(1)
  62. showClass = split(split(f_Lablechar,"┆")(2),"$")(1)
  63. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  64. Searchstr = ""
  65. if showdate = "1" then
  66. datestr = "开始日期:<input type=text name=""s_date"" id=""s_date"" style=""width:90;"" value="""" onFocus=""setday(this)"" maskType=""shortDate"">"&vbNewLine
  67. datestr = datestr & "<IMG onClick=""s_date.focus()"" src=""/FS_Inc/calendar.bmp"" align=""absBottom"">" &vbNewLine
  68. datestr = datestr & "结束日期:<input type=text name=""e_date"" id=""e_date"" style=""width:90;"" value="""" onFocus=""setday(this)"" maskType=""shortDate"">"&vbNewLine
  69. datestr = datestr & "<IMG onClick=""e_date.focus()"" src=""/FS_Inc/calendar.bmp"" align=""absBottom"">" &vbNewLine
  70. else
  71. datestr = ""
  72. end if
  73. if showClass = "1" then
  74. classstr = "<select name=""ClassId"" id=""ClassId"">"
  75. classstr = classstr & "<option value="""">不指定栏目</option>"&vbNewLine
  76. set rs = Conn.execute("select ClassId,id,classname,classEname,ParentId From FS_NS_NewsClass where ReycleTF=0 and isURL=0 and ParentId='0' order by OrderId desc,id desc")
  77. do while not rs.eof
  78. classstr = classstr & "<option value="""&rs("ClassId")&""">┝"&rs("classname")&"</option>"&vbNewLine
  79. classstr = classstr & get_optionNewsList(rs("ClassId"),"┝")&vbNewLine
  80. rs.movenext
  81. loop
  82. rs.close:set rs=nothing
  83. classstr = classstr&"</select>"
  84. else
  85. classstr = ""
  86. end if
  87. select_str ="<select name=""s_type"" id=""s_type"">"&vbNewLine
  88. select_str=select_str&"<option value=""title"" selected=""selected"">标题</option>"&vbNewLine
  89. select_str=select_str&"<option value=""stitle"">副标题</option>"&vbNewLine
  90. select_str=select_str&"<option value=""content"">全文</option>"&vbNewLine
  91. select_str=select_str&"<option value=""author"">作者</option>"&vbNewLine
  92. select_str=select_str&"<option value=""keyword"">关键字</option>"&vbNewLine
  93. select_str=select_str&"<option value=""NaviContent"">导航</option>"&vbNewLine
  94. select_str=select_str&"<option value=""source"">来源</option>"&vbNewLine
  95. select_str=select_str&"</select>"&vbNewLine
  96. Searchstr = Searchstr & "<table width=""100%""><form action=""http://"& MF_Domain & "/Search.html"" id=""SearchForm"" name=""SearchForm"" method=""get""><tr><td><input name=""SubSys"" type=""hidden"" id=""SubSys"" value=""NS"" /><input name=""Keyword"" type=""text"" id=""Keyword"" size=""15"" /> "&select_str&datestr&classstr&"<input type=""submit"" id=""SearchSubmit"" value=""搜索"" /></td></tr></form></table>"
  97. Search = Searchstr
  98.  End Function
  99.  '得到统计信息_______________________________________________________________
  100. Public Function infoStat(f_Lablechar,f_type)
  101. dim cols,br_str,infoStatstr
  102. cols = split(split(f_Lablechar,"┆")(1),"$")(1)
  103. if cols="0" then
  104. br_str = "&nbsp;"
  105. else
  106. br_str = "<br />"
  107. end if
  108. dim rs,c_rs1,c_rs2,c_rs3,c_rs4,c_rs5
  109. set rs = Conn.execute("select count(id) From FS_NS_News where islock=0 and isRecyle=0 and isdraft=0")
  110. c_rs1=rs(0)
  111. rs.close:set rs=nothing
  112. set rs = Conn.execute("select count(id) From FS_NS_NewsClass where ReycleTF=0")
  113. c_rs2=rs(0)
  114. rs.close:set rs=nothing
  115. set rs = Conn.execute("select count(SpecialID) From FS_NS_Special where isLock=0")
  116. c_rs3=rs(0)
  117. rs.close:set rs=nothing
  118. set rs = User_Conn.execute("select count(Userid) From FS_ME_Users")
  119. c_rs4=rs(0)
  120. rs.close:set rs=nothing
  121. if G_IS_SQL_User_DB=0 then
  122. set rs = User_Conn.execute("select count(Userid) From FS_ME_Users where datevalue(RegTime)=#"&datevalue(date)&"#")
  123. else
  124. set rs = User_Conn.execute("select count(Userid) From FS_ME_Users where datevalue(RegTime)='"&datevalue(date)&"'")
  125. end if
  126. c_rs5=rs(0)
  127. rs.close:set rs=nothing
  128. infoStatstr = "总新闻:"&"<strong>"&c_rs1&"</strong>"&br_str
  129. infoStatstr = infoStatstr &"总栏目:"&"<strong>"&c_rs2&"</strong>"&br_str
  130. infoStatstr = infoStatstr &"专题数:"&"<strong>"&c_rs3&"</strong>"&br_str
  131. infoStatstr = infoStatstr &"会员数:"&"<strong>"&c_rs4&"</strong>"&br_str
  132. infoStatstr = infoStatstr &"今日注册:"&"<strong>"&c_rs5&"</strong>"&br_str
  133. infoStat = infoStatstr
  134. End Function
  135. '得到图片头条________________________________________________________________
  136. Public Function TodayPic(f_Lablechar,f_type,f_id)
  137. dim ClassId,InSql_search,rs,MF_Domain,TodayPicstr
  138. ClassID = split(split(f_Lablechar,"┆")(1),"$")(1)
  139. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  140. if trim(ClassId)="" then
  141. if trim(f_id)<>"" then
  142. InSql_search = " where ClassId = '"&f_id&"'"
  143. else
  144. InSql_search = ""
  145. end if
  146. else
  147. if trim(ClassId)<>"" then
  148. InSql_search = " where ClassId = '"&ClassId&"'"
  149. else
  150. InSql_search = ""
  151. end if
  152. end if
  153. set rs = conn.execute("select top 1 NewsID,ClassID,TodayPic_SavePath From FS_NS_TodayPic"& InSql_search &"")
  154. if rs.eof then
  155. TodayPicstr = ""
  156. rs.close:set rs=nothing
  157. else
  158. TodayPicstr = "<a href="""& get_NewsLink(rs("NewsID"))&"""><img src=""http://"&MF_Domain&"/"&G_UP_FILES_DIR&"/TodayPicFiles/"&rs("TodayPic_SavePath")&".jpg"" border=""0""></a>"
  159. rs.close:set rs=nothing
  160. end if
  161. TodayPic = TodayPicstr
  162. End Function
  163. '得到文字头条________________________________________________________________
  164. Public Function TodayWord(f_Lablechar,f_type,f_Id)
  165. dim Content_List,table_array,div_tf,ClassId,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2,f_sql,f_rs_obj
  166. dim RefreshNumber,search_inSQL,colnumber,cssstyle,Titlenumber,ShowReview,ShowReviewTF
  167. table_array=split(f_Lablechar,"┆")
  168. if instr(f_Lablechar,"out_DIV")>0 then
  169. div_tf = 1
  170. else
  171. div_tf=0
  172. end if
  173. ClassId = split(split(f_Lablechar,"┆")(2),"$")(1)
  174. RefreshNumber = split(split(f_Lablechar,"┆")(11),"$")(1)
  175. colnumber = split(split(f_Lablechar,"┆")(9),"$")(1)
  176. Titlenumber = split(split(f_Lablechar,"┆")(12),"$")(1)
  177. ShowReview = split(split(f_Lablechar,"┆")(13),"$")(1)
  178. if trim(split(split(f_Lablechar,"┆")(10),"$")(1))<>"" then
  179. cssstyle = " class="""&split(split(f_Lablechar,"┆")(10),"$")(1)&""""
  180. else
  181. cssstyle = ""
  182. end if
  183. if trim(ClassId)<>"" then
  184. search_inSQL = " and "& all_substring &"(NewsProperty,11,1)='1' and ClassId='"& ClassId &"'"
  185. else
  186. if trim(f_id)<>"" then
  187. search_inSQL = " and "& all_substring &"(NewsProperty,11,1)='1' and ClassId='"& f_id &"'"
  188. else
  189. search_inSQL = " and "& all_substring &"(NewsProperty,11,1)='1'"
  190. end if
  191. end if
  192. if div_tf=1 then
  193. classNews_head = table_str_list_head(div_tf,split(table_array(3),"$")(1),split(table_array(4),"$")(1),split(table_array(5),"$")(1),split(table_array(6),"$")(1))
  194. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(7),"$")(1),split(table_array(8),"$")(1))
  195. else
  196. classNews_head = "<table border=""0"" cellspacing=""0"" cellpadding=""3"" width=""100%"">"
  197. end if
  198. classNews_bottom = table_str_list_bottom(div_tf)
  199. classNews_middle2 = table_str_list_middle_2(div_tf)
  200. f_sql="select top "& RefreshNumber &" ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
  201. f_sql = f_sql &",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
  202. f_sql = f_sql &"From FS_NS_News where isLock=0 "&search_inSQL&" and  isRecyle=0 and isdraft=0 order by addtime desc,id desc"
  203. Set  f_rs_obj = Server.CreateObject(G_FS_RS)
  204. 'response.Write(f_sql)
  205. 'response.end
  206. f_rs_obj.open f_sql,Conn,1,3
  207. if f_rs_obj.eof then
  208. Content_List = ""
  209. f_rs_obj.close:set f_rs_obj=nothing
  210. else
  211. dim c_i_k
  212. Content_List = ""
  213. if div_tf = 0 then
  214. c_i_k = 0
  215. if cint(colnumber)<>1 then
  216. Content_List = Content_List &  "  <tr>"
  217. end if
  218. end if
  219. do while not f_rs_obj.eof
  220. if ShowReview="1" then
  221. ShowReviewTF = "<img src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/sys_images/sp_er.gif"" border=""0"" /><a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewUrl.asp?Id="&f_rs_obj("ID")&"&Type=NS"" target=""_blank""><font color=""red"">评</font></a>"
  222. else
  223. ShowReviewTF = ""
  224. end if
  225. if div_tf=1 then
  226. Content_List= Content_List & classNews_middle1 & "<a href="""&get_NewsLink(f_rs_obj("NewsId"))&""""& cssstyle&">"&GotTopic(f_rs_obj("newstitle"),Titlenumber)&"</a>"& ShowReviewTF & classNews_middle2
  227. else
  228. if cint(colnumber) =1 then
  229. Content_List= Content_List & vbNewLine&"   <tr><td><a href="""&get_NewsLink(f_rs_obj("NewsId"))&""""& cssstyle&">"&GotTopic(f_rs_obj("newstitle"),Titlenumber)&"</a>"& ShowReviewTF &"</td></tr>"
  230. else
  231. Content_List= Content_List & "<td width="""& cint(100/cint(colnumber))&"%""><a href="""&get_NewsLink(f_rs_obj("NewsId"))&""""& cssstyle&">"&GotTopic(f_rs_obj("newstitle"),Titlenumber)&"</a>"& ShowReviewTF &"</td>"
  232. end if
  233. end if
  234. f_rs_obj.movenext
  235. if div_tf = 0 then
  236. if cint(colnumber)<>1 then
  237. c_i_k = c_i_k+1
  238. if c_i_k mod cint(colnumber) = 0 then
  239. Content_List = Content_List & "</tr>"&vbNewLine&"  <tr>"
  240. end if
  241. end if
  242. end if
  243. loop
  244.    if div_tf=0 then
  245. if cint(colnumber)<>1 then
  246. Content_List = Content_List & "</tr>"&vbNewLine
  247. end if
  248.    end if
  249. f_rs_obj.close:set f_rs_obj=nothing
  250. Content_List=classNews_head & Content_List & classNews_bottom
  251. end if
  252. TodayWord = Content_List
  253. End Function
  254. '栏目导航____________________________________________________________________
  255. Public Function ClassNavi(f_Lablechar,f_type,f_Id)
  256. 'ClassNavi┆输出方式$out_Table┆栏目$┆方向$0┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆标题CSS$┆标题导航$·
  257. dim ClassId,cols,titlecss,rs,ClassNavistr,ParentIDstr,cols_str,div_tf,table_array
  258. dim classNews_head,classNews_bottom,classNews_middle1,classNews_middle2,cssstyle,titleNavi
  259. table_array=split(f_Lablechar,"┆")
  260. ClassId = split(split(f_Lablechar,"┆")(2),"$")(1)
  261. cols = split(split(f_Lablechar,"┆")(3),"$")(1)
  262. titlecss = split(split(f_Lablechar,"┆")(10),"$")(1)
  263. if instr(f_Lablechar,"out_DIV")>0 then
  264. div_tf = 1
  265. cssstyle = ""
  266. else
  267. div_tf=0
  268. if titlecss<>"" then
  269. cssstyle = " Class="""& titlecss &""""
  270. else
  271. cssstyle = ""
  272. end if
  273. titleNavi = split(split(f_Lablechar,"┆")(11),"$")(1)
  274. end if
  275. if div_tf=1 then
  276. classNews_head = table_str_list_head(div_tf,split(table_array(4),"$")(1),split(table_array(5),"$")(1),split(table_array(6),"$")(1),split(table_array(7),"$")(1))
  277. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(8),"$")(1),split(table_array(9),"$")(1))
  278. else
  279. classNews_head = "<table border=""0"" cellspacing=""0"" cellpadding=""3"" width=""100%"">"
  280. end if
  281. classNews_bottom = table_str_list_bottom(div_tf)
  282. classNews_middle2 = table_str_list_middle_2(div_tf)
  283. if trim(ClassId)<>"" then
  284. ParentIDstr = " and ParentId = '"& ClassId&"'"
  285. else
  286. if f_id<>"" then
  287. ParentIDstr = " and ParentId = '"& f_Id&"'"
  288. else
  289. ParentIDstr = " and ParentId = '0'"
  290. end if
  291. end if
  292. set rs = Conn.execute("select ClassID,OrderID,ClassName,isShow,ParentID,ReycleTF From FS_NS_NewsClass where isShow=1 and ReycleTF=0 "& ParentIDstr &" Order by OrderId desc,id desc")
  293. ClassNavistr = ""
  294. if rs.eof then
  295. ClassNavistr = ""
  296. rs.close:set rs=nothing
  297. else
  298. do while not rs.eof
  299. if div_tf=1 then
  300. ClassNavistr = ClassNavistr &classNews_middle1 & "<a href="""&get_ClassLink(rs("ClassId"))&""">"&rs("ClassName")&"</a>" & classNews_middle2
  301. else
  302. if cols="0" then
  303. cols_str = "&nbsp;"
  304. else
  305. cols_str = "<br />"
  306. end if
  307. ClassNavistr = ClassNavistr & titleNavi & "<a href="""&get_ClassLink(rs("ClassId"))&""""& cssstyle&">"&rs("ClassName")&"</a>"& cols_str &""
  308. end if
  309. rs.movenext
  310. loop
  311. rs.close:set rs=nothing
  312. if div_tf=1 then
  313. ClassNavistr=classNews_head & ClassNavistr & classNews_bottom
  314. end if
  315. end if
  316. ClassNavi = ClassNavistr
  317. End Function
  318. '专题导航____________________________________________________________________
  319. Public Function SpecialNavi(f_Lablechar,f_type,f_Id)
  320. 'SpecialNavi┆输出方式$out_Table┆方向$0┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆导航$·
  321. dim table_array,cols,titlecss,div_tf,cssstyle,titleNavi,rs,SpecialNavistr,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2,cols_str
  322. table_array=split(f_Lablechar,"┆")
  323. cols = split(split(f_Lablechar,"┆")(2),"$")(1)
  324. titlecss = split(split(f_Lablechar,"┆")(9),"$")(1)
  325. 'piccss=split(split(f_Lablechar,"┆")(17),"$")(1)
  326. if instr(f_Lablechar,"out_DIV")>0 then
  327. div_tf = 1
  328. cssstyle = ""
  329. else
  330. div_tf=0
  331. if titlecss<>"" then
  332. cssstyle = " Class="""& titlecss &""""
  333. else
  334. cssstyle = ""
  335. end if
  336. titleNavi = split(split(f_Lablechar,"┆")(10),"$")(1)
  337. end if
  338. classNews_head = table_str_list_head(div_tf,split(table_array(3),"$")(1),split(table_array(4),"$")(1),split(table_array(5),"$")(1),split(table_array(6),"$")(1))
  339. classNews_bottom = table_str_list_bottom(div_tf)
  340. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(7),"$")(1),split(table_array(8),"$")(1))
  341. classNews_middle2 = table_str_list_middle_2(div_tf)
  342. set rs = Conn.execute("select SpecialID,SpecialCName,SpecialEName,isLock From FS_NS_Special where isLock=0  Order by SpecialID desc")
  343. 'get_specialLink
  344. SpecialNavistr = ""
  345. if rs.eof then
  346. SpecialNavistr = ""
  347. rs.close:set rs=nothing
  348. else
  349. do while not rs.eof
  350. if div_tf=1 then
  351. SpecialNavistr = SpecialNavistr &classNews_middle1 & "<a href="""&get_specialLink(rs("SpecialEName"))&""">"&rs("SpecialCName")&"</a>" & classNews_middle2
  352. else
  353. if cols="0" then
  354. cols_str = "&nbsp;"
  355. else
  356. cols_str = "<br />"
  357. end if
  358. SpecialNavistr = SpecialNavistr & titleNavi & "<a href="""&get_specialLink(rs("SpecialEName"))&""""& cssstyle&">"&rs("SpecialCName")&"</a>"& cols_str &""
  359. end if
  360. rs.movenext
  361. loop
  362. rs.close:set rs=nothing
  363. end if
  364. if div_tf=1 then
  365. SpecialNavistr=classNews_head & SpecialNavistr & classNews_bottom
  366. end if
  367. SpecialNavi = SpecialNavistr
  368. End Function
  369. 'RSS聚合_____________________________________________________________________
  370. Public Function RssFeed(f_Lablechar,f_type,f_Id)
  371. dim ClassID,RssFeedstr
  372. ClassID = split(split(f_Lablechar,"┆")(1),"$")(1)
  373.   if trim(ClassID)<>"" then
  374. RssFeedstr = "<a href=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/xml/NS/"&ClassID&".xml""><img src=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/sys_images/rss.gif"" border=""0""></a>"
  375. elseif trim(f_id)<>"" then
  376. RssFeedstr = "<a href=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/xml/NS/"&f_id&".xml""><img src=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/sys_images/rss.gif"" border=""0""></a>"
  377. else
  378. RssFeedstr = ""
  379. end if
  380. RssFeed = RssFeedstr
  381. End Function
  382. '专题调用____________________________________________________________________
  383. Public Function SpecialCode(f_Lablechar,f_type,f_Id)
  384. 'SpecialCode┆栏目$2006┆图片显示$1┆图片尺寸$120,100┆导航内容$1┆导航内容字数$200┆栏目名称CSS$┆导航内容CSS$┆输出方式$out_Table┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆排列方式$0┆导航$·
  385. dim table_array,ClassID,titleNavi,SpecialCodestr,cols,pictf,picsize,piccss,piccssstr,ContentTF,ContentNumber,div_tf,titlecss,cssstyle,ContentCSS,ContentCSSstr,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2
  386. table_array=split(f_Lablechar,"┆")
  387. ClassID = split(split(f_Lablechar,"┆")(1),"$")(1)
  388. titleNavi = split(split(f_Lablechar,"┆")(16),"$")(1)
  389. titlecss = split(split(f_Lablechar,"┆")(6),"$")(1)
  390. ContentCSS = split(split(f_Lablechar,"┆")(7),"$")(1)
  391. cols=split(split(f_Lablechar,"┆")(15),"$")(1)
  392. pictf=split(split(f_Lablechar,"┆")(2),"$")(1)
  393. picsize=split(split(f_Lablechar,"┆")(3),"$")(1)
  394. piccss=split(split(f_Lablechar,"┆")(17),"$")(1)
  395. ContentTF = split(split(f_Lablechar,"┆")(4),"$")(1)
  396. ContentNumber= split(split(f_Lablechar,"┆")(5),"$")(1)
  397. if piccss<>"" then
  398. piccssstr = " class="""& piccss &""""
  399. else
  400. piccssstr = ""
  401. end if
  402. if trim(ClassID)="" then
  403. SpecialCodestr = "错误的标签,by Foosun.cn"
  404. end if
  405. if instr(f_Lablechar,"out_DIV")>0 then
  406. div_tf = 1
  407. cssstyle = ""
  408. else
  409. div_tf=0
  410. if titlecss<>"" then
  411. cssstyle = " class="""& titlecss &""""
  412. else
  413. cssstyle = ""
  414. end if
  415. if ContentCSS<>"" then
  416. ContentCSSstr = " class="""& ContentCSS &""""
  417. else
  418. ContentCSSstr = ""
  419. end if
  420. titleNavi = split(split(f_Lablechar,"┆")(16),"$")(1)
  421. end if
  422. classNews_head = table_str_list_head(div_tf,split(table_array(9),"$")(1),split(table_array(10),"$")(1),split(table_array(11),"$")(1),split(table_array(12),"$")(1))
  423. classNews_bottom = table_str_list_bottom(div_tf)
  424. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(13),"$")(1),split(table_array(14),"$")(1))
  425. classNews_middle2 = table_str_list_middle_2(div_tf)
  426. SpecialCodestr = ""
  427. dim rs
  428. set rs=Conn.execute("select SpecialCName,SpecialEName,SpecialContent,naviPic From FS_NS_Special Where SpecialEName='"& ClassID &"'")
  429. if rs.eof then
  430. SpecialCodestr = ""
  431. rs.close:set rs=nothing
  432. else'
  433. if div_tf=1 then
  434. if pictf="1" then
  435. if trim(picsize)="" then
  436. SpecialCodestr = SpecialCodestr & ""
  437. else
  438. SpecialCodestr = SpecialCodestr & "  <a href="""&get_specialLink(rs("SpecialEName"))&"""><img "&piccssstr&" src="""&rs("naviPic")&""" width="""&split(picsize,",")(1)&""" height="""&split(picsize,",")(0)&""" border=""0"" /></a>" &vbNewLine
  439. end if
  440. end if
  441. SpecialCodestr = SpecialCodestr & classNews_middle1 & "<a href="""&get_specialLink(rs("SpecialEName"))&""">"& rs("SpecialCName") &"</a>" & classNews_middle2
  442. if ContentTF="1" then
  443. SpecialCodestr = SpecialCodestr & classNews_middle1 &"&nbsp;"& GetCStrLen(""&rs("SpecialContent"),ContentNumber) & "&nbsp;<a href="""& get_specialLink(rs("SpecialEName")) &""">详细</a>" & classNews_middle2
  444. end if
  445. SpecialCodestr = classNews_head & SpecialCodestr & classNews_bottom
  446. else
  447. SpecialCodestr = SpecialCodestr& "<table width=""99%"" border=""0"" cellspacing=""0"" cellpadding=""5"">"&vbNewLine&" <tr>"
  448. if pictf="1" then
  449. if trim(picsize)="" then
  450. SpecialCodestr = SpecialCodestr & ""
  451. else
  452. if cols="0" then
  453. SpecialCodestr = SpecialCodestr & "<td align=""center""><a href="""&get_specialLink(rs("SpecialEName"))&"""><img "&piccssstr&" src="""&rs("naviPic")&""" width="""&split(picsize,",")(1)&""" height="""&split(picsize,",")(0)&""" border=""0"" /></a></td>" &vbNewLine
  454. else
  455. SpecialCodestr = SpecialCodestr & "<td><a href="""&get_specialLink(rs("SpecialEName"))&"""><img "&piccssstr&" src="""&rs("naviPic")&""" width="""&split(picsize,",")(1)&""" height="""&split(picsize,",")(0)&""" border=""0"" /></a></td></tr>" &vbNewLine
  456. end if
  457. end if
  458. end if
  459. if cols="0" then
  460. SpecialCodestr = SpecialCodestr & "<td>"& titleNavi &"<a href="""&get_specialLink(rs("SpecialEName"))&""""&cssstyle&">"& rs("SpecialCName") &"</a>"
  461. if ContentTF="1" then
  462. SpecialCodestr = SpecialCodestr & "<br /><div align=""left"" "&ContentCSSstr&">&nbsp;"& GetCStrLen(""&rs("SpecialContent"),ContentNumber)&"&nbsp;<a href="""& get_specialLink(rs("SpecialEName")) &""">详细</a></div></td>"&vbNewLine
  463. else
  464. SpecialCodestr = SpecialCodestr & "</td></tr>"&vbNewLine
  465. end if
  466. else
  467. SpecialCodestr = SpecialCodestr & " <tr><td>"& titleNavi &"<a href="""&get_specialLink(rs("SpecialEName"))&""""&cssstyle&">"& rs("SpecialCName") &"</a>"&vbNewLine
  468. if ContentTF="1" then
  469. SpecialCodestr = SpecialCodestr & "<br /><div align=""left"" "&ContentCSSstr&">&nbsp;"& GetCStrLen(""&rs("SpecialContent"),ContentNumber)&"&nbsp;<a href="""& get_specialLink(rs("SpecialEName")) &""">详细</a></div></td></tr>"&vbNewLine
  470. else
  471. SpecialCodestr = SpecialCodestr & "</td></tr>"&vbNewLine
  472. end if
  473. end if
  474. SpecialCodestr = SpecialCodestr & "</table>"
  475. end if
  476. rs.close:set rs=nothing
  477. end if
  478. SpecialCode = SpecialCodestr
  479. End Function
  480. '栏目调用____________________________________________________________________
  481. Public Function ClassCode(f_Lablechar,f_type,f_Id)
  482. 'ClassCode┆栏目$20066┆图片显示$1┆图片尺寸$120,100┆导航内容$1┆导航内容字数$200┆栏目名称CSS$┆导航内容CSS$┆输出方式$out_Table┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆排列方式$0┆导航$·┆图片CSS$
  483. dim table_array,ClassID,titleNavi,ClassCodestr,cols,pictf,picsize,piccss,piccssstr,ContentTF,ContentNumber,div_tf,titlecss,cssstyle,ContentCSS,ContentCSSstr,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2
  484. table_array=split(f_Lablechar,"┆")
  485. ClassID = split(split(f_Lablechar,"┆")(1),"$")(1)
  486. titleNavi = split(split(f_Lablechar,"┆")(16),"$")(1)
  487. titlecss = split(split(f_Lablechar,"┆")(6),"$")(1)
  488. ContentCSS = split(split(f_Lablechar,"┆")(7),"$")(1)
  489. cols=split(split(f_Lablechar,"┆")(15),"$")(1)
  490. pictf=split(split(f_Lablechar,"┆")(2),"$")(1)
  491. picsize=split(split(f_Lablechar,"┆")(3),"$")(1)
  492. piccss=split(split(f_Lablechar,"┆")(17),"$")(1)
  493. ContentTF = split(split(f_Lablechar,"┆")(4),"$")(1)
  494. ContentNumber= split(split(f_Lablechar,"┆")(5),"$")(1)
  495. if piccss<>"" then
  496. piccssstr = " class="""& piccss &""""
  497. else
  498. piccssstr = ""
  499. end if
  500. if trim(ClassID)="" then
  501. ClassCodestr = "错误的标签,by Foosun.cn"
  502. end if
  503. if instr(f_Lablechar,"out_DIV")>0 then
  504. div_tf = 1
  505. cssstyle = ""
  506. else
  507. div_tf=0
  508. if titlecss<>"" then
  509. cssstyle = " class="""& titlecss &""""
  510. else
  511. cssstyle = ""
  512. end if
  513. if ContentCSS<>"" then
  514. ContentCSSstr = " class="""& ContentCSS &""""
  515. else
  516. ContentCSSstr = ""
  517. end if
  518. titleNavi = split(split(f_Lablechar,"┆")(16),"$")(1)
  519. end if
  520. classNews_head = table_str_list_head(div_tf,split(table_array(9),"$")(1),split(table_array(10),"$")(1),split(table_array(11),"$")(1),split(table_array(12),"$")(1))
  521. classNews_bottom = table_str_list_bottom(div_tf)
  522. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(13),"$")(1),split(table_array(14),"$")(1))
  523. classNews_middle2 = table_str_list_middle_2(div_tf)
  524. ClassCodestr = ""
  525. dim rs
  526. set rs=Conn.execute("select ClassID,ClassName,ClassNaviContent,ClassNaviPic From FS_NS_NewsClass Where ClassID='"& ClassID &"'")
  527. if rs.eof then
  528. ClassCodestr = ""
  529. rs.close:set rs=nothing
  530. else'
  531. if div_tf=1 then
  532. if pictf="1" then
  533. if trim(picsize)="" then
  534. ClassCodestr = ClassCodestr & ""
  535. else
  536. ClassCodestr = ClassCodestr & "  <a href="""&get_ClassLink(rs("ClassID"))&"""><img "&piccssstr&" src="""&rs("ClassNaviPic")&""" width="""&split(picsize,",")(1)&""" height="""&split(picsize,",")(0)&""" border=""0"" /></a>" &vbNewLine
  537. end if
  538. end if
  539. ClassCodestr = ClassCodestr & classNews_middle1 & "<a href="""&get_ClassLink(rs("ClassID"))&""">"& rs("ClassName") &"</a>" & classNews_middle2
  540. if ContentTF="1" then
  541. ClassCodestr = ClassCodestr & classNews_middle1 &"&nbsp;"& GetCStrLen(""&rs("ClassNaviContent"),ContentNumber) & "&nbsp;<a href="""& get_ClassLink(rs("ClassID")) &""">详细</a>" & classNews_middle2
  542. end if
  543. ClassCodestr = classNews_head & ClassCodestr & classNews_bottom
  544. else
  545. ClassCodestr = ClassCodestr& "<table width=""99%"" border=""0"" cellspacing=""0"" cellpadding=""5"">"&vbNewLine&" <tr>"
  546. if pictf="1" then
  547. if trim(picsize)="" then
  548. ClassCodestr = ClassCodestr & ""
  549. else
  550. if cols="0" then
  551. ClassCodestr = ClassCodestr & "<td align=""center""><a href="""&get_ClassLink(rs("ClassID"))&"""><img "&piccssstr&" src="""&rs("ClassNaviPic")&""" width="""&split(picsize,",")(1)&""" height="""&split(picsize,",")(0)&""" border=""0"" /></a></td>" &vbNewLine
  552. else
  553. ClassCodestr = ClassCodestr & "<td><a href="""&get_ClassLink(rs("ClassID"))&"""><img "&piccssstr&" src="""&rs("ClassNaviPic")&""" width="""&split(picsize,",")(1)&""" height="""&split(picsize,",")(0)&""" border=""0"" /></a></td></tr>" &vbNewLine
  554. end if
  555. end if
  556. end if
  557. if cols="0" then
  558. ClassCodestr = ClassCodestr & "<td>"& titleNavi &"<a href="""&get_ClassLink(rs("ClassID"))&""""&cssstyle&">"& rs("ClassName") &"</a>"
  559. if ContentTF="1" then
  560. ClassCodestr = ClassCodestr & "<br /><div align=""left"" "&ContentCSSstr&">&nbsp;"& GetCStrLen(""&rs("ClassNaviContent"),ContentNumber)&"&nbsp;<a href="""& get_ClassLink(rs("ClassID")) &""">详细</a></div></td>"&vbNewLine
  561. else
  562. ClassCodestr = ClassCodestr & "</td></tr>"&vbNewLine
  563. end if
  564. else
  565. ClassCodestr = ClassCodestr & " <tr><td>"& titleNavi &"<a href="""&get_ClassLink(rs("ClassID"))&""""&cssstyle&">"& rs("ClassName") &"</a>"&vbNewLine
  566. if ContentTF="1" then
  567. ClassCodestr = ClassCodestr & "<br /><div align=""left"" "&ContentCSSstr&">&nbsp;"& GetCStrLen(""&rs("ClassNaviContent"),ContentNumber)&"&nbsp;<a href="""& get_ClassLink(rs("ClassID")) &""">详细</a></div></td></tr>"&vbNewLine
  568. else
  569. ClassCodestr = ClassCodestr & "</td></tr>"&vbNewLine
  570. end if
  571. end if
  572. ClassCodestr = ClassCodestr & "</table>"
  573. end if
  574. rs.close:set rs=nothing
  575. end if
  576. ClassCode = ClassCodestr
  577. End Function
  578. '不规则新闻开始______________________________________________________________
  579. Public Function DefineNews(f_Lablechar,f_type,f_Id)
  580. 'DefineNews┆输出方式$out_Table┆不规则ID$┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆标题CSS$
  581. dim DefineNewsstr,ClassId,TitleCss,TitleCssstr,table_array,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2
  582. dim div_tf,dot_str,TmpRsObj,RowValue,i,TitleNavi
  583. dim tmp_alt_title,tmp_rs,tmp_titleBorder,tmp_TitleItalic,tmp_TitleColor
  584. ClassId=split(split(f_Lablechar,"┆")(2),"$")(1)
  585. TitleCss=split(split(f_Lablechar,"┆")(9),"$")(1)
  586. if instr(f_Lablechar,"out_DIV")>0 then
  587. div_tf = 1
  588. TitleCssstr = ""
  589. else
  590. div_tf=0
  591. if trim(TitleCss)<>"" then
  592. TitleCssstr = " class="""& TitleCss &""""
  593. else
  594. TitleCssstr = ""
  595. end if
  596. TitleNavi = split(split(f_Lablechar,"┆")(10),"$")(1)
  597. end if
  598. table_array=split(f_Lablechar,"┆")
  599. if div_tf=1 then
  600. classNews_head = table_str_list_head(div_tf,split(table_array(3),"$")(1),split(table_array(4),"$")(1),split(table_array(5),"$")(1),split(table_array(6),"$")(1))
  601. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(7),"$")(1),split(table_array(8),"$")(1))
  602. else
  603. classNews_head = "<table border=""0"" cellspacing=""0"" cellpadding=""3"" width=""100%"">"
  604. end if
  605. classNews_bottom = table_str_list_bottom(div_tf)
  606. classNews_middle2 = table_str_list_middle_2(div_tf)
  607. DefineNewsstr = ""
  608. if div_tf=0 then
  609. SET TmpRsObj = Server.CreateObject(G_FS_RS)
  610. TmpRsObj.open "Select UnregulatedMain,MainUnregNewsID,UnregNewsName,Rows from FS_NS_News_Unrgl Where UnregulatedMain='"&ClassId&"' order by Rows,id asc",Conn,1,3
  611. i=0
  612. Do While Not TmpRsObj.eof
  613. set tmp_rs = Conn.execute("select titleBorder,TitleItalic,TitleColor From FS_NS_News where NewsId='"& TmpRsObj("MainUnregNewsID")&"'")
  614. if not tmp_rs.eof then
  615. tmp_alt_title = TmpRsObj("UnregNewsName")
  616. if trim(tmp_rs("titleBorder"))=1 then
  617. tmp_alt_title = "<strong>"& tmp_alt_title &"</strong>"
  618. end if
  619. if trim(tmp_rs("TitleItalic"))=1 then
  620. tmp_alt_title = "<em>"&tmp_alt_title&"</em>"
  621. end if
  622. if trim(tmp_rs("TitleColor"))<>"" then
  623. tmp_alt_title = "<font color=""#"& tmp_rs("TitleColor")&""">"&tmp_alt_title&"</font>"
  624. end if
  625. tmp_rs.close:set tmp_rs = nothing
  626. end if
  627. if i = 0 then
  628. DefineNewsstr = DefineNewsstr &  TitleNavi &"<a href="""&Get_NewsLink(TmpRsObj("MainUnregNewsID"))&""""&TitleCssstr&">"&tmp_alt_title&"</a>"
  629. else
  630. DefineNewsstr = DefineNewsstr &"<a href="""&Get_NewsLink(TmpRsObj("MainUnregNewsID"))&""""&TitleCssstr&">"&tmp_alt_title&"</a>"
  631. end if
  632. RowValue=Cint(TmpRsObj("Rows"))
  633. TmpRsObj.movenext
  634. if not TmpRsObj.eof then
  635. if Cint(TmpRsObj("Rows"))=RowValue then
  636. DefineNewsstr = DefineNewsstr & " "& vbNewLine
  637. else
  638. DefineNewsstr = DefineNewsstr & "<br />"& vbNewLine&TitleNavi
  639. end if
  640. end if
  641. i=i+1
  642. Loop
  643. TmpRsObj.close:set TmpRsObj = nothing
  644. DefineNewsstr = DefineNewsstr
  645. else
  646. SET TmpRsObj = Server.CreateObject(G_FS_RS)
  647. TmpRsObj.open "Select UnregulatedMain,MainUnregNewsID,UnregNewsName,Rows from FS_NS_News_Unrgl Where UnregulatedMain='"&ClassId&"' order by Rows,id asc",Conn,1,3
  648. i=0
  649. Do While Not TmpRsObj.eof
  650. set tmp_rs = Conn.execute("select titleBorder,TitleItalic,TitleColor From FS_NS_News where NewsId='"& TmpRsObj("MainUnregNewsID")&"'")
  651. if not tmp_rs.eof then
  652. tmp_alt_title = TmpRsObj("UnregNewsName")
  653. if trim(tmp_rs("titleBorder"))=1 then
  654. tmp_alt_title = "<strong>"& tmp_alt_title &"</strong>"
  655. end if
  656. if trim(tmp_rs("TitleItalic"))=1 then
  657. tmp_alt_title = "<em>"&tmp_alt_title&"</em>"
  658. end if
  659. if trim(tmp_rs("TitleColor"))<>"" then
  660. tmp_alt_title = "<font color=""#"& tmp_rs("TitleColor")&""">"&tmp_alt_title&"</font>"
  661. end if
  662. tmp_rs.close:set tmp_rs = nothing
  663. end if
  664. if i=0 then
  665. DefineNewsstr = DefineNewsstr &classNews_middle1&"<a href="""&Get_NewsLink(TmpRsObj("MainUnregNewsID"))&""""&TitleCssstr&">"&tmp_alt_title&"</a>"
  666. else
  667. DefineNewsstr = DefineNewsstr &"<a href="""&Get_NewsLink(TmpRsObj("MainUnregNewsID"))&""""&TitleCssstr&">"&tmp_alt_title&"</a>"
  668. end if
  669. RowValue=Cint(TmpRsObj("Rows"))
  670. TmpRsObj.movenext
  671. if not TmpRsObj.eof then
  672. if Cint(TmpRsObj("Rows"))=RowValue then
  673. DefineNewsstr = DefineNewsstr & " "
  674. else
  675. DefineNewsstr =  DefineNewsstr &"</li>" & vbNewLine &classNews_middle1
  676. end if
  677. end if
  678. i=i+1
  679. Loop
  680. TmpRsObj.close:set TmpRsObj = nothing
  681. DefineNewsstr = classNews_head & DefineNewsstr & "</li>"&vbNewLine&classNews_bottom
  682. end if
  683. DefineNews = DefineNewsstr
  684. End Function
  685. '归档标签
  686. Public Function OldNews(f_Lablechar,f_type,f_Id)
  687. dim OldNews_time
  688. OldNews = ""
  689. if G_SEARCH_TYPE = 1 then
  690. OldNews_time =  "开始日期:<input name=""s_date"" type=""text"" size=""9"" value="""&date-90&""" /> 结束日期:<input name=""e_date"" size=""9"" type=""text"" value="""&date-60&""" />"
  691. end if
  692. OldNews = OldNews & "<form id=""recordNewsForm"" name=""recordNewsForm"" method=""get"" action=""http://"& request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/Search.html""> 关键字:<input name=""keyword"" size=""15"" type=""text"" value="""" /> "& OldNews_time &" <input type=""submit"" value=""搜索"" /><input type=""hidden"" name=""SubSys"" value=""RD"" /> <input type=""reset"" name=""Submit2"" value=""重填"" /></form>"
  693. End Function
  694. '替换样式列表________________________________________________________________
  695. Public Function getlist_news(f_obj,style_id,f_titlenumber,f_contentnumber,f_navinumber,f_picshowtf,f_datestyle,f_openstyle,f_MF_Domain,f_subsys_ListType)
  696. Dim f_target,get_SpecialEName,ListSql,Rs_ListObj,s_Content,s_NewsPathUrl,Rs_Authorobj,k_i,k_tmp_Char,k_tmp_uchar,k_tmp_Chararray,FormReview
  697. Dim s_m_Rs,s_array,s_t_i,tmp_list,s_f_classSql,m_Rs_class,class_path,str_newstitle
  698. select case f_subsys_ListType
  699. case "ClassNews"
  700. get_SpecialEName = f_obj("SpecialEName")
  701. case "specialnews"
  702. get_SpecialEName = ""
  703. case else
  704. end select
  705. if f_openstyle=0 then
  706. f_target=" "
  707. else
  708. f_target=" target=""_blank"""
  709. end if
  710. if style_id<>"" then
  711. ListSql = "Select Content from FS_MF_Labestyle where ID=" & style_id & ""
  712. Set Rs_ListObj = Conn.Execute(ListSql)
  713. if Not Rs_ListObj.Eof then
  714. s_Content = Rs_ListObj("Content")
  715. '_________________________________________________________________________________________________
  716. if instr(s_Content,"{NS:FS_ID}")>0 then
  717. s_Content = replace(s_Content,"{NS:FS_ID}",f_obj("Id"))
  718. end if
  719. '_________________________________________________________________________________________________
  720. if instr(s_Content,"{NS:FS_NewsID}")>0 then
  721. s_Content = replace(s_Content,"{NS:FS_NewsID}",f_obj("NewsId"))
  722. end if
  723. '_________________________________________________________________________________________________
  724. if instr(s_Content,"{NS:FS_NewsTitle}")>0 then
  725. if f_subsys_ListType="readnews" then
  726. str_newstitle = f_obj("NewsTitle")
  727. else
  728. str_newstitle = GotTopic(f_obj("NewsTitle"),f_titlenumber)
  729. if trim(f_obj("titleBorder"))=1 then
  730. str_newstitle = "<strong>"&str_newstitle&"</strong>"
  731. end if
  732. if trim(f_obj("TitleItalic"))=1 then
  733. str_newstitle = "<em>"&str_newstitle&"</em>"
  734. end if
  735. if trim(f_obj("TitleColor"))<>"" then
  736. str_newstitle = "<font color=""#"& f_obj("TitleColor")&""">"&str_newstitle&"</font>"
  737. end if
  738. end if
  739. if f_picshowtf=1 then
  740. if f_obj("isPicNews")=1 then
  741. str_newstitle = ""&str_newstitle&"<img src="""&m_PathDir&"sys_images/img.gif"" alt=""图片"" border=""0"">"
  742. end if
  743. end if
  744. s_Content = replace(s_Content,"{NS:FS_NewsTitle}",str_newstitle)
  745. end if
  746. '_________________________________________________________________________________________________
  747. dim news_SavePath,s_Query_rs,news_Domain,news_UrlDomain,news_ClassEname,s_all_savepath
  748. if instr(s_Content,"{NS:FS_NewsURL}")>0 or  instr(s_Content,"{NS:FS_Content}")>0 then
  749. s_all_savepath = get_NewsLink(f_obj("NewsId"))
  750. s_NewsPathUrl = s_all_savepath
  751. s_Content = replace(s_Content,"{NS:FS_NewsURL}",s_NewsPathUrl)
  752. end if
  753. '_________________________________________________________________________________________________
  754. if instr(s_Content,"{NS:FS_CurtTitle}")>0 then
  755. s_Content = replace(s_Content,"{NS:FS_CurtTitle}",""&f_obj("CurtTitle")&"")
  756. end if
  757. '_________________________________________________________________________________________________
  758. if instr(s_Content,"{NS:FS_NewsNaviContent}")>0 then
  759. if f_subsys_ListType="readnews" then
  760. s_Content = replace(s_Content,"{NS:FS_NewsNaviContent}",""&f_obj("NewsNaviContent"))
  761. else
  762. s_Content = replace(s_Content,"{NS:FS_NewsNaviContent}",replace(replace(GetCStrLen(""&f_obj("NewsNaviContent")&"",f_navinumber),"&nbsp;",""),vbCrLf,"")&"")
  763. end if
  764. end if
  765. '_________________________________________________________________________________________________
  766. if instr(s_Content,"{NS:FS_Content}")>0 then
  767. if f_obj("isUrl")=1 then
  768. s_Content = replace(s_Content,"{NS:FS_Content}","<a href="""&f_obj("URLAddress")&""">"&f_obj("URLAddress")&"</a>")
  769. else
  770. if f_subsys_ListType="readnews" then
  771. if instr(f_obj("Content"),"[FS:PAGE]")>0 then
  772. s_Content = replace(s_Content,"{NS:FS_Content}","[FS:CONTENT_START]"&f_obj("Content")&"[FS:CONTENT_END]")
  773. else
  774. s_Content = replace(s_Content,"{NS:FS_Content}",""&f_obj("Content"))
  775. end if
  776. else
  777. s_Content = replace(s_Content,"{NS:FS_Content}",replace(replace(GetCStrLen(""&replace(""&f_obj("Content"),"[FS:PAGE]","")&"",f_contentnumber),"&nbsp;",""),vbCrLf,"")&"...<a href="""& s_NewsPathUrl &""">详细内容</a>")
  778. end if
  779. end if
  780. end if
  781. '_________________________________________________________________________________________________
  782. if instr(s_Content,"{NS:FS_AddTime}")>0 then
  783. dim tmp_f_datestyle
  784. tmp_f_datestyle = f_datestyle
  785. if instr(f_datestyle,"YY02")>0 then
  786. tmp_f_datestyle= replace(tmp_f_datestyle,"YY02",right(year(f_obj("AddTime")),2))
  787. end if
  788. if instr(f_datestyle,"YY04")>0 then
  789. tmp_f_datestyle= replace(tmp_f_datestyle,"YY04",year(f_obj("AddTime")))
  790. end if
  791. if instr(f_datestyle,"MM")>0 then
  792. if month(f_obj("AddTime"))<10 then
  793. tmp_f_datestyle= replace(tmp_f_datestyle,"MM","0"&month(f_obj("AddTime")))
  794. else
  795. tmp_f_datestyle= replace(tmp_f_datestyle,"MM",month(f_obj("AddTime")))
  796. end if
  797. end if
  798. if instr(f_datestyle,"DD")>0 then
  799. if day(f_obj("AddTime"))<10 then
  800. tmp_f_datestyle= replace(tmp_f_datestyle,"DD","0"&day(f_obj("AddTime")))
  801. else
  802. tmp_f_datestyle= replace(tmp_f_datestyle,"DD",day(f_obj("AddTime")))
  803. end if
  804. end if
  805. if instr(f_datestyle,"HH")>0 then
  806. if hour(f_obj("AddTime"))<10 then
  807. tmp_f_datestyle= replace(tmp_f_datestyle,"HH","0"&hour(f_obj("AddTime")))
  808. else
  809. tmp_f_datestyle= replace(tmp_f_datestyle,"HH",hour(f_obj("AddTime")))
  810. end if
  811. end if
  812. if instr(f_datestyle,"MI")>0 then
  813. if minute(f_obj("AddTime"))<10 then
  814. tmp_f_datestyle= replace(tmp_f_datestyle,"MI","0"&minute(f_obj("AddTime")))
  815. else
  816. tmp_f_datestyle= replace(tmp_f_datestyle,"MI",minute(f_obj("AddTime")))
  817. end if
  818. end if
  819. if instr(f_datestyle,"SS")>0 then
  820. if second(f_obj("AddTime"))<10 then
  821. tmp_f_datestyle= replace(tmp_f_datestyle,"SS","0"&second(f_obj("AddTime")))
  822. else
  823. tmp_f_datestyle= replace(tmp_f_datestyle,"SS",second(f_obj("AddTime")))
  824. end if
  825. end if
  826. s_Content = replace(s_Content,"{NS:FS_AddTime}",""&tmp_f_datestyle&"")
  827. end if
  828. '_________________________________________________________________________________________________
  829. if instr(s_Content,"{NS:FS_Author}")>0 then
  830. dim mid_str
  831. mid_str = mid(f_obj("NewsProperty"),7,1)
  832. set Rs_Authorobj = Conn.execute("select top 1 G_Name,G_Email from FS_NS_General where G_Type=3 and G_Name='"& f_obj("Author") &"'")
  833. if Rs_Authorobj.eof then
  834. if  mid_str="1" then
  835. s_Content = replace(s_Content,"{NS:FS_Author}","<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&G_USER_DIR&"/ShowUser.asp?UserName="& f_obj("Author") &""" target=""_blank"">"&f_obj("Author")&"</a>")
  836. else
  837. s_Content = replace(s_Content,"{NS:FS_Author}",""&f_obj("Author")&"")
  838. end if
  839. Rs_Authorobj.close:set Rs_Authorobj=nothing
  840. else
  841. if  mid_str="1" then
  842. s_Content = replace(s_Content,"{NS:FS_Author}","<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&G_USER_DIR&"/ShowUser.asp?UserName="& f_obj("Author") &""" target=""_blank"">"&f_obj("Author")&"</a>")
  843. else
  844. s_Content = replace(s_Content,"{NS:FS_Author}","<a href=""mailto:"&Rs_Authorobj("G_Email")&""">"&f_obj("Author")&"</a>")
  845. end if
  846. Rs_Authorobj.close:set Rs_Authorobj=nothing
  847. end if
  848. end if
  849. '_________________________________________________________________________________________________
  850. if instr(s_Content,"{NS:FS_Editer}")>0 then
  851. s_Content = replace(s_Content,"{NS:FS_Editer}",""&f_obj("Editor")&"")
  852. end if
  853. '_________________________________________________________________________________________________
  854. if instr(s_Content,"{NS:FS_hits}")>0 then
  855. if f_subsys_ListType="readnews" then
  856. dim ajax_str,hits_str
  857. hits_str = "<script language=""JavaScript"" src=""http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/Click.asp?type=ajax&SubSys=NS&spanid=NS_id_click_"&f_obj("NewsId")&"""></script>"
  858. s_Content = replace(s_Content,"{NS:FS_hits}",""&  hits_str & "<span id=""NS_id_click_"&f_obj("NewsId")&"""></span> ")
  859. else
  860. s_Content = replace(s_Content,"{NS:FS_hits}",""&  hits_str & ""&f_obj("hits"))
  861. end if
  862. end if
  863. '_________________________________________________________________________________________________
  864. if instr(s_Content,"{NS:FS_KeyWords}")>0 then
  865. if trim(f_obj("Keywords"))<>"" and Not isNull(trim(f_obj("Keywords"))) then
  866. k_tmp_Chararray = split(f_obj("Keywords"),",")
  867. k_tmp_Char=""
  868. k_tmp_uchar= ""
  869. for k_i = 0 to UBound(k_tmp_Chararray)
  870. if k_i=UBound(k_tmp_Chararray) then
  871. k_tmp_Char = k_tmp_Char & "<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/search.html?keyword="& k_tmp_Chararray(k_i) &"&Type=ns"" target=""_blank"">"& k_tmp_Chararray(k_i) &"</a>"
  872. k_tmp_uchar= k_tmp_uchar &  k_tmp_Chararray(k_i)
  873. else
  874. k_tmp_Char = k_tmp_Char & "<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/search.html?keyword="& k_tmp_Chararray(k_i) &"&Type=ns"" target=""_blank"">"& k_tmp_Chararray(k_i) &"</a>&nbsp;&nbsp;"
  875. k_tmp_uchar= k_tmp_uchar &  k_tmp_Chararray(k_i) &","
  876. end if
  877. next
  878. s_Content = replace(s_Content,"{NS:FS_KeyWords}",""&k_tmp_Char&"")
  879. s_Content = replace(s_Content,"{NS:FS_TitleKeyWords}}",""&k_tmp_uchar&"")
  880. else
  881. s_Content = replace(s_Content,"{NS:FS_KeyWords}","")
  882. s_Content = replace(s_Content,"{NS:FS_TitleKeyWords}}","")
  883. end if
  884. end if
  885. '_________________________________________________________________________________________________
  886. if instr(s_Content,"{NS:FS_TxtSource}")>0 then
  887. set Rs_Authorobj = Conn.execute("select top 1 G_Name,G_URL from FS_NS_General where G_Type=2 and G_Name='"& f_obj("Source") &"'")
  888. if Rs_Authorobj.eof then
  889. s_Content = replace(s_Content,"{NS:FS_TxtSource}",""&f_obj("Source")&"")
  890. else
  891. s_Content = replace(s_Content,"{NS:FS_TxtSource}","<a href="""&Rs_Authorobj("G_URL")&""" target=""_blank"">"&f_obj("Source")&"</a>")
  892. end if
  893. Rs_Authorobj.close:set Rs_Authorobj=nothing
  894. end if
  895. '_________________________________________________________________________________________________
  896. if instr(s_Content,"{NS:FS_SmallPicPath}")>0 then
  897. if trim(f_obj("NewsSmallPicFile"))<>"" then
  898. s_Content = replace(s_Content,"{NS:FS_SmallPicPath}",""&f_obj("NewsSmallPicFile"))
  899. else
  900. s_Content = replace(s_Content,"{NS:FS_SmallPicPath}","")
  901. end if
  902. end if
  903. '_________________________________________________________________________________________________
  904. if instr(s_Content,"{NS:FS_PicPath}")>0 then
  905. if trim(f_obj("NewsPicFile"))<>"" then
  906. s_Content = replace(s_Content,"{NS:FS_PicPath}",""&f_obj("NewsPicFile"))
  907. else
  908. s_Content = replace(s_Content,"{NS:FS_PicPath}","http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/sys_images/nopic_supply.gif")
  909. end if
  910. end if
  911. '_________________________________________________________________________________________________
  912. if instr(s_Content,"{NS:FS_FormReview}")>0 then
  913. s_Content = replace(s_Content,"{NS:FS_FormReview}","<label id=""Review_TF_"& f_obj("ID") &""">loading...</label><script language=""JavaScript"" type=""text/javascript"" src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewTF.asp?Id="& f_obj("ID") &"&Type=NS""></script>")
  914. end If
  915. '_________________________________________________________________________________________________
  916. If InStr(s_Content,"{NS:FS_PrevPage}")>0 Then
  917. s_Content = replace(s_Content,"{NS:FS_PrevPage}","<label id=""PrevPage_"& f_obj("NewsId") &"""></label><script language=""JavaScript"" type=""text/javascript"" src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/Showpage.asp?Id="& f_obj("NewsId") &"&Type=NS&PageType=PrevPage""></script>")
  918. End If
  919. '_________________________________________________________________________________________________
  920. If InStr(s_Content,"{NS:FS_NextPage}")>0 Then
  921. s_Content = replace(s_Content,"{NS:FS_NextPage}","<label id=""NextPage_"& f_obj("NewsId") &"""></label><script language=""JavaScript"" type=""text/javascript"" src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/Showpage.asp?Id="& f_obj("NewsId") &"&Type=NS&PageType=NextPage""></script>")
  922. End If
  923. '_________________________________________________________________________________________________
  924. if instr(s_Content,"{NS:FS_ReviewTF}")>0 then
  925. if f_obj("isShowReview")=1 then
  926. s_Content = replace(s_Content,"{NS:FS_ReviewTF}","<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewUrl.asp?Type=ns&Id="&f_obj("ID")&""">评论</a>")
  927. else
  928. s_Content = replace(s_Content,"{NS:FS_ReviewTF}","")
  929. end if
  930. end if
  931. '_________________________________________________________________________________________________
  932. If InStr(s_Content,"{NS:FS_ReviewURL}")>0 Then
  933. if f_obj("isShowReview")=1 then
  934. s_Content = replace(s_Content,"{NS:FS_ReviewURL}","<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ShowReviewList.asp?type=NS&Id="&f_obj("ID")&""">评</a>")
  935. else
  936. s_Content = replace(s_Content,"{NS:FS_ReviewURL}","")
  937. end if
  938. End if
  939.                    '_________________________________________________________________________________________________
  940. If instr(s_Content,"{NS:FS_ShowComment}")>0 Then
  941. s_Content = replace(s_Content,"{NS:FS_ShowComment}","<label id=""NS_show_review_"& f_obj("ID") &""">评论加载中...</label><script language=""JavaScript"" type=""text/javascript"" src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ShowReview.asp?Id="&f_obj("ID")&"&Type=NS&SpanId=NS_show_review_"& f_obj("ID") &"""></script>")
  942. End If
  943. '_________________________________________________________________________________________________
  944. If instr(s_Content,"{NS:FS_AddFavorite}")>0 Then
  945. s_Content = replace(s_Content,"{NS:FS_AddFavorite}","<a href=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/User/AddFavor.asp?Id="&f_obj("ID")&"&Type=ns""><img src="""& m_PathDir &"sys_images/Favorite.gif"" border=""0"" alt=""加入收藏夹""></a>")
  946. End If
  947. '_________________________________________________________________________________________________
  948. If instr(s_Content,"{NS:FS_SendFriend}")>0 Then
  949. s_Content = replace(s_Content,"{NS:FS_SendFriend}","<a href=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/"&G_USER_DIR&"/Sendmail.asp?Id="&f_obj("NewsId")&"&Type=ns""><img src="""& m_PathDir &"sys_images/sendmail.gif"" border=""0"" alt=""发送给好友""></a>")
  950. End If
  951. '_________________________________________________________________________________________________
  952. If instr(s_Content,"{NS:FS_SpecialList}")>0 Then
  953. if trim(get_SpecialEName)<>"" then
  954. tmp_list = ""
  955. s_array = split(get_SpecialEName,",")
  956. for s_t_i = 0 to ubound(s_array)
  957. set s_m_Rs=Conn.execute("select  SpecialID,SpecialCName,SpecialEName From FS_NS_Special where SpecialEName='"&trim(s_array(s_t_i))&"' order by SpecialID desc")
  958. if not s_m_Rs.eof then
  959. tmp_list = tmp_list &"<a href="""& s_m_Rs("SpecialEName") &""">" & s_m_Rs("SpecialCName") &"</a>&nbsp;"
  960. else
  961. tmp_list = tmp_list
  962. end if
  963. s_m_Rs.close:set s_m_Rs=nothing
  964. next
  965. tmp_list = tmp_list
  966. end if
  967. s_Content = replace(s_Content,"{NS:FS_SpecialList}",tmp_list)
  968. end if
  969. '获得栏目地址_______________________________________________________________________________________________
  970. s_f_classSql = "select ClassID,ClassName,ClassEName,[Domain],ClassNaviContent,ClassNaviPic,SavePath,FileSaveType,ClassKeywords,Classdescription,FileExtName from FS_NS_NewsClass where ClassId='"&f_obj("ClassId")&"' and ReycleTF=0 order by OrderID desc,id desc"
  971. If instr(s_Content,"{NS:FS_ClassURL}")>0 then
  972. class_path=get_ClassLink(f_obj("ClassId"))
  973. s_Content = replace(s_Content,"{NS:FS_ClassURL}",class_path)
  974. End If
  975. if instr(s_Content,"{NS:FS_ClassName}")>0 then
  976. set m_Rs_class = Conn.execute(s_f_classSql)
  977. s_Content = replace(s_Content,"{NS:FS_ClassName}",""&m_Rs_class("ClassName")&"")
  978. m_Rs_class.close:set m_Rs_class=nothing
  979. end if
  980. if instr(s_Content,"{NS:FS_ClassNaviPicURL}")>0 then
  981. set m_Rs_class = Conn.execute(s_f_classSql)
  982. if trim(m_Rs_class("ClassNaviPic"))<>"" then
  983. s_Content = replace(s_Content,"{NS:FS_ClassNaviPicURL}",""& m_Rs_class("ClassNaviPic") &"")
  984. else
  985. s_Content = replace(s_Content,"{NS:FS_ClassNaviPicURL}","")
  986. end if
  987. m_Rs_class.close:set m_Rs_class=nothing
  988. end if
  989. if instr(s_Content,"{NS:FS_ClassNaviDescript}")>0 then
  990. set m_Rs_class = Conn.execute(s_f_classSql)
  991. if trim(m_Rs_class("ClassNaviContent"))<>"" then
  992. s_Content = replace(s_Content,"{NS:FS_ClassNaviDescript}",""& m_Rs_class("ClassNaviContent") &"")
  993. else
  994. s_Content = replace(s_Content,"{NS:FS_ClassNaviDescript}","")
  995. end if
  996. m_Rs_class.close:set m_Rs_class=nothing
  997. end if
  998. if instr(s_Content,"{NS:FS_ClassNaviContent}")>0 then
  999. set m_Rs_class = Conn.execute(s_f_classSql)
  1000. s_Content = replace(s_Content,"{NS:FS_ClassNaviContent}",""&m_Rs_class("ClassNaviContent"))
  1001. m_Rs_class.close:set m_Rs_class=nothing
  1002. end if
  1003. if instr(s_Content,"{NS:FS_ClassKeywords}")>0 then
  1004. set m_Rs_class = Conn.execute(s_f_classSql)
  1005. s_Content = replace(s_Content,"{NS:FS_ClassKeywords}",""&m_Rs_class("ClassKeywords"))
  1006. m_Rs_class.close:set m_Rs_class=nothing
  1007. end if
  1008. if instr(s_Content,"{NS:FS_Classdescription}")>0 then
  1009. set m_Rs_class = Conn.execute(s_f_classSql)
  1010. s_Content = replace(s_Content,"{NS:FS_Classdescription}",""&m_Rs_class("Classdescription"))
  1011. m_Rs_class.close:set m_Rs_class=nothing
  1012. end if
  1013. '这里暂时用*代替
  1014. '以下为通用专题使用##############################################################################
  1015. Dim m_Rs_special,m_sp_sql,array_special,i_special,s_SpecialName,m_save_special,special_UrlDomain
  1016. if instr(s_Content,"{NS:FS_SpecialName}")>0 then
  1017. if trim(get_SpecialEName)<>"" then
  1018. s_SpecialName = ""
  1019. array_special = split(get_SpecialEName,",")
  1020. for i_special = 0 to Ubound(array_special)
  1021. m_sp_sql = "select SpecialID,SpecialCName,SpecialEName,SpecialContent,SavePath,ExtName,isLock,naviPic From FS_NS_Special where isLock=0 and SpecialEName='"&trim(array_special(i_special))&"'"
  1022. set m_Rs_special=Conn.execute(m_sp_sql)
  1023. if not m_Rs_special.eof then
  1024. m_save_special = get_specialLink(m_Rs_special("m_Rs_special"))
  1025. if i_special=ubound(array_special) then
  1026. s_SpecialName = s_SpecialName & "<a href="""&m_save_special&""">" &m_Rs_special("SpecialCName")&"</a>"
  1027. else
  1028. s_SpecialName = s_SpecialName & "<a href="""&m_save_special&""">" &m_Rs_special("SpecialCName")&"</a>&nbsp;"
  1029. end if
  1030. else
  1031. s_SpecialName = ""
  1032. end if
  1033. next
  1034. s_Content = replace(s_Content,"{NS:FS_SpecialName}",s_SpecialName)
  1035. else
  1036. s_Content = replace(s_Content,"{NS:FS_SpecialName}","")
  1037. end if
  1038. end if
  1039. 'if instr(s_Content,"{NS:FS_SpecialURL}")>0 then
  1040. 'dim m_sp_sql,m_Rs_special
  1041. 'm_sp_sql = "select SpecialID,SpecialCName,SpecialEName,SpecialContent,SavePath,ExtName,isLock,naviPic From FS_NS_Special where isLock=0 and SpecialEName='"&trim(array_special(i_special))&"'"
  1042. 'set m_Rs_special=Conn.execute(m_sp_sql)
  1043. s_Content = replace(s_Content,"{NS:FS_SpecialURL}","")
  1044. 'end if
  1045. s_Content = replace(s_Content,"{NS:FS_SpecialNaviPicURL}","")
  1046. s_Content = replace(s_Content,"{NS:FS_SpecialNaviDescript}","")
  1047. '以下是自定义字段替换
  1048. if instr(s_Content,"{NS=Define|")>0 then
  1049. dim define_rs_sql,define_rs
  1050. define_rs_sql="select ID,TableEName,ColumnName,ColumnValue,InfoID,InfoType From FS_MF_DefineData where InfoType='NS' and InfoID='"&f_obj("NewsId")&"' order by ID desc"
  1051. set define_rs=Conn.execute(define_rs_sql)
  1052. if not define_rs.eof  then
  1053. do while not define_rs.eof
  1054. s_Content = replace(s_Content,"{NS=Define|"&define_rs("TableEName")&"}",""&define_rs("ColumnValue"))
  1055. define_rs.movenext
  1056. loop
  1057. define_rs.close:set define_rs=nothing
  1058. else
  1059. dim define_class_sql,define_class_rs
  1060. define_class_sql="select D_Coul From FS_MF_DefineTable where D_SubType='NS' order  by DefineID desc"
  1061. set define_class_rs=Conn.execute(define_class_sql)
  1062. if not define_class_rs.eof then
  1063. do while not define_class_rs.eof
  1064. s_Content = replace(s_Content,"{NS=Define|"&define_class_rs("D_Coul")&"}","")
  1065. define_class_rs.movenext
  1066. loop
  1067. end if
  1068. define_class_rs.close:set define_class_rs=nothing
  1069. define_rs.close:set define_rs=nothing
  1070. end if
  1071. end if
  1072. '释放对象
  1073. Rs_ListObj.close:set Rs_ListObj=nothing
  1074. else
  1075. m_Err_Info = "NS警告:此新闻找不到样式,没生成"
  1076. m_Err_No="NS:nostyle"
  1077. s_Content=""
  1078. Rs_ListObj.close:set Rs_ListObj=nothing
  1079. end if
  1080. else
  1081. m_Err_Info = "NS警告:找不到此新闻"
  1082. m_Err_No="NS:nodata"
  1083. s_Content=""
  1084. end if
  1085. getlist_news = s_Content
  1086. End Function
  1087. '得到新闻单个地址____________________________________________________________
  1088. Public Function get_NewsLink(f_id)
  1089. get_NewsLink = ""
  1090. dim rs,config_rs,config_mf_rs,class_rs
  1091. dim SaveNewsPath,FileName,FileExtName,ClassId,LinkType,MF_Domain,Url_Domain,ClassEName,c_Domain,c_SavePath,IsDomain
  1092. set rs = Conn.execute("select ID,IsURL,URLAddress,ClassId,NewsId,SaveNewsPath,FileName,FileExtName From FS_NS_News where NewsId='"&f_id&"'")
  1093. SaveNewsPath = rs("SaveNewsPath")
  1094. FileName = rs("FileName")
  1095. FileExtName = rs("FileExtName")
  1096. ClassId = rs("ClassId")
  1097. LinkType = Request.Cookies("FoosunNSCookies")("FoosunNSLinkType")
  1098. IsDomain = Request.Cookies("FoosunNSCookies")("FoosunNSDomain")
  1099. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  1100. set class_rs = Conn.execute("select ClassEName,IsURL,URLAddress,[Domain],SavePath From FS_NS_NewsClass where ClassId='"&ClassId&"'")
  1101. if not class_rs.eof then
  1102. ClassEName = class_rs("ClassEName")
  1103. c_Domain = class_rs("Domain")
  1104. c_SavePath = class_rs("SavePath")
  1105. class_rs.close:set class_rs=nothing
  1106. else
  1107. ClassEName = ""
  1108. class_rs.close:set class_rs=nothing
  1109. end if
  1110. if not rs.eof then
  1111. if rs("IsURL")=0 then
  1112. if LinkType = 1 then
  1113. if trim(c_Domain)<>"" then
  1114. Url_Domain = "http://"&c_Domain
  1115. else
  1116. if trim(IsDomain)<>"" then
  1117. Url_Domain = "http://"&IsDomain
  1118. else
  1119. Url_Domain = "http://"&MF_Domain
  1120. end if
  1121. end if
  1122. else
  1123. if trim(c_Domain)<>"" then
  1124. Url_Domain = "http://"&c_Domain
  1125. else
  1126. if trim(IsDomain)<>"" then
  1127. Url_Domain = "http://"&IsDomain
  1128. else
  1129. Url_Domain = ""
  1130. end if
  1131. end if
  1132. end if
  1133. if trim(c_Domain)<>"" then
  1134. get_NewsLink = Url_Domain & SaveNewsPath &"/"&FileName&"."&FileExtName
  1135. else
  1136. get_NewsLink = Url_Domain & c_SavePath& "/" & ClassEName &SaveNewsPath &"/"&FileName&"."&FileExtName
  1137. end if
  1138. else
  1139. get_NewsLink = rs("URLAddress")
  1140. end if
  1141. rs.close:set rs=nothing
  1142.   else
  1143. get_NewsLink = ""
  1144. rs.close:set rs=nothing
  1145.   end if
  1146.   get_NewsLink = get_NewsLink
  1147. End Function
  1148. '得到栏目地址________________________________________________________________
  1149. Public function get_ClassLink(f_id)
  1150. dim IsDomain,LinkType,MF_Domain,c_rs,ClassEName,c_Domain,Url_Domain,ClassSaveType,class_savepath,FileExtName,c_SavePath
  1151. LinkType = Request.Cookies("FoosunNSCookies")("FoosunNSLinkType")
  1152. IsDomain = Request.Cookies("FoosunNSCookies")("FoosunNSDomain")
  1153. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  1154. set c_rs=conn.execute("select id,IsURL,UrlAddress,ClassId,ClassEName,[Domain],FileSaveType,FileExtName,SavePath From FS_NS_NewsClass where ClassId='"&f_id&"'")
  1155. if not c_rs.eof then
  1156. if c_rs("IsURL")=0 then
  1157. ClassEName = c_rs("ClassEName")
  1158. c_Domain = c_rs("Domain")
  1159. FileExtName = c_rs("FileExtName")
  1160. ClassSaveType = c_rs("FileSaveType")
  1161. c_SavePath= c_rs("SavePath")
  1162. if trim(c_Domain)<>"" then
  1163. if ClassSaveType=0 then
  1164. class_savepath = "Index."&FileExtName
  1165. elseif ClassSaveType=1 then
  1166. class_savepath =ClassEName &"."&FileExtName
  1167. else
  1168. class_savepath = ClassEName &"."&FileExtName
  1169. end if
  1170. else
  1171. if ClassSaveType=0 then
  1172. class_savepath = ClassEName&"/Index."&FileExtName
  1173. elseif ClassSaveType=1 then
  1174. class_savepath = ClassEName&"/"& ClassEName &"."&FileExtName
  1175. else
  1176. class_savepath = ClassEName &"."&FileExtName
  1177. end if
  1178. end if
  1179. if LinkType = 1 then
  1180. if trim(c_Domain)<>"" then
  1181. Url_Domain = "http://"&c_Domain
  1182. else
  1183. if trim(IsDomain)<>"" then
  1184. Url_Domain = "http://"&IsDomain
  1185. else
  1186. Url_Domain = "http://"&MF_Domain
  1187. end if
  1188. end if
  1189. else
  1190. if trim(c_Domain)<>"" then
  1191. Url_Domain = "http://"&c_Domain
  1192. else
  1193. if trim(IsDomain)<>"" then
  1194. Url_Domain = "http://"&IsDomain
  1195. else
  1196. Url_Domain = ""
  1197. end if
  1198. end if
  1199. end if
  1200. if trim(c_Domain)<>"" then
  1201. get_ClassLink = Url_Domain&Replace("/"&class_savepath,"//","/")
  1202. else
  1203. get_ClassLink = Url_Domain&Replace(c_SavePath&"/"&class_savepath,"//","/")
  1204. end if
  1205. else
  1206. get_ClassLink = c_rs("UrlAddress")
  1207. end if
  1208. c_rs.close:set c_rs=nothing
  1209. else
  1210. c_rs.close:set c_rs=nothing
  1211. get_ClassLink = ""
  1212. end if
  1213. get_ClassLink = get_ClassLink
  1214. End function
  1215. '得到专题地址________________________________________________________________
  1216. Public function get_specialLink(f_id)
  1217. dim IsDomain,LinkType,MF_Domain,c_rs,SpecialEName,ExtName,c_SavePath,Url_Domain
  1218. LinkType = Request.Cookies("FoosunNSCookies")("FoosunNSLinkType")
  1219. IsDomain = Request.Cookies("FoosunNSCookies")("FoosunNSDomain")
  1220. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  1221. set c_rs=conn.execute("select SpecialID,SpecialCName,SpecialEName,SavePath,ExtName,isLock From FS_NS_Special where SpecialEName='"&f_id&"'")
  1222. if not c_rs.eof then
  1223. SpecialEName = c_rs("SpecialEName")
  1224. ExtName = c_rs("ExtName")
  1225. c_SavePath= c_rs("SavePath")
  1226. if LinkType = 1 then
  1227. if trim(IsDomain)<>"" then
  1228. Url_Domain = "http://"&IsDomain
  1229. else
  1230. Url_Domain = "http://"&MF_Domain
  1231. end if
  1232. else
  1233. if trim(IsDomain)<>"" then
  1234. Url_Domain = "http://"&IsDomain
  1235. else
  1236. Url_Domain = ""
  1237. end if
  1238. end if
  1239. get_specialLink = Url_Domain&c_SavePath&"/special_"&SpecialEName&"."&ExtName
  1240. c_rs.close:set c_rs=nothing
  1241. else
  1242. c_rs.close:set c_rs=nothing
  1243. get_specialLink = ""
  1244. end if
  1245. get_specialLink = get_specialLink
  1246. End function
  1247. '得到子类____________________________________________________________________
  1248. Public Function get_ClassList(TypeID,CompatStr,f_css)
  1249. Dim ChildTypeListRs,ChildTypeListStr,TempStr,i,Sql
  1250. Set ChildTypeListRs = Server.CreateObject(G_FS_RS)
  1251. Sql = "Select ParentID,ClassID,ClassName from FS_NS_NewsClass where ParentID='" & TypeID & "' and ReycleTF=0 order by OrderID desc,id desc"
  1252. ChildTypeListRs.open sql,conn,1,1
  1253. TempStr = CompatStr
  1254. do while Not ChildTypeListRs.Eof
  1255. get_ClassList = get_ClassList & TempStr
  1256. get_ClassList = get_ClassList & "<img src="""&m_PathDir&"sys_images/-.gif"" border=""0""><a href="""&get_ClassLink(ChildTypeListRs("ClassId"))&""" class="""& f_css &""">"&ChildTypeListRs("ClassName")&"</a>"&vbNewLine
  1257. get_ClassList = get_ClassList & get_ClassList(ChildTypeListRs("ClassID"),TempStr,f_css)
  1258. ChildTypeListRs.MoveNext
  1259. loop
  1260. ChildTypeListRs.Close:Set ChildTypeListRs = Nothing
  1261. End Function
  1262. '得到option子类______________________________________________________________
  1263. Public Function get_optionNewsList(TypeID,CompatStr)
  1264. Dim ChildTypeListRs,ChildTypeListStr,TempStr
  1265. Set ChildTypeListRs = Conn.execute("Select ParentID,ClassID,ClassName from FS_NS_NewsClass where ParentID='" & TypeID & "' and ReycleTF=0 order by OrderID desc,id desc")
  1266. TempStr = CompatStr & "┉"
  1267. do while Not ChildTypeListRs.Eof
  1268. get_optionNewsList = get_optionNewsList &"<option value="""&ChildTypeListRs("ClassId")&""">"& TempStr
  1269. get_optionNewsList = get_optionNewsList & "┉"&ChildTypeListRs("ClassName")&"</option>"&vbNewLine
  1270. get_optionNewsList = get_optionNewsList & get_optionNewsList(ChildTypeListRs("ClassID"),TempStr)
  1271. ChildTypeListRs.MoveNext
  1272. loop
  1273. ChildTypeListRs.Close:Set ChildTypeListRs = Nothing
  1274. End Function
  1275. Public Function getNewsSubClass(typeID)
  1276. Dim childClassRs,result,Str_SubClassID
  1277. result=""
  1278. Set childClassRs=Conn.execute("Select ParentID,ClassID from FS_NS_NewsClass where ParentID='" & TypeID & "' and ReycleTF=0 order by OrderID desc,id desc")
  1279. While Not childClassRs.eof
  1280. If result="" Then
  1281. result="'"&childClassRs("classID")&"'"
  1282. Else
  1283. result=result&",'"&childClassRs("classID")&"'"
  1284. End If
  1285. Str_SubClassID=getNewsSubClass(childClassRs("classID"))
  1286. If Str_SubClassID<>"" Then
  1287. result=result&","&Str_SubClassID
  1288. End If
  1289. childClassRs.movenext
  1290. Wend
  1291. childClassRs.close:Set childClassRs=nothing
  1292. getNewsSubClass=result
  1293. End function
  1294. End Class
  1295. %>