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

数据库编程

开发平台:

ASP/ASPX

  1. <%
  2. Class cls_DS
  3. Private m_Rs,m_FSO,m_Dict
  4. Private m_PathDir,m_Path_UserDir,m_Path_User,m_Path_adminDir,m_Path_UserPageDir,m_Path_Templet
  5. Private m_Err_Info,m_Err_NO
  6. Public Property Get Err_Info()
  7. Err_Info = m_Err_Info
  8. End Property
  9. Public Property Get Err_NO()
  10. Err_NO = m_Err_NO
  11. End Property
  12. Private Sub Class_initialize()
  13. Set m_Rs = Server.CreateObject(G_FS_RS)
  14. Set m_FSO = Server.CreateObject(G_FS_FSO)
  15. Set m_Dict = Server.CreateObject(G_FS_DICT)
  16. m_PathDir = replace("/"&G_VIRTUAL_ROOT_DIR&"/","//","/")
  17. m_Path_UserDir = replace("/"&G_VIRTUAL_ROOT_DIR&"/"&G_USER_DIR&"/","//","/")
  18. m_Path_UserPageDir = replace("/"&G_VIRTUAL_ROOT_DIR&"/"&G_USERFILES_DIR&"/","//","/")
  19. End Sub
  20. Private Sub Class_Terminate()
  21. Set m_Rs = Nothing
  22. Set m_FSO = Nothing
  23. Set m_Dict = Nothing
  24. End Sub
  25. Public Function get_LableChar(f_Lablechar,f_Id)
  26. Dim f_array
  27. f_array= split(f_Lablechar,"┆")
  28. if ubound(f_array)=0 and not isarray(f_array) then
  29. get_LableChar=""
  30. exit Function
  31. else
  32. select case LCase(f_array(0))
  33. case "classnews","lastnews","recnews","hotnews","downhotnews"
  34. ''get_LableChar = ubound(f_array) : exit function ''测试用
  35. if ubound(f_array)<>17  and  ubound(f_array)<>23 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNews(f_Lablechar,LCase(f_array(0)),f_Id):end if
  36. case "classlist"
  37. if ubound(f_array)<>17  and  ubound(f_array)<>23 then:get_LableChar="标签错误":else:get_LableChar=classlist(f_Lablechar,"classlist",f_Id):end if
  38. '常规标签类
  39. case "readnews"
  40. if ubound(f_array)<>2   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ReadNews(f_Lablechar,"readnews",f_Id):end if
  41. case "sitemap"
  42. if ubound(f_array)<>2   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=SiteMap(f_Lablechar,"sitemap",f_Id):end if
  43. case "search"
  44. if ubound(f_array)<>2   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Search(f_Lablechar,"search"):end if
  45. case "infostat"
  46. if ubound(f_array)<>1   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=infoStat(f_Lablechar,"infostat"):end if
  47. case "classnavi"
  48. if ubound(f_array)<>11   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNavi(f_Lablechar,"classnavi",f_Id):end if
  49. case "subclasslist"
  50. if ubound(f_array)<>20 and  ubound(f_array)<>26  then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=subClassList(f_Lablechar,"subclasslist",f_Id):end if
  51. end select
  52. end if
  53. End Function
  54. '得到div,table_________________________________________________________________________________
  55. Public Function table_str_list_head(f_tf,f_divid,f_divclass,f_ulid,f_ulclass)
  56. Dim table_,tr_
  57. Dim f_divid_1,f_divclass_1,f_ulid_1,f_ulclass_1
  58. if f_tf=1 then
  59. if f_divid<>"" then:f_divid_1 = " id="""& f_divid &"""":else:f_divid_1 = "":end if
  60. if f_divclass<>"" then:f_divclass_1 = " class="""& f_divclass &"""":else:f_divclass_1 = "":end if
  61. if f_ulid<>"" then:f_ulid_1 = " id="""& f_ulid &"""":else:f_ulid_1 = "":end if
  62. if f_ulclass<>"" then:f_ulclass_1 = " class="""& f_ulclass &"""":else:f_ulclass_1 = "":end if
  63. table_="<div"& f_divid_1 & f_divclass_1 &">"
  64. tr_="<ul"& f_ulid_1 & f_ulclass_1 &">"
  65. table_str_list_head =  table_&chr(10)
  66. table_str_list_head = table_str_list_head &" "& tr_&chr(10)
  67. else
  68. table_="<table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  69. table_str_list_head =  table_&chr(10)
  70. end if
  71. End Function
  72. '得到div,table_________________________________________________________________________________
  73. public Function table_str_list_middle_1(f_tf,f_liid,f_liclass)
  74. Dim f_liid_1,f_liclass_1,td_
  75. if f_tf=1 then
  76. if f_liid<>"" then:f_liid_1 = " id="""& f_liid &"""":else:f_liid_1 = "":end if
  77. if f_liclass<>"" then:f_liclass_1 = " class="""& f_liclass &"""":else:f_liclass_1 = "":end if
  78. td_="<li"&f_liid_1&f_liclass_1&">"
  79. table_str_list_middle_1 ="  "&td_
  80. end if
  81. End Function
  82. '得到div,table_________________________________________________________________________________
  83. public Function table_str_list_middle_2(f_tf)
  84. Dim td__,tr__
  85. if f_tf=1 then
  86. td__="</li>"
  87. else
  88. td__="</td>"
  89. end if
  90. table_str_list_middle_2 =  td__&chr(10)
  91. End Function
  92. '得到div,table_________________________________________________________________________________
  93. Public Function table_str_list_middle_3(f_tf)
  94. if f_tf=1 then
  95. table_str_list_middle_3 = ""
  96. else
  97. table_str_list_middle_3 = "</tr>"
  98. end if
  99. End Function
  100. '得到div,table_________________________________________________________________________________
  101. Public Function table_str_list_bottom(f_tf)
  102. Dim table__,tr__
  103. if f_tf=1 then
  104. table__="</div>"
  105. tr__="</ul>"
  106. table_str_list_bottom = " "&tr__&chr(10)
  107. else
  108. table__="</table>"
  109. table_str_list_bottom = ""
  110. end if
  111. table_str_list_bottom = table_str_list_bottom &table__&chr(10)
  112. End Function
  113. 'DIV格式输出结束_____________________________________________________________________
  114. '开始读取标签____综合类标签__________________________________________________
  115. Public Function ClassNews(f_Lablechar,f_LableType,f_Id)
  116. 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
  117. Dim newnumber,classid,orderby,orderdesc,colnumber,contentnumber,navinumber,datenumber,titlenumber,picshowtf,datenumber_tmp,morechar,datestyle,openstyle,open_target,containSubClass,childClass
  118. Dim f_sql,f_rs_obj,f_rs_configobj,f_configSql,CharIndexStr
  119. Dim MF_Domain,marqueedirec,marqueespeed,marqueestyle
  120. Dim search_str,order_in_str_awen
  121. Dim ClassName,ClassEName,c_Domain,ClassNaviContent,ClassNaviPic,c_SavePath,c_FileSaveType,search_inSQL
  122. table_array=split(f_Lablechar,"┆")
  123. if instr(f_Lablechar,"out_DIV")>0 then
  124. div_tf=1
  125. search_str = split(split(f_Lablechar,"┆")(2),"$")(1)
  126. newnumber =split(split(f_Lablechar,"┆")(3),"$")(1)
  127. datenumber= split(split(f_Lablechar,"┆")(11),"$")(1)
  128. titlenumber= split(split(f_Lablechar,"┆")(12),"$")(1)
  129. picshowtf=split(split(f_Lablechar,"┆")(13),"$")(1)
  130. openstyle=split(split(f_Lablechar,"┆")(14),"$")(1)
  131. containSubClass=split(split(f_Lablechar,"┆")(15),"$")(1)
  132. orderby = split(split(f_Lablechar,"┆")(16),"$")(1)
  133. orderdesc = split(split(f_Lablechar,"┆")(17),"$")(1)
  134. morechar = split(split(f_Lablechar,"┆")(18),"$")(1)
  135. datestyle = split(split(f_Lablechar,"┆")(20),"$")(1)
  136. style_id = split(split(f_Lablechar,"┆")(21),"$")(1)
  137. colnumber= split(split(f_Lablechar,"┆")(22),"$")(1)
  138. contentnumber= split(split(f_Lablechar,"┆")(23),"$")(1)
  139. else
  140. div_tf=0
  141. search_str = split(split(f_Lablechar,"┆")(2),"$")(1)
  142. newnumber = split(split(f_Lablechar,"┆")(3),"$")(1)
  143. datenumber= split(split(f_Lablechar,"┆")(5),"$")(1)
  144. titlenumber= split(split(f_Lablechar,"┆")(6),"$")(1)
  145. picshowtf=split(split(f_Lablechar,"┆")(7),"$")(1)
  146. openstyle=split(split(f_Lablechar,"┆")(8),"$")(1)
  147. containSubClass=split(split(f_Lablechar,"┆")(9),"$")(1)
  148. orderby = split(split(f_Lablechar,"┆")(10),"$")(1)
  149. orderdesc = split(split(f_Lablechar,"┆")(11),"$")(1)
  150. morechar = split(split(f_Lablechar,"┆")(12),"$")(1)
  151. datestyle = split(split(f_Lablechar,"┆")(14),"$")(1)
  152. style_id = split(split(f_Lablechar,"┆")(15),"$")(1)
  153. colnumber= split(split(f_Lablechar,"┆")(16),"$")(1)
  154. contentnumber= split(split(f_Lablechar,"┆")(17),"$")(1)
  155. end if
  156. 'if isnumeric(newnumber)=false then
  157. ' newnumber = 10
  158. 'else
  159. ' newnumber=newnumber
  160. 'end if
  161. if not isnumeric(titlenumber) then
  162. titlenumber = 30
  163. else
  164. titlenumber = titlenumber
  165. end if
  166. if isnumeric(colnumber)=false then
  167. colnumber = 30
  168. else
  169. colnumber = colnumber
  170. end if
  171. if isnumeric(contentnumber)=false then
  172. contentnumber = 100
  173. else
  174. contentnumber = contentnumber
  175. end if
  176. 'if div_tf=1 then
  177. 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))
  178. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(9),"$")(1),split(table_array(10),"$")(1))
  179. 'end if
  180. classNews_bottom = table_str_list_bottom(div_tf)
  181. classNews_middle2 = table_str_list_middle_2(div_tf)
  182. ''永不过期和尚未到期的
  183. datenumber_tmp=" and  (OverDue=0 or (OverDue>0 and datediff('d',AddTime,'"&date()&"')<= OverDue))"
  184. if datenumber ="0" then:datenumber_tmp = "":else:datenumber_tmp = " and datevalue(AddTime)+"&datenumber&">=datevalue(now)":end if
  185. ''已经在外部定义好了。
  186. order_in_str_awen = ""&orderby&" "&orderdesc&""
  187. if ucase(orderby)<>"ID" then order_in_str_awen = order_in_str_awen & ",ID Desc"
  188. If containSubClass=1 Then
  189. childClass=" or classid in ("&DelHeadAndEndDot(getNewsSubClass(search_str))&")"
  190. Else
  191. childClass=""
  192. End if
  193. select case f_LableType
  194. case "classnews"
  195. If childClass<>"" Then
  196. search_inSQL = " and (ClassId='"& search_str &"'"&childClass&")"
  197. Else
  198. search_inSQL = " and ClassId='"& search_str &"'"
  199. End if
  200. case "lastnews","hotnews","downhotnews"
  201. if trim(search_str)<>"" Then
  202. If childClass<>"" Then
  203. search_inSQL = " and (ClassId='"& search_str &"'"&childClass&")"
  204. Else
  205. search_inSQL = " and ClassId='"& search_str &"'"
  206. End if
  207. else
  208. if trim(f_id)<>"" Then
  209. If childClass<>"" then
  210. search_inSQL = " and (ClassId='"& f_id &"'"&childClass&")"
  211. Else
  212. search_inSQL = " and ClassId='"& f_id &"'"
  213. End if
  214. else
  215. search_inSQL = ""
  216. end if
  217. end if
  218. f_LableType = "classnews" ''处理后还原
  219. case "recnews"
  220. if trim(search_str)<>"" Then
  221. If childClass<>"" then
  222. search_inSQL = " and RecTF=1 and (ClassId='"& search_str &"'"&childClass&")"
  223. Else
  224. search_inSQL = " and RecTF=1 and ClassId='"& search_str &"'"
  225. End if
  226. else
  227. if trim(f_id)<>"" Then
  228. If childClass<>"" then
  229. search_inSQL = " and RecTF=1 and (ClassId='"& f_id &"'"&childClass&")"
  230. Else
  231. search_inSQL = " and RecTF=1 and ClassId='"& f_id &"'"
  232. End if
  233. else
  234. search_inSQL = " and RecTF=1"
  235. end if
  236. end if
  237. f_LableType = "classnews" ''处理后还原
  238. end select
  239. f_sql="select top "& cint(newnumber) &" ID,DownLoadID,ClassID,Description,Accredit,AddTime,Appraise,AuditTF,BrowPop," _
  240. &"ClickNum,EditTime,EMail,SavePath,FileExtName,FileName,FileSize,Language,Name,NewsTemplet,PassWord,Pic," _
  241. &"Property,Provider,ProviderUrl,RecTF,ReviewTF,ShowReviewTF,SystemType,Types,Version,OverDue,ConsumeNum,Hits"
  242. f_sql = f_sql &" From FS_DS_List where AuditTF=1 "&search_inSQL & datenumber_tmp &" order by "&order_in_str_awen
  243. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  244. Content_List=""
  245. set f_rs_obj = Conn.execute(f_sql)
  246. if f_rs_obj.eof then
  247. Content_List=""
  248. f_rs_obj.close:set f_rs_obj=nothing
  249. else
  250. if f_LableType="marnews" then
  251. Content_List = Content_List & "<marquee onmouseover=""this.stop();"" scrollamount="""& marqueespeed &""" direction="""& marqueedirec &""" onmouseout=""this.start();"">"
  252. do while not f_rs_obj.eof
  253. Content_List= Content_List &getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,f_LableType)&"&nbsp;&nbsp;&nbsp;"
  254. f_rs_obj.movenext
  255. loop
  256. Content_List = Content_List & "</marquee>"
  257. else
  258. if div_tf = 0 then
  259. c_i_k = 0
  260. if cint(colnumber)<>1 then
  261. Content_List = Content_List &  "  <tr>"
  262. end if
  263. end if
  264. do while not f_rs_obj.eof
  265. if div_tf=1 then
  266. 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
  267. else
  268. if cint(colnumber) =1 then
  269. Content_List= Content_List & chr(10)&"   <tr><td>" & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,f_LableType) & "</td></tr>"
  270. else
  271. 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>"
  272. end if
  273. end if
  274. f_rs_obj.movenext
  275. if div_tf = 0 then
  276. if cint(colnumber)<>1 then
  277. c_i_k = c_i_k+1
  278. if c_i_k mod cint(colnumber) = 0 then
  279. Content_List = Content_List & "</tr>"&chr(10)&"  <tr>"
  280. end if
  281. end if
  282. end if
  283.    loop
  284.    if div_tf=0 then
  285. if cint(colnumber)<>1 then
  286. Content_List = Content_List & "</tr>"&chr(10)
  287. end if
  288.    end if
  289. end if
  290. '得到栏目路径
  291. if f_LableType="classnews" then
  292. dim Query_rs,newsclass_SavePath,FileSaveType,UrlDomain,all_savepath
  293. set Query_rs=Conn.execute("select ClassEName,SavePath,FileExtName,[Domain],FileSaveType,IsURL,UrlAddress From FS_DS_Class where ClassId='"& search_str &"'")
  294. if Query_rs.eof then
  295. Query_rs.close:set Query_rs=nothing
  296. else
  297.   all_savepath = get_ClassLink(search_str)
  298.   Query_rs.close:set Query_rs=nothing
  299. end if
  300. if openstyle=0 then
  301. open_target=" "
  302. else
  303. open_target=" target=""_blank"""
  304. end if
  305. if div_tf=1 then
  306. Content_more = "  <li><a href="""&  all_savepath &""" "& open_target &" title=""更多..."">"&morechar&"</a></li>"&chr(10)
  307. else
  308. Content_more = "  <tr><td colspan="""& cint(colnumber) &"""><div align=""right""><a href="""&  all_savepath &""" "& open_target &" title=""更多..."">"&morechar&"</a></div></td></tr>"&chr(10)
  309. end if
  310.  end if
  311.  f_rs_obj.close:set f_rs_obj=nothing
  312. if f_LableType="marnews" then
  313. Content_List= Content_List
  314. else
  315. Content_List=classNews_head & Content_List & Content_more & classNews_bottom
  316. end if
  317. end if
  318. ClassNews =  Content_List
  319. End Function
  320. ''正则查找
  321. Public Function Test_KeyWord(f_Str,Patt)
  322. Dim f_regEx
  323. Set f_regEx = New RegExp
  324. f_regEx.Pattern = Patt
  325. f_regEx.IgnoreCase = True
  326. f_regEx.Global = True
  327. Test_KeyWord = f_regEx.test(Cstr(f_Str))
  328. End Function
  329. Public Function replace_KeyWord(f_obj,f_MF_Domain,f_Str,Patstr)
  330. Dim regEx,Match, Matches,f_oldStr
  331. f_oldStr = f_Str
  332. Set regEx = New RegExp
  333. regEx.Pattern = Patstr
  334. regEx.IgnoreCase = True
  335. regEx.Global = True
  336. Set Matches = regEx.Execute(Cstr(f_Str))      ' 执行搜索。
  337. 'Show_Html = Matches(Matches.Count-1).value   'Matches.Count-1 才是最后一个数值
  338. For Each Match in Matches         ' 遍历 Matches 集合。
  339. if Match.Value<>"" then replace_KeyWord = replace_KeyWord & doregExValue(f_obj,f_MF_Domain,f_oldStr,Match.Value)
  340. Next
  341. End Function
  342. Public Function doregExValue(f_obj,f_MF_Domain,f_oldStr,ExValue)
  343. dim s_m_Rs1,k_tmp_Chararray,k_tmp_Chararray1,k_tmp_uchar,tmp_list,k_tmp_uchar1,k_tmp_uchar2,k_tmp_i
  344. k_tmp_Chararray = split(ExValue,"$")
  345. k_tmp_uchar="":tmp_list="":k_tmp_uchar1="":k_tmp_uchar2=""
  346. if ubound(k_tmp_Chararray)=1 then
  347. k_tmp_uchar =  replace(k_tmp_Chararray(1),"}","")
  348. k_tmp_uchar=Replace(k_tmp_uchar,"&amp;","&")
  349. k_tmp_uchar=Replace(k_tmp_uchar,"&lt;","<")
  350. k_tmp_uchar=Replace(k_tmp_uchar,"&gt;",">")
  351. select case k_tmp_uchar
  352. case "1"
  353. k_tmp_uchar = "<br />"
  354. case "2"
  355. k_tmp_uchar = "&nbsp;"
  356. case "3"
  357. k_tmp_uchar = "</tr><tr>"
  358. case else
  359. '' $<br />:10 表示 <br />循环10次
  360. if instr(k_tmp_uchar,":") then
  361. k_tmp_Chararray1 = split(k_tmp_uchar,":")
  362. if ubound(k_tmp_Chararray1) = 1 then
  363. if k_tmp_Chararray1(1)<>"" then
  364. if isnumeric(k_tmp_Chararray1(1)) then
  365. k_tmp_uchar = ""
  366. for k_tmp_i=1 to cint(k_tmp_Chararray1(1))
  367. select case k_tmp_Chararray1(0)
  368. case "1"
  369. k_tmp_uchar2 = "<br />"
  370. case "2"
  371. k_tmp_uchar2 = "&nbsp;"
  372. case "3"
  373. k_tmp_uchar2 = "</tr><tr>"
  374. case else
  375. k_tmp_uchar2 = k_tmp_Chararray1(0)
  376. end select
  377. k_tmp_uchar = k_tmp_uchar & k_tmp_uchar2
  378. next
  379. end if
  380. end if
  381. end if
  382. end if
  383. end select
  384. end if
  385. set s_m_Rs1 = Conn.execute("select ID,AddressName from FS_DS_Address where DownLoadID='"&f_obj("DownLoadID")&"' order by Number desc")
  386. do while not s_m_Rs1.eof
  387. tmp_list = tmp_list & "<a href=""http://"&f_MF_Domain&"/Down.asp?DownLoadID="&f_obj("DownLoadID")&"&ID="&s_m_Rs1("ID")&""" target=""_blank"">"& s_m_Rs1("AddressName") &"</a>"
  388. tmp_list = tmp_list & k_tmp_uchar
  389. s_m_Rs1.movenext
  390. loop
  391. s_m_Rs1.close
  392. set s_m_Rs1=nothing
  393. doregExValue = replace(f_oldStr,ExValue,tmp_list)
  394. End Function
  395. '替换样式列表________________________________________________________________
  396. 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)
  397. 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
  398. Dim s_m_Rs,s_m_Rs1,s_array,s_t_i,tmp_list,s_f_classSql,m_Rs_class,class_path,str_newstitle
  399. if f_openstyle=0 then
  400. f_target=" "
  401. else
  402. f_target=" target=""_blank"""
  403. end if
  404. if style_id<>"" then
  405. ListSql = "Select Content from FS_MF_Labestyle where ID=" & style_id & ""
  406. Set Rs_ListObj = Conn.Execute(ListSql)
  407. if Not Rs_ListObj.Eof then
  408. s_Content = Rs_ListObj("Content")
  409. '_________________________________________________________________________________________________
  410. if instr(s_Content,"{DS:FS_ID}")>0 then
  411. s_Content = replace(s_Content,"{DS:FS_ID}",f_obj("Id"))
  412. end if
  413. '_________________________________________________________________________________________________
  414. if instr(s_Content,"{DS:FS_DownLoadID}")>0 then
  415. s_Content = replace(s_Content,"{DS:FS_DownLoadID}",f_obj("DownLoadID"))
  416. end if
  417. '_________________________________________________________________________________________________
  418. if instr(s_Content,"{DS:FS_Name}")>0 then
  419. if f_subsys_ListType="readnews" then
  420. str_newstitle = f_obj("Name")
  421. else
  422. str_newstitle =GotTopic(f_obj("Name"),f_titlenumber)
  423. if f_picshowtf=1 then
  424. if f_obj("Pic")<>"" then
  425. str_newstitle = ""&str_newstitle&"<img src="""&m_PathDir&"sys_images/img.gif"" alt=""有图片"" border=""0"">"
  426. end if
  427. end if
  428. end if
  429. s_Content = replace(s_Content,"{DS:FS_Name}",str_newstitle)
  430. end if
  431. dim news_SavePath,s_Query_rs,news_Domain,news_UrlDomain,news_ClassEname,s_all_savepath
  432. '_________________________________________________________________________________________________
  433. if instr(s_Content,"{DS:FS_Description}")>0 then
  434. if f_subsys_ListType="readnews" then
  435. if instr(f_obj("Description"),"[FS:PAGE]")>0 then
  436. s_Content = replace(s_Content,"{DS:FS_Description}","[FS:CONTENT_START]"&f_obj("Description")&"[FS:CONTENT_END]")
  437. else
  438. s_Content = replace(s_Content,"{DS:FS_Description}",""&f_obj("Description"))
  439. end if
  440. else
  441. s_all_savepath = get_DownLink(f_obj("DownLoadID"))
  442. s_NewsPathUrl = s_all_savepath
  443. s_Content = replace(s_Content,"{DS:FS_Description}",replace(replace(GetCStrLen(""&replace(""&f_obj("Description"),"[FS:PAGE]","")&"",f_contentnumber),"&nbsp;",""),vbCrLf,"")&"...&nbsp;&nbsp;<a class=""more"" href="""& s_NewsPathUrl &""">详细内容 >> </a>")
  444. end if
  445. end if
  446. '_________________________________________________________________________________________________
  447. if instr(s_Content,"{DS:FS_DownURL}")>0 or  instr(s_Content,"{DS:FS_Description}")>0 then
  448. s_all_savepath = get_DownLink(f_obj("DownLoadID"))
  449. s_NewsPathUrl = s_all_savepath
  450. s_Content = replace(s_Content,"{DS:FS_DownURL}",s_NewsPathUrl)
  451. end if
  452. '''下载地址列表
  453. '_________________________________________________________________________________________________
  454. if Test_KeyWord(s_Content,"{DS:FS_Address($[^{]+)?}") then
  455. s_Content = replace_KeyWord(f_obj,f_MF_Domain,s_Content,"{DS:FS_Address($[^{]+)?}")
  456. end if
  457. '_________________________________________________________________________________________________
  458. dim tmp_f_datestyle
  459. tmp_f_datestyle = f_datestyle
  460. if instr(s_Content,"{DS:FS_AddTime}")>0 then
  461. if instr(f_datestyle,"YY02")>0 then
  462. tmp_f_datestyle= replace(tmp_f_datestyle,"YY02",right(year(f_obj("AddTime")),2))
  463. end if
  464. if instr(f_datestyle,"YY04")>0 then
  465. tmp_f_datestyle= replace(tmp_f_datestyle,"YY04",year(f_obj("AddTime")))
  466. end if
  467. if instr(f_datestyle,"MM")>0 then
  468. if month(f_obj("AddTime"))<10 then
  469. tmp_f_datestyle= replace(tmp_f_datestyle,"MM","0"&month(f_obj("AddTime")))
  470. else
  471. tmp_f_datestyle= replace(tmp_f_datestyle,"MM",month(f_obj("AddTime")))
  472. end if
  473. end if
  474. if instr(f_datestyle,"DD")>0 then
  475. if day(f_obj("AddTime"))<10 then
  476. tmp_f_datestyle= replace(tmp_f_datestyle,"DD","0"&day(f_obj("AddTime")))
  477. else
  478. tmp_f_datestyle= replace(tmp_f_datestyle,"DD",day(f_obj("AddTime")))
  479. end if
  480. end if
  481. if instr(f_datestyle,"HH")>0 then
  482. if hour(f_obj("AddTime"))<10 then
  483. tmp_f_datestyle= replace(tmp_f_datestyle,"HH","0"&hour(f_obj("AddTime")))
  484. else
  485. tmp_f_datestyle= replace(tmp_f_datestyle,"HH",hour(f_obj("AddTime")))
  486. end if
  487. end if
  488. if instr(f_datestyle,"MI")>0 then
  489. if minute(f_obj("AddTime"))<10 then
  490. tmp_f_datestyle= replace(tmp_f_datestyle,"MI","0"&minute(f_obj("AddTime")))
  491. else
  492. tmp_f_datestyle= replace(tmp_f_datestyle,"MI",minute(f_obj("AddTime")))
  493. end if
  494. end if
  495. if instr(f_datestyle,"SS")>0 then
  496. if second(f_obj("AddTime"))<10 then
  497. tmp_f_datestyle= replace(tmp_f_datestyle,"SS","0"&second(f_obj("AddTime")))
  498. else
  499. tmp_f_datestyle= replace(tmp_f_datestyle,"SS",second(f_obj("AddTime")))
  500. end if
  501. end if
  502. s_Content = replace(s_Content,"{DS:FS_AddTime}",""&tmp_f_datestyle&"")
  503. end if
  504. '_________________________________________________________________________________________________
  505. if instr(s_Content,"{DS:FS_EditTime}")>0 then
  506. if instr(f_datestyle,"YY02")>0 then
  507. tmp_f_datestyle= replace(tmp_f_datestyle,"YY02",right(year(f_obj("EditTime")),2))
  508. end if
  509. if instr(f_datestyle,"YY04")>0 then
  510. tmp_f_datestyle= replace(tmp_f_datestyle,"YY04",year(f_obj("EditTime")))
  511. end if
  512. if instr(f_datestyle,"MM")>0 then
  513. if month(f_obj("EditTime"))<10 then
  514. tmp_f_datestyle= replace(tmp_f_datestyle,"MM","0"&month(f_obj("EditTime")))
  515. else
  516. tmp_f_datestyle= replace(tmp_f_datestyle,"MM",month(f_obj("EditTime")))
  517. end if
  518. end if
  519. if instr(f_datestyle,"DD")>0 then
  520. if day(f_obj("EditTime"))<10 then
  521. tmp_f_datestyle= replace(tmp_f_datestyle,"DD","0"&day(f_obj("EditTime")))
  522. else
  523. tmp_f_datestyle= replace(tmp_f_datestyle,"DD",day(f_obj("EditTime")))
  524. end if
  525. end if
  526. if instr(f_datestyle,"HH")>0 then
  527. if hour(f_obj("EditTime"))<10 then
  528. tmp_f_datestyle= replace(tmp_f_datestyle,"HH","0"&hour(f_obj("EditTime")))
  529. else
  530. tmp_f_datestyle= replace(tmp_f_datestyle,"HH",hour(f_obj("EditTime")))
  531. end if
  532. end if
  533. if instr(f_datestyle,"MI")>0 then
  534. if minute(f_obj("EditTime"))<10 then
  535. tmp_f_datestyle= replace(tmp_f_datestyle,"MI","0"&minute(f_obj("EditTime")))
  536. else
  537. tmp_f_datestyle= replace(tmp_f_datestyle,"MI",minute(f_obj("EditTime")))
  538. end if
  539. end if
  540. if instr(f_datestyle,"SS")>0 then
  541. if second(f_obj("EditTime"))<10 then
  542. tmp_f_datestyle= replace(tmp_f_datestyle,"SS","0"&second(f_obj("EditTime")))
  543. else
  544. tmp_f_datestyle= replace(tmp_f_datestyle,"SS",second(f_obj("EditTime")))
  545. end if
  546. end if
  547. s_Content = replace(s_Content,"{DS:FS_EditTime}",""&tmp_f_datestyle&"")
  548. end if
  549. dim ajax_str,hits_str
  550. '_________________________________________________________________________________________________
  551. if instr(s_Content,"{DS:FS_Hits}")>0 then
  552. hits_str = "<script language=""JavaScript"" src=""http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/Click.asp?type=ajax&SubSys=DS&spanid=DS_id_click_"&f_obj("ID")&"""></script>"&chr(10)
  553. s_Content = replace(s_Content,"{DS:FS_Hits}",""&  hits_str & "<span id=""DS_id_click_"&f_obj("ID")&"""></span>")
  554. end if
  555. '_________________________________________________________________________________________________
  556. if instr(s_Content,"{DS:FS_ClickNum}")>0 then
  557. hits_str = "<script language=""JavaScript"" src=""http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/Click.asp?type=ajax&SubSys=DS&Get=ClickNum&spanid=DS_id_click_"&f_obj("ID")&"""></script>"&chr(10)
  558. s_Content = replace(s_Content,"{DS:FS_ClickNum}",""&  hits_str & "<span id=""DS_id_click_"&f_obj("ID")&"""></span>")
  559. end if
  560. '_________________________________________________________________________________________________
  561. if instr(s_Content,"{DS:FS_SystemType}")>0 then
  562. s_Content = replace(s_Content,"{DS:FS_SystemType}",""&f_obj("SystemType")&"")
  563. end if
  564. '_________________________________________________________________________________________________
  565. if instr(s_Content,"{DS:FS_Accredit}")>0 then
  566. s_Content = replace(s_Content,"{DS:FS_Accredit}",""&Replacestr(f_obj("Accredit"),"1:免费,2:共享,3:试用,4:演示,5:注册,6:破解,7:零售,8:其它")&"")
  567. end if
  568. '_________________________________________________________________________________________________
  569. if instr(s_Content,"{DS:FS_Version}")>0 then
  570. s_Content = replace(s_Content,"{DS:FS_Version}",""&f_obj("Version")&"")
  571. end if
  572. '_________________________________________________________________________________________________
  573. if instr(s_Content,"{DS:FS_Appraise}")>0 then
  574. dim db_ii,Str_Tmp,ii_
  575. db_ii = f_obj("Appraise")
  576. if db_ii = "" or isnull(db_ii) then  db_ii = 0
  577. if db_ii>6 then db_ii=6
  578. Str_Tmp = ""
  579. for ii_ = 1 to db_ii
  580. Str_Tmp = Str_Tmp & "<img border=0 src=""/sys_images/icon_star_2.gif"" title="""&f_obj("Appraise")&"星"">"
  581. next 
  582. for ii_ = 1 to 6 - db_ii
  583. Str_Tmp = Str_Tmp & "<img border=0 src=""/sys_images/icon_star_1.gif"" title="""&f_obj("Appraise")&"星"">"
  584. next 
  585. s_Content = replace(s_Content,"{DS:FS_Appraise}",""&Str_Tmp&"")
  586. end if
  587. '_________________________________________________________________________________________________
  588. if instr(s_Content,"{DS:FS_FileSize}")>0 then
  589. s_Content = replace(s_Content,"{DS:FS_FileSize}",""&f_obj("FileSize")&"")
  590. end if
  591. '_________________________________________________________________________________________________
  592. if instr(s_Content,"{DS:FS_Language}")>0 then
  593. s_Content = replace(s_Content,"{DS:FS_Language}",""&f_obj("Language")&"")
  594. end if
  595. '_________________________________________________________________________________________________
  596. if instr(s_Content,"{DS:FS_PassWord}")>0 then
  597. s_Content = replace(s_Content,"{DS:FS_PassWord}",""&f_obj("PassWord")&"")
  598. end if
  599. '_________________________________________________________________________________________________
  600. if instr(s_Content,"{DS:FS_Provider}")>0 then
  601. s_Content = replace(s_Content,"{DS:FS_Provider}",""&f_obj("Provider")&"")
  602. end if
  603. '_________________________________________________________________________________________________
  604. if instr(s_Content,"{DS:FS_ProviderUrl}")>0 then
  605. s_Content = replace(s_Content,"{DS:FS_ProviderUrl}",""&f_obj("ProviderUrl")&"")
  606. end if
  607. '_________________________________________________________________________________________________
  608. if instr(s_Content,"{DS:FS_EMail}")>0 then
  609. s_Content = replace(s_Content,"{DS:FS_EMail}","<a href=""mailto:"&f_obj("EMail")&""">"&f_obj("EMail")&"</a>")
  610. end if
  611. '_________________________________________________________________________________________________
  612. if instr(s_Content,"{DS:FS_Types}")>0 then
  613. s_Content = replace(s_Content,"{DS:FS_Types}",""&f_obj("Types")&"")
  614. end if
  615. '_________________________________________________________________________________________________
  616. if instr(s_Content,"{DS:FS_OverDue}")>0 then
  617. if f_obj("OverDue")=0 then
  618. s_Content = replace(s_Content,"{DS:FS_OverDue}","永不过期")
  619. else
  620. s_Content = replace(s_Content,"{DS:FS_OverDue}",""&f_obj("OverDue")&"天")
  621. end if
  622. end if
  623. '_________________________________________________________________________________________________
  624. if instr(s_Content,"{DS:FS_ConsumeNum}")>0 then
  625. s_Content = replace(s_Content,"{DS:FS_ConsumeNum}",""&f_obj("ConsumeNum")&"")
  626. end if
  627. '_________________________________________________________________________________________________
  628. if instr(s_Content,"{DS:FS_Pic}")>0 then
  629. if trim(f_obj("Pic"))<>"" then
  630. s_Content = replace(s_Content,"{DS:FS_Pic}",f_obj("Pic"))
  631. else
  632. s_Content = replace(s_Content,"{DS:FS_Pic}","/sys_images/NoPic.jpg")
  633. end if
  634. end if
  635. '_________________________________________________________________________________________________
  636. if instr(s_Content,"{DS:FS_FormReview}")>0 then
  637. s_Content = replace(s_Content,"{DS:FS_FormReview}","<span id=""Review_TF_"& f_obj("ID") &""">loading...</span><script language=""JavaScript"" type=""text/javascript"" src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewTF.asp?Id="& f_obj("ID") &"&Type=DS""></script>")
  638. end if
  639. '_________________________________________________________________________________________________
  640. If instr(s_Content,"{DS:FS_ShowComment}")>0 Then
  641. s_Content = replace(s_Content,"{DS:FS_ShowComment}","<span id=""DS_show_review_"& f_obj("ID") &""">评论加载中...</span><script language=""JavaScript"" type=""text/javascript"" src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ShowReview.asp?Id="&f_obj("ID")&"&Type=DS&SpanId=DS_show_review_"& f_obj("ID") &"""></script>")
  642. End If
  643. '_________________________________________________________________________________________________
  644. if instr(s_Content,"{DS:FS_AddFavorite}")>0 then
  645. s_Content = replace(s_Content,"{DS:FS_AddFavorite}","<a href=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/User/AddFavor.asp?Id="&f_obj("id")&"&Type=ds""><img src="""& m_PathDir &"sys_images/Favorite.gif"" border=""0"" alt=""加入收藏夹""></a>")
  646. end if
  647. '_________________________________________________________________________________________________
  648. if instr(s_Content,"{DS:FS_SendFriend}")>0 then
  649. s_Content = replace(s_Content,"{DS:FS_SendFriend}","<a href=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/Sendmail.asp?Id="&f_obj("id")&"&Type=ds""><img src="""& m_PathDir &"sys_images/sendmail.gif"" border=""0"" alt=""发送给好友""></a>")
  650. end if
  651. '获得栏目地址_______________________________________________________________________________________________
  652. s_f_classSql = "select ClassID,ClassName,ClassEName,[Domain],ClassNaviContent,ClassNaviPic,SavePath,FileSaveType,ClassKeywords,Classdescription,FileExtName from FS_DS_Class where ClassId='"&f_obj("ClassId")&"' and ReycleTF=0 order by OrderID desc,id desc"
  653. if instr(s_Content,"{DS:FS_ClassURL}")>0 then
  654. class_path=get_ClassLink(f_obj("ClassId"))
  655. s_Content = replace(s_Content,"{DS:FS_ClassURL}",class_path)
  656. end if
  657. if instr(s_Content,"{DS:FS_ClassName}")>0 then
  658. set m_Rs_class = Conn.execute(s_f_classSql)
  659. s_Content = replace(s_Content,"{DS:FS_ClassName}",""&m_Rs_class("ClassName")&"")
  660. m_Rs_class.close:set m_Rs_class=nothing
  661. end if
  662. if instr(s_Content,"{DS:FS_ClassNaviPicURL}")>0 then
  663. set m_Rs_class = Conn.execute(s_f_classSql)
  664. if trim(m_Rs_class("ClassNaviPic"))<>"" then
  665. s_Content = replace(s_Content,"{DS:FS_ClassNaviPicURL}",""& m_Rs_class("ClassNaviPic") &"")
  666. else
  667. s_Content = replace(s_Content,"{DS:FS_ClassNaviPicURL}","")
  668. end if
  669. m_Rs_class.close:set m_Rs_class=nothing
  670. end if
  671. if instr(s_Content,"{DS:FS_ClassNaviDescript}")>0 then
  672. set m_Rs_class = Conn.execute(s_f_classSql)
  673. if trim(m_Rs_class("ClassNaviContent"))<>"" then
  674. s_Content = replace(s_Content,"{DS:FS_ClassNaviDescript}",""& m_Rs_class("ClassNaviContent") &"")
  675. else
  676. s_Content = replace(s_Content,"{DS:FS_ClassNaviDescript}","")
  677. end if
  678. m_Rs_class.close:set m_Rs_class=nothing
  679. end if
  680. if instr(s_Content,"{DS:FS_ClassNaviContent}")>0 then
  681. set m_Rs_class = Conn.execute(s_f_classSql)
  682. s_Content = replace(s_Content,"{DS:FS_ClassNaviContent}",""&m_Rs_class("ClassNaviContent"))
  683. m_Rs_class.close:set m_Rs_class=nothing
  684. end if
  685. if instr(s_Content,"{DS:FS_ClassKeywords}")>0 then
  686. set m_Rs_class = Conn.execute(s_f_classSql)
  687. s_Content = replace(s_Content,"{DS:FS_ClassKeywords}",""&m_Rs_class("ClassKeywords"))
  688. m_Rs_class.close:set m_Rs_class=nothing
  689. end if
  690. if instr(s_Content,"{DS:FS_Classdescription}")>0 then
  691. set m_Rs_class = Conn.execute(s_f_classSql)
  692. s_Content = replace(s_Content,"{DS:FS_Classdescription}",""&m_Rs_class("Classdescription"))
  693. m_Rs_class.close:set m_Rs_class=nothing
  694. end if
  695. '这里暂时用*代替
  696. '释放对象
  697. Rs_ListObj.close:set Rs_ListObj=nothing
  698. else
  699. m_Err_Info = "DS警告:此下载找不到样式,没生成"
  700. m_Err_No="DS:nostyle"
  701. s_Content=""
  702. Rs_ListObj.close:set Rs_ListObj=nothing
  703. end if
  704. else
  705. m_Err_Info = "DS警告:找不到此下载"
  706. m_Err_No="DS:nodata"
  707. s_Content=""
  708. end if
  709. getlist_news = s_Content
  710. End Function
  711. '开始读取标签____下载终极类标签_____________________________________________________________________
  712. Public Function ClassList(f_Lablechar,f_type,f_Id)
  713. if f_Id<>"" then
  714. dim table_array,div_tf,newnumber,datenumber,titlenumber,picshowtf,openstyle,orderby,orderdesc,pageTF,pagestyle,pagenumber,pagecss,datestyle,style_id,colnumber,contentnumber,navinumber
  715. dim classNews_head,classNews_bottom,classNews_middle1,classNews_middle2,search_inSQL,order_in_str_awen
  716. dim datenumber_tmp,f_sql,f_configsql,f_rs_obj,f_rs_configobj,MF_Domain
  717. dim TPageNum,perPageNum,PageNum,sPageCount,cl_i,c_i_k
  718. dim rs_c,RefreshNumber,Page_flag_TF
  719. table_array=split(f_Lablechar,"┆")
  720. m_Err_Info = ""
  721. if instr(f_Lablechar,"out_DIV")>0 then
  722. div_tf=1
  723. datenumber= split(split(f_Lablechar,"┆")(9),"$")(1)
  724. titlenumber= split(split(f_Lablechar,"┆")(10),"$")(1)
  725. picshowtf=split(split(f_Lablechar,"┆")(11),"$")(1)
  726. openstyle=split(split(f_Lablechar,"┆")(12),"$")(1)
  727. orderby = split(split(f_Lablechar,"┆")(14),"$")(1)
  728. orderdesc = split(split(f_Lablechar,"┆")(15),"$")(1)
  729. pageTF = split(split(f_Lablechar,"┆")(16),"$")(1)
  730. pagestyle = split(split(f_Lablechar,"┆")(17),"$")(1)
  731. pagenumber = split(split(f_Lablechar,"┆")(18),"$")(1)
  732. pagecss = split(split(f_Lablechar,"┆")(19),"$")(1)
  733. datestyle = split(split(f_Lablechar,"┆")(20),"$")(1)
  734. style_id = split(split(f_Lablechar,"┆")(21),"$")(1)
  735. colnumber= split(split(f_Lablechar,"┆")(22),"$")(1)
  736. contentnumber= split(split(f_Lablechar,"┆")(23),"$")(1)
  737. else
  738. div_tf=0
  739. datenumber= split(split(f_Lablechar,"┆")(3),"$")(1)
  740. titlenumber= split(split(f_Lablechar,"┆")(4),"$")(1)
  741. picshowtf=split(split(f_Lablechar,"┆")(5),"$")(1)
  742. openstyle=split(split(f_Lablechar,"┆")(6),"$")(1)
  743. orderby = split(split(f_Lablechar,"┆")(8),"$")(1)
  744. orderdesc = split(split(f_Lablechar,"┆")(9),"$")(1)
  745. pageTF = split(split(f_Lablechar,"┆")(10),"$")(1)
  746. pagestyle = split(split(f_Lablechar,"┆")(11),"$")(1)
  747. pagenumber = split(split(f_Lablechar,"┆")(12),"$")(1)
  748. pagecss = split(split(f_Lablechar,"┆")(13),"$")(1)
  749. datestyle = split(split(f_Lablechar,"┆")(14),"$")(1)
  750. style_id = split(split(f_Lablechar,"┆")(15),"$")(1)
  751. colnumber= split(split(f_Lablechar,"┆")(16),"$")(1)
  752. contentnumber= split(split(f_Lablechar,"┆")(17),"$")(1)
  753. end if
  754. 'if div_tf=1 then
  755. 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))
  756. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(7),"$")(1),split(table_array(8),"$")(1))
  757. 'end if
  758. classNews_bottom = table_str_list_bottom(div_tf)
  759. classNews_middle2 = table_str_list_middle_2(div_tf)
  760. Page_flag_TF = "{Foosun_Page_news}"& pagestyle &"|"& pagecss&"{/Foosun_Page_news}"
  761. ''永不过期和尚未到期的
  762. datenumber_tmp=" and  (OverDue=0 or (OverDue>0 and datediff('d',AddTime,'"&date()&"')<= OverDue))"
  763. if datenumber ="0" then:datenumber_tmp = "":else:datenumber_tmp = " and datevalue(AddTime)+"&datenumber&">=datevalue(now)":end if
  764. ''已经在外部定义好了。
  765. order_in_str_awen = ""&orderby&" "&orderdesc&""
  766. if ucase(orderby)<>"ID" then order_in_str_awen = order_in_str_awen & ",ID Desc"
  767. ''top多少条
  768. set rs_c=conn.execute("select RefreshNumber from FS_DS_Class where  ClassId='"& f_Id &"'")
  769. if rs_c.eof then
  770. RefreshNumber = ""
  771.    rs_c.close:set rs_c = nothing
  772. else
  773. if rs_c(0)=0 then
  774. RefreshNumber = ""
  775. else
  776. RefreshNumber = "top "&rs_c(0)&""
  777. end if
  778. rs_c.close:Set rs_c=nothing
  779. end if
  780. search_inSQL=" and ClassId='"& f_Id &"'"
  781. f_sql="select "& RefreshNumber &" ID,DownLoadID,ClassID,Description,Accredit,AddTime,Appraise,AuditTF,BrowPop," _
  782. &"ClickNum,EditTime,EMail,SavePath,FileExtName,FileName,FileSize,Language,Name,NewsTemplet,PassWord,Pic," _
  783. &"Property,Provider,ProviderUrl,RecTF,ReviewTF,ShowReviewTF,SystemType,Types,Version,OverDue,ConsumeNum,Hits"
  784. f_sql = f_sql &" From FS_DS_List where AuditTF=1 "&search_inSQL & datenumber_tmp &" order by "&order_in_str_awen
  785. Set  f_rs_obj = Server.CreateObject(G_FS_RS)
  786. f_rs_obj.open f_sql,Conn,1,3
  787. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  788. ClassList = ""
  789. if f_rs_obj.eof then
  790. ClassList = ""
  791. f_rs_obj.close:set f_rs_obj=nothing
  792. else
  793. perPageNum =pagenumber
  794. TPageNum = f_rs_obj.recordcount
  795. f_rs_obj.PageSize = perPageNum
  796. sPageCount = f_rs_obj.PageCount
  797. if div_tf = 0 then
  798. c_i_k = 0
  799. if cint(colnumber)<>1 then
  800. ClassList = ClassList &  "  <tr>"
  801. end if
  802. end if
  803. for cl_i=1 to f_rs_obj.recordcount
  804. if f_rs_obj.eof Then exit For
  805. if div_tf=1 then
  806. ClassList= ClassList & classNews_middle1 & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"ClassList") & classNews_middle2
  807. else
  808. if cint(colnumber) =1 then
  809. ClassList= ClassList &"   <tr><td>" & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"ClassList") & "</td></tr>"
  810. else
  811. 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>"
  812. end if
  813. end if
  814. f_rs_obj.movenext
  815. if div_tf = 0 then
  816. if cint(colnumber)<>1 then
  817. c_i_k = c_i_k+1
  818. if c_i_k mod cint(colnumber) = 0 then
  819. ClassList = ClassList & "</tr>"&chr(10)&"  <tr>"
  820. end if
  821. end if
  822. dim tmp_1
  823. if pageTF="1" then
  824. 'if cint(colnumber) =1 then
  825. ' tmp_1 = ""
  826. 'else
  827. ' tmp_1 = "</tr>"&chr(10)
  828. 'end if
  829. if split(formatnumber(cl_i/f_rs_obj.pagesize,2,-1),".")(1)="00" and cl_i <> f_rs_obj.recordcount then
  830. ClassList = ClassList &"</table>"& Page_flag_TF & chr(10) & classNews_head
  831. end if
  832. if cl_i = f_rs_obj.recordcount then
  833. ClassList = ClassList &"</table>"& Page_flag_TF
  834. end if
  835. end if
  836. else
  837. if pageTF="1" then
  838. if split(formatnumber(cl_i/f_rs_obj.pagesize,2,-1),".")(1)="00" and cl_i <> f_rs_obj.recordcount then
  839. ClassList = ClassList & classNews_bottom & Page_flag_TF & chr(10) & classNews_head
  840. end if
  841. if cl_i = f_rs_obj.recordcount then
  842. ClassList = ClassList & classNews_bottom &  Page_flag_TF &chr(10)
  843. end if
  844. end if
  845. end if
  846. next
  847. if div_tf=0 then
  848. if cint(colnumber)<>1 then
  849. ClassList = ClassList & "</tr>"&chr(10)
  850. end if
  851. end if
  852. f_rs_obj.close:set f_rs_obj=nothing
  853. ClassList=classNews_head & ClassList
  854. end if
  855. else
  856. ClassList = ""
  857. end if
  858. ' if ClassList<>"" then
  859. ' if Not f_type="marnews" then
  860. ' ClassList=classNews_head & ClassList & classNews_middle1 & classNews_middle2 & classNews_bottom
  861. ' end if
  862. ' end if
  863. End Function
  864. '得到子类新闻列表
  865. '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
  866. '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
  867. 'picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
  868. Public Function subClassList(f_Lablechar,f_type,f_Id)
  869. dim rs,f_sql,rs_n,rs_f_sql
  870. 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
  871. dim titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,loopnumber
  872. dim classNews_head,classNews_middle1,classNews_bottom,classNews_middle2,c_s_i_1,table_array
  873. if instr(f_Lablechar,"out_DIV")>0 then
  874. div_tf=1
  875. c_cols = split(split(f_Lablechar,"┆")(24),"$")(1)
  876. c_cols_1 = split(split(f_Lablechar,"┆")(25),"$")(1)
  877. bg_ground = split(split(f_Lablechar,"┆")(23),"$")(1)
  878. datenumber = split(split(f_Lablechar,"┆")(10),"$")(1)
  879. orderby = split(split(f_Lablechar,"┆")(15),"$")(1)
  880. orderdesc = split(split(f_Lablechar,"┆")(16),"$")(1)
  881. style_id = split(split(f_Lablechar,"┆")(22),"$")(1)
  882. loopnumber = split(split(f_Lablechar,"┆")(2),"$")(1)
  883. titlenumber = split(split(f_Lablechar,"┆")(11),"$")(1)
  884. contentnumber = split(split(f_Lablechar,"┆")(26),"$")(1)
  885. picshowtf = split(split(f_Lablechar,"┆")(12),"$")(1)
  886. datestyle =  split(split(f_Lablechar,"┆")(21),"$")(1)
  887. openstyle =  split(split(f_Lablechar,"┆")(13),"$")(1)
  888. Inc_SubClass = split(split(f_Lablechar,"┆")(8),"$")(1)
  889. else
  890. div_tf=0
  891. c_cols = split(split(f_Lablechar,"┆")(18),"$")(1)   ''栏目排列数
  892. c_cols_1 = split(split(f_Lablechar,"┆")(19),"$")(1) ''新闻排列数
  893. bg_ground = split(split(f_Lablechar,"┆")(17),"$")(1) ''背景底纹
  894. datenumber = split(split(f_Lablechar,"┆")(4),"$")(1) ''多少天
  895. orderby = split(split(f_Lablechar,"┆")(9),"$")(1) ''排列字段
  896. orderdesc =  split(split(f_Lablechar,"┆")(10),"$")(1) ''排列方式
  897. style_id = split(split(f_Lablechar,"┆")(16),"$")(1) ''日期引用样式
  898. loopnumber = split(split(f_Lablechar,"┆")(2),"$")(1) ''Loop
  899. titlenumber = split(split(f_Lablechar,"┆")(5),"$")(1) ''标题数
  900. contentnumber = split(split(f_Lablechar,"┆")(20),"$")(1) ''内容字数
  901. picshowtf = split(split(f_Lablechar,"┆")(6),"$")(1) ''图文标志
  902. datestyle =  split(split(f_Lablechar,"┆")(15),"$")(1) ''日期格式
  903. openstyle =  split(split(f_Lablechar,"┆")(7),"$")(1) ''打开窗口方式
  904. Inc_SubClass = split(split(f_Lablechar,"┆")(8),"$")(1) ''是否包含子类
  905. end if
  906. if not isnumeric(titlenumber) then:titlenumber = 30:else:titlenumber = cint(titlenumber):end if
  907. if not isnumeric(loopnumber) then:loopnumber = 10:else:loopnumber = cint(loopnumber):end if
  908. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  909. table_array=split(f_Lablechar,"┆")
  910. 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))
  911. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(8),"$")(1),split(table_array(9),"$")(1))
  912. classNews_bottom = table_str_list_bottom(div_tf)
  913. classNews_middle2 = table_str_list_middle_2(div_tf)
  914. if len(bg_ground)>5 then
  915.  bg_ground = " background="""& bg_ground &""""
  916. else
  917.  bg_ground = ""
  918. end If
  919. if datenumber <>"0" then:datenumber_tmp = " and datevalue(addtime)+"&datenumber&">=datevalue(now)":else:datenumber_tmp = "":end if
  920. if f_Id="" then f_id="0"
  921. f_sql = "select ClassId,ClassName,ClassEName,ParentID From FS_DS_Class Where ParentID='"& f_Id &"' and IsURL=0 and ReycleTF=0 order by OrderID desc,id desc"
  922. set rs = Conn.execute(f_sql)
  923. if not rs.eof then
  924. subClassList = "<table border=""0"" cellspacing=""3"" cellpadding=""0"" width=""100%"">"&vbNewLine&"  <tr>"
  925. c_s_i = 0
  926. do while not rs.eof
  927. If (c_s_i mod c_cols =0) And c_s_i>0 Then
  928. subClassList = subClassList & "</tr>"&vbNewLine&"<tr>"&vbNewLine
  929. End If
  930. 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>"
  931. If Inc_SubClass="1" Then
  932. If getNewsSubClass(rs("ClassId"))<>"" Then
  933. SQL_Inc_SubClass=" and (ClassID='"&rs("ClassId")&"' OR ClassID IN ("&getNewsSubClass(rs("ClassId"))&"))"
  934. Else
  935. SQL_Inc_SubClass=" AND ClassID='"&rs("ClassId")&"'"
  936. End If
  937. Else
  938. SQL_Inc_SubClass=" AND ClassID='"&rs("ClassId")&"'"
  939. End If
  940. rs_f_sql = "select top "& loopnumber &" * From FS_DS_List where AuditTF=1 "& datenumber_tmp & SQL_Inc_SubClass &" order by "&orderby&" "&orderdesc
  941. if ucase(orderby)<>"ID" then  rs_f_sql = rs_f_sql&",id "&orderdesc&""
  942. set rs_n = Conn.execute(rs_f_sql)
  943. If Not rs_n.eof then
  944. if div_tf=1 then
  945. subClassList = subClassList & vbNewLine & classNews_head
  946. end if
  947. do while not rs_n.eof
  948. If div_tf = 1 Then
  949. subClassList = subClassList & classNews_middle1 &getlist_news(rs_n,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"subClassList")&classNews_middle2
  950. Else
  951. subClassList = subClassList & "<div>" & getlist_news(rs_n,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"subClassList")&"<div>"&vbNewLine
  952. End If
  953. rs_n.movenext
  954. loop
  955. if div_tf=1 then
  956. subClassList = subClassList & classNews_bottom
  957. end if
  958. end If
  959. subClassList = subClassList & "</td>"&vbNewLine
  960. rs.movenext
  961. c_s_i = c_s_i + 1
  962. Loop
  963. If c_s_i Mod 2 <>0 Then
  964. subClassList = subClassList & "<td width="""&cint(100/c_cols)&"%"" valign=""top""></td>"&vbNewLine
  965. End If
  966. rs.close:set rs = Nothing
  967. rs_n.close:set rs_n = nothing
  968. subClassList = subClassList & "</tr>"&vbNewLine&"</table>"&vbNewLine
  969. else
  970. subClassList = ""
  971. end If
  972. End Function
  973. '得到下载浏览________________________________________________________________
  974. Public Function ReadNews(f_Lablechar,f_type,f_Id)
  975. Dim styleId,ReadSql,RsReadObj
  976. Dim MF_Domain,datestyle
  977. styleId = split(split(f_Lablechar,"┆")(1),"$")(1)
  978. datestyle = split(split(f_Lablechar,"┆")(2),"$")(1)
  979. ReadNews = ""
  980. if trim(f_Id)="" then
  981. ReadNews = ""
  982. else
  983. ReadSql="select ID,DownLoadID,ClassID,Description,Accredit,AddTime,Appraise,AuditTF,BrowPop," _
  984. &"ClickNum,EditTime,EMail,SavePath,FileExtName,FileName,FileSize,Language,Name,NewsTemplet,PassWord,Pic," _
  985. &"Property,Provider,ProviderUrl,RecTF,ReviewTF,ShowReviewTF,SystemType,Types,Version,OverDue,ConsumeNum,Hits"
  986. ReadSql = ReadSql &" From FS_DS_List where AuditTF=1 and DownLoadID='"& f_Id &"'  and  (OverDue=0 or (OverDue>0 and datediff('d',AddTime,'"&date()&"')<= OverDue)) "
  987. Set  RsReadObj = Server.CreateObject(G_FS_RS)
  988. RsReadObj.open ReadSql,Conn,1,1
  989. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  990. if not RsReadObj.eof then
  991. ReadNews = ReadNews&getlist_news(RsReadObj,styleId,0,0,0,0,datestyle,0,MF_Domain,"readnews")
  992. else
  993. ReadNews =""
  994. end if
  995. end if
  996. ReadNews=ReadNews
  997. End Function
  998. '站点地图____________________________________________________________________
  999. Public Function SiteMap(f_Lablechar,f_type,f_Id)
  1000. dim classId,cssstyle,SiteMapstr,RsClassObj,i,br_str
  1001. classId = split(split(f_Lablechar,"┆")(1),"$")(1)
  1002. cssstyle = split(split(f_Lablechar,"┆")(2),"$")(1)
  1003. SiteMapstr = ""
  1004. set RsClassObj = Conn.execute("select ClassId,ClassName,ClassEName,IsURL,ParentID From FS_DS_Class where ReycleTF=0 and ParentID='0' order by OrderID desc,id desc")
  1005. if Not RsClassObj.eof then
  1006. i=0
  1007. do while Not RsClassObj.eof
  1008. if RsClassObj("ParentID")<>"0" then
  1009. if i=0 then
  1010. br_str=""
  1011. else
  1012. br_str="<br />"
  1013. end if
  1014. else
  1015. if i=0 then
  1016. br_str=""
  1017. else
  1018. br_str="<br />"
  1019. end if
  1020. end if
  1021. if cssstyle<>"" then
  1022. SiteMapstr = SiteMapstr & br_str & "<img src="""&m_PathDir&"sys_images/+.gif"" border=""0"" /><a href="""&get_ClassLink(RsClassObj("ClassId"))&""" class="""& cssstyle &""">"&RsClassObj("ClassName")&"</a>"&chr(10)
  1023. else
  1024. SiteMapstr = SiteMapstr & br_str & "<img src="""&m_PathDir&"sys_images/+.gif"" border=""0"" /><a href="""&get_ClassLink(RsClassObj("ClassId"))&""">"&RsClassObj("ClassName")&"</a>"&chr(10)
  1025. end if
  1026. SiteMapstr = SiteMapstr & get_ClassList(RsClassObj("ClassId"),"&nbsp;",cssstyle)
  1027. RsClassObj.movenext
  1028. i=i+1
  1029. loop
  1030. RsClassObj.close:set RsClassObj=nothing
  1031. else
  1032. SiteMapstr = ""
  1033. RsClassObj.close:set RsClassObj=nothing
  1034. end if
  1035. SiteMap = SiteMapstr
  1036. End Function
  1037. '得到搜索表单________________________________________________________________
  1038. Public Function Search(f_Lablechar,f_type)
  1039. dim Searchstr,showdate,showClass,rs,select_str,datestr,classstr,MF_Domain
  1040. showdate = split(split(f_Lablechar,"┆")(1),"$")(1)
  1041. showClass = split(split(f_Lablechar,"┆")(2),"$")(1)
  1042. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  1043. Searchstr = ""
  1044. if showdate = "1" then
  1045. datestr = "开始日期:<input name=""s_date"" type=""text"" value="""" size=""10"" /> 结束日期:<input name=""e_date"" type=""text"" value="""" size=""10"" />"
  1046. else
  1047. datestr = ""
  1048. end if
  1049. if showClass = "1" then
  1050. classstr = " <select name=""ClassId"" id=""ClassId"">"
  1051. classstr = classstr&"<option value="""">--所有--</option>"&chr(10)
  1052. set rs = Conn.execute("select ClassId,id,classname,classEname,ParentId From FS_DS_Class where ReycleTF=0 and isURL=0 and ParentId='0' order by OrderId desc,id desc")
  1053. do while not rs.eof
  1054. classstr = classstr & "<option value="""&rs("ClassId")&""">┝"&rs("classname")&"</option>"&chr(10)
  1055. classstr = classstr & get_optionNewsList(rs("ClassId"),"┝")&chr(10)
  1056. rs.movenext
  1057. loop
  1058. rs.close:set rs=nothing
  1059. classstr = classstr&"</select>"
  1060. else
  1061. classstr = ""
  1062. end if
  1063. select_str =" <select name=""s_type"" id=""s_type"">"&chr(10)
  1064. select_str=select_str&"<option value=""title"" selected=""selected"">标题</option>"&chr(10)
  1065. select_str=select_str&"<option value=""content"">全文</option>"&chr(10)
  1066. select_str=select_str&"</select>"&chr(10)
  1067. Searchstr = Searchstr & "<table width=""100%""><form action=""http://"& MF_Domain & "/Search.html"" id=""SearchForm"" name=""SearchForm"" method=""get"">" _
  1068. &"<tr><td><input name=""SubSys"" type=""hidden"" id=""SubSys"" value=""DS"" /><input name=""Keyword"" type=""text"" id=""Keyword"" size=""15"" /> " _
  1069. &select_str&datestr&classstr&" <input type=""submit"" value=""搜索"" /></td></tr></form></table>"
  1070. Search = Searchstr
  1071.  End Function
  1072.  '得到统计信息_______________________________________________________________
  1073. Public Function infoStat(f_Lablechar,f_type)
  1074. dim cols,br_str,infoStatstr
  1075. cols = split(split(f_Lablechar,"┆")(1),"$")(1)
  1076. if cols="0" then
  1077. br_str = "&nbsp;"
  1078. else
  1079. br_str = "<br />"
  1080. end if
  1081. dim rs,c_rs1,c_rs2,c_rs3,c_rs4,c_rs5
  1082. set rs = Conn.execute("select count(id) From FS_DS_List where AuditTF=1  and (OverDue=0 or (OverDue>0 and datediff('d',AddTime,'"&date()&"')<= OverDue))")
  1083. c_rs1=rs(0)
  1084. rs.close:set rs=nothing
  1085. set rs = Conn.execute("select count(id) From FS_DS_Class where ReycleTF=0")
  1086. c_rs2=rs(0)
  1087. rs.close:set rs=nothing
  1088. set rs = User_Conn.execute("select count(Userid) From FS_ME_Users")
  1089. c_rs4=rs(0)
  1090. rs.close:set rs=nothing
  1091. if G_IS_SQL_User_DB=0 then
  1092. set rs = User_Conn.execute("select count(Userid) From FS_ME_Users where datevalue(RegTime)=#"&datevalue(date)&"#")
  1093. else
  1094. set rs = User_Conn.execute("select count(Userid) From FS_ME_Users where datevalue(RegTime)='"&datevalue(date)&"'")
  1095. end if
  1096. c_rs5=rs(0)
  1097. rs.close:set rs=nothing
  1098. infoStatstr = "总下载:"&"<strong>"&c_rs1&"</strong>"&br_str
  1099. infoStatstr = infoStatstr &"总栏目:"&"<strong>"&c_rs2&"</strong>"&br_str
  1100. infoStatstr = infoStatstr &"会员数:"&"<strong>"&c_rs4&"</strong>"&br_str
  1101. infoStatstr = infoStatstr &"今日注册:"&"<strong>"&c_rs5&"</strong>"&br_str
  1102. infoStat = infoStatstr
  1103. End Function
  1104. '栏目导航____________________________________________________________________
  1105. Public Function ClassNavi(f_Lablechar,f_type,f_Id)
  1106. 'ClassNavi┆输出方式$out_Table┆栏目$┆方向$0┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆标题CSS$┆标题导航$·
  1107. dim ClassId,cols,titlecss,rs,ClassNavistr,ParentIDstr,cols_str,div_tf,table_array
  1108. dim classNews_head,classNews_bottom,classNews_middle1,classNews_middle2,cssstyle,titleNavi
  1109. table_array=split(f_Lablechar,"┆")
  1110. ClassId = split(split(f_Lablechar,"┆")(2),"$")(1)
  1111. cols = split(split(f_Lablechar,"┆")(3),"$")(1)
  1112. titlecss = split(split(f_Lablechar,"┆")(10),"$")(1)
  1113. if instr(f_Lablechar,"out_DIV")>0 then
  1114. div_tf = 1
  1115. cssstyle = ""
  1116. else
  1117. div_tf=0
  1118. if titlecss<>"" then
  1119. cssstyle = " Class="""& titlecss &""""
  1120. else
  1121. cssstyle = ""
  1122. end if
  1123. titleNavi = split(split(f_Lablechar,"┆")(11),"$")(1)
  1124. end if
  1125. if div_tf=1 then
  1126. 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))
  1127. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(8),"$")(1),split(table_array(9),"$")(1))
  1128. end if
  1129. classNews_bottom = table_str_list_bottom(div_tf)
  1130. classNews_middle2 = table_str_list_middle_2(div_tf)
  1131. if trim(ClassId)<>"" then
  1132. ParentIDstr = " and ParentId = '"& ClassId&"'"
  1133. else
  1134. if f_id<>"" then
  1135. ParentIDstr = " and ParentId = '"& f_Id&"'"
  1136. else
  1137. ParentIDstr = " and ParentId = '0'"
  1138. end if
  1139. end if
  1140. set rs = Conn.execute("select ClassID,OrderID,ClassName,isShow,ParentID,ReycleTF From FS_DS_Class where isShow=1 and ReycleTF=0 "& ParentIDstr &" Order by OrderId desc,id desc")
  1141. ClassNavistr = ""
  1142. if rs.eof then
  1143. ClassNavistr = ""
  1144. rs.close:set rs=nothing
  1145. else
  1146. do while not rs.eof
  1147. if div_tf=1 then
  1148. ClassNavistr = ClassNavistr &classNews_middle1 & "<a href="""&get_ClassLink(rs("ClassId"))&""">"&rs("ClassName")&"</a>" & classNews_middle2
  1149. else
  1150. if cols="0" then
  1151. cols_str = "&nbsp;"
  1152. else
  1153. cols_str = "<br />"
  1154. end if
  1155. ClassNavistr = ClassNavistr & titleNavi & "<a href="""&get_ClassLink(rs("ClassId"))&""""& cssstyle&">"&rs("ClassName")&"</a>"& cols_str &""
  1156. end if
  1157. rs.movenext
  1158. loop
  1159. rs.close:set rs=nothing
  1160. if div_tf=1 then
  1161. ClassNavistr=classNews_head & ClassNavistr & classNews_bottom
  1162. end if
  1163. end if
  1164. ClassNavi = ClassNavistr
  1165. End Function
  1166. '得到下载单个地址____________________________________________________________
  1167. Public Function get_DownLink(f_id)
  1168. get_DownLink = ""
  1169. dim rs,config_rs,config_mf_rs,class_rs
  1170. dim SaveNewsPath,FileName,FileExtName,ClassId,LinkType,MF_Domain,Url_Domain,ClassEName,c_Domain,c_SavePath,IsDomain
  1171. set rs = Conn.execute("select ID,ClassId,DownLoadID,SavePath,FileName,FileExtName From FS_DS_List where DownLoadID='"&f_id&"'")
  1172. SaveNewsPath = rs("SavePath")
  1173. if right(SaveNewsPath,1)="/" then SaveNewsPath = left(SaveNewsPath,len(SaveNewsPath)-1)
  1174. FileName = rs("FileName")
  1175. FileExtName = rs("FileExtName")
  1176. ClassId = rs("ClassId")
  1177. LinkType = Request.Cookies("FoosunDSCookies")("FoosunDSLinkType")
  1178. IsDomain = Request.Cookies("FoosunDSCookies")("FoosunDSDomain")
  1179. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  1180. set class_rs = Conn.execute("select ClassEName,IsURL,URLAddress,[Domain],SavePath From FS_DS_Class where ClassId='"&ClassId&"'")
  1181. if not class_rs.eof then
  1182. ClassEName = class_rs("ClassEName")
  1183. c_Domain = class_rs("Domain")
  1184. c_SavePath = class_rs("SavePath")
  1185. class_rs.close:set class_rs=nothing
  1186. else
  1187. ClassEName = ""
  1188. class_rs.close:set class_rs=nothing
  1189. end if
  1190. if not rs.eof then
  1191. if LinkType = 1 then
  1192. if trim(c_Domain)<>"" then
  1193. Url_Domain = "http://"&c_Domain
  1194. else
  1195. if trim(IsDomain)<>"" then
  1196. Url_Domain = "http://"&IsDomain
  1197. else
  1198. Url_Domain = "http://"&MF_Domain
  1199. end if
  1200. end if
  1201. else
  1202. if trim(c_Domain)<>"" then
  1203. Url_Domain = "http://"&c_Domain
  1204. else
  1205. if trim(IsDomain)<>"" then
  1206. Url_Domain = "http://"&IsDomain
  1207. else
  1208. Url_Domain = ""
  1209. end if
  1210. end if
  1211. end if
  1212. if trim(c_Domain)<>"" then
  1213. get_DownLink = Url_Domain & SaveNewsPath &"/"&FileName&"."&FileExtName
  1214. else
  1215. get_DownLink = Url_Domain & c_SavePath& "/" & ClassEName &SaveNewsPath &"/"& FileName&"."&FileExtName
  1216. end if
  1217. rs.close:set rs=nothing
  1218.   else
  1219. get_DownLink = ""
  1220. rs.close:set rs=nothing
  1221.   end if
  1222.   get_DownLink = get_DownLink
  1223. End Function
  1224. '得到栏目地址________________________________________________________________
  1225. Public function get_ClassLink(f_id)
  1226. dim IsDomain,LinkType,MF_Domain,c_rs,ClassEName,c_Domain,Url_Domain,ClassSaveType,class_savepath,FileExtName,c_SavePath
  1227. LinkType = Request.Cookies("FoosunDSCookies")("FoosunDSLinkType")
  1228. IsDomain = Request.Cookies("FoosunDSCookies")("FoosunDSDomain")
  1229. MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  1230. set c_rs=conn.execute("select id,IsURL,UrlAddress,ClassId,ClassEName,[Domain],FileSaveType,FileExtName,SavePath From FS_DS_Class where ClassId='"&f_id&"'")
  1231. if not c_rs.eof then
  1232. if c_rs("IsURL")=0 then
  1233. ClassEName = c_rs("ClassEName")
  1234. c_Domain = c_rs("Domain")
  1235. FileExtName = c_rs("FileExtName")
  1236. ClassSaveType = c_rs("FileSaveType")
  1237. c_SavePath= c_rs("SavePath")
  1238. if ClassSaveType=0 then
  1239. class_savepath = ClassEName&"/Index."&FileExtName
  1240. elseif ClassSaveType=1 then
  1241. class_savepath = ClassEName&"/"& ClassEName &"."&FileExtName
  1242. else
  1243. class_savepath = ClassEName &"."&FileExtName
  1244. end if
  1245. if LinkType = 1 then
  1246. if trim(c_Domain)<>"" then
  1247. Url_Domain = "http://"&c_Domain
  1248. else
  1249. if trim(IsDomain)<>"" then
  1250. Url_Domain = "http://"&IsDomain
  1251. else
  1252. Url_Domain = "http://"&MF_Domain
  1253. end if
  1254. end if
  1255. else
  1256. if trim(c_Domain)<>"" then
  1257. Url_Domain = "http://"&c_Domain
  1258. else
  1259. if trim(IsDomain)<>"" then
  1260. Url_Domain = "http://"&IsDomain
  1261. else
  1262. Url_Domain = ""
  1263. end if
  1264. end if
  1265. end if
  1266. get_ClassLink = Url_Domain&c_SavePath&"/"&class_savepath
  1267. else
  1268. get_ClassLink = c_rs("UrlAddress")
  1269. end if
  1270. c_rs.close:set c_rs=nothing
  1271. else
  1272. c_rs.close:set c_rs=nothing
  1273. get_ClassLink = ""
  1274. end if
  1275. get_ClassLink = get_ClassLink
  1276. End function
  1277. '得到子类____________________________________________________________________
  1278. Public Function get_ClassList(TypeID,CompatStr,f_css)
  1279. Dim ChildTypeListRs,ChildTypeListStr,TempStr,i,Sql
  1280. Set ChildTypeListRs = Server.CreateObject(G_FS_RS)
  1281. Sql = "Select ParentID,ClassID,ClassName from FS_DS_Class where ParentID='" & TypeID & "' and ReycleTF=0 order by OrderID desc,id desc"
  1282. ChildTypeListRs.open sql,conn,1,1
  1283. TempStr = CompatStr
  1284. do while Not ChildTypeListRs.Eof
  1285. get_ClassList = get_ClassList & TempStr
  1286. 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>"&chr(10)
  1287. get_ClassList = get_ClassList & get_ClassList(ChildTypeListRs("ClassID"),TempStr,f_css)
  1288. ChildTypeListRs.MoveNext
  1289. loop
  1290. ChildTypeListRs.Close:Set ChildTypeListRs = Nothing
  1291. End Function
  1292. '得到option子类______________________________________________________________
  1293. Public Function get_optionNewsList(TypeID,CompatStr)
  1294. Dim ChildTypeListRs,ChildTypeListStr,TempStr
  1295. Set ChildTypeListRs = Conn.execute("Select ParentID,ClassID,ClassName from FS_DS_Class where ParentID='" & TypeID & "' and ReycleTF=0 order by OrderID desc,id desc")
  1296. TempStr = CompatStr & "┉"
  1297. do while Not ChildTypeListRs.Eof
  1298. get_optionNewsList = get_optionNewsList &"<option value="""&ChildTypeListRs("ClassId")&""">"& TempStr
  1299. get_optionNewsList = get_optionNewsList & "┉"&ChildTypeListRs("ClassName")&"</option>"&chr(10)
  1300. get_optionNewsList = get_optionNewsList & get_optionNewsList(ChildTypeListRs("ClassID"),TempStr)
  1301. ChildTypeListRs.MoveNext
  1302. loop
  1303. ChildTypeListRs.Close:Set ChildTypeListRs = Nothing
  1304. End Function
  1305. Public Function getNewsSubClass(typeID)
  1306. Dim childClassRs,result,Str_SubClassID
  1307. result=""
  1308. Set childClassRs=Conn.execute("Select ParentID,ClassID from FS_DS_Class where ParentID='" & TypeID & "' and ReycleTF=0 order by OrderID desc,id desc")
  1309. While Not childClassRs.eof
  1310. If result="" Then
  1311. result="'"&childClassRs("classID")&"'"
  1312. Else
  1313. result=result&",'"&childClassRs("classID")&"'"
  1314. End If
  1315. Str_SubClassID=getNewsSubClass(childClassRs("classID"))
  1316. If Str_SubClassID<>"" Then
  1317. result=result&","&Str_SubClassID
  1318. End If
  1319. childClassRs.movenext
  1320. Wend
  1321. childClassRs.close:Set childClassRs=nothing
  1322. getNewsSubClass=result
  1323. End Function
  1324. End Class
  1325. %>