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

数据库编程

开发平台:

ASP/ASPX

  1. <%
  2. Class cls_NS
  3. '风讯新闻刷新代码获得类,用于获得代码
  4. '方法:Fs_ns.Get_LableChar("标签代码","")
  5. 'Copyright (c)2002-2006 Foosun.cn code by simpwind.xie LastTime:06年9月7日
  6. '非经风讯公司正版许可,请勿用于商业用途
  7. '官方站:Foosun.cn
  8. '技术支持论坛:bbs.foosun.net
  9. 'QQ:655071(欢迎和您交流。^_^)
  10. '定义参数____________________________________________________________________
  11. Private m_Rs,m_FSO,m_Dict
  12. Private m_PathDir,m_Path_UserDir,m_Path_User,m_Path_adminDir,m_Path_UserPageDir,m_Path_Templet
  13. Private m_Err_Info,m_Err_NO
  14. Public Property Get Err_Info()
  15. Err_Info = m_Err_Info
  16. End Property
  17. Public Property Get Err_NO()
  18. Err_NO = m_Err_NO
  19. End Property
  20. Private Sub Class_initialize()
  21. Set m_Rs = Server.CreateObject(G_FS_RS)
  22. Set m_FSO = Server.CreateObject(G_FS_FSO)
  23. Set m_Dict = Server.CreateObject(G_FS_DICT)
  24. m_PathDir = replace("/"&G_VIRTUAL_ROOT_DIR&"/","//","/")
  25. m_Path_UserDir = replace("/"&G_VIRTUAL_ROOT_DIR&"/"&G_USER_DIR&"/","//","/")
  26. m_Path_UserPageDir = replace("/"&G_VIRTUAL_ROOT_DIR&"/"&G_USERFILES_DIR&"/","//","/")
  27. m_Path_Templet  = replace("/"&G_VIRTUAL_ROOT_DIR&"/"&G_TEMPLETS_DIR&"/","//","/")
  28. End Sub
  29. Private Sub Class_Terminate()
  30. Set m_Rs = Nothing
  31. Set m_FSO = Nothing
  32. Set m_Dict = Nothing
  33. End Sub
  34. '获得参数____________________________________________________________________
  35. Public Function get_LableChar(f_Lablechar,f_Id)
  36. Dim f_array
  37. f_array= split(f_Lablechar,"┆")
  38. if ubound(f_array)=0 and not isarray(f_array) then
  39. get_LableChar=""
  40. exit Function
  41. else
  42. select case LCase(f_array(0))
  43. case "classnews"
  44. if ubound(f_array)<>18  and  ubound(f_array)<>24 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNews(f_Lablechar,"classnews",f_Id):end if
  45. case "specialnews"
  46. if ubound(f_array)<>18  and  ubound(f_array)<>24 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNews(f_Lablechar,"specialnews",f_Id):end if
  47. case "lastnews"
  48. if ubound(f_array)<>18  and  ubound(f_array)<>24 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNews(f_Lablechar,"lastnews",f_Id):end if
  49. case "hotnews"
  50. if ubound(f_array)<>18  and  ubound(f_array)<>24 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNews(f_Lablechar,"hotnews",f_Id):end if
  51. case "recnews"
  52. if ubound(f_array)<>18  and  ubound(f_array)<>24 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNews(f_Lablechar,"recnews",f_Id):end if
  53. case "marnews"
  54. if ubound(f_array)<>20  and  ubound(f_array)<>26 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNews(f_Lablechar,"marnews",f_Id):end if
  55. case "brinews"
  56. if ubound(f_array)<>18  and  ubound(f_array)<>24 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNews(f_Lablechar,"brinews",f_Id):end if
  57. case "annnews"
  58. if ubound(f_array)<>18  and  ubound(f_array)<>24 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNews(f_Lablechar,"annnews",f_Id):end if
  59. case "constrnews"
  60. if ubound(f_array)<>18  and  ubound(f_array)<>24 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNews(f_Lablechar,"constrnews",f_Id):end if
  61. case "classlist"
  62. if ubound(f_array)<>18  and  ubound(f_array)<>24 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=classlist(f_Lablechar,"classlist",f_Id):end if
  63. case "speciallist"
  64. if ubound(f_array)<>18  and  ubound(f_array)<>24 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=classlist(f_Lablechar,"speciallist",f_Id):end if
  65. '常规标签类
  66. case "flashfilt"
  67. if ubound(f_array)<>5   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=flashfilt(f_Lablechar,"flashfilt",f_Id):end if
  68. case "norfilt"
  69. if ubound(f_array)<>7   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=NorFilter(f_Lablechar,"NorFilt",f_Id):end if
  70. case "readnews"
  71. if ubound(f_array)<>2   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ReadNews(f_Lablechar,"readnews",f_Id):end if
  72. case "sitemap"
  73. if ubound(f_array)<>2   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=SiteMap(f_Lablechar,"sitemap",f_Id):end if
  74. case "search"
  75. if ubound(f_array)<>2   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Search(f_Lablechar,"search"):end if
  76. case "infostat"
  77. if ubound(f_array)<>1   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=infoStat(f_Lablechar,"infostat"):end if
  78. case "todaypic"
  79. if ubound(f_array)<>1   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=TodayPic(f_Lablechar,"todaypic",f_Id):end if
  80. case "todayword"
  81. if ubound(f_array)<>13   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=TodayWord(f_Lablechar,"todayword",f_Id):end if
  82. case "classnavi"
  83. if ubound(f_array)<>11   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNavi(f_Lablechar,"classnavi",f_Id):end if
  84. case "specialnavi"
  85. if ubound(f_array)<>10   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=SpecialNavi(f_Lablechar,"specialnavi",f_Id):end if
  86. case "rssfeed"
  87. if ubound(f_array)<>1   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=RssFeed(f_Lablechar,"rssfeed",f_Id):end if
  88. case "specialcode"
  89. if ubound(f_array)<>17   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=SpecialCode(f_Lablechar,"specialcode",f_Id):end if
  90. case "classcode"
  91. if ubound(f_array)<>17   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassCode(f_Lablechar,"classcode",f_Id):end if
  92. case "definenews"
  93. if ubound(f_array)<>10   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=DefineNews(f_Lablechar,"definenews",f_Id):end if
  94. case "oldnews"
  95. if ubound(f_array)<>1   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=OldNews(f_Lablechar,"oldnews",f_Id):end if
  96. case "c_news"
  97. if ubound(f_array)<>5   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=c_news(f_Lablechar,"c_news",f_Id):end if
  98. case "subclasslist"
  99. if ubound(f_array)<>21 and  ubound(f_array)<>27  then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=subClassList(f_Lablechar,"subclasslist",f_Id):end if
  100. case "allcode"
  101. if ubound(f_array)<>17 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=AllCode(f_Lablechar,"allcode",f_Id):end if
  102. case "classinfo"
  103. if ubound(f_array)<>1 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassInfo(f_Lablechar,"ClassInfo",f_Id):end if
  104. end select
  105. end if
  106. End Function
  107. 'DIV输出_____________________________________________________________________
  108. '得到div,table_________________________________________________________________________________
  109. Public Function table_str_list_head(f_tf,f_divid,f_divclass,f_ulid,f_ulclass)
  110. Dim table_,tr_
  111. Dim f_divid_1,f_divclass_1,f_ulid_1,f_ulclass_1
  112. if f_tf=1 then
  113. if f_divid<>"" then:f_divid_1 = " id="""& f_divid &"""":else:f_divid_1 = "":end if
  114. if f_divclass<>"" then:f_divclass_1 = " class="""& f_divclass &"""":else:f_divclass_1 = "":end if
  115. if f_ulid<>"" then:f_ulid_1 = " id="""& f_ulid &"""":else:f_ulid_1 = "":end if
  116. if f_ulclass<>"" then:f_ulclass_1 = " class="""& f_ulclass &"""":else:f_ulclass_1 = "":end if
  117. table_="<div"& f_divid_1 & f_divclass_1 &">"
  118. tr_="<ul"& f_ulid_1 & f_ulclass_1 &">"
  119. table_str_list_head =  table_&vbNewLine
  120. table_str_list_head = table_str_list_head &" "& tr_&vbNewLine
  121. else
  122. table_="<table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  123. table_str_list_head =  table_&vbNewLine
  124. end if
  125. End Function
  126. '得到div,table_________________________________________________________________________________
  127. public Function table_str_list_middle_1(f_tf,f_liid,f_liclass)
  128. Dim f_liid_1,f_liclass_1,td_
  129. if f_tf=1 then
  130. if f_liid<>"" then:f_liid_1 = " id="""& f_liid &"""":else:f_liid_1 = "":end if
  131. if f_liclass<>"" then:f_liclass_1 = " class="""& f_liclass &"""":else:f_liclass_1 = "":end if
  132. td_="<li"&f_liid_1&f_liclass_1&">"
  133. table_str_list_middle_1 ="  "&td_
  134. end if
  135. End Function
  136. '得到div,table_________________________________________________________________________________
  137. public Function table_str_list_middle_2(f_tf)
  138. Dim td__,tr__
  139. if f_tf=1 then
  140. td__="</li>"
  141. else
  142. td__="</td>"
  143. end if
  144. table_str_list_middle_2 =  td__&vbNewLine
  145. End Function
  146. '得到div,table_________________________________________________________________________________
  147. Public Function table_str_list_middle_3(f_tf)
  148. if f_tf=1 then
  149. table_str_list_middle_3 = ""
  150. else
  151. table_str_list_middle_3 = "</tr>"
  152. end if
  153. End Function
  154. '得到div,table_________________________________________________________________________________
  155. Public Function table_str_list_bottom(f_tf)
  156. Dim table__,tr__
  157. if f_tf=1 then
  158. table__="</div>"
  159. tr__="</ul>"
  160. table_str_list_bottom = " "&tr__&vbNewLine
  161. else
  162. table__="</table>"
  163. table_str_list_bottom = ""
  164. end if
  165. table_str_list_bottom = table_str_list_bottom &table__&vbNewLine
  166. End Function
  167. 'DIV格式输出结束_____________________________________________________________
  168. '通用类标签
  169. Public Function AllCode(f_Lablechar,f_type,f_Id)
  170. 'AllCode┆类型$HotNews┆调用数$10┆标题数$40┆点击数$0┆图片新闻$0┆排列数$1┆日期格式$YY02年MM月DD日┆引用样式$41┆输出格式$out_Table┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$
  171. Dim MF_Domain,LableType,CodeNumer,LeftTitle,ClickNum,PicTF,ColsNumer,DateStyle,Style_Id,contentNum,NaviNum,div_tf,table_array
  172. Dim SearSQL,f_rs_obj,f_sql,picnewstf,orderby,HotStr,Content_List,tjstr
  173. Dim classNews_head,classNews_middle1,classNews_bottom,classNews_middle2,c_i_k
  174. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  175. LableType = split(split(f_Lablechar,"┆")(1),"$")(1)
  176. CodeNumer = split(split(f_Lablechar,"┆")(2),"$")(1)
  177. if not isnumeric(CodeNumer) then:CodeNumer = 10:else:CodeNumer = cint(CodeNumer):end if
  178. LeftTitle = split(split(f_Lablechar,"┆")(3),"$")(1)
  179. if not isnumeric(LeftTitle) then:LeftTitle = 40:else:LeftTitle = cint(LeftTitle):end if
  180. ClickNum = split(split(f_Lablechar,"┆")(4),"$")(1)
  181. PicTF = split(split(f_Lablechar,"┆")(5),"$")(1)
  182. ColsNumer = split(split(f_Lablechar,"┆")(6),"$")(1)
  183. DateStyle = split(split(f_Lablechar,"┆")(7),"$")(1)
  184. Style_Id = split(split(f_Lablechar,"┆")(8),"$")(1)
  185. contentNum = split(split(f_Lablechar,"┆")(16),"$")(1)
  186. if not isnumeric(contentNum) then:contentNum = 200:else:contentNum = cint(contentNum):end if
  187. NaviNum = split(split(f_Lablechar,"┆")(17),"$")(1)
  188. if not isnumeric(NaviNum) then:NaviNum = 200:else:NaviNum = cint(NaviNum):end if
  189. if instr(f_Lablechar,"out_DIV")>0 then:div_tf = 1:else:div_tf = 0:end if
  190. table_array=split(f_Lablechar,"┆")
  191. classNews_head = table_str_list_head(div_tf,split(table_array(10),"$")(1),split(table_array(11),"$")(1),split(table_array(12),"$")(1),split(table_array(13),"$")(1))
  192. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(14),"$")(1),split(table_array(15),"$")(1))
  193. classNews_bottom = table_str_list_bottom(div_tf)
  194. classNews_middle2 = table_str_list_middle_2(div_tf)
  195. if f_id<>"" then
  196. dim news_rs
  197. set news_rs = Conn.execute("select Id From FS_NS_NewsClass where ClassID='"& f_id &"'")
  198. if news_rs.eof then
  199. SearSQL = ""
  200. news_rs.close:set news_rs=nothing
  201. else
  202. SearSQL = " and ClassId='"& f_id &"'"
  203. news_rs.close:set news_rs=nothing
  204. end if
  205. else
  206. SearSQL = ""
  207. end if
  208. if PicTF = "1" then
  209. picnewstf = "  and isPicNews=1"
  210. else
  211. picnewstf = ""
  212. end if 
  213. if LableType = "HotNews" then
  214. orderby = " order by Hits desc,Popid desc,addtime desc"
  215. if ClickNum<>"0" then
  216. HotStr = " and where Hits>="& clng(ClickNum) &""
  217. else
  218. HotStr = ""
  219. end if
  220. else
  221. orderby = " order by Popid desc,addtime desc"
  222. HotStr = ""
  223. end if
  224. select Case LableType
  225. Case "HotNews"
  226. tjstr = " and "& all_substring &"(NewsProperty,13,1)='1'"
  227. Case "LastNews"
  228. tjstr = ""
  229. Case "RecNews"
  230. tjstr = " and "& all_substring &"(NewsProperty,1,1)='1'"
  231. Case "MarqueeNews"
  232. tjstr = " and "& all_substring &"(NewsProperty,3,1)='1'"
  233. Case "JcNews"
  234. tjstr = " and "& all_substring &"(NewsProperty,15,1)='1'"
  235. Case else
  236. tjstr = ""
  237. end select
  238. f_sql="select top "& cint(CodeNumer) &" ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
  239. f_sql = f_sql &",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
  240. f_sql = f_sql &"From FS_NS_News where isLock=0 "& picnewstf & SearSQL & HotStr & tjstr &" and  isRecyle=0 and isdraft=0 "&orderby&",id desc"
  241. set f_rs_obj = Conn.execute(f_sql)
  242. if f_rs_obj.eof then
  243. Content_List=""
  244. f_rs_obj.close:set f_rs_obj=nothing
  245. else
  246. if div_tf = 0 then
  247. c_i_k = 0
  248. if cint(ColsNumer)<>1 then
  249. Content_List = Content_List &  "  <tr>"
  250. end if
  251. end if
  252. do while not f_rs_obj.eof
  253. if div_tf=1 then
  254. Content_List= Content_List & classNews_middle1 & getlist_news(f_rs_obj,Style_Id,LeftTitle,contentNum,NaviNum,0,DateStyle,0,MF_Domain,f_type) & classNews_middle2
  255. else
  256. if cint(ColsNumer) =1 then
  257. Content_List= Content_List & vbNewLine&"   <tr><td>" & getlist_news(f_rs_obj,Style_Id,LeftTitle,contentNum,NaviNum,0,DateStyle,0,MF_Domain,f_type) & "</td></tr>"
  258. else
  259. Content_List= Content_List & "<td width="""& cint(100/cint(ColsNumer))&"%"">" & getlist_news(f_rs_obj,Style_Id,LeftTitle,contentNum,NaviNum,0,DateStyle,0,MF_Domain,f_type) & "</td>"
  260. end if
  261. end if
  262. f_rs_obj.movenext
  263. if div_tf = 0 then
  264. if cint(ColsNumer)<>1 then
  265. c_i_k = c_i_k+1
  266. if c_i_k mod cint(ColsNumer) = 0 then
  267. Content_List = Content_List & "</tr>"&vbNewLine&"  <tr>"
  268. end if
  269. end if
  270. end if
  271.    loop
  272.    if div_tf=0 then
  273. if cint(ColsNumer)<>1 then
  274. Content_List = Content_List & "</tr>"&vbNewLine
  275. end if
  276.    end if
  277. f_rs_obj.close:set f_rs_obj=nothing
  278. Content_List=classNews_head & Content_List & classNews_bottom
  279. end if 
  280. AllCode = Content_List
  281. End Function
  282. Public Function ClassInfo(f_Lablechar,f_type,f_Id)
  283. 'AllCode┆类型$HotNews┆调用数$10┆标题数$40┆点击数$0┆图片新闻$0┆排列数$1┆日期格式$YY02年MM月DD日┆引用样式$41┆输出格式$out_Table┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$
  284. Dim LableType,Style_Id,Content_List,InfoType
  285. Dim f_rs_obj,f_sql
  286. InfoType = split(split(f_Lablechar,"┆")(1),"$")(1)
  287. if f_id<>"" then
  288. Select Case InfoType
  289. Case "Keywords"
  290. f_sql="select ClassKeywords From FS_NS_NewsClass where ClassID='"& f_id &"'"
  291. Case "Description"
  292. f_sql="select ClassDescription From FS_NS_NewsClass where ClassID='"& f_id &"'"
  293. End Select
  294. set f_rs_obj = Conn.execute(f_sql)
  295. if Not f_rs_obj.eof then
  296. Content_List = f_rs_obj(0)
  297. else
  298. Content_List = ""
  299. end if
  300. f_rs_obj.close:set f_rs_obj=nothing
  301. else
  302. Content_List = ""
  303. End if
  304. ClassInfo = Content_List
  305. End Function
  306. '开始读取标签____综合类标签__________________________________________________
  307. Public Function ClassNews(f_Lablechar,f_LableType,f_Id)
  308. Dim table_array,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2,div_tf,style_id,style_Content,Content_List,f_rs_s_obj,Content_more,c_i_k
  309. Dim newnumber,classid,orderby,orderdesc,colnumber,contentnumber,navinumber,datenumber,titlenumber,picshowtf,datenumber_tmp,morechar,datestyle,openstyle,open_target,containSubClass,childClass
  310. Dim f_sql,f_rs_obj,f_rs_configobj,f_configSql,CharIndexStr
  311. Dim MF_Domain,marqueedirec,marqueespeed,marqueestyle
  312. Dim search_str
  313. Dim ClassName,ClassEName,c_Domain,ClassNaviContent,ClassNaviPic,c_SavePath,c_FileSaveType,search_inSQL
  314. Dim Exist_Child_ClassID,picnewstf
  315. table_array=split(f_Lablechar,"┆")
  316. if instr(f_Lablechar,"out_DIV")>0 then
  317. div_tf=1
  318. search_str = split(split(f_Lablechar,"┆")(2),"$")(1)
  319. picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
  320. newnumber =split(split(f_Lablechar,"┆")(3),"$")(1)
  321. datenumber= split(split(f_Lablechar,"┆")(11),"$")(1)
  322. titlenumber= split(split(f_Lablechar,"┆")(12),"$")(1)
  323. picshowtf=split(split(f_Lablechar,"┆")(13),"$")(1)
  324. openstyle=split(split(f_Lablechar,"┆")(14),"$")(1)
  325. containSubClass=split(split(f_Lablechar,"┆")(15),"$")(1)
  326. orderby = split(split(f_Lablechar,"┆")(16),"$")(1)
  327. orderdesc = split(split(f_Lablechar,"┆")(17),"$")(1)
  328. morechar = split(split(f_Lablechar,"┆")(18),"$")(1)
  329. datestyle = split(split(f_Lablechar,"┆")(20),"$")(1)
  330. style_id = split(split(f_Lablechar,"┆")(21),"$")(1)
  331. colnumber= split(split(f_Lablechar,"┆")(22),"$")(1)
  332. contentnumber= split(split(f_Lablechar,"┆")(23),"$")(1)
  333. navinumber= split(split(f_Lablechar,"┆")(24),"$")(1)
  334. if f_LableType="marnews" then
  335. marqueespeed=split(split(f_Lablechar,"┆")(25),"$")(1)
  336. marqueedirec=split(split(f_Lablechar,"┆")(26),"$")(1)
  337. end if
  338. else
  339. div_tf=0
  340. picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
  341. search_str = split(split(f_Lablechar,"┆")(2),"$")(1)
  342. newnumber = split(split(f_Lablechar,"┆")(3),"$")(1)
  343. datenumber= split(split(f_Lablechar,"┆")(5),"$")(1)
  344. titlenumber= split(split(f_Lablechar,"┆")(6),"$")(1)
  345. picshowtf=split(split(f_Lablechar,"┆")(7),"$")(1)
  346. openstyle=split(split(f_Lablechar,"┆")(8),"$")(1)
  347. containSubClass=split(split(f_Lablechar,"┆")(9),"$")(1)
  348. orderby = split(split(f_Lablechar,"┆")(10),"$")(1)
  349. orderdesc = split(split(f_Lablechar,"┆")(11),"$")(1)
  350. morechar = split(split(f_Lablechar,"┆")(12),"$")(1)
  351. datestyle = split(split(f_Lablechar,"┆")(14),"$")(1)
  352. style_id = split(split(f_Lablechar,"┆")(15),"$")(1)
  353. colnumber= split(split(f_Lablechar,"┆")(16),"$")(1)
  354. contentnumber= split(split(f_Lablechar,"┆")(17),"$")(1)
  355. navinumber= split(split(f_Lablechar,"┆")(18),"$")(1)
  356. if f_LableType="marnews" then
  357. marqueespeed=split(split(f_Lablechar,"┆")(19),"$")(1)
  358. marqueedirec=split(split(f_Lablechar,"┆")(20),"$")(1)
  359. end if
  360. end if
  361. if newnumber<>"" and isnumeric(newnumber)=false then
  362. newnumber = 10
  363. else
  364. newnumber=newnumber
  365. end if
  366. if titlenumber="" and isnumeric(titlenumber)=false then
  367. titlenumber = 30
  368. else
  369. titlenumber = titlenumber
  370. end if
  371. if colnumber="" and isnumeric(colnumber)=false then
  372. colnumber = 30
  373. else
  374. colnumber = colnumber
  375. end if
  376. if contentnumber="" and isnumeric(contentnumber)=false then
  377. contentnumber = 30
  378. else
  379. contentnumber = contentnumber
  380. end if
  381. if navinumber="" and isnumeric(navinumber)=false then
  382. navinumber = 30
  383. else
  384. navinumber = navinumber
  385. end If
  386. if picnewstf="1" then
  387. picnewstf = " and isPicNews=1"
  388. else
  389. picnewstf = ""
  390. end if
  391. 'if div_tf=1 then
  392. classNews_head = table_str_list_head(div_tf,split(table_array(5),"$")(1),split(table_array(6),"$")(1),split(table_array(7),"$")(1),split(table_array(8),"$")(1))
  393. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(9),"$")(1),split(table_array(10),"$")(1))
  394. 'end if
  395. classNews_bottom = table_str_list_bottom(div_tf)
  396. classNews_middle2 = table_str_list_middle_2(div_tf)
  397. if datenumber ="0" then:datenumber_tmp = "":else:datenumber_tmp = " and datevalue(addtime)+"&datenumber&">=datevalue(now)":end if
  398. If containSubClass=1 Then
  399. Exist_Child_ClassID=getNewsSubClass(search_str)
  400. If Exist_Child_ClassID<>"" Then
  401. childClass=" or classid in ("&DelHeadAndEndDot(Exist_Child_ClassID)&")"
  402. Else
  403. childClass=""
  404. End If
  405. Else
  406. childClass=""
  407. End If
  408. select case f_LableType
  409. case "classnews"
  410. If childClass<>"" Then
  411. search_inSQL = " and (ClassId='"& search_str &"'"&childClass&")"
  412. Else
  413. search_inSQL = " and ClassId='"& search_str &"'"
  414. End if
  415. case "specialnews"
  416. if G_IS_SQL_DB=0 then
  417. search_inSQL = " and instr(SpecialEName,'"&search_str&"')>0"
  418. else
  419. search_inSQL = " and charindex('"&search_str&"',SpecialEName)>0"
  420. end if
  421. case "lastnews"
  422. if trim(search_str)<>"" Then
  423. If childClass<>"" Then
  424. search_inSQL = " and (ClassId='"& search_str &"'"&childClass&")"
  425. Else
  426. search_inSQL = " and ClassId='"& search_str &"'"
  427. End if
  428. else
  429. 'if trim(f_id)<>"" Then
  430. ' If childClass<>"" Then
  431. ' search_inSQL = " and (ClassId='"& f_id &"'"&childClass&")"
  432. ' Else
  433. ' search_inSQL = " and ClassId='"& f_id &"'"
  434. '' End if
  435. 'else
  436. search_inSQL = ""
  437. 'end if
  438. end if
  439. case "hotnews"
  440. if trim(search_str)<>"" Then
  441. If childClass<>"" then
  442. search_inSQL = " and "& all_substring &"(NewsProperty,13,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
  443. Else
  444. search_inSQL = " and "& all_substring &"(NewsProperty,13,1)='1' and ClassId='"& search_str &"'"
  445. End if
  446. else
  447. 'if trim(f_id)<>"" Then
  448. ' If childClass<>"" then
  449. ' search_inSQL = " and "& all_substring &"(NewsProperty,13,1)='1' and (ClassId='"& f_id &"'"&childClass&")"
  450. ' Else
  451. ' search_inSQL = " and "& all_substring &"(NewsProperty,13,1)='1' and ClassId='"& f_id &"'"
  452. ' End if
  453. 'else
  454. search_inSQL = " and "& all_substring &"(NewsProperty,13,1)='1'"
  455. 'end if
  456. end if
  457. case "recnews"
  458. if trim(search_str)<>"" Then
  459. If childClass<>"" then
  460. search_inSQL = " and "& all_substring &"(NewsProperty,1,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
  461. Else
  462. search_inSQL = " and "& all_substring &"(NewsProperty,1,1)='1' and ClassId='"& search_str &"'"
  463. End if
  464. else
  465. 'if trim(f_id)<>"" then
  466. 'If childClass<>"" then
  467. ' search_inSQL = " and "& all_substring &"(NewsProperty,1,1)='1' and (ClassId='"& f_id &"'"&childClass&")"
  468. 'Else
  469. ' search_inSQL = " and "& all_substring &"(NewsProperty,1,1)='1' and ClassId='"& f_id &"'"
  470. 'End if
  471. 'else
  472. search_inSQL = " and "& all_substring &"(NewsProperty,1,1)='1'"
  473. 'end if
  474. end if
  475. case "marnews"
  476. if trim(search_str)<>"" Then
  477. If childClass<>"" then
  478. search_inSQL = " and "& all_substring &"(NewsProperty,3,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
  479. Else
  480. search_inSQL = " and "& all_substring &"(NewsProperty,3,1)='1' and ClassId='"& search_str &"'"
  481. End if
  482. else
  483. 'if trim(f_id)<>"" Then
  484. ' If childClass<>"" then
  485. ' search_inSQL = " and "& all_substring &"(NewsProperty,3,1)='1' and (ClassId='"& f_id &"'"&childClass&")"
  486. ' Else
  487. ' search_inSQL = " and "& all_substring &"(NewsProperty,3,1)='1' and ClassId='"& f_id &"'"
  488. ' End if
  489. 'else
  490. search_inSQL = " and "& all_substring &"(NewsProperty,3,1)='1'"
  491. 'end if
  492. end if
  493. case "brinews"
  494. if trim(search_str)<>"" Then
  495. If childClass<>"" then
  496. search_inSQL = " and "& all_substring &"(NewsProperty,15,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
  497. Else
  498. search_inSQL = " and "& all_substring &"(NewsProperty,15,1)='1' and ClassId='"& search_str &"'"
  499. End if
  500. else
  501. 'if trim(f_id)<>"" Then
  502. ' If childClass<>"" then
  503. ' search_inSQL = " and "& all_substring &"(NewsProperty,15,1)='1' and (ClassId='"& f_id &"'"&childClass&")"
  504. ' Else
  505. ' search_inSQL = " and "& all_substring &"(NewsProperty,15,1)='1' and ClassId='"& f_id &"'"
  506. ' End if
  507. 'else
  508. search_inSQL = " and "& all_substring &"(NewsProperty,15,1)='1'"
  509. 'end if
  510. end if
  511. case "annnews"
  512. if trim(search_str)<>"" Then
  513. If childClass<>"" then
  514. search_inSQL = " and "& all_substring &"(NewsProperty,19,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
  515. Else
  516. search_inSQL = " and "& all_substring &"(NewsProperty,19,1)='1' and ClassId='"& search_str &"'"
  517. End if
  518. else
  519. 'if trim(f_id)<>"" Then
  520. ' If childClass<>"" then
  521. ' search_inSQL = " and "& all_substring &"(NewsProperty,19,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
  522. ' Else
  523. ' search_inSQL = " and "& all_substring &"(NewsProperty,19,1)='1' and ClassId='"& search_str &"'"
  524. ' End if
  525. 'else
  526. search_inSQL = " and "& all_substring &"(NewsProperty,19,1)='1'"
  527. 'end if
  528. end if
  529. case "constrnews"
  530. if trim(search_str)<>"" Then
  531. If childClass<>"" then
  532. search_inSQL = " and "& all_substring &"(NewsProperty,7,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
  533. Else
  534. search_inSQL = " and "& all_substring &"(NewsProperty,7,1)='1' and ClassId='"& search_str &"'"
  535. End if
  536. else
  537. 'if trim(f_id)<>"" Then
  538. ' If childClass<>"" then
  539. ' search_inSQL = " and "& all_substring &"(NewsProperty,7,1)='1' and (ClassId='"& f_id &"'"&childClass&")"
  540. ' Else
  541. ' search_inSQL = " and "& all_substring &"(NewsProperty,7,1)='1' and ClassId='"& f_id &"'"
  542. ' End if
  543. 'else
  544. search_inSQL = " and "& all_substring &"(NewsProperty,7,1)='1'"
  545. 'end if
  546. end if
  547. end select
  548. f_sql="select top "& cint(newnumber) &" ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
  549. f_sql = f_sql &",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
  550. f_sql = f_sql &"From FS_NS_News where isLock=0 "& picnewstf &search_inSQL & datenumber_tmp &" and  isRecyle=0 and isdraft=0 order by "&orderby&" "&orderdesc&",id "&orderdesc&""
  551. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  552. Content_List=""
  553. set f_rs_obj = Conn.execute(f_sql)
  554. if f_rs_obj.eof then
  555. Content_List=""
  556. f_rs_obj.close:set f_rs_obj=nothing
  557. else
  558. if f_LableType="marnews" then
  559. Content_List = Content_List & "<marquee onmouseover=""this.stop();"" scrollamount="""& marqueespeed &""" direction="""& marqueedirec &""" onmouseout=""this.start();"">"
  560. do while not f_rs_obj.eof
  561. Content_List= Content_List  & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,f_LableType)&"&nbsp;&nbsp;&nbsp;"
  562. f_rs_obj.movenext
  563. loop
  564. Content_List = Content_List & "</marquee>"
  565. else
  566. if div_tf = 0 then
  567. c_i_k = 0
  568. if cint(colnumber)<>1 then
  569. Content_List = Content_List &  "  <tr>"
  570. end if
  571. end if
  572. do while not f_rs_obj.eof
  573. if div_tf=1 then
  574. Content_List= Content_List & classNews_middle1 & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,f_LableType) & classNews_middle2
  575. else
  576. if cint(colnumber) =1 then
  577. Content_List= Content_List & vbNewLine&"   <tr><td>" & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,f_LableType) & "</td></tr>"
  578. else
  579. Content_List= Content_List & "<td width="""& cint(100/cint(colnumber))&"%"">" & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,f_LableType) & "</td>"
  580. end if
  581. end if
  582. f_rs_obj.movenext
  583. if div_tf = 0 then
  584. if cint(colnumber)<>1 then
  585. c_i_k = c_i_k+1
  586. if c_i_k mod cint(colnumber) = 0 then
  587. Content_List = Content_List & "</tr>"&vbNewLine&"  <tr>"
  588. end if
  589. end if
  590. end if
  591.    loop
  592.    if div_tf=0 then
  593. if cint(colnumber)<>1 then
  594. Content_List = Content_List & "</tr>"&vbNewLine
  595. end if
  596.    end if
  597. end if
  598. '得到栏目路径
  599. if f_LableType="classnews" then
  600. dim Query_rs,newsclass_SavePath,FileSaveType,UrlDomain,all_savepath
  601. set Query_rs=Conn.execute("select ClassEName,SavePath,FileExtName,[Domain],FileSaveType,IsURL,UrlAddress From FS_NS_NewsClass where ClassId='"& search_str &"'")
  602. if Query_rs.eof then
  603. Query_rs.close:set Query_rs=nothing
  604. else
  605. all_savepath = get_ClassLink(search_str)
  606.   Query_rs.close:set Query_rs=nothing
  607. end if
  608. if openstyle=0 then
  609. open_target=" "
  610. else
  611. open_target=" target=""_blank"""
  612. end if
  613. if div_tf=1 then
  614. Content_more = "  <li><a href="""&  all_savepath &""" "& open_target &" title=""更多..."">"&morechar&"</a></li>"&vbNewLine
  615. else
  616. Content_more = "  <tr><td colspan="""& cint(colnumber) &"""><div align=""right""><a href="""&  all_savepath &""" "& open_target &" title=""更多..."">"&morechar&"</a></div></td></tr>"&vbNewLine
  617. end if
  618. elseif f_LableType="specialnews" then
  619. dim special_rs,special_Path
  620. set special_rs =Conn.execute("select SpecialID,SpecialCName,SpecialEName,SpecialContent,SavePath,ExtName,isLock,naviPic From FS_NS_Special where isLock=0 and SpecialEName='"&trim(search_str)&"'")
  621. if Not special_rs.eof then
  622. special_Path = get_SpecialLink(special_rs("SpecialEName"))
  623. special_rs.close:set special_rs=nothing
  624. end if
  625. if div_tf=1 then
  626. Content_more = "  <li><a href="""&  special_Path &""" "& open_target &" title=""更多..."">"&morechar&"</a></li>"&vbNewLine
  627. else
  628. Content_more = "  <tr><td colspan="""& cint(colnumber) &"""><div align=""right""><a href="""&  special_Path &""" "& open_target &" title=""更多..."">"&morechar&"</a></div></td></tr>"&vbNewLine
  629. end if
  630.  end if
  631.  f_rs_obj.close:set f_rs_obj=nothing
  632. if f_LableType="marnews" then
  633. Content_List= Content_List
  634. else
  635. Content_List=classNews_head & Content_List & Content_more & classNews_bottom
  636. end if
  637. end if
  638. ClassNews =  Content_List
  639. End Function
  640. '开始读取标签____新闻终极类标签______________________________________________
  641. Public Function ClassList(f_Lablechar,f_type,f_Id)
  642. if f_Id<>"" then
  643. dim table_array,div_tf,newnumber,datenumber,titlenumber,picshowtf,openstyle,orderby,orderdesc,pageTF,pagestyle,pagenumber,pagecss,datestyle,style_id,colnumber,contentnumber,navinumber
  644. dim classNews_head,classNews_bottom,classNews_middle1,classNews_middle2,search_inSQL
  645. dim datenumber_tmp,f_sql,f_configsql,f_rs_obj,f_rs_configobj,MF_Domain
  646. dim TPageNum,perPageNum,PageNum,sPageCount,cl_i,c_i_k
  647. dim rs_c,RefreshNumber,Page_flag_TF,picnewstf
  648. table_array=split(f_Lablechar,"┆")
  649. m_Err_Info = ""
  650. if instr(f_Lablechar,"out_DIV")>0 then
  651. div_tf=1
  652. datenumber= split(split(f_Lablechar,"┆")(9),"$")(1)
  653. picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
  654. titlenumber= split(split(f_Lablechar,"┆")(10),"$")(1)
  655. picshowtf=split(split(f_Lablechar,"┆")(11),"$")(1)
  656. openstyle=split(split(f_Lablechar,"┆")(12),"$")(1)
  657. orderby = split(split(f_Lablechar,"┆")(14),"$")(1)
  658. orderdesc = split(split(f_Lablechar,"┆")(15),"$")(1)
  659. pageTF = split(split(f_Lablechar,"┆")(16),"$")(1)
  660. pagestyle = split(split(f_Lablechar,"┆")(17),"$")(1)
  661. pagenumber = split(split(f_Lablechar,"┆")(18),"$")(1)
  662. pagecss = split(split(f_Lablechar,"┆")(19),"$")(1)
  663. datestyle = split(split(f_Lablechar,"┆")(20),"$")(1)
  664. style_id = split(split(f_Lablechar,"┆")(21),"$")(1)
  665. colnumber= split(split(f_Lablechar,"┆")(22),"$")(1)
  666. contentnumber= split(split(f_Lablechar,"┆")(23),"$")(1)
  667. navinumber= split(split(f_Lablechar,"┆")(24),"$")(1)
  668. else
  669. div_tf=0
  670. picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
  671. datenumber= split(split(f_Lablechar,"┆")(3),"$")(1)
  672. titlenumber= split(split(f_Lablechar,"┆")(4),"$")(1)
  673. picshowtf=split(split(f_Lablechar,"┆")(5),"$")(1)
  674. openstyle=split(split(f_Lablechar,"┆")(6),"$")(1)
  675. orderby = split(split(f_Lablechar,"┆")(8),"$")(1)
  676. orderdesc = split(split(f_Lablechar,"┆")(9),"$")(1)
  677. pageTF = split(split(f_Lablechar,"┆")(10),"$")(1)
  678. pagestyle = split(split(f_Lablechar,"┆")(11),"$")(1)
  679. pagenumber = split(split(f_Lablechar,"┆")(12),"$")(1)
  680. pagecss = split(split(f_Lablechar,"┆")(13),"$")(1)
  681. datestyle = split(split(f_Lablechar,"┆")(14),"$")(1)
  682. style_id = split(split(f_Lablechar,"┆")(15),"$")(1)
  683. colnumber= split(split(f_Lablechar,"┆")(16),"$")(1)
  684. contentnumber= split(split(f_Lablechar,"┆")(17),"$")(1)
  685. navinumber= split(split(f_Lablechar,"┆")(18),"$")(1)
  686. end if
  687. 'if div_tf=1 then
  688. 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))
  689. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(7),"$")(1),split(table_array(8),"$")(1))
  690. 'end if
  691. classNews_bottom = table_str_list_bottom(div_tf)
  692. classNews_middle2 = table_str_list_middle_2(div_tf)
  693. if picnewstf="1" then
  694. picnewstf = " and isPicNews=1"
  695. else
  696. picnewstf = ""
  697. end if
  698. Page_flag_TF = "{Foosun_Page_news}"& pagestyle &"|"& pagecss&"{/Foosun_Page_news}"
  699. if f_type="speciallist" then
  700. dim specaial_rs,f_spen
  701. set specaial_rs = Conn.execute("select SpecialEName From FS_NS_Special where SpecialID="&f_Id&"")
  702. if Not specaial_rs.eof then
  703. f_spen = specaial_rs(0)
  704. end if
  705. specaial_rs.close:set specaial_rs = nothing
  706. if G_IS_SQL_DB=0 then
  707. search_inSQL = " and instr(SpecialEName,'"&f_spen&"')>0"
  708. else
  709. search_inSQL = " and charindex('"&f_spen&"',SpecialEName)>0"
  710. end if
  711. RefreshNumber = ""
  712. else
  713. set rs_c=conn.execute("select RefreshNumber from FS_NS_NewsClass where  ClassId='"& f_Id &"'")
  714. if rs_c.eof then
  715. RefreshNumber = ""
  716.    rs_c.close:set rs_c = nothing
  717. else
  718. if rs_c(0)=0 then
  719. RefreshNumber = ""
  720. else
  721. RefreshNumber = "top "&rs_c(0)&""
  722. end if
  723. rs_c.close:Set rs_c=nothing
  724. end if
  725. search_inSQL=" and ClassId='"& f_Id &"'"
  726. end if
  727. if datenumber ="0" then:datenumber_tmp = "":else:datenumber_tmp = " and datevalue(addtime)+"&datenumber&">=datevalue(now)":end if
  728. f_sql="select "& RefreshNumber &" ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
  729. f_sql = f_sql &",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
  730. f_sql = f_sql &"From FS_NS_News where isLock=0 "& search_inSQL & picnewstf & datenumber_tmp &" and  isRecyle=0 and isdraft=0 order by "&orderby&" "&orderdesc&",id "&orderdesc&""
  731. Set  f_rs_obj = Server.CreateObject(G_FS_RS)
  732. f_rs_obj.open f_sql,Conn,1,3
  733. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  734. if f_rs_obj.eof then
  735. ClassList = ""
  736. f_rs_obj.close:set f_rs_obj=nothing
  737. else
  738. perPageNum =pagenumber
  739. TPageNum = f_rs_obj.recordcount
  740. f_rs_obj.PageSize = perPageNum
  741. sPageCount = f_rs_obj.PageCount
  742. if div_tf = 0 then
  743. c_i_k = 0
  744. if cint(colnumber)<>1 then
  745. ClassList = ClassList &  "  <tr>"
  746. end if
  747. end if
  748. for cl_i=1 to f_rs_obj.recordcount
  749. if f_rs_obj.eof Then exit For
  750. if div_tf=1 then
  751. ClassList= ClassList & classNews_middle1 & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"ClassList") & classNews_middle2
  752. else
  753. if cint(colnumber) =1 then
  754. ClassList= ClassList &"   <tr><td>" & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"ClassList") & "</td></tr>"
  755. else
  756. ClassList= ClassList & "<td width="""& cint(100/cint(colnumber))&"%"">" & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"ClassList") & "</td>"
  757. end if
  758. end if
  759. f_rs_obj.movenext
  760. if div_tf = 0 then
  761. if cint(colnumber)<>1 then
  762. c_i_k = c_i_k+1
  763. if c_i_k mod cint(colnumber) = 0 then
  764. ClassList = ClassList & "</tr>"&vbNewLine&"  <tr>"
  765. end if
  766. end if
  767. dim tmp_1
  768. if pageTF="1" then
  769. 'if cint(colnumber) =1 then
  770. ' tmp_1 = ""
  771. 'else
  772. ' tmp_1 = "</tr>"&vbNewLine
  773. 'end if
  774. if split(formatnumber(cl_i/f_rs_obj.pagesize,2,-1),".")(1)="00" and cl_i <> f_rs_obj.recordcount then
  775. ClassList = ClassList &"</table>"& Page_flag_TF & vbNewLine & classNews_head
  776. end if
  777. if cl_i = f_rs_obj.recordcount then
  778. ClassList = ClassList &"</table>"
  779. end if
  780. end if
  781. else
  782. if pageTF="1" then
  783. if split(formatnumber(cl_i/f_rs_obj.pagesize,2,-1),".")(1)="00" and cl_i <> f_rs_obj.recordcount then
  784. ClassList = ClassList & classNews_bottom & Page_flag_TF & vbNewLine & classNews_head
  785. end if
  786. if cl_i = f_rs_obj.recordcount then
  787. ClassList = ClassList & classNews_bottom & vbNewLine
  788. end if
  789. end if
  790. end if
  791. next
  792. if div_tf=0 then
  793. if cint(colnumber)<>1 then
  794. ClassList = ClassList & "</tr>"&vbNewLine
  795. end if
  796. end if
  797. f_rs_obj.close:set f_rs_obj=nothing
  798. ClassList=classNews_head & ClassList
  799. end if
  800. else
  801. ClassList = ""
  802. end if
  803. End Function
  804. '得到相关新闻
  805. Public Function c_news(f_Lablechar,f_type,f_Id)
  806. 'c_news┆根据条件$1┆显示数量$10┆标题字数$40┆导航$·┆css$
  807. Dim ifstr,titleNumber,leftTitle,navidot,css,f_sql,rs,str_newstitle,like_str,old_rs,TitleNumberStr
  808. ifstr = split(split(f_Lablechar,"┆")(1),"$")(1)
  809. TitleNumberStr= split(split(f_Lablechar,"┆")(2),"$")(1)
  810. if not isnumeric(TitleNumberStr) then:TitleNumberStr = 10:else:TitleNumberStr = cint(TitleNumberStr):end if
  811. leftTitle= split(split(f_Lablechar,"┆")(3),"$")(1)
  812. if not isnumeric(leftTitle) then:leftTitle = 40:else:leftTitle = cint(leftTitle):end if
  813. navidot = split(split(f_Lablechar,"┆")(4),"$")(1)
  814. css = split(split(f_Lablechar,"┆")(5),"$")(1)
  815. if css<>"" then:css = " class="""&css&"""":else:css = "":end if
  816. c_news = ""
  817. '获得原新闻关键字
  818. dim RelateNewsSql,RsSearchObj,OldSpecialID,tmp_like,tmp_1,tmp_2
  819. RelateNewsSql = "Select Keywords from FS_NS_News where NewsID='" & f_Id & "' order by ID desc"
  820. Set RsSearchObj = Conn.Execute(RelateNewsSql)
  821. if Not RsSearchObj.Eof then
  822. If RsSearchObj("KeyWords") <> "" and isnull(RsSearchObj("KeyWords"))=false then
  823. Dim KeyWordsStr,KeyWordsArray,SqlKeyWordStr,keyword_j
  824. SqlKeyWordStr = ""
  825. KeyWordsStr = RsSearchObj("KeyWords")
  826. If KeyWordsStr<>"" and isnull(KeyWordsStr)=false then
  827. if instr(KeyWordsStr,",")=0 then KeyWordsStr = KeyWordsStr&","
  828. KeyWordsArray = split(KeyWordsStr,",")
  829. For keyword_j = 0 to UBound(KeyWordsArray)
  830.   if KeyWordsArray(keyword_j)<>"" then
  831. if ifstr = "0" then
  832. if G_IS_SQL_DB=0 then
  833. If SqlKeyWordStr = "" then
  834. SqlKeyWordStr = "instr(NewsTitle,'"&KeyWordsArray(keyword_j)&"')>0"
  835. Else
  836. SqlKeyWordStr = SqlKeyWordStr & "or instr(NewsTitle,'"&KeyWordsArray(keyword_j)&"')>0"
  837. End If
  838. else
  839. If SqlKeyWordStr = "" then
  840. SqlKeyWordStr = "charindex('"&KeyWordsArray(keyword_j)&"',NewsTitle)>0"
  841. Else
  842. SqlKeyWordStr = SqlKeyWordStr & "or charindex('"&KeyWordsArray(keyword_j)&"',NewsTitle)>0"
  843. End If
  844. end if
  845. elseif ifstr = "2" then
  846. if G_IS_SQL_DB=0 then
  847. If SqlKeyWordStr = "" then
  848. tmp_like = "instr(NewsTitle,'"&KeyWordsArray(keyword_j)&"')>0"
  849. Else
  850. tmp_like = tmp_like & "or instr(NewsTitle,'"&KeyWordsArray(keyword_j)&"')>0"
  851. End If
  852. else
  853. If SqlKeyWordStr = "" then
  854. tmp_like = "charindex('"&KeyWordsArray(keyword_j)&"',NewsTitle)>0"
  855. Else
  856. tmp_like = tmp_like & "or charindex('"&KeyWordsArray(keyword_j)&"',NewsTitle)>0"
  857. End If
  858. end if
  859. If SqlKeyWordStr = "" then
  860. SqlKeyWordStr = ""&tmp_like&" or KeyWords like '%"&KeyWordsArray(keyword_j)&"%' "
  861. Else
  862. SqlKeyWordStr = SqlKeyWordStr & " or "&tmp_like&" or KeyWords like '%"&KeyWordsArray(keyword_j)&"%' "
  863. End If
  864. elseif ifstr = "1" then
  865. If SqlKeyWordStr = "" then
  866. SqlKeyWordStr = "KeyWords like '%"&KeyWordsArray(keyword_j)&"%' "
  867. Else
  868. SqlKeyWordStr = SqlKeyWordStr & "or KeyWords like '%"&KeyWordsArray(keyword_j)&"%' "
  869. End If
  870. else
  871. '3*s1 3==2
  872. tmp_1 = mid(ifstr,2,2)
  873. tmp_1 = replace(tmp_1,"==","=")
  874. tmp_1 = replace(tmp_1,"&lt;&gt;","<>")
  875. tmp_2 = mid(ifstr,4)
  876. if not isnumeric(tmp_2) then c_news = "错误:"&tmp_2:exit for:exit function
  877. if keyword_j = cint(tmp_2)-1 then
  878. select case tmp_1
  879. case "=","<>"
  880. SqlKeyWordStr = " KeyWords "&tmp_1&"'"&KeyWordsArray(keyword_j)&"' "
  881. case "*s"
  882. SqlKeyWordStr = " KeyWords like '%"&KeyWordsArray(keyword_j)&"' "
  883. case "*e"
  884. SqlKeyWordStr = " KeyWords like '"&KeyWordsArray(keyword_j)&"'% "
  885. case "**"
  886. SqlKeyWordStr = " KeyWords like '%"&KeyWordsArray(keyword_j)&"'% "
  887. end select
  888. exit for
  889. end if
  890.  end if
  891.  end if
  892. Next
  893. Else
  894. SqlKeyWordStr = ""
  895. End If
  896. if SqlKeyWordStr<>"" then SqlKeyWordStr = " And ("&SqlKeyWordStr&")"
  897. f_sql = "Select Top " & TitleNumberStr & " NewsId,NewsTitle,titleBorder,TitleItalic,TitleColor from FS_NS_News Where isRecyle=0 and isdraft=0 " & SqlKeyWordStr & " and islock=0 and NewsID<>'"&f_id &"' order by addtime desc,ID Desc"
  898. 'response.Write("f_sql:"&f_sql)
  899. 'response.end
  900. Set rs = Conn.Execute(f_sql)
  901. if Not rs.Eof then
  902. c_news = ""
  903. do while Not rs.Eof
  904. str_newstitle = GotTopic(rs("NewsTitle"),leftTitle)
  905. if len(str_newstitle)<>len(rs("NewsTitle")) then str_newstitle = str_newstitle&"..."
  906. if trim(rs("titleBorder"))=1 then
  907. str_newstitle = "<strong>"&str_newstitle&"</strong>"
  908. end if
  909. if trim(rs("TitleItalic"))=1 then
  910. str_newstitle = "<em>"&str_newstitle&"</em>"
  911. end if
  912. if trim(rs("TitleColor"))<>"" then
  913. str_newstitle = "<font color=""#"& rs("TitleColor")&""">"&str_newstitle&"</font>"
  914. end if
  915. c_news = c_news & navidot &"<a href="""&get_NewsLink(rs("NewsId"))&""""&css&" title="""&rs("NewsTitle")&""">"&str_newstitle&"</a><br />"&vbNewLine
  916. rs.MoveNext
  917. Loop
  918. rs.Close:Set rs = Nothing
  919. else
  920. c_news = "无相关新闻"
  921. rs.Close:Set rs = Nothing
  922. end if
  923. else
  924. c_news = ""
  925. end if
  926. else
  927. c_news = ""
  928. end if
  929. Set RsSearchObj = Nothing
  930. c_news = c_news
  931. End Function
  932. 'Flash幻灯片_________________________________________________________________
  933. Public Function flashfilt(f_Lablechar,f_type,f_Id)
  934. dim Randomize_i_Str,TitleNumberStr,FilterSql,ClassId,InSQL_Search,RsFilterObj,str_filt,NewsNumberStr,FlashStr
  935. dim ClassSaveFilePath,ImagesStr,TxtStr,TxtFirst,LinkStr
  936. dim Class_SQL,RsClassObj,Temp_Num
  937. Randomize
  938. Randomize_i_Str =  CStr(Int((999 * Rnd) + 1))
  939. TitleNumberStr= split(split(f_Lablechar,"┆")(3),"$")(1)
  940. NewsNumberStr= split(split(f_Lablechar,"┆")(2),"$")(1)
  941. if trim(NewsNumberStr)<>"" and  isNumeric(NewsNumberStr) then
  942. NewsNumberStr = cint(NewsNumberStr)
  943. else
  944. NewsNumberStr = 6
  945. end if
  946. ClassId=split(split(f_Lablechar,"┆")(1),"$")(1)
  947. if trim(ClassId)<>"" then
  948. InSQL_Search = " and ClassId='"& ClassId &"'"
  949. else
  950. if f_Id <> "" then
  951. InSQL_Search = " and ClassId='"& f_Id &"'"
  952. else
  953. InSQL_Search = ""
  954. end if
  955. end if
  956. str_filt=" and "& all_substring &"(NewsProperty,21,1)='1'"
  957. FilterSql="select top "& NewsNumberStr &" ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
  958. FilterSql = FilterSql &",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
  959. FilterSql = FilterSql &"From FS_NS_News where isLock=0 and isPicNews=1 "&InSQL_Search & str_filt &" and  isRecyle=0 and isdraft=0 order by addtime desc,id desc"
  960. Set RsFilterObj = Conn.Execute(FilterSql)
  961. If not RsFilterObj.Eof then
  962. Class_SQL = "select ClassEName,FileExtName,SavePath,FileSaveType From FS_NS_NewsClass where ClassId='"& RsFilterObj("ClassId") &"'"
  963. Set RsClassObj = Conn.Execute(Class_SQL)
  964. Temp_Num = 0
  965. Do While Not RsFilterObj.Eof
  966. Temp_Num = Temp_Num + 1
  967. RsFilterObj.MoveNext
  968. Loop
  969. RsFilterObj.MoveFirst
  970. If Temp_Num <=1 then
  971. Set RsFilterObj = Nothing
  972. FlashStr = "至少需要两条幻灯新闻才能正确显示幻灯效果"
  973. Set RsFilterObj = Nothing
  974. Exit Function
  975. End If
  976. do while Not RsFilterObj.Eof
  977. 'ImagesStr=""
  978. if (Not IsNull(RsFilterObj("NewsSmallPicFile"))) And (RsFilterObj("NewsSmallPicFile") <> "") then
  979. if ImagesStr = "" then
  980. ImagesStr =  RsFilterObj("NewsSmallPicFile")
  981. TxtStr =  GotTopic(RsFilterObj("NewsTitle"),TitleNumberStr)
  982. TxtFirst = GotTopic(RsFilterObj("NewsTitle"),TitleNumberStr)
  983. LinkStr =   get_NewsLink(RsFilterObj("NewsID"))
  984. else
  985. If Instr(1,LCase(RsFilterObj("NewsSmallPicFile")),"http://") <> 0 then
  986. ImagesStr = ImagesStr &"|"& RsFilterObj("NewsSmallPicFile")
  987. Else
  988. ImagesStr = ImagesStr &"|"&  RsFilterObj("NewsSmallPicFile")
  989. End If
  990. TxtStr = TxtStr &"|"&GotTopic(RsFilterObj("NewsTitle"),TitleNumberStr)
  991. LinkStr = LinkStr & "|" & get_NewsLink(RsFilterObj("NewsID"))
  992. end if
  993. end if
  994. RsFilterObj.MoveNext
  995. loop
  996. FlashStr="<script type=""text/javascript"">"& Chr(13)
  997. FlashStr=FlashStr&" <!--"& Chr(13)
  998. dim PicWidthStr,PicHeightStr,txtheight
  999. PicWidthStr = split(split(split(f_Lablechar,"┆")(4),"$")(1),",")(1)
  1000. PicHeightStr = split(split(split(f_Lablechar,"┆")(4),"$")(1),",")(0)
  1001. txtheight = split(split(f_Lablechar,"┆")(5),"$")(1)
  1002. FlashStr=FlashStr&" var focus_width"&Randomize_i_Str&"="&PicWidthStr& Chr(13)
  1003. FlashStr=FlashStr&" var focus_height"&Randomize_i_Str&"="&PicHeightStr& Chr(13)
  1004. FlashStr=FlashStr&" var text_height"&Randomize_i_Str&"="&txtheight& Chr(13)
  1005. FlashStr=FlashStr&" var swf_height"&Randomize_i_Str&" = focus_height"&Randomize_i_Str&"+text_height"&Randomize_i_Str& Chr(13)
  1006. FlashStr=FlashStr&" var pics"&Randomize_i_Str&"='"&ImagesStr&"'"&Chr(13)
  1007. FlashStr=FlashStr&" var links"&Randomize_i_Str&"='"&LinkStr &"'"&Chr(13)
  1008. FlashStr=FlashStr&" var texts"&Randomize_i_Str&"='"&TxtStr&"'"&Chr(13)
  1009. FlashStr=FlashStr&" document.write('<object classid=""clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"" codebase=""http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"" width=""'+ focus_width"&Randomize_i_Str&" +'"" height=""'+ swf_height"&Randomize_i_Str&" +'"">');"&Chr(13)
  1010. FlashStr=FlashStr&" document.write('<param name=""allowScriptAccess"" value=""sameDomain""><param name=""movie"" value="""&m_Path_Templet & "Flash.swf""><param name=""quality"" value=""high""><param name=""bgcolor"" value=""white"">');"&Chr(13)
  1011. FlashStr=FlashStr&" document.write('<param name=""menu"" value=""false""><param name=wmode value=""opaque"">');"&Chr(13)
  1012. FlashStr=FlashStr&" document.write('<param name=""FlashVars"" value=""pics='+pics"&Randomize_i_Str&"+'&links='+links"&Randomize_i_Str&"+'&texts='+texts"&Randomize_i_Str&"+'&borderwidth='+focus_width"&Randomize_i_Str&"+'&borderheight='+focus_height"&Randomize_i_Str&"+'&textheight='+text_height"&Randomize_i_Str&"+'"">');"&Chr(13)
  1013. FlashStr=FlashStr&" document.write('<embed src="""&m_Path_Templet & "Flash.swf"" wmode=""opaque"" FlashVars=""pics='+pics"&Randomize_i_Str&"+'&links='+links"&Randomize_i_Str&"+'&texts='+texts"&Randomize_i_Str&"+'&borderwidth='+focus_width"&Randomize_i_Str&"+'&borderheight='+focus_height"&Randomize_i_Str&"+'&textheight='+text_height"&Randomize_i_Str&"+'"" menu=""false"" bgcolor=""white"" quality=""high"" width=""'+ focus_width"&Randomize_i_Str&" +'"" height=""'+ swf_height"&Randomize_i_Str&" +'"" allowScriptAccess=""sameDomain"" type=""application/x-shockwave-flash"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" />');"&Chr(13)
  1014. FlashStr=FlashStr&" document.write('</object>');"&Chr(13)
  1015. FlashStr=FlashStr&" //-->"& Chr(13)
  1016. FlashStr=FlashStr&"</script>"
  1017. else
  1018. FlashStr=""
  1019. end if
  1020. RsFilterObj.Close:Set RsFilterObj = Nothing
  1021. flashfilt= FlashStr
  1022. End Function
  1023. '轮换幻灯____________________________________________________________________
  1024. Public Function NorFilter(f_Lablechar,f_type,f_id)
  1025. dim FilterSql,RsFilterObj,FilterStr,ImagesStr,TxtStr,TxtFirst,ClassSaveFilePath,LinkStr,CssFileStr,PicWidthStr, PicHeightStr
  1026. dim fltheightstr,fltwidthstr,Temp_Num,TitleNumberStr,NewsNumberStr,ClassId,InSQL_Search,str_filt
  1027. TitleNumberStr= split(split(f_Lablechar,"┆")(3),"$")(1)
  1028. NewsNumberStr= split(split(f_Lablechar,"┆")(2),"$")(1)
  1029. if trim(NewsNumberStr)<>"" and  isNumeric(NewsNumberStr) then
  1030. NewsNumberStr = cint(NewsNumberStr)
  1031. else
  1032. NewsNumberStr = 6
  1033. end if
  1034. ClassId=split(split(f_Lablechar,"┆")(1),"$")(1)
  1035. if trim(ClassId)<>"" then
  1036. InSQL_Search = " and ClassId='"& ClassId &"'"
  1037. else
  1038. if f_Id <> "" then
  1039. InSQL_Search = " and ClassId='"& f_Id &"'"
  1040. else
  1041. InSQL_Search = ""
  1042. end if
  1043. end if
  1044. str_filt=" and "& all_substring &"(NewsProperty,21,1)='1'"
  1045. FilterSql="select top "& NewsNumberStr &" ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
  1046. FilterSql = FilterSql &",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
  1047. FilterSql = FilterSql &"From FS_NS_News where isLock=0 and isPicNews=1 "&InSQL_Search & str_filt &" and  isRecyle=0 and isdraft=0 order by addtime desc,id desc"
  1048. Set RsFilterObj = Conn.Execute(FilterSql)
  1049. 'response.Write(FilterSql)
  1050. 'response.end
  1051. if not RsFilterObj.Eof then
  1052. Temp_Num = 0
  1053. Do While Not RsFilterObj.Eof
  1054. Temp_Num = Temp_Num + 1
  1055. RsFilterObj.MoveNext
  1056. Loop
  1057. RsFilterObj.MoveFirst
  1058. If Temp_Num <=1 then
  1059. Set RsFilterObj = Nothing
  1060. FilterStr = "至少需要两条幻灯新闻才能正确显示幻灯效果"
  1061. Set RsFilterObj = Nothing
  1062. Exit Function
  1063. End If
  1064. fltheightstr = split(split(split(f_Lablechar,"┆")(4),"$")(1),",")(0)
  1065. fltwidthstr = split(split(split(f_Lablechar,"┆")(4),"$")(1),",")(1)
  1066. CssFileStr = split(split(f_Lablechar,"┆")(5),"$")(1)
  1067. PicWidthStr = " width=""" & fltwidthstr & """"
  1068. PicHeightStr = " height=""" & fltheightstr & """"
  1069. if CssFileStr <> "" then CssFileStr = " Class='" & CssFileStr & "'"
  1070. do while Not RsFilterObj.Eof
  1071. if (Not IsNull(RsFilterObj("NewsSmallPicFile"))) And (RsFilterObj("NewsSmallPicFile") <> "") then
  1072. if ImagesStr = "" then
  1073. If Instr(1,LCase(RsFilterObj("NewsSmallPicFile")),"http://") <> 0 then
  1074. ImagesStr =  RsFilterObj("NewsSmallPicFile")
  1075. Else
  1076. ImagesStr =   RsFilterObj("NewsSmallPicFile")
  1077. End If
  1078. TxtStr = "<a " & CssFileStr & " href='" & get_NewsLink(RsFilterObj("NewsID")) & "' target='_blank'>" & GotTopic(RsFilterObj("NewsTitle"),TitleNumberStr)&"</a>"
  1079. TxtFirst = "<a " & CssFileStr & " href='" & get_NewsLink(RsFilterObj("NewsID")) & "' target=''_blank''>" & GotTopic(RsFilterObj("NewsTitle"),TitleNumberStr)&"</a>"
  1080. LinkStr =  get_NewsLink(RsFilterObj("NewsID"))
  1081. else
  1082. ImagesStr = ImagesStr &","&  RsFilterObj("NewsSmallPicFile")
  1083. TxtStr = TxtStr &",<a " & CssFileStr & " href='" & get_NewsLink(RsFilterObj("NewsID")) & "'  target='_blank'>" & GotTopic(RsFilterObj("NewsTitle"),TitleNumberStr)&"</a>"
  1084. LinkStr = LinkStr & ","& get_NewsLink(RsFilterObj("NewsID"))
  1085. end if
  1086. end if
  1087. RsFilterObj.MoveNext
  1088. loop
  1089. FilterStr="<script language=""vbscript"">"& Chr(13)
  1090. FilterStr = FilterStr & "Dim FileList,FileListArr,TxtList,TxtListArr,LinkList,LinkArr"& Chr(13)
  1091. FilterStr = FilterStr & "FileList = """ & ImagesStr & """"& Chr(13)
  1092. FilterStr = FilterStr & "LinkList = """ & LinkStr & """"& Chr(13)
  1093. FilterStr = FilterStr & "TxtList = """ & TxtStr & """"& Chr(13)
  1094. FilterStr = FilterStr & "FileListArr = Split(FileList,"","")"& Chr(13)
  1095. FilterStr = FilterStr & "LinkArr = Split(LinkList,"","")"& Chr(13)
  1096. FilterStr = FilterStr & "TxtListArr = Split(TxtList,"","")"& Chr(13)
  1097. FilterStr = FilterStr & "Dim CanPlay"& Chr(13)
  1098. FilterStr = FilterStr & "CanPlay = CInt(Split(Split(navigator.appVersion,"";"")(1),"" "")(2))>5"& Chr(13)
  1099. FilterStr = FilterStr & "Dim FilterStr"& Chr(13)
  1100. FilterStr = FilterStr & "FilterStr = ""RevealTrans(duration=2,transition=23)"""& Chr(13)
  1101. FilterStr = FilterStr & "FilterStr = FilterStr + "";BlendTrans(duration=2)"""& Chr(13)
  1102. FilterStr = FilterStr & "If CanPlay Then"& Chr(13)
  1103. FilterStr = FilterStr & "FilterStr = FilterStr + "";progid:DXImageTransform.Microsoft.Fade(duration=2,overlap=0)"""& Chr(13)
  1104. FilterStr = FilterStr & "FilterStr = FilterStr + "";progid:DXImageTransform.Microsoft.Wipe(duration=3,gradientsize=0.25,motion=reverse)"""& Chr(13)
  1105. FilterStr = FilterStr & "Else"& Chr(13)
  1106. FilterStr = FilterStr & "Msgbox ""幻灯片播放具有多种动态图片切换效果,但此功能需要您的浏览器为IE5.5或以上版本,否则您将只能看到部分的切换效果。"",64"& Chr(13)
  1107. FilterStr = FilterStr & "End If"& Chr(13)
  1108. FilterStr = FilterStr & "Dim FilterArr"& Chr(13)
  1109. FilterStr = FilterStr & "FilterArr = Split(FilterStr,"";"")"& Chr(13)
  1110. FilterStr = FilterStr & "Dim PlayImg_M"& Chr(13)
  1111. FilterStr = FilterStr & "PlayImg_M = 5 * 1000  "& Chr(13)
  1112. FilterStr = FilterStr & "Dim I"& Chr(13)
  1113. FilterStr = FilterStr & "I = 1"& Chr(13)
  1114. FilterStr = FilterStr & "Sub ChangeImg"& Chr(13)
  1115. FilterStr = FilterStr & "Do While FileListArr(I)="""""& Chr(13)
  1116. FilterStr = FilterStr & "I = I + 1"& Chr(13)
  1117. FilterStr = FilterStr & "If I>UBound(FileListArr) Then I = 0"& Chr(13)
  1118. FilterStr = FilterStr & "Loop"& Chr(13)
  1119. FilterStr = FilterStr & "Dim J"& Chr(13)
  1120. FilterStr = FilterStr & "If I>UBound(FileListArr) Then I = 0"& Chr(13)
  1121. FilterStr = FilterStr & "Randomize"& Chr(13)
  1122. FilterStr = FilterStr & "J = Int(Rnd * (UBound(FilterArr)+1))"& Chr(13)
  1123. FilterStr = FilterStr & "Img.style.filter = FilterArr(J)"& Chr(13)
  1124. FilterStr = FilterStr & "Img.filters(0).Apply"& Chr(13)
  1125. FilterStr = FilterStr & "Img.Src = FileListArr(I)"& Chr(13)
  1126. FilterStr = FilterStr & "Img.filters(0).play"& Chr(13)
  1127. FilterStr = FilterStr & "Link.Href = LinkArr(I)"& Chr(13)
  1128. If split(split(f_Lablechar,"┆")(7),"$")(1) = "1" Then
  1129. FilterStr = FilterStr & "Txt.filters(0).Apply"& Chr(13)
  1130. FilterStr = FilterStr & "Txt.innerHTML = TxtListArr(I)"& Chr(13)
  1131. FilterStr = FilterStr & "Txt.filters(0).play"& Chr(13)
  1132. End If
  1133. FilterStr = FilterStr & "I = I + 1"& Chr(13)
  1134. FilterStr = FilterStr & "If I>UBound(FileListArr) Then I = 0"& Chr(13)
  1135. FilterStr = FilterStr & "TempImg.Src = FileListArr(I)"& Chr(13)
  1136. FilterStr = FilterStr & "TempLink.Href = LinkArr(I)"& Chr(13)
  1137. FilterStr = FilterStr & "SetTimeout ""ChangeImg"", PlayImg_M,""VBScript"""& Chr(13)
  1138. FilterStr = FilterStr & "End Sub"& Chr(13)
  1139. FilterStr = FilterStr & "</SCRIPT>"& Chr(13)
  1140. FilterStr = FilterStr & "<TABLE WIDTH=""100%"" height=""100%"" BORDER=""0"" CELLSPACING="""" CELLPADDING=""0"">" &vbcrlf
  1141. FilterStr = FilterStr & "<TR ID=""NoScript"">"&vbcrlf
  1142. FilterStr = FilterStr & "<TD Align=""Center"" Style=""Color:White"">对不起,图片浏览功能需脚本支持,但您的浏览器已经设置了禁止脚本运行。请您在浏览器设置中调整有关安全选项。</TD>"&vbcrlf
  1143. FilterStr = FilterStr & "</TR>"&vbcrlf
  1144. FilterStr = FilterStr & "<TR Style=""Display:none"" ID=""CanRunScript""><TD HEIGHT=""100%"" Align=""Center"" vAlign=""Center""><a id=""Link""><Img ID=""Img"" "  & PicWidthStr & PicHeightStr & " Border=""0"" ></a>"&vbcrlf
  1145. FilterStr = FilterStr & "</TD></TR><TR Style=""Display:none""><TD><a id=TempLink ><Img ID=""TempImg"" Border=""0""></a></TD></TR>"&vbcrlf
  1146. If split(split(f_Lablechar,"┆")(7),"$")(1) = "1" Then
  1147. FilterStr = FilterStr & "<TR><TD HEIGHT=""100%"" Align=""Center"" vAlign=""Top"">"&vbcrlf
  1148. FilterStr = FilterStr & "<div ID=""Txt"" style=""PADDING-LEFT: 5px; Z-INDEX: 1; FILTER: progid:DXImageTransform.Microsoft.Fade(duration=1,overlap=0); POSITION:"">"&TxtFirst&"</div>"
  1149. FilterStr = FilterStr & "</TD></TR>"&vbcrlf
  1150. End If
  1151. FilterStr = FilterStr & "</TABLE>"& Chr(13)
  1152. FilterStr = FilterStr & "<Script Language=""VBScript"">"& Chr(13)
  1153. FilterStr = FilterStr & "NoScript.Style.Display = ""none"""& Chr(13)
  1154. FilterStr = FilterStr & "CanRunScript.Style.Display = """""& Chr(13)
  1155. FilterStr = FilterStr & "Img.Src = FileListArr(0)"& Chr(13)
  1156. FilterStr = FilterStr & "Link.Href = LinkArr(0)"& Chr(13)
  1157. FilterStr = FilterStr & "SetTimeout ""ChangeImg"", PlayImg_M,""VBScript"""& Chr(13)
  1158. FilterStr = FilterStr & "</Script>"& Chr(13)
  1159. else
  1160. FilterStr="没有幻灯图片"
  1161. End if
  1162. RsFilterObj.Close
  1163. Set RsFilterObj = Nothing
  1164. NorFilter = FilterStr
  1165. End Function
  1166. '得到子类新闻列表
  1167. 'subClassList┆图片新闻$0┆Loop$10┆输出格式$out_Table┆多少天$0┆标题数$30┆图文标志$1┆打开窗口$0┆包含子类$0┆排列字段$PopId┆排列方式$DESC┆分页$1┆分页样式$3,CC0066┆每页数量$30┆PageCSS$┆日期格式$YY02年MM月DD日┆引用样式$40┆背景底纹$┆栏目排列数$1┆新闻排列数$1┆内容字数$200┆导航字数$200
  1168. 'subClassList┆图片新闻$0┆Loop$10┆输出格式$out_DIV┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆多少天$0┆标题数$30┆图文标志$1┆打开窗口$0┆包含子类$0┆排列字段$PopId┆排列方式$DESC┆分页$1┆分页样式$3,CC0066┆每页数量$30┆PageCSS$┆日期格式$YY02年MM月DD日┆引用样式$40┆背景底纹$┆栏目排列数$1┆新闻排列数$1┆内容字数$200┆导航字数$200
  1169. 'picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
  1170. Public Function subClassList(f_Lablechar,f_type,f_Id)
  1171. dim rs,f_sql,rs_n,rs_f_sql
  1172. dim div_tf,c_s_i,bg_ground,c_cols,c_cols_1,datenumber,datenumber_tmp,orderby,orderdesc,style_id,Inc_SubClass,SQL_Inc_SubClass
  1173. dim titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,loopnumber,picnewstf
  1174. dim classNews_head,classNews_middle1,classNews_bottom,classNews_middle2,c_s_i_1,table_array
  1175. if instr(f_Lablechar,"out_DIV")>0 then
  1176. div_tf=1
  1177. c_cols = split(split(f_Lablechar,"┆")(24),"$")(1)
  1178. c_cols_1 = split(split(f_Lablechar,"┆")(25),"$")(1)
  1179. bg_ground = split(split(f_Lablechar,"┆")(23),"$")(1)
  1180. datenumber = split(split(f_Lablechar,"┆")(10),"$")(1)
  1181. orderby = split(split(f_Lablechar,"┆")(15),"$")(1)
  1182. orderdesc = split(split(f_Lablechar,"┆")(16),"$")(1)
  1183. style_id = split(split(f_Lablechar,"┆")(22),"$")(1)
  1184. loopnumber = split(split(f_Lablechar,"┆")(2),"$")(1)
  1185. titlenumber = split(split(f_Lablechar,"┆")(11),"$")(1)
  1186. contentnumber = split(split(f_Lablechar,"┆")(26),"$")(1)
  1187. navinumber = split(split(f_Lablechar,"┆")(27),"$")(1)
  1188. picshowtf = split(split(f_Lablechar,"┆")(12),"$")(1)
  1189. datestyle =  split(split(f_Lablechar,"┆")(21),"$")(1)
  1190. openstyle =  split(split(f_Lablechar,"┆")(13),"$")(1)
  1191. picnewstf =   split(split(f_Lablechar,"┆")(1),"$")(1)
  1192. Inc_SubClass = split(split(f_Lablechar,"┆")(8),"$")(1)
  1193. else
  1194. div_tf=0
  1195. c_cols = split(split(f_Lablechar,"┆")(18),"$")(1)
  1196. c_cols_1 = split(split(f_Lablechar,"┆")(19),"$")(1)
  1197. bg_ground = split(split(f_Lablechar,"┆")(17),"$")(1)
  1198. datenumber = split(split(f_Lablechar,"┆")(4),"$")(1)
  1199. orderby = split(split(f_Lablechar,"┆")(9),"$")(1)
  1200. orderdesc =  split(split(f_Lablechar,"┆")(10),"$")(1)
  1201. style_id = split(split(f_Lablechar,"┆")(16),"$")(1)
  1202. loopnumber = split(split(f_Lablechar,"┆")(2),"$")(1)
  1203. titlenumber = split(split(f_Lablechar,"┆")(5),"$")(1)
  1204. contentnumber = split(split(f_Lablechar,"┆")(20),"$")(1)
  1205. navinumber = split(split(f_Lablechar,"┆")(21),"$")(1)
  1206. picshowtf = split(split(f_Lablechar,"┆")(6),"$")(1)
  1207. datestyle =  split(split(f_Lablechar,"┆")(15),"$")(1)
  1208. openstyle =  split(split(f_Lablechar,"┆")(7),"$")(1)
  1209. picnewstf =   split(split(f_Lablechar,"┆")(1),"$")(1)
  1210. Inc_SubClass = split(split(f_Lablechar,"┆")(8),"$")(1)
  1211. end if
  1212. if not isnumeric(titlenumber) then:titlenumber = 30:else:titlenumber = cint(titlenumber):end if
  1213. if not isnumeric(loopnumber) then:loopnumber = 10:else:loopnumber = cint(loopnumber):end if
  1214. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  1215. table_array=split(f_Lablechar,"┆")
  1216. 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))
  1217. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(8),"$")(1),split(table_array(9),"$")(1))
  1218. classNews_bottom = table_str_list_bottom(div_tf)
  1219. classNews_middle2 = table_str_list_middle_2(div_tf)
  1220. if picnewstf="1" then
  1221. picnewstf = " and isPicNews=1"
  1222. else
  1223. picnewstf = ""
  1224. end if
  1225. if len(bg_ground)>5 then
  1226.  bg_ground = " background="""& bg_ground &""""
  1227. else
  1228.  bg_ground = ""
  1229. end If
  1230. if datenumber <>"0" then:datenumber_tmp = " and datevalue(addtime)+"&datenumber&">=datevalue(now)":else:datenumber_tmp = "":end if
  1231. if f_Id="" then f_id="0"
  1232. f_sql = "select ClassId,ClassName,ClassEName,ParentID From FS_NS_NewsClass Where ParentID='"& f_Id &"' and IsURL=0 and ReycleTF=0 order by OrderID desc,id desc"
  1233. set rs = Conn.execute(f_sql)
  1234. if not rs.eof then
  1235. subClassList = "<table border=""0"" cellspacing=""3"" cellpadding=""0"" width=""100%"">"&vbNewLine&"  <tr>"
  1236. c_s_i = 0
  1237. do while not rs.eof
  1238. If (c_s_i mod c_cols =0) And c_s_i>0 Then
  1239. subClassList = subClassList & "</tr>"&vbNewLine&"<tr>"&vbNewLine
  1240. End If
  1241. subClassList = subClassList & "<td width="""&cint(100/c_cols)&"%"" valign=""top"" style=""BORDER-RIGHT: #D18989 1px solid; BORDER-TOP: #D18989 1px solid; BORDER-LEFT: #D18989 1px solid; BORDER-BOTTOM: #D18989 1px solid""><table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%"""& bg_ground &"><tr><td height=""26"" width=""80%"" class=""dldh"">&nbsp;&gt;&gt; <a class=""dldh""  href="""& get_ClassLink(rs("ClassId"))&""">"&rs("ClassName")&"</a></td><td align=""center"" width=""20%""><a href="""& get_ClassLink(rs("ClassId"))&"""><img src=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/sys_images/news_more.gif"" border=""0"" alt="""& rs("ClassName") &"..更多""></a></td></tr></table>"
  1242. If Inc_SubClass="1" Then
  1243. If getNewsSubClass(rs("ClassId"))<>"" Then
  1244. SQL_Inc_SubClass=" and (ClassID='"&rs("ClassId")&"' OR ClassID IN ("&getNewsSubClass(rs("ClassId"))&"))"
  1245. Else
  1246. SQL_Inc_SubClass=" AND ClassID='"&rs("ClassId")&"'"
  1247. End If
  1248. Else
  1249. SQL_Inc_SubClass=" AND ClassID='"&rs("ClassId")&"'"
  1250. End If
  1251. rs_f_sql = "select top "& loopnumber &" ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic From FS_NS_News where isLock=0 "& picnewstf & datenumber_tmp & SQL_Inc_SubClass &" and isRecyle=0 and isdraft=0 order by "&orderby&" "&orderdesc&",id "&orderdesc&""
  1252. set rs_n = Conn.execute(rs_f_sql)
  1253. If Not rs_n.eof then
  1254. if div_tf=1 then
  1255. subClassList = subClassList & vbNewLine & classNews_head
  1256. end if
  1257. do while not rs_n.eof
  1258. If div_tf = 1 Then
  1259. subClassList = subClassList & classNews_middle1 &getlist_news(rs_n,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"subClassList")&classNews_middle2
  1260. Else
  1261. subClassList = subClassList & "<div>" & getlist_news(rs_n,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"subClassList")&"<div>"&vbNewLine
  1262. End If
  1263. rs_n.movenext
  1264. loop
  1265. if div_tf=1 then
  1266. subClassList = subClassList & classNews_bottom
  1267. end if
  1268. end If
  1269. subClassList = subClassList & "</td>"&vbNewLine
  1270. rs.movenext
  1271. c_s_i = c_s_i + 1
  1272. Loop
  1273. If c_s_i Mod 2 <>0 Then
  1274. subClassList = subClassList & "<td width="""&cint(100/c_cols)&"%"" valign=""top""></td>"&vbNewLine
  1275. End If
  1276. rs.close:set rs = Nothing
  1277. rs_n.close:set rs_n = nothing
  1278. subClassList = subClassList & "</tr>"&vbNewLine&"</table>"&vbNewLine
  1279. else
  1280. subClassList = ""
  1281. end If
  1282. End Function
  1283. '得到新闻浏览________________________________________________________________
  1284. Public Function ReadNews(f_Lablechar,f_type,f_Id)
  1285. 'ReadNews┆引用样式$2┆日期格式$YY02-MM-DD HH:MI:SS
  1286. Dim styleId,ReadSql,RsReadObj
  1287. Dim MF_Domain,datestyle,PageTF,pagecss,pageposi,pagegs
  1288. styleId = split(split(f_Lablechar,"┆")(1),"$")(1)
  1289. datestyle = split(split(f_Lablechar,"┆")(2),"$")(1)
  1290. ReadNews = ""