NS_Public.asp
资源名称:eat.rar [点击查看]
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:130k
源码类别:
数据库编程
开发平台:
ASP/ASPX
- <%
- Class cls_NS
- '风讯新闻刷新代码获得类,用于获得代码
- '方法:Fs_ns.Get_LableChar("标签代码","")
- 'Copyright (c)2002-2006 Foosun.cn code by simpwind.xie LastTime:06年9月7日
- '非经风讯公司正版许可,请勿用于商业用途
- '官方站:Foosun.cn
- '技术支持论坛:bbs.foosun.net
- 'QQ:655071(欢迎和您交流。^_^)
- '定义参数____________________________________________________________________
- Private m_Rs,m_FSO,m_Dict
- Private m_PathDir,m_Path_UserDir,m_Path_User,m_Path_adminDir,m_Path_UserPageDir,m_Path_Templet
- Private m_Err_Info,m_Err_NO
- Public Property Get Err_Info()
- Err_Info = m_Err_Info
- End Property
- Public Property Get Err_NO()
- Err_NO = m_Err_NO
- End Property
- Private Sub Class_initialize()
- Set m_Rs = Server.CreateObject(G_FS_RS)
- Set m_FSO = Server.CreateObject(G_FS_FSO)
- Set m_Dict = Server.CreateObject(G_FS_DICT)
- m_PathDir = replace("/"&G_VIRTUAL_ROOT_DIR&"/","//","/")
- m_Path_UserDir = replace("/"&G_VIRTUAL_ROOT_DIR&"/"&G_USER_DIR&"/","//","/")
- m_Path_UserPageDir = replace("/"&G_VIRTUAL_ROOT_DIR&"/"&G_USERFILES_DIR&"/","//","/")
- m_Path_Templet = replace("/"&G_VIRTUAL_ROOT_DIR&"/"&G_TEMPLETS_DIR&"/","//","/")
- End Sub
- Private Sub Class_Terminate()
- Set m_Rs = Nothing
- Set m_FSO = Nothing
- Set m_Dict = Nothing
- End Sub
- '获得参数____________________________________________________________________
- Public Function get_LableChar(f_Lablechar,f_Id)
- Dim f_array
- f_array= split(f_Lablechar,"┆")
- if ubound(f_array)=0 and not isarray(f_array) then
- get_LableChar=""
- exit Function
- else
- select case LCase(f_array(0))
- case "classnews"
- 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
- case "specialnews"
- 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
- case "lastnews"
- 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
- case "hotnews"
- 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
- case "recnews"
- 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
- case "marnews"
- 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
- case "brinews"
- 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
- case "annnews"
- 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
- case "constrnews"
- 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
- case "classlist"
- 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
- case "speciallist"
- 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
- '常规标签类
- case "flashfilt"
- if ubound(f_array)<>5 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=flashfilt(f_Lablechar,"flashfilt",f_Id):end if
- case "norfilt"
- if ubound(f_array)<>7 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=NorFilter(f_Lablechar,"NorFilt",f_Id):end if
- case "readnews"
- if ubound(f_array)<>2 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ReadNews(f_Lablechar,"readnews",f_Id):end if
- case "sitemap"
- if ubound(f_array)<>2 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=SiteMap(f_Lablechar,"sitemap",f_Id):end if
- case "search"
- if ubound(f_array)<>2 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Search(f_Lablechar,"search"):end if
- case "infostat"
- if ubound(f_array)<>1 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=infoStat(f_Lablechar,"infostat"):end if
- case "todaypic"
- if ubound(f_array)<>1 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=TodayPic(f_Lablechar,"todaypic",f_Id):end if
- case "todayword"
- if ubound(f_array)<>13 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=TodayWord(f_Lablechar,"todayword",f_Id):end if
- case "classnavi"
- if ubound(f_array)<>11 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassNavi(f_Lablechar,"classnavi",f_Id):end if
- case "specialnavi"
- if ubound(f_array)<>10 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=SpecialNavi(f_Lablechar,"specialnavi",f_Id):end if
- case "rssfeed"
- if ubound(f_array)<>1 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=RssFeed(f_Lablechar,"rssfeed",f_Id):end if
- case "specialcode"
- if ubound(f_array)<>17 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=SpecialCode(f_Lablechar,"specialcode",f_Id):end if
- case "classcode"
- if ubound(f_array)<>17 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassCode(f_Lablechar,"classcode",f_Id):end if
- case "definenews"
- if ubound(f_array)<>10 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=DefineNews(f_Lablechar,"definenews",f_Id):end if
- case "oldnews"
- if ubound(f_array)<>1 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=OldNews(f_Lablechar,"oldnews",f_Id):end if
- case "c_news"
- if ubound(f_array)<>5 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=c_news(f_Lablechar,"c_news",f_Id):end if
- case "subclasslist"
- 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
- case "allcode"
- if ubound(f_array)<>17 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=AllCode(f_Lablechar,"allcode",f_Id):end if
- case "classinfo"
- if ubound(f_array)<>1 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassInfo(f_Lablechar,"ClassInfo",f_Id):end if
- end select
- end if
- End Function
- 'DIV输出_____________________________________________________________________
- '得到div,table_________________________________________________________________________________
- Public Function table_str_list_head(f_tf,f_divid,f_divclass,f_ulid,f_ulclass)
- Dim table_,tr_
- Dim f_divid_1,f_divclass_1,f_ulid_1,f_ulclass_1
- if f_tf=1 then
- if f_divid<>"" then:f_divid_1 = " id="""& f_divid &"""":else:f_divid_1 = "":end if
- if f_divclass<>"" then:f_divclass_1 = " class="""& f_divclass &"""":else:f_divclass_1 = "":end if
- if f_ulid<>"" then:f_ulid_1 = " id="""& f_ulid &"""":else:f_ulid_1 = "":end if
- if f_ulclass<>"" then:f_ulclass_1 = " class="""& f_ulclass &"""":else:f_ulclass_1 = "":end if
- table_="<div"& f_divid_1 & f_divclass_1 &">"
- tr_="<ul"& f_ulid_1 & f_ulclass_1 &">"
- table_str_list_head = table_&vbNewLine
- table_str_list_head = table_str_list_head &" "& tr_&vbNewLine
- else
- table_="<table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
- table_str_list_head = table_&vbNewLine
- end if
- End Function
- '得到div,table_________________________________________________________________________________
- public Function table_str_list_middle_1(f_tf,f_liid,f_liclass)
- Dim f_liid_1,f_liclass_1,td_
- if f_tf=1 then
- if f_liid<>"" then:f_liid_1 = " id="""& f_liid &"""":else:f_liid_1 = "":end if
- if f_liclass<>"" then:f_liclass_1 = " class="""& f_liclass &"""":else:f_liclass_1 = "":end if
- td_="<li"&f_liid_1&f_liclass_1&">"
- table_str_list_middle_1 =" "&td_
- end if
- End Function
- '得到div,table_________________________________________________________________________________
- public Function table_str_list_middle_2(f_tf)
- Dim td__,tr__
- if f_tf=1 then
- td__="</li>"
- else
- td__="</td>"
- end if
- table_str_list_middle_2 = td__&vbNewLine
- End Function
- '得到div,table_________________________________________________________________________________
- Public Function table_str_list_middle_3(f_tf)
- if f_tf=1 then
- table_str_list_middle_3 = ""
- else
- table_str_list_middle_3 = "</tr>"
- end if
- End Function
- '得到div,table_________________________________________________________________________________
- Public Function table_str_list_bottom(f_tf)
- Dim table__,tr__
- if f_tf=1 then
- table__="</div>"
- tr__="</ul>"
- table_str_list_bottom = " "&tr__&vbNewLine
- else
- table__="</table>"
- table_str_list_bottom = ""
- end if
- table_str_list_bottom = table_str_list_bottom &table__&vbNewLine
- End Function
- 'DIV格式输出结束_____________________________________________________________
- '通用类标签
- Public Function AllCode(f_Lablechar,f_type,f_Id)
- 'AllCode┆类型$HotNews┆调用数$10┆标题数$40┆点击数$0┆图片新闻$0┆排列数$1┆日期格式$YY02年MM月DD日┆引用样式$41┆输出格式$out_Table┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$
- Dim MF_Domain,LableType,CodeNumer,LeftTitle,ClickNum,PicTF,ColsNumer,DateStyle,Style_Id,contentNum,NaviNum,div_tf,table_array
- Dim SearSQL,f_rs_obj,f_sql,picnewstf,orderby,HotStr,Content_List,tjstr
- Dim classNews_head,classNews_middle1,classNews_bottom,classNews_middle2,c_i_k
- MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
- LableType = split(split(f_Lablechar,"┆")(1),"$")(1)
- CodeNumer = split(split(f_Lablechar,"┆")(2),"$")(1)
- if not isnumeric(CodeNumer) then:CodeNumer = 10:else:CodeNumer = cint(CodeNumer):end if
- LeftTitle = split(split(f_Lablechar,"┆")(3),"$")(1)
- if not isnumeric(LeftTitle) then:LeftTitle = 40:else:LeftTitle = cint(LeftTitle):end if
- ClickNum = split(split(f_Lablechar,"┆")(4),"$")(1)
- PicTF = split(split(f_Lablechar,"┆")(5),"$")(1)
- ColsNumer = split(split(f_Lablechar,"┆")(6),"$")(1)
- DateStyle = split(split(f_Lablechar,"┆")(7),"$")(1)
- Style_Id = split(split(f_Lablechar,"┆")(8),"$")(1)
- contentNum = split(split(f_Lablechar,"┆")(16),"$")(1)
- if not isnumeric(contentNum) then:contentNum = 200:else:contentNum = cint(contentNum):end if
- NaviNum = split(split(f_Lablechar,"┆")(17),"$")(1)
- if not isnumeric(NaviNum) then:NaviNum = 200:else:NaviNum = cint(NaviNum):end if
- if instr(f_Lablechar,"out_DIV")>0 then:div_tf = 1:else:div_tf = 0:end if
- table_array=split(f_Lablechar,"┆")
- 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))
- classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(14),"$")(1),split(table_array(15),"$")(1))
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle2 = table_str_list_middle_2(div_tf)
- if f_id<>"" then
- dim news_rs
- set news_rs = Conn.execute("select Id From FS_NS_NewsClass where ClassID='"& f_id &"'")
- if news_rs.eof then
- SearSQL = ""
- news_rs.close:set news_rs=nothing
- else
- SearSQL = " and ClassId='"& f_id &"'"
- news_rs.close:set news_rs=nothing
- end if
- else
- SearSQL = ""
- end if
- if PicTF = "1" then
- picnewstf = " and isPicNews=1"
- else
- picnewstf = ""
- end if
- if LableType = "HotNews" then
- orderby = " order by Hits desc,Popid desc,addtime desc"
- if ClickNum<>"0" then
- HotStr = " and where Hits>="& clng(ClickNum) &""
- else
- HotStr = ""
- end if
- else
- orderby = " order by Popid desc,addtime desc"
- HotStr = ""
- end if
- select Case LableType
- Case "HotNews"
- tjstr = " and "& all_substring &"(NewsProperty,13,1)='1'"
- Case "LastNews"
- tjstr = ""
- Case "RecNews"
- tjstr = " and "& all_substring &"(NewsProperty,1,1)='1'"
- Case "MarqueeNews"
- tjstr = " and "& all_substring &"(NewsProperty,3,1)='1'"
- Case "JcNews"
- tjstr = " and "& all_substring &"(NewsProperty,15,1)='1'"
- Case else
- tjstr = ""
- end select
- f_sql="select top "& cint(CodeNumer) &" ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
- f_sql = f_sql &",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
- f_sql = f_sql &"From FS_NS_News where isLock=0 "& picnewstf & SearSQL & HotStr & tjstr &" and isRecyle=0 and isdraft=0 "&orderby&",id desc"
- set f_rs_obj = Conn.execute(f_sql)
- if f_rs_obj.eof then
- Content_List=""
- f_rs_obj.close:set f_rs_obj=nothing
- else
- if div_tf = 0 then
- c_i_k = 0
- if cint(ColsNumer)<>1 then
- Content_List = Content_List & " <tr>"
- end if
- end if
- do while not f_rs_obj.eof
- if div_tf=1 then
- 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
- else
- if cint(ColsNumer) =1 then
- 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>"
- else
- 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>"
- end if
- end if
- f_rs_obj.movenext
- if div_tf = 0 then
- if cint(ColsNumer)<>1 then
- c_i_k = c_i_k+1
- if c_i_k mod cint(ColsNumer) = 0 then
- Content_List = Content_List & "</tr>"&vbNewLine&" <tr>"
- end if
- end if
- end if
- loop
- if div_tf=0 then
- if cint(ColsNumer)<>1 then
- Content_List = Content_List & "</tr>"&vbNewLine
- end if
- end if
- f_rs_obj.close:set f_rs_obj=nothing
- Content_List=classNews_head & Content_List & classNews_bottom
- end if
- AllCode = Content_List
- End Function
- Public Function ClassInfo(f_Lablechar,f_type,f_Id)
- 'AllCode┆类型$HotNews┆调用数$10┆标题数$40┆点击数$0┆图片新闻$0┆排列数$1┆日期格式$YY02年MM月DD日┆引用样式$41┆输出格式$out_Table┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$
- Dim LableType,Style_Id,Content_List,InfoType
- Dim f_rs_obj,f_sql
- InfoType = split(split(f_Lablechar,"┆")(1),"$")(1)
- if f_id<>"" then
- Select Case InfoType
- Case "Keywords"
- f_sql="select ClassKeywords From FS_NS_NewsClass where ClassID='"& f_id &"'"
- Case "Description"
- f_sql="select ClassDescription From FS_NS_NewsClass where ClassID='"& f_id &"'"
- End Select
- set f_rs_obj = Conn.execute(f_sql)
- if Not f_rs_obj.eof then
- Content_List = f_rs_obj(0)
- else
- Content_List = ""
- end if
- f_rs_obj.close:set f_rs_obj=nothing
- else
- Content_List = ""
- End if
- ClassInfo = Content_List
- End Function
- '开始读取标签____综合类标签__________________________________________________
- Public Function ClassNews(f_Lablechar,f_LableType,f_Id)
- 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
- Dim newnumber,classid,orderby,orderdesc,colnumber,contentnumber,navinumber,datenumber,titlenumber,picshowtf,datenumber_tmp,morechar,datestyle,openstyle,open_target,containSubClass,childClass
- Dim f_sql,f_rs_obj,f_rs_configobj,f_configSql,CharIndexStr
- Dim MF_Domain,marqueedirec,marqueespeed,marqueestyle
- Dim search_str
- Dim ClassName,ClassEName,c_Domain,ClassNaviContent,ClassNaviPic,c_SavePath,c_FileSaveType,search_inSQL
- Dim Exist_Child_ClassID,picnewstf
- table_array=split(f_Lablechar,"┆")
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf=1
- search_str = split(split(f_Lablechar,"┆")(2),"$")(1)
- picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
- newnumber =split(split(f_Lablechar,"┆")(3),"$")(1)
- datenumber= split(split(f_Lablechar,"┆")(11),"$")(1)
- titlenumber= split(split(f_Lablechar,"┆")(12),"$")(1)
- picshowtf=split(split(f_Lablechar,"┆")(13),"$")(1)
- openstyle=split(split(f_Lablechar,"┆")(14),"$")(1)
- containSubClass=split(split(f_Lablechar,"┆")(15),"$")(1)
- orderby = split(split(f_Lablechar,"┆")(16),"$")(1)
- orderdesc = split(split(f_Lablechar,"┆")(17),"$")(1)
- morechar = split(split(f_Lablechar,"┆")(18),"$")(1)
- datestyle = split(split(f_Lablechar,"┆")(20),"$")(1)
- style_id = split(split(f_Lablechar,"┆")(21),"$")(1)
- colnumber= split(split(f_Lablechar,"┆")(22),"$")(1)
- contentnumber= split(split(f_Lablechar,"┆")(23),"$")(1)
- navinumber= split(split(f_Lablechar,"┆")(24),"$")(1)
- if f_LableType="marnews" then
- marqueespeed=split(split(f_Lablechar,"┆")(25),"$")(1)
- marqueedirec=split(split(f_Lablechar,"┆")(26),"$")(1)
- end if
- else
- div_tf=0
- picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
- search_str = split(split(f_Lablechar,"┆")(2),"$")(1)
- newnumber = split(split(f_Lablechar,"┆")(3),"$")(1)
- datenumber= split(split(f_Lablechar,"┆")(5),"$")(1)
- titlenumber= split(split(f_Lablechar,"┆")(6),"$")(1)
- picshowtf=split(split(f_Lablechar,"┆")(7),"$")(1)
- openstyle=split(split(f_Lablechar,"┆")(8),"$")(1)
- containSubClass=split(split(f_Lablechar,"┆")(9),"$")(1)
- orderby = split(split(f_Lablechar,"┆")(10),"$")(1)
- orderdesc = split(split(f_Lablechar,"┆")(11),"$")(1)
- morechar = split(split(f_Lablechar,"┆")(12),"$")(1)
- datestyle = split(split(f_Lablechar,"┆")(14),"$")(1)
- style_id = split(split(f_Lablechar,"┆")(15),"$")(1)
- colnumber= split(split(f_Lablechar,"┆")(16),"$")(1)
- contentnumber= split(split(f_Lablechar,"┆")(17),"$")(1)
- navinumber= split(split(f_Lablechar,"┆")(18),"$")(1)
- if f_LableType="marnews" then
- marqueespeed=split(split(f_Lablechar,"┆")(19),"$")(1)
- marqueedirec=split(split(f_Lablechar,"┆")(20),"$")(1)
- end if
- end if
- if newnumber<>"" and isnumeric(newnumber)=false then
- newnumber = 10
- else
- newnumber=newnumber
- end if
- if titlenumber="" and isnumeric(titlenumber)=false then
- titlenumber = 30
- else
- titlenumber = titlenumber
- end if
- if colnumber="" and isnumeric(colnumber)=false then
- colnumber = 30
- else
- colnumber = colnumber
- end if
- if contentnumber="" and isnumeric(contentnumber)=false then
- contentnumber = 30
- else
- contentnumber = contentnumber
- end if
- if navinumber="" and isnumeric(navinumber)=false then
- navinumber = 30
- else
- navinumber = navinumber
- end If
- if picnewstf="1" then
- picnewstf = " and isPicNews=1"
- else
- picnewstf = ""
- end if
- 'if div_tf=1 then
- 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))
- classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(9),"$")(1),split(table_array(10),"$")(1))
- 'end if
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle2 = table_str_list_middle_2(div_tf)
- if datenumber ="0" then:datenumber_tmp = "":else:datenumber_tmp = " and datevalue(addtime)+"&datenumber&">=datevalue(now)":end if
- If containSubClass=1 Then
- Exist_Child_ClassID=getNewsSubClass(search_str)
- If Exist_Child_ClassID<>"" Then
- childClass=" or classid in ("&DelHeadAndEndDot(Exist_Child_ClassID)&")"
- Else
- childClass=""
- End If
- Else
- childClass=""
- End If
- select case f_LableType
- case "classnews"
- If childClass<>"" Then
- search_inSQL = " and (ClassId='"& search_str &"'"&childClass&")"
- Else
- search_inSQL = " and ClassId='"& search_str &"'"
- End if
- case "specialnews"
- if G_IS_SQL_DB=0 then
- search_inSQL = " and instr(SpecialEName,'"&search_str&"')>0"
- else
- search_inSQL = " and charindex('"&search_str&"',SpecialEName)>0"
- end if
- case "lastnews"
- if trim(search_str)<>"" Then
- If childClass<>"" Then
- search_inSQL = " and (ClassId='"& search_str &"'"&childClass&")"
- Else
- search_inSQL = " and ClassId='"& search_str &"'"
- End if
- else
- 'if trim(f_id)<>"" Then
- ' If childClass<>"" Then
- ' search_inSQL = " and (ClassId='"& f_id &"'"&childClass&")"
- ' Else
- ' search_inSQL = " and ClassId='"& f_id &"'"
- '' End if
- 'else
- search_inSQL = ""
- 'end if
- end if
- case "hotnews"
- if trim(search_str)<>"" Then
- If childClass<>"" then
- search_inSQL = " and "& all_substring &"(NewsProperty,13,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
- Else
- search_inSQL = " and "& all_substring &"(NewsProperty,13,1)='1' and ClassId='"& search_str &"'"
- End if
- else
- 'if trim(f_id)<>"" Then
- ' If childClass<>"" then
- ' search_inSQL = " and "& all_substring &"(NewsProperty,13,1)='1' and (ClassId='"& f_id &"'"&childClass&")"
- ' Else
- ' search_inSQL = " and "& all_substring &"(NewsProperty,13,1)='1' and ClassId='"& f_id &"'"
- ' End if
- 'else
- search_inSQL = " and "& all_substring &"(NewsProperty,13,1)='1'"
- 'end if
- end if
- case "recnews"
- if trim(search_str)<>"" Then
- If childClass<>"" then
- search_inSQL = " and "& all_substring &"(NewsProperty,1,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
- Else
- search_inSQL = " and "& all_substring &"(NewsProperty,1,1)='1' and ClassId='"& search_str &"'"
- End if
- else
- 'if trim(f_id)<>"" then
- 'If childClass<>"" then
- ' search_inSQL = " and "& all_substring &"(NewsProperty,1,1)='1' and (ClassId='"& f_id &"'"&childClass&")"
- 'Else
- ' search_inSQL = " and "& all_substring &"(NewsProperty,1,1)='1' and ClassId='"& f_id &"'"
- 'End if
- 'else
- search_inSQL = " and "& all_substring &"(NewsProperty,1,1)='1'"
- 'end if
- end if
- case "marnews"
- if trim(search_str)<>"" Then
- If childClass<>"" then
- search_inSQL = " and "& all_substring &"(NewsProperty,3,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
- Else
- search_inSQL = " and "& all_substring &"(NewsProperty,3,1)='1' and ClassId='"& search_str &"'"
- End if
- else
- 'if trim(f_id)<>"" Then
- ' If childClass<>"" then
- ' search_inSQL = " and "& all_substring &"(NewsProperty,3,1)='1' and (ClassId='"& f_id &"'"&childClass&")"
- ' Else
- ' search_inSQL = " and "& all_substring &"(NewsProperty,3,1)='1' and ClassId='"& f_id &"'"
- ' End if
- 'else
- search_inSQL = " and "& all_substring &"(NewsProperty,3,1)='1'"
- 'end if
- end if
- case "brinews"
- if trim(search_str)<>"" Then
- If childClass<>"" then
- search_inSQL = " and "& all_substring &"(NewsProperty,15,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
- Else
- search_inSQL = " and "& all_substring &"(NewsProperty,15,1)='1' and ClassId='"& search_str &"'"
- End if
- else
- 'if trim(f_id)<>"" Then
- ' If childClass<>"" then
- ' search_inSQL = " and "& all_substring &"(NewsProperty,15,1)='1' and (ClassId='"& f_id &"'"&childClass&")"
- ' Else
- ' search_inSQL = " and "& all_substring &"(NewsProperty,15,1)='1' and ClassId='"& f_id &"'"
- ' End if
- 'else
- search_inSQL = " and "& all_substring &"(NewsProperty,15,1)='1'"
- 'end if
- end if
- case "annnews"
- if trim(search_str)<>"" Then
- If childClass<>"" then
- search_inSQL = " and "& all_substring &"(NewsProperty,19,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
- Else
- search_inSQL = " and "& all_substring &"(NewsProperty,19,1)='1' and ClassId='"& search_str &"'"
- End if
- else
- 'if trim(f_id)<>"" Then
- ' If childClass<>"" then
- ' search_inSQL = " and "& all_substring &"(NewsProperty,19,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
- ' Else
- ' search_inSQL = " and "& all_substring &"(NewsProperty,19,1)='1' and ClassId='"& search_str &"'"
- ' End if
- 'else
- search_inSQL = " and "& all_substring &"(NewsProperty,19,1)='1'"
- 'end if
- end if
- case "constrnews"
- if trim(search_str)<>"" Then
- If childClass<>"" then
- search_inSQL = " and "& all_substring &"(NewsProperty,7,1)='1' and (ClassId='"& search_str &"'"&childClass&")"
- Else
- search_inSQL = " and "& all_substring &"(NewsProperty,7,1)='1' and ClassId='"& search_str &"'"
- End if
- else
- 'if trim(f_id)<>"" Then
- ' If childClass<>"" then
- ' search_inSQL = " and "& all_substring &"(NewsProperty,7,1)='1' and (ClassId='"& f_id &"'"&childClass&")"
- ' Else
- ' search_inSQL = " and "& all_substring &"(NewsProperty,7,1)='1' and ClassId='"& f_id &"'"
- ' End if
- 'else
- search_inSQL = " and "& all_substring &"(NewsProperty,7,1)='1'"
- 'end if
- end if
- end select
- f_sql="select top "& cint(newnumber) &" ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
- f_sql = f_sql &",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
- 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&""
- MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
- Content_List=""
- set f_rs_obj = Conn.execute(f_sql)
- if f_rs_obj.eof then
- Content_List=""
- f_rs_obj.close:set f_rs_obj=nothing
- else
- if f_LableType="marnews" then
- Content_List = Content_List & "<marquee onmouseover=""this.stop();"" scrollamount="""& marqueespeed &""" direction="""& marqueedirec &""" onmouseout=""this.start();"">"
- do while not f_rs_obj.eof
- Content_List= Content_List & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,f_LableType)&" "
- f_rs_obj.movenext
- loop
- Content_List = Content_List & "</marquee>"
- else
- if div_tf = 0 then
- c_i_k = 0
- if cint(colnumber)<>1 then
- Content_List = Content_List & " <tr>"
- end if
- end if
- do while not f_rs_obj.eof
- if div_tf=1 then
- 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
- else
- if cint(colnumber) =1 then
- 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>"
- else
- 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>"
- end if
- end if
- f_rs_obj.movenext
- if div_tf = 0 then
- if cint(colnumber)<>1 then
- c_i_k = c_i_k+1
- if c_i_k mod cint(colnumber) = 0 then
- Content_List = Content_List & "</tr>"&vbNewLine&" <tr>"
- end if
- end if
- end if
- loop
- if div_tf=0 then
- if cint(colnumber)<>1 then
- Content_List = Content_List & "</tr>"&vbNewLine
- end if
- end if
- end if
- '得到栏目路径
- if f_LableType="classnews" then
- dim Query_rs,newsclass_SavePath,FileSaveType,UrlDomain,all_savepath
- set Query_rs=Conn.execute("select ClassEName,SavePath,FileExtName,[Domain],FileSaveType,IsURL,UrlAddress From FS_NS_NewsClass where ClassId='"& search_str &"'")
- if Query_rs.eof then
- Query_rs.close:set Query_rs=nothing
- else
- all_savepath = get_ClassLink(search_str)
- Query_rs.close:set Query_rs=nothing
- end if
- if openstyle=0 then
- open_target=" "
- else
- open_target=" target=""_blank"""
- end if
- if div_tf=1 then
- Content_more = " <li><a href="""& all_savepath &""" "& open_target &" title=""更多..."">"&morechar&"</a></li>"&vbNewLine
- else
- Content_more = " <tr><td colspan="""& cint(colnumber) &"""><div align=""right""><a href="""& all_savepath &""" "& open_target &" title=""更多..."">"&morechar&"</a></div></td></tr>"&vbNewLine
- end if
- elseif f_LableType="specialnews" then
- dim special_rs,special_Path
- 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)&"'")
- if Not special_rs.eof then
- special_Path = get_SpecialLink(special_rs("SpecialEName"))
- special_rs.close:set special_rs=nothing
- end if
- if div_tf=1 then
- Content_more = " <li><a href="""& special_Path &""" "& open_target &" title=""更多..."">"&morechar&"</a></li>"&vbNewLine
- else
- Content_more = " <tr><td colspan="""& cint(colnumber) &"""><div align=""right""><a href="""& special_Path &""" "& open_target &" title=""更多..."">"&morechar&"</a></div></td></tr>"&vbNewLine
- end if
- end if
- f_rs_obj.close:set f_rs_obj=nothing
- if f_LableType="marnews" then
- Content_List= Content_List
- else
- Content_List=classNews_head & Content_List & Content_more & classNews_bottom
- end if
- end if
- ClassNews = Content_List
- End Function
- '开始读取标签____新闻终极类标签______________________________________________
- Public Function ClassList(f_Lablechar,f_type,f_Id)
- if f_Id<>"" then
- dim table_array,div_tf,newnumber,datenumber,titlenumber,picshowtf,openstyle,orderby,orderdesc,pageTF,pagestyle,pagenumber,pagecss,datestyle,style_id,colnumber,contentnumber,navinumber
- dim classNews_head,classNews_bottom,classNews_middle1,classNews_middle2,search_inSQL
- dim datenumber_tmp,f_sql,f_configsql,f_rs_obj,f_rs_configobj,MF_Domain
- dim TPageNum,perPageNum,PageNum,sPageCount,cl_i,c_i_k
- dim rs_c,RefreshNumber,Page_flag_TF,picnewstf
- table_array=split(f_Lablechar,"┆")
- m_Err_Info = ""
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf=1
- datenumber= split(split(f_Lablechar,"┆")(9),"$")(1)
- picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
- titlenumber= split(split(f_Lablechar,"┆")(10),"$")(1)
- picshowtf=split(split(f_Lablechar,"┆")(11),"$")(1)
- openstyle=split(split(f_Lablechar,"┆")(12),"$")(1)
- orderby = split(split(f_Lablechar,"┆")(14),"$")(1)
- orderdesc = split(split(f_Lablechar,"┆")(15),"$")(1)
- pageTF = split(split(f_Lablechar,"┆")(16),"$")(1)
- pagestyle = split(split(f_Lablechar,"┆")(17),"$")(1)
- pagenumber = split(split(f_Lablechar,"┆")(18),"$")(1)
- pagecss = split(split(f_Lablechar,"┆")(19),"$")(1)
- datestyle = split(split(f_Lablechar,"┆")(20),"$")(1)
- style_id = split(split(f_Lablechar,"┆")(21),"$")(1)
- colnumber= split(split(f_Lablechar,"┆")(22),"$")(1)
- contentnumber= split(split(f_Lablechar,"┆")(23),"$")(1)
- navinumber= split(split(f_Lablechar,"┆")(24),"$")(1)
- else
- div_tf=0
- picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
- datenumber= split(split(f_Lablechar,"┆")(3),"$")(1)
- titlenumber= split(split(f_Lablechar,"┆")(4),"$")(1)
- picshowtf=split(split(f_Lablechar,"┆")(5),"$")(1)
- openstyle=split(split(f_Lablechar,"┆")(6),"$")(1)
- orderby = split(split(f_Lablechar,"┆")(8),"$")(1)
- orderdesc = split(split(f_Lablechar,"┆")(9),"$")(1)
- pageTF = split(split(f_Lablechar,"┆")(10),"$")(1)
- pagestyle = split(split(f_Lablechar,"┆")(11),"$")(1)
- pagenumber = split(split(f_Lablechar,"┆")(12),"$")(1)
- pagecss = split(split(f_Lablechar,"┆")(13),"$")(1)
- datestyle = split(split(f_Lablechar,"┆")(14),"$")(1)
- style_id = split(split(f_Lablechar,"┆")(15),"$")(1)
- colnumber= split(split(f_Lablechar,"┆")(16),"$")(1)
- contentnumber= split(split(f_Lablechar,"┆")(17),"$")(1)
- navinumber= split(split(f_Lablechar,"┆")(18),"$")(1)
- end if
- 'if div_tf=1 then
- 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))
- classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(7),"$")(1),split(table_array(8),"$")(1))
- 'end if
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle2 = table_str_list_middle_2(div_tf)
- if picnewstf="1" then
- picnewstf = " and isPicNews=1"
- else
- picnewstf = ""
- end if
- Page_flag_TF = "{Foosun_Page_news}"& pagestyle &"|"& pagecss&"{/Foosun_Page_news}"
- if f_type="speciallist" then
- dim specaial_rs,f_spen
- set specaial_rs = Conn.execute("select SpecialEName From FS_NS_Special where SpecialID="&f_Id&"")
- if Not specaial_rs.eof then
- f_spen = specaial_rs(0)
- end if
- specaial_rs.close:set specaial_rs = nothing
- if G_IS_SQL_DB=0 then
- search_inSQL = " and instr(SpecialEName,'"&f_spen&"')>0"
- else
- search_inSQL = " and charindex('"&f_spen&"',SpecialEName)>0"
- end if
- RefreshNumber = ""
- else
- set rs_c=conn.execute("select RefreshNumber from FS_NS_NewsClass where ClassId='"& f_Id &"'")
- if rs_c.eof then
- RefreshNumber = ""
- rs_c.close:set rs_c = nothing
- else
- if rs_c(0)=0 then
- RefreshNumber = ""
- else
- RefreshNumber = "top "&rs_c(0)&""
- end if
- rs_c.close:Set rs_c=nothing
- end if
- search_inSQL=" and ClassId='"& f_Id &"'"
- end if
- if datenumber ="0" then:datenumber_tmp = "":else:datenumber_tmp = " and datevalue(addtime)+"&datenumber&">=datevalue(now)":end if
- f_sql="select "& RefreshNumber &" ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
- f_sql = f_sql &",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
- 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&""
- Set f_rs_obj = Server.CreateObject(G_FS_RS)
- f_rs_obj.open f_sql,Conn,1,3
- MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
- if f_rs_obj.eof then
- ClassList = ""
- f_rs_obj.close:set f_rs_obj=nothing
- else
- perPageNum =pagenumber
- TPageNum = f_rs_obj.recordcount
- f_rs_obj.PageSize = perPageNum
- sPageCount = f_rs_obj.PageCount
- if div_tf = 0 then
- c_i_k = 0
- if cint(colnumber)<>1 then
- ClassList = ClassList & " <tr>"
- end if
- end if
- for cl_i=1 to f_rs_obj.recordcount
- if f_rs_obj.eof Then exit For
- if div_tf=1 then
- ClassList= ClassList & classNews_middle1 & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"ClassList") & classNews_middle2
- else
- if cint(colnumber) =1 then
- ClassList= ClassList &" <tr><td>" & getlist_news(f_rs_obj,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"ClassList") & "</td></tr>"
- else
- 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>"
- end if
- end if
- f_rs_obj.movenext
- if div_tf = 0 then
- if cint(colnumber)<>1 then
- c_i_k = c_i_k+1
- if c_i_k mod cint(colnumber) = 0 then
- ClassList = ClassList & "</tr>"&vbNewLine&" <tr>"
- end if
- end if
- dim tmp_1
- if pageTF="1" then
- 'if cint(colnumber) =1 then
- ' tmp_1 = ""
- 'else
- ' tmp_1 = "</tr>"&vbNewLine
- 'end if
- if split(formatnumber(cl_i/f_rs_obj.pagesize,2,-1),".")(1)="00" and cl_i <> f_rs_obj.recordcount then
- ClassList = ClassList &"</table>"& Page_flag_TF & vbNewLine & classNews_head
- end if
- if cl_i = f_rs_obj.recordcount then
- ClassList = ClassList &"</table>"
- end if
- end if
- else
- if pageTF="1" then
- if split(formatnumber(cl_i/f_rs_obj.pagesize,2,-1),".")(1)="00" and cl_i <> f_rs_obj.recordcount then
- ClassList = ClassList & classNews_bottom & Page_flag_TF & vbNewLine & classNews_head
- end if
- if cl_i = f_rs_obj.recordcount then
- ClassList = ClassList & classNews_bottom & vbNewLine
- end if
- end if
- end if
- next
- if div_tf=0 then
- if cint(colnumber)<>1 then
- ClassList = ClassList & "</tr>"&vbNewLine
- end if
- end if
- f_rs_obj.close:set f_rs_obj=nothing
- ClassList=classNews_head & ClassList
- end if
- else
- ClassList = ""
- end if
- End Function
- '得到相关新闻
- Public Function c_news(f_Lablechar,f_type,f_Id)
- 'c_news┆根据条件$1┆显示数量$10┆标题字数$40┆导航$·┆css$
- Dim ifstr,titleNumber,leftTitle,navidot,css,f_sql,rs,str_newstitle,like_str,old_rs,TitleNumberStr
- ifstr = split(split(f_Lablechar,"┆")(1),"$")(1)
- TitleNumberStr= split(split(f_Lablechar,"┆")(2),"$")(1)
- if not isnumeric(TitleNumberStr) then:TitleNumberStr = 10:else:TitleNumberStr = cint(TitleNumberStr):end if
- leftTitle= split(split(f_Lablechar,"┆")(3),"$")(1)
- if not isnumeric(leftTitle) then:leftTitle = 40:else:leftTitle = cint(leftTitle):end if
- navidot = split(split(f_Lablechar,"┆")(4),"$")(1)
- css = split(split(f_Lablechar,"┆")(5),"$")(1)
- if css<>"" then:css = " class="""&css&"""":else:css = "":end if
- c_news = ""
- '获得原新闻关键字
- dim RelateNewsSql,RsSearchObj,OldSpecialID,tmp_like,tmp_1,tmp_2
- RelateNewsSql = "Select Keywords from FS_NS_News where NewsID='" & f_Id & "' order by ID desc"
- Set RsSearchObj = Conn.Execute(RelateNewsSql)
- if Not RsSearchObj.Eof then
- If RsSearchObj("KeyWords") <> "" and isnull(RsSearchObj("KeyWords"))=false then
- Dim KeyWordsStr,KeyWordsArray,SqlKeyWordStr,keyword_j
- SqlKeyWordStr = ""
- KeyWordsStr = RsSearchObj("KeyWords")
- If KeyWordsStr<>"" and isnull(KeyWordsStr)=false then
- if instr(KeyWordsStr,",")=0 then KeyWordsStr = KeyWordsStr&","
- KeyWordsArray = split(KeyWordsStr,",")
- For keyword_j = 0 to UBound(KeyWordsArray)
- if KeyWordsArray(keyword_j)<>"" then
- if ifstr = "0" then
- if G_IS_SQL_DB=0 then
- If SqlKeyWordStr = "" then
- SqlKeyWordStr = "instr(NewsTitle,'"&KeyWordsArray(keyword_j)&"')>0"
- Else
- SqlKeyWordStr = SqlKeyWordStr & "or instr(NewsTitle,'"&KeyWordsArray(keyword_j)&"')>0"
- End If
- else
- If SqlKeyWordStr = "" then
- SqlKeyWordStr = "charindex('"&KeyWordsArray(keyword_j)&"',NewsTitle)>0"
- Else
- SqlKeyWordStr = SqlKeyWordStr & "or charindex('"&KeyWordsArray(keyword_j)&"',NewsTitle)>0"
- End If
- end if
- elseif ifstr = "2" then
- if G_IS_SQL_DB=0 then
- If SqlKeyWordStr = "" then
- tmp_like = "instr(NewsTitle,'"&KeyWordsArray(keyword_j)&"')>0"
- Else
- tmp_like = tmp_like & "or instr(NewsTitle,'"&KeyWordsArray(keyword_j)&"')>0"
- End If
- else
- If SqlKeyWordStr = "" then
- tmp_like = "charindex('"&KeyWordsArray(keyword_j)&"',NewsTitle)>0"
- Else
- tmp_like = tmp_like & "or charindex('"&KeyWordsArray(keyword_j)&"',NewsTitle)>0"
- End If
- end if
- If SqlKeyWordStr = "" then
- SqlKeyWordStr = ""&tmp_like&" or KeyWords like '%"&KeyWordsArray(keyword_j)&"%' "
- Else
- SqlKeyWordStr = SqlKeyWordStr & " or "&tmp_like&" or KeyWords like '%"&KeyWordsArray(keyword_j)&"%' "
- End If
- elseif ifstr = "1" then
- If SqlKeyWordStr = "" then
- SqlKeyWordStr = "KeyWords like '%"&KeyWordsArray(keyword_j)&"%' "
- Else
- SqlKeyWordStr = SqlKeyWordStr & "or KeyWords like '%"&KeyWordsArray(keyword_j)&"%' "
- End If
- else
- '3*s1 3==2
- tmp_1 = mid(ifstr,2,2)
- tmp_1 = replace(tmp_1,"==","=")
- tmp_1 = replace(tmp_1,"<>","<>")
- tmp_2 = mid(ifstr,4)
- if not isnumeric(tmp_2) then c_news = "错误:"&tmp_2:exit for:exit function
- if keyword_j = cint(tmp_2)-1 then
- select case tmp_1
- case "=","<>"
- SqlKeyWordStr = " KeyWords "&tmp_1&"'"&KeyWordsArray(keyword_j)&"' "
- case "*s"
- SqlKeyWordStr = " KeyWords like '%"&KeyWordsArray(keyword_j)&"' "
- case "*e"
- SqlKeyWordStr = " KeyWords like '"&KeyWordsArray(keyword_j)&"'% "
- case "**"
- SqlKeyWordStr = " KeyWords like '%"&KeyWordsArray(keyword_j)&"'% "
- end select
- exit for
- end if
- end if
- end if
- Next
- Else
- SqlKeyWordStr = ""
- End If
- if SqlKeyWordStr<>"" then SqlKeyWordStr = " And ("&SqlKeyWordStr&")"
- 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"
- 'response.Write("f_sql:"&f_sql)
- 'response.end
- Set rs = Conn.Execute(f_sql)
- if Not rs.Eof then
- c_news = ""
- do while Not rs.Eof
- str_newstitle = GotTopic(rs("NewsTitle"),leftTitle)
- if len(str_newstitle)<>len(rs("NewsTitle")) then str_newstitle = str_newstitle&"..."
- if trim(rs("titleBorder"))=1 then
- str_newstitle = "<strong>"&str_newstitle&"</strong>"
- end if
- if trim(rs("TitleItalic"))=1 then
- str_newstitle = "<em>"&str_newstitle&"</em>"
- end if
- if trim(rs("TitleColor"))<>"" then
- str_newstitle = "<font color=""#"& rs("TitleColor")&""">"&str_newstitle&"</font>"
- end if
- c_news = c_news & navidot &"<a href="""&get_NewsLink(rs("NewsId"))&""""&css&" title="""&rs("NewsTitle")&""">"&str_newstitle&"</a><br />"&vbNewLine
- rs.MoveNext
- Loop
- rs.Close:Set rs = Nothing
- else
- c_news = "无相关新闻"
- rs.Close:Set rs = Nothing
- end if
- else
- c_news = ""
- end if
- else
- c_news = ""
- end if
- Set RsSearchObj = Nothing
- c_news = c_news
- End Function
- 'Flash幻灯片_________________________________________________________________
- Public Function flashfilt(f_Lablechar,f_type,f_Id)
- dim Randomize_i_Str,TitleNumberStr,FilterSql,ClassId,InSQL_Search,RsFilterObj,str_filt,NewsNumberStr,FlashStr
- dim ClassSaveFilePath,ImagesStr,TxtStr,TxtFirst,LinkStr
- dim Class_SQL,RsClassObj,Temp_Num
- Randomize
- Randomize_i_Str = CStr(Int((999 * Rnd) + 1))
- TitleNumberStr= split(split(f_Lablechar,"┆")(3),"$")(1)
- NewsNumberStr= split(split(f_Lablechar,"┆")(2),"$")(1)
- if trim(NewsNumberStr)<>"" and isNumeric(NewsNumberStr) then
- NewsNumberStr = cint(NewsNumberStr)
- else
- NewsNumberStr = 6
- end if
- ClassId=split(split(f_Lablechar,"┆")(1),"$")(1)
- if trim(ClassId)<>"" then
- InSQL_Search = " and ClassId='"& ClassId &"'"
- else
- if f_Id <> "" then
- InSQL_Search = " and ClassId='"& f_Id &"'"
- else
- InSQL_Search = ""
- end if
- end if
- str_filt=" and "& all_substring &"(NewsProperty,21,1)='1'"
- FilterSql="select top "& NewsNumberStr &" ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
- FilterSql = FilterSql &",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
- 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"
- Set RsFilterObj = Conn.Execute(FilterSql)
- If not RsFilterObj.Eof then
- Class_SQL = "select ClassEName,FileExtName,SavePath,FileSaveType From FS_NS_NewsClass where ClassId='"& RsFilterObj("ClassId") &"'"
- Set RsClassObj = Conn.Execute(Class_SQL)
- Temp_Num = 0
- Do While Not RsFilterObj.Eof
- Temp_Num = Temp_Num + 1
- RsFilterObj.MoveNext
- Loop
- RsFilterObj.MoveFirst
- If Temp_Num <=1 then
- Set RsFilterObj = Nothing
- FlashStr = "至少需要两条幻灯新闻才能正确显示幻灯效果"
- Set RsFilterObj = Nothing
- Exit Function
- End If
- do while Not RsFilterObj.Eof
- 'ImagesStr=""
- if (Not IsNull(RsFilterObj("NewsSmallPicFile"))) And (RsFilterObj("NewsSmallPicFile") <> "") then
- if ImagesStr = "" then
- ImagesStr = RsFilterObj("NewsSmallPicFile")
- TxtStr = GotTopic(RsFilterObj("NewsTitle"),TitleNumberStr)
- TxtFirst = GotTopic(RsFilterObj("NewsTitle"),TitleNumberStr)
- LinkStr = get_NewsLink(RsFilterObj("NewsID"))
- else
- If Instr(1,LCase(RsFilterObj("NewsSmallPicFile")),"http://") <> 0 then
- ImagesStr = ImagesStr &"|"& RsFilterObj("NewsSmallPicFile")
- Else
- ImagesStr = ImagesStr &"|"& RsFilterObj("NewsSmallPicFile")
- End If
- TxtStr = TxtStr &"|"&GotTopic(RsFilterObj("NewsTitle"),TitleNumberStr)
- LinkStr = LinkStr & "|" & get_NewsLink(RsFilterObj("NewsID"))
- end if
- end if
- RsFilterObj.MoveNext
- loop
- FlashStr="<script type=""text/javascript"">"& Chr(13)
- FlashStr=FlashStr&" <!--"& Chr(13)
- dim PicWidthStr,PicHeightStr,txtheight
- PicWidthStr = split(split(split(f_Lablechar,"┆")(4),"$")(1),",")(1)
- PicHeightStr = split(split(split(f_Lablechar,"┆")(4),"$")(1),",")(0)
- txtheight = split(split(f_Lablechar,"┆")(5),"$")(1)
- FlashStr=FlashStr&" var focus_width"&Randomize_i_Str&"="&PicWidthStr& Chr(13)
- FlashStr=FlashStr&" var focus_height"&Randomize_i_Str&"="&PicHeightStr& Chr(13)
- FlashStr=FlashStr&" var text_height"&Randomize_i_Str&"="&txtheight& Chr(13)
- FlashStr=FlashStr&" var swf_height"&Randomize_i_Str&" = focus_height"&Randomize_i_Str&"+text_height"&Randomize_i_Str& Chr(13)
- FlashStr=FlashStr&" var pics"&Randomize_i_Str&"='"&ImagesStr&"'"&Chr(13)
- FlashStr=FlashStr&" var links"&Randomize_i_Str&"='"&LinkStr &"'"&Chr(13)
- FlashStr=FlashStr&" var texts"&Randomize_i_Str&"='"&TxtStr&"'"&Chr(13)
- 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)
- 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)
- FlashStr=FlashStr&" document.write('<param name=""menu"" value=""false""><param name=wmode value=""opaque"">');"&Chr(13)
- 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)
- 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)
- FlashStr=FlashStr&" document.write('</object>');"&Chr(13)
- FlashStr=FlashStr&" //-->"& Chr(13)
- FlashStr=FlashStr&"</script>"
- else
- FlashStr=""
- end if
- RsFilterObj.Close:Set RsFilterObj = Nothing
- flashfilt= FlashStr
- End Function
- '轮换幻灯____________________________________________________________________
- Public Function NorFilter(f_Lablechar,f_type,f_id)
- dim FilterSql,RsFilterObj,FilterStr,ImagesStr,TxtStr,TxtFirst,ClassSaveFilePath,LinkStr,CssFileStr,PicWidthStr, PicHeightStr
- dim fltheightstr,fltwidthstr,Temp_Num,TitleNumberStr,NewsNumberStr,ClassId,InSQL_Search,str_filt
- TitleNumberStr= split(split(f_Lablechar,"┆")(3),"$")(1)
- NewsNumberStr= split(split(f_Lablechar,"┆")(2),"$")(1)
- if trim(NewsNumberStr)<>"" and isNumeric(NewsNumberStr) then
- NewsNumberStr = cint(NewsNumberStr)
- else
- NewsNumberStr = 6
- end if
- ClassId=split(split(f_Lablechar,"┆")(1),"$")(1)
- if trim(ClassId)<>"" then
- InSQL_Search = " and ClassId='"& ClassId &"'"
- else
- if f_Id <> "" then
- InSQL_Search = " and ClassId='"& f_Id &"'"
- else
- InSQL_Search = ""
- end if
- end if
- str_filt=" and "& all_substring &"(NewsProperty,21,1)='1'"
- FilterSql="select top "& NewsNumberStr &" ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
- FilterSql = FilterSql &",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
- 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"
- Set RsFilterObj = Conn.Execute(FilterSql)
- 'response.Write(FilterSql)
- 'response.end
- if not RsFilterObj.Eof then
- Temp_Num = 0
- Do While Not RsFilterObj.Eof
- Temp_Num = Temp_Num + 1
- RsFilterObj.MoveNext
- Loop
- RsFilterObj.MoveFirst
- If Temp_Num <=1 then
- Set RsFilterObj = Nothing
- FilterStr = "至少需要两条幻灯新闻才能正确显示幻灯效果"
- Set RsFilterObj = Nothing
- Exit Function
- End If
- fltheightstr = split(split(split(f_Lablechar,"┆")(4),"$")(1),",")(0)
- fltwidthstr = split(split(split(f_Lablechar,"┆")(4),"$")(1),",")(1)
- CssFileStr = split(split(f_Lablechar,"┆")(5),"$")(1)
- PicWidthStr = " width=""" & fltwidthstr & """"
- PicHeightStr = " height=""" & fltheightstr & """"
- if CssFileStr <> "" then CssFileStr = " Class='" & CssFileStr & "'"
- do while Not RsFilterObj.Eof
- if (Not IsNull(RsFilterObj("NewsSmallPicFile"))) And (RsFilterObj("NewsSmallPicFile") <> "") then
- if ImagesStr = "" then
- If Instr(1,LCase(RsFilterObj("NewsSmallPicFile")),"http://") <> 0 then
- ImagesStr = RsFilterObj("NewsSmallPicFile")
- Else
- ImagesStr = RsFilterObj("NewsSmallPicFile")
- End If
- TxtStr = "<a " & CssFileStr & " href='" & get_NewsLink(RsFilterObj("NewsID")) & "' target='_blank'>" & GotTopic(RsFilterObj("NewsTitle"),TitleNumberStr)&"</a>"
- TxtFirst = "<a " & CssFileStr & " href='" & get_NewsLink(RsFilterObj("NewsID")) & "' target=''_blank''>" & GotTopic(RsFilterObj("NewsTitle"),TitleNumberStr)&"</a>"
- LinkStr = get_NewsLink(RsFilterObj("NewsID"))
- else
- ImagesStr = ImagesStr &","& RsFilterObj("NewsSmallPicFile")
- TxtStr = TxtStr &",<a " & CssFileStr & " href='" & get_NewsLink(RsFilterObj("NewsID")) & "' target='_blank'>" & GotTopic(RsFilterObj("NewsTitle"),TitleNumberStr)&"</a>"
- LinkStr = LinkStr & ","& get_NewsLink(RsFilterObj("NewsID"))
- end if
- end if
- RsFilterObj.MoveNext
- loop
- FilterStr="<script language=""vbscript"">"& Chr(13)
- FilterStr = FilterStr & "Dim FileList,FileListArr,TxtList,TxtListArr,LinkList,LinkArr"& Chr(13)
- FilterStr = FilterStr & "FileList = """ & ImagesStr & """"& Chr(13)
- FilterStr = FilterStr & "LinkList = """ & LinkStr & """"& Chr(13)
- FilterStr = FilterStr & "TxtList = """ & TxtStr & """"& Chr(13)
- FilterStr = FilterStr & "FileListArr = Split(FileList,"","")"& Chr(13)
- FilterStr = FilterStr & "LinkArr = Split(LinkList,"","")"& Chr(13)
- FilterStr = FilterStr & "TxtListArr = Split(TxtList,"","")"& Chr(13)
- FilterStr = FilterStr & "Dim CanPlay"& Chr(13)
- FilterStr = FilterStr & "CanPlay = CInt(Split(Split(navigator.appVersion,"";"")(1),"" "")(2))>5"& Chr(13)
- FilterStr = FilterStr & "Dim FilterStr"& Chr(13)
- FilterStr = FilterStr & "FilterStr = ""RevealTrans(duration=2,transition=23)"""& Chr(13)
- FilterStr = FilterStr & "FilterStr = FilterStr + "";BlendTrans(duration=2)"""& Chr(13)
- FilterStr = FilterStr & "If CanPlay Then"& Chr(13)
- FilterStr = FilterStr & "FilterStr = FilterStr + "";progid:DXImageTransform.Microsoft.Fade(duration=2,overlap=0)"""& Chr(13)
- FilterStr = FilterStr & "FilterStr = FilterStr + "";progid:DXImageTransform.Microsoft.Wipe(duration=3,gradientsize=0.25,motion=reverse)"""& Chr(13)
- FilterStr = FilterStr & "Else"& Chr(13)
- FilterStr = FilterStr & "Msgbox ""幻灯片播放具有多种动态图片切换效果,但此功能需要您的浏览器为IE5.5或以上版本,否则您将只能看到部分的切换效果。"",64"& Chr(13)
- FilterStr = FilterStr & "End If"& Chr(13)
- FilterStr = FilterStr & "Dim FilterArr"& Chr(13)
- FilterStr = FilterStr & "FilterArr = Split(FilterStr,"";"")"& Chr(13)
- FilterStr = FilterStr & "Dim PlayImg_M"& Chr(13)
- FilterStr = FilterStr & "PlayImg_M = 5 * 1000 "& Chr(13)
- FilterStr = FilterStr & "Dim I"& Chr(13)
- FilterStr = FilterStr & "I = 1"& Chr(13)
- FilterStr = FilterStr & "Sub ChangeImg"& Chr(13)
- FilterStr = FilterStr & "Do While FileListArr(I)="""""& Chr(13)
- FilterStr = FilterStr & "I = I + 1"& Chr(13)
- FilterStr = FilterStr & "If I>UBound(FileListArr) Then I = 0"& Chr(13)
- FilterStr = FilterStr & "Loop"& Chr(13)
- FilterStr = FilterStr & "Dim J"& Chr(13)
- FilterStr = FilterStr & "If I>UBound(FileListArr) Then I = 0"& Chr(13)
- FilterStr = FilterStr & "Randomize"& Chr(13)
- FilterStr = FilterStr & "J = Int(Rnd * (UBound(FilterArr)+1))"& Chr(13)
- FilterStr = FilterStr & "Img.style.filter = FilterArr(J)"& Chr(13)
- FilterStr = FilterStr & "Img.filters(0).Apply"& Chr(13)
- FilterStr = FilterStr & "Img.Src = FileListArr(I)"& Chr(13)
- FilterStr = FilterStr & "Img.filters(0).play"& Chr(13)
- FilterStr = FilterStr & "Link.Href = LinkArr(I)"& Chr(13)
- If split(split(f_Lablechar,"┆")(7),"$")(1) = "1" Then
- FilterStr = FilterStr & "Txt.filters(0).Apply"& Chr(13)
- FilterStr = FilterStr & "Txt.innerHTML = TxtListArr(I)"& Chr(13)
- FilterStr = FilterStr & "Txt.filters(0).play"& Chr(13)
- End If
- FilterStr = FilterStr & "I = I + 1"& Chr(13)
- FilterStr = FilterStr & "If I>UBound(FileListArr) Then I = 0"& Chr(13)
- FilterStr = FilterStr & "TempImg.Src = FileListArr(I)"& Chr(13)
- FilterStr = FilterStr & "TempLink.Href = LinkArr(I)"& Chr(13)
- FilterStr = FilterStr & "SetTimeout ""ChangeImg"", PlayImg_M,""VBScript"""& Chr(13)
- FilterStr = FilterStr & "End Sub"& Chr(13)
- FilterStr = FilterStr & "</SCRIPT>"& Chr(13)
- FilterStr = FilterStr & "<TABLE WIDTH=""100%"" height=""100%"" BORDER=""0"" CELLSPACING="""" CELLPADDING=""0"">" &vbcrlf
- FilterStr = FilterStr & "<TR ID=""NoScript"">"&vbcrlf
- FilterStr = FilterStr & "<TD Align=""Center"" Style=""Color:White"">对不起,图片浏览功能需脚本支持,但您的浏览器已经设置了禁止脚本运行。请您在浏览器设置中调整有关安全选项。</TD>"&vbcrlf
- FilterStr = FilterStr & "</TR>"&vbcrlf
- 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
- FilterStr = FilterStr & "</TD></TR><TR Style=""Display:none""><TD><a id=TempLink ><Img ID=""TempImg"" Border=""0""></a></TD></TR>"&vbcrlf
- If split(split(f_Lablechar,"┆")(7),"$")(1) = "1" Then
- FilterStr = FilterStr & "<TR><TD HEIGHT=""100%"" Align=""Center"" vAlign=""Top"">"&vbcrlf
- FilterStr = FilterStr & "<div ID=""Txt"" style=""PADDING-LEFT: 5px; Z-INDEX: 1; FILTER: progid:DXImageTransform.Microsoft.Fade(duration=1,overlap=0); POSITION:"">"&TxtFirst&"</div>"
- FilterStr = FilterStr & "</TD></TR>"&vbcrlf
- End If
- FilterStr = FilterStr & "</TABLE>"& Chr(13)
- FilterStr = FilterStr & "<Script Language=""VBScript"">"& Chr(13)
- FilterStr = FilterStr & "NoScript.Style.Display = ""none"""& Chr(13)
- FilterStr = FilterStr & "CanRunScript.Style.Display = """""& Chr(13)
- FilterStr = FilterStr & "Img.Src = FileListArr(0)"& Chr(13)
- FilterStr = FilterStr & "Link.Href = LinkArr(0)"& Chr(13)
- FilterStr = FilterStr & "SetTimeout ""ChangeImg"", PlayImg_M,""VBScript"""& Chr(13)
- FilterStr = FilterStr & "</Script>"& Chr(13)
- else
- FilterStr="没有幻灯图片"
- End if
- RsFilterObj.Close
- Set RsFilterObj = Nothing
- NorFilter = FilterStr
- End Function
- '得到子类新闻列表
- '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
- '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
- 'picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
- Public Function subClassList(f_Lablechar,f_type,f_Id)
- dim rs,f_sql,rs_n,rs_f_sql
- 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
- dim titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,loopnumber,picnewstf
- dim classNews_head,classNews_middle1,classNews_bottom,classNews_middle2,c_s_i_1,table_array
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf=1
- c_cols = split(split(f_Lablechar,"┆")(24),"$")(1)
- c_cols_1 = split(split(f_Lablechar,"┆")(25),"$")(1)
- bg_ground = split(split(f_Lablechar,"┆")(23),"$")(1)
- datenumber = split(split(f_Lablechar,"┆")(10),"$")(1)
- orderby = split(split(f_Lablechar,"┆")(15),"$")(1)
- orderdesc = split(split(f_Lablechar,"┆")(16),"$")(1)
- style_id = split(split(f_Lablechar,"┆")(22),"$")(1)
- loopnumber = split(split(f_Lablechar,"┆")(2),"$")(1)
- titlenumber = split(split(f_Lablechar,"┆")(11),"$")(1)
- contentnumber = split(split(f_Lablechar,"┆")(26),"$")(1)
- navinumber = split(split(f_Lablechar,"┆")(27),"$")(1)
- picshowtf = split(split(f_Lablechar,"┆")(12),"$")(1)
- datestyle = split(split(f_Lablechar,"┆")(21),"$")(1)
- openstyle = split(split(f_Lablechar,"┆")(13),"$")(1)
- picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
- Inc_SubClass = split(split(f_Lablechar,"┆")(8),"$")(1)
- else
- div_tf=0
- c_cols = split(split(f_Lablechar,"┆")(18),"$")(1)
- c_cols_1 = split(split(f_Lablechar,"┆")(19),"$")(1)
- bg_ground = split(split(f_Lablechar,"┆")(17),"$")(1)
- datenumber = split(split(f_Lablechar,"┆")(4),"$")(1)
- orderby = split(split(f_Lablechar,"┆")(9),"$")(1)
- orderdesc = split(split(f_Lablechar,"┆")(10),"$")(1)
- style_id = split(split(f_Lablechar,"┆")(16),"$")(1)
- loopnumber = split(split(f_Lablechar,"┆")(2),"$")(1)
- titlenumber = split(split(f_Lablechar,"┆")(5),"$")(1)
- contentnumber = split(split(f_Lablechar,"┆")(20),"$")(1)
- navinumber = split(split(f_Lablechar,"┆")(21),"$")(1)
- picshowtf = split(split(f_Lablechar,"┆")(6),"$")(1)
- datestyle = split(split(f_Lablechar,"┆")(15),"$")(1)
- openstyle = split(split(f_Lablechar,"┆")(7),"$")(1)
- picnewstf = split(split(f_Lablechar,"┆")(1),"$")(1)
- Inc_SubClass = split(split(f_Lablechar,"┆")(8),"$")(1)
- end if
- if not isnumeric(titlenumber) then:titlenumber = 30:else:titlenumber = cint(titlenumber):end if
- if not isnumeric(loopnumber) then:loopnumber = 10:else:loopnumber = cint(loopnumber):end if
- MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
- table_array=split(f_Lablechar,"┆")
- 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))
- classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(8),"$")(1),split(table_array(9),"$")(1))
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle2 = table_str_list_middle_2(div_tf)
- if picnewstf="1" then
- picnewstf = " and isPicNews=1"
- else
- picnewstf = ""
- end if
- if len(bg_ground)>5 then
- bg_ground = " background="""& bg_ground &""""
- else
- bg_ground = ""
- end If
- if datenumber <>"0" then:datenumber_tmp = " and datevalue(addtime)+"&datenumber&">=datevalue(now)":else:datenumber_tmp = "":end if
- if f_Id="" then f_id="0"
- 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"
- set rs = Conn.execute(f_sql)
- if not rs.eof then
- subClassList = "<table border=""0"" cellspacing=""3"" cellpadding=""0"" width=""100%"">"&vbNewLine&" <tr>"
- c_s_i = 0
- do while not rs.eof
- If (c_s_i mod c_cols =0) And c_s_i>0 Then
- subClassList = subClassList & "</tr>"&vbNewLine&"<tr>"&vbNewLine
- End If
- 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""> >> <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>"
- If Inc_SubClass="1" Then
- If getNewsSubClass(rs("ClassId"))<>"" Then
- SQL_Inc_SubClass=" and (ClassID='"&rs("ClassId")&"' OR ClassID IN ("&getNewsSubClass(rs("ClassId"))&"))"
- Else
- SQL_Inc_SubClass=" AND ClassID='"&rs("ClassId")&"'"
- End If
- Else
- SQL_Inc_SubClass=" AND ClassID='"&rs("ClassId")&"'"
- End If
- 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&""
- set rs_n = Conn.execute(rs_f_sql)
- If Not rs_n.eof then
- if div_tf=1 then
- subClassList = subClassList & vbNewLine & classNews_head
- end if
- do while not rs_n.eof
- If div_tf = 1 Then
- subClassList = subClassList & classNews_middle1 &getlist_news(rs_n,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"subClassList")&classNews_middle2
- Else
- subClassList = subClassList & "<div>" & getlist_news(rs_n,style_id,titlenumber,contentnumber,navinumber,picshowtf,datestyle,openstyle,MF_Domain,"subClassList")&"<div>"&vbNewLine
- End If
- rs_n.movenext
- loop
- if div_tf=1 then
- subClassList = subClassList & classNews_bottom
- end if
- end If
- subClassList = subClassList & "</td>"&vbNewLine
- rs.movenext
- c_s_i = c_s_i + 1
- Loop
- If c_s_i Mod 2 <>0 Then
- subClassList = subClassList & "<td width="""&cint(100/c_cols)&"%"" valign=""top""></td>"&vbNewLine
- End If
- rs.close:set rs = Nothing
- rs_n.close:set rs_n = nothing
- subClassList = subClassList & "</tr>"&vbNewLine&"</table>"&vbNewLine
- else
- subClassList = ""
- end If
- End Function
- '得到新闻浏览________________________________________________________________
- Public Function ReadNews(f_Lablechar,f_type,f_Id)
- 'ReadNews┆引用样式$2┆日期格式$YY02-MM-DD HH:MI:SS
- Dim styleId,ReadSql,RsReadObj
- Dim MF_Domain,datestyle,PageTF,pagecss,pageposi,pagegs
- styleId = split(split(f_Lablechar,"┆")(1),"$")(1)
- datestyle = split(split(f_Lablechar,"┆")(2),"$")(1)
- ReadNews = ""