NS_Public.asp
资源名称:eat.rar [点击查看]
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:130k
源码类别:
数据库编程
开发平台:
ASP/ASPX
- if trim(f_Id)="" then
- ReadNews = ""
- else
- ReadSql="select ID,NewsId,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress"
- ReadSql = ReadSql & ",Content,isPicNews,NewsPicFile,NewsSmallPicFile,isPop,Source,Editor,Keywords,Author,Hits,SaveNewsPath,FileName,FileExtName,NewsProperty,isLock,addtime,TodayNewsPic "
- ReadSql = ReadSql & "From FS_NS_News where isLock=0 and NewsId='"& f_Id &"' and IsURL=0 and isRecyle=0 and isdraft=0"
- Set RsReadObj = Server.CreateObject(G_FS_RS)
- RsReadObj.open ReadSql,Conn,1,1
- MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
- if not RsReadObj.eof then
- ReadNews = ReadNews & getlist_news(RsReadObj,styleId,0,0,0,0,datestyle,0,MF_Domain,"readnews")
- else
- ReadNews =""
- end If
- RsReadObj.close:set RsReadObj = nothing
- end if
- ReadNews=ReadNews
- End Function
- '站点地图____________________________________________________________________
- Public Function SiteMap(f_Lablechar,f_type,f_Id)
- dim classId,cssstyle,SiteMapstr,RsClassObj,i,br_str
- classId = split(split(f_Lablechar,"┆")(1),"$")(1)
- cssstyle = split(split(f_Lablechar,"┆")(2),"$")(1)
- SiteMapstr = ""
- set RsClassObj = Conn.execute("select ClassId,ClassName,ClassEName,IsURL,ParentID From FS_NS_NewsClass where ReycleTF=0 and ParentID='0' order by OrderID desc,id desc")
- if Not RsClassObj.eof then
- i=0
- do while Not RsClassObj.eof
- if RsClassObj("ParentID")<>"0" then
- if i=0 then
- br_str=""
- else
- br_str="<br />"
- end if
- else
- if i=0 then
- br_str=""
- else
- br_str="<br />"
- end if
- end if
- if cssstyle<>"" then
- SiteMapstr = SiteMapstr & br_str & "<img src="""&m_PathDir&"sys_images/+.gif"" border=""0"" /><a href="""&get_ClassLink(RsClassObj("ClassId"))&""" class="""& cssstyle &""">"&RsClassObj("ClassName")&"</a>"&vbNewLine
- else
- SiteMapstr = SiteMapstr & br_str & "<img src="""&m_PathDir&"sys_images/+.gif"" border=""0"" /><a href="""&get_ClassLink(RsClassObj("ClassId"))&""">"&RsClassObj("ClassName")&"</a>"&vbNewLine
- end if
- SiteMapstr = SiteMapstr & get_ClassList(RsClassObj("ClassId")," ",cssstyle)
- RsClassObj.movenext
- i=i+1
- loop
- RsClassObj.close:set RsClassObj=nothing
- else
- SiteMapstr = ""
- RsClassObj.close:set RsClassObj=nothing
- end if
- SiteMap = SiteMapstr
- End Function
- '得到搜索表单________________________________________________________________
- Public Function Search(f_Lablechar,f_type)
- dim Searchstr,showdate,showClass,rs,select_str,datestr,classstr,MF_Domain
- showdate = split(split(f_Lablechar,"┆")(1),"$")(1)
- showClass = split(split(f_Lablechar,"┆")(2),"$")(1)
- MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
- Searchstr = ""
- if showdate = "1" then
- datestr = "开始日期:<input type=text name=""s_date"" id=""s_date"" style=""width:90;"" value="""" onFocus=""setday(this)"" maskType=""shortDate"">"&vbNewLine
- datestr = datestr & "<IMG onClick=""s_date.focus()"" src=""/FS_Inc/calendar.bmp"" align=""absBottom"">" &vbNewLine
- datestr = datestr & "结束日期:<input type=text name=""e_date"" id=""e_date"" style=""width:90;"" value="""" onFocus=""setday(this)"" maskType=""shortDate"">"&vbNewLine
- datestr = datestr & "<IMG onClick=""e_date.focus()"" src=""/FS_Inc/calendar.bmp"" align=""absBottom"">" &vbNewLine
- else
- datestr = ""
- end if
- if showClass = "1" then
- classstr = "<select name=""ClassId"" id=""ClassId"">"
- classstr = classstr & "<option value="""">不指定栏目</option>"&vbNewLine
- set rs = Conn.execute("select ClassId,id,classname,classEname,ParentId From FS_NS_NewsClass where ReycleTF=0 and isURL=0 and ParentId='0' order by OrderId desc,id desc")
- do while not rs.eof
- classstr = classstr & "<option value="""&rs("ClassId")&""">┝"&rs("classname")&"</option>"&vbNewLine
- classstr = classstr & get_optionNewsList(rs("ClassId"),"┝")&vbNewLine
- rs.movenext
- loop
- rs.close:set rs=nothing
- classstr = classstr&"</select>"
- else
- classstr = ""
- end if
- select_str ="<select name=""s_type"" id=""s_type"">"&vbNewLine
- select_str=select_str&"<option value=""title"" selected=""selected"">标题</option>"&vbNewLine
- select_str=select_str&"<option value=""stitle"">副标题</option>"&vbNewLine
- select_str=select_str&"<option value=""content"">全文</option>"&vbNewLine
- select_str=select_str&"<option value=""author"">作者</option>"&vbNewLine
- select_str=select_str&"<option value=""keyword"">关键字</option>"&vbNewLine
- select_str=select_str&"<option value=""NaviContent"">导航</option>"&vbNewLine
- select_str=select_str&"<option value=""source"">来源</option>"&vbNewLine
- select_str=select_str&"</select>"&vbNewLine
- Searchstr = Searchstr & "<table width=""100%""><form action=""http://"& MF_Domain & "/Search.html"" id=""SearchForm"" name=""SearchForm"" method=""get""><tr><td><input name=""SubSys"" type=""hidden"" id=""SubSys"" value=""NS"" /><input name=""Keyword"" type=""text"" id=""Keyword"" size=""15"" /> "&select_str&datestr&classstr&"<input type=""submit"" id=""SearchSubmit"" value=""搜索"" /></td></tr></form></table>"
- Search = Searchstr
- End Function
- '得到统计信息_______________________________________________________________
- Public Function infoStat(f_Lablechar,f_type)
- dim cols,br_str,infoStatstr
- cols = split(split(f_Lablechar,"┆")(1),"$")(1)
- if cols="0" then
- br_str = " "
- else
- br_str = "<br />"
- end if
- dim rs,c_rs1,c_rs2,c_rs3,c_rs4,c_rs5
- set rs = Conn.execute("select count(id) From FS_NS_News where islock=0 and isRecyle=0 and isdraft=0")
- c_rs1=rs(0)
- rs.close:set rs=nothing
- set rs = Conn.execute("select count(id) From FS_NS_NewsClass where ReycleTF=0")
- c_rs2=rs(0)
- rs.close:set rs=nothing
- set rs = Conn.execute("select count(SpecialID) From FS_NS_Special where isLock=0")
- c_rs3=rs(0)
- rs.close:set rs=nothing
- set rs = User_Conn.execute("select count(Userid) From FS_ME_Users")
- c_rs4=rs(0)
- rs.close:set rs=nothing
- if G_IS_SQL_User_DB=0 then
- set rs = User_Conn.execute("select count(Userid) From FS_ME_Users where datevalue(RegTime)=#"&datevalue(date)&"#")
- else
- set rs = User_Conn.execute("select count(Userid) From FS_ME_Users where datevalue(RegTime)='"&datevalue(date)&"'")
- end if
- c_rs5=rs(0)
- rs.close:set rs=nothing
- infoStatstr = "总新闻:"&"<strong>"&c_rs1&"</strong>"&br_str
- infoStatstr = infoStatstr &"总栏目:"&"<strong>"&c_rs2&"</strong>"&br_str
- infoStatstr = infoStatstr &"专题数:"&"<strong>"&c_rs3&"</strong>"&br_str
- infoStatstr = infoStatstr &"会员数:"&"<strong>"&c_rs4&"</strong>"&br_str
- infoStatstr = infoStatstr &"今日注册:"&"<strong>"&c_rs5&"</strong>"&br_str
- infoStat = infoStatstr
- End Function
- '得到图片头条________________________________________________________________
- Public Function TodayPic(f_Lablechar,f_type,f_id)
- dim ClassId,InSql_search,rs,MF_Domain,TodayPicstr
- ClassID = split(split(f_Lablechar,"┆")(1),"$")(1)
- MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
- if trim(ClassId)="" then
- if trim(f_id)<>"" then
- InSql_search = " where ClassId = '"&f_id&"'"
- else
- InSql_search = ""
- end if
- else
- if trim(ClassId)<>"" then
- InSql_search = " where ClassId = '"&ClassId&"'"
- else
- InSql_search = ""
- end if
- end if
- set rs = conn.execute("select top 1 NewsID,ClassID,TodayPic_SavePath From FS_NS_TodayPic"& InSql_search &"")
- if rs.eof then
- TodayPicstr = ""
- rs.close:set rs=nothing
- else
- TodayPicstr = "<a href="""& get_NewsLink(rs("NewsID"))&"""><img src=""http://"&MF_Domain&"/"&G_UP_FILES_DIR&"/TodayPicFiles/"&rs("TodayPic_SavePath")&".jpg"" border=""0""></a>"
- rs.close:set rs=nothing
- end if
- TodayPic = TodayPicstr
- End Function
- '得到文字头条________________________________________________________________
- Public Function TodayWord(f_Lablechar,f_type,f_Id)
- dim Content_List,table_array,div_tf,ClassId,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2,f_sql,f_rs_obj
- dim RefreshNumber,search_inSQL,colnumber,cssstyle,Titlenumber,ShowReview,ShowReviewTF
- table_array=split(f_Lablechar,"┆")
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf = 1
- else
- div_tf=0
- end if
- ClassId = split(split(f_Lablechar,"┆")(2),"$")(1)
- RefreshNumber = split(split(f_Lablechar,"┆")(11),"$")(1)
- colnumber = split(split(f_Lablechar,"┆")(9),"$")(1)
- Titlenumber = split(split(f_Lablechar,"┆")(12),"$")(1)
- ShowReview = split(split(f_Lablechar,"┆")(13),"$")(1)
- if trim(split(split(f_Lablechar,"┆")(10),"$")(1))<>"" then
- cssstyle = " class="""&split(split(f_Lablechar,"┆")(10),"$")(1)&""""
- else
- cssstyle = ""
- end if
- if trim(ClassId)<>"" then
- search_inSQL = " and "& all_substring &"(NewsProperty,11,1)='1' and ClassId='"& ClassId &"'"
- else
- if trim(f_id)<>"" then
- search_inSQL = " and "& all_substring &"(NewsProperty,11,1)='1' and ClassId='"& f_id &"'"
- else
- search_inSQL = " and "& all_substring &"(NewsProperty,11,1)='1'"
- end if
- 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))
- else
- classNews_head = "<table border=""0"" cellspacing=""0"" cellpadding=""3"" width=""100%"">"
- end if
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle2 = table_str_list_middle_2(div_tf)
- f_sql="select top "& 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&" and isRecyle=0 and isdraft=0 order by addtime desc,id desc"
- Set f_rs_obj = Server.CreateObject(G_FS_RS)
- 'response.Write(f_sql)
- 'response.end
- f_rs_obj.open f_sql,Conn,1,3
- if f_rs_obj.eof then
- Content_List = ""
- f_rs_obj.close:set f_rs_obj=nothing
- else
- dim c_i_k
- Content_List = ""
- 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 ShowReview="1" then
- ShowReviewTF = "<img src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/sys_images/sp_er.gif"" border=""0"" /><a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewUrl.asp?Id="&f_rs_obj("ID")&"&Type=NS"" target=""_blank""><font color=""red"">评</font></a>"
- else
- ShowReviewTF = ""
- end if
- if div_tf=1 then
- Content_List= Content_List & classNews_middle1 & "<a href="""&get_NewsLink(f_rs_obj("NewsId"))&""""& cssstyle&">"&GotTopic(f_rs_obj("newstitle"),Titlenumber)&"</a>"& ShowReviewTF & classNews_middle2
- else
- if cint(colnumber) =1 then
- Content_List= Content_List & vbNewLine&" <tr><td><a href="""&get_NewsLink(f_rs_obj("NewsId"))&""""& cssstyle&">"&GotTopic(f_rs_obj("newstitle"),Titlenumber)&"</a>"& ShowReviewTF &"</td></tr>"
- else
- Content_List= Content_List & "<td width="""& cint(100/cint(colnumber))&"%""><a href="""&get_NewsLink(f_rs_obj("NewsId"))&""""& cssstyle&">"&GotTopic(f_rs_obj("newstitle"),Titlenumber)&"</a>"& ShowReviewTF &"</td>"
- 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
- f_rs_obj.close:set f_rs_obj=nothing
- Content_List=classNews_head & Content_List & classNews_bottom
- end if
- TodayWord = Content_List
- End Function
- '栏目导航____________________________________________________________________
- Public Function ClassNavi(f_Lablechar,f_type,f_Id)
- 'ClassNavi┆输出方式$out_Table┆栏目$┆方向$0┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆标题CSS$┆标题导航$·
- dim ClassId,cols,titlecss,rs,ClassNavistr,ParentIDstr,cols_str,div_tf,table_array
- dim classNews_head,classNews_bottom,classNews_middle1,classNews_middle2,cssstyle,titleNavi
- table_array=split(f_Lablechar,"┆")
- ClassId = split(split(f_Lablechar,"┆")(2),"$")(1)
- cols = split(split(f_Lablechar,"┆")(3),"$")(1)
- titlecss = split(split(f_Lablechar,"┆")(10),"$")(1)
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf = 1
- cssstyle = ""
- else
- div_tf=0
- if titlecss<>"" then
- cssstyle = " Class="""& titlecss &""""
- else
- cssstyle = ""
- end if
- titleNavi = split(split(f_Lablechar,"┆")(11),"$")(1)
- end if
- if div_tf=1 then
- 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))
- else
- classNews_head = "<table border=""0"" cellspacing=""0"" cellpadding=""3"" width=""100%"">"
- end if
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle2 = table_str_list_middle_2(div_tf)
- if trim(ClassId)<>"" then
- ParentIDstr = " and ParentId = '"& ClassId&"'"
- else
- if f_id<>"" then
- ParentIDstr = " and ParentId = '"& f_Id&"'"
- else
- ParentIDstr = " and ParentId = '0'"
- end if
- end if
- set rs = Conn.execute("select ClassID,OrderID,ClassName,isShow,ParentID,ReycleTF From FS_NS_NewsClass where isShow=1 and ReycleTF=0 "& ParentIDstr &" Order by OrderId desc,id desc")
- ClassNavistr = ""
- if rs.eof then
- ClassNavistr = ""
- rs.close:set rs=nothing
- else
- do while not rs.eof
- if div_tf=1 then
- ClassNavistr = ClassNavistr &classNews_middle1 & "<a href="""&get_ClassLink(rs("ClassId"))&""">"&rs("ClassName")&"</a>" & classNews_middle2
- else
- if cols="0" then
- cols_str = " "
- else
- cols_str = "<br />"
- end if
- ClassNavistr = ClassNavistr & titleNavi & "<a href="""&get_ClassLink(rs("ClassId"))&""""& cssstyle&">"&rs("ClassName")&"</a>"& cols_str &""
- end if
- rs.movenext
- loop
- rs.close:set rs=nothing
- if div_tf=1 then
- ClassNavistr=classNews_head & ClassNavistr & classNews_bottom
- end if
- end if
- ClassNavi = ClassNavistr
- End Function
- '专题导航____________________________________________________________________
- Public Function SpecialNavi(f_Lablechar,f_type,f_Id)
- 'SpecialNavi┆输出方式$out_Table┆方向$0┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆导航$·
- dim table_array,cols,titlecss,div_tf,cssstyle,titleNavi,rs,SpecialNavistr,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2,cols_str
- table_array=split(f_Lablechar,"┆")
- cols = split(split(f_Lablechar,"┆")(2),"$")(1)
- titlecss = split(split(f_Lablechar,"┆")(9),"$")(1)
- 'piccss=split(split(f_Lablechar,"┆")(17),"$")(1)
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf = 1
- cssstyle = ""
- else
- div_tf=0
- if titlecss<>"" then
- cssstyle = " Class="""& titlecss &""""
- else
- cssstyle = ""
- end if
- titleNavi = split(split(f_Lablechar,"┆")(10),"$")(1)
- end if
- 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_bottom = table_str_list_bottom(div_tf)
- classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(7),"$")(1),split(table_array(8),"$")(1))
- classNews_middle2 = table_str_list_middle_2(div_tf)
- set rs = Conn.execute("select SpecialID,SpecialCName,SpecialEName,isLock From FS_NS_Special where isLock=0 Order by SpecialID desc")
- 'get_specialLink
- SpecialNavistr = ""
- if rs.eof then
- SpecialNavistr = ""
- rs.close:set rs=nothing
- else
- do while not rs.eof
- if div_tf=1 then
- SpecialNavistr = SpecialNavistr &classNews_middle1 & "<a href="""&get_specialLink(rs("SpecialEName"))&""">"&rs("SpecialCName")&"</a>" & classNews_middle2
- else
- if cols="0" then
- cols_str = " "
- else
- cols_str = "<br />"
- end if
- SpecialNavistr = SpecialNavistr & titleNavi & "<a href="""&get_specialLink(rs("SpecialEName"))&""""& cssstyle&">"&rs("SpecialCName")&"</a>"& cols_str &""
- end if
- rs.movenext
- loop
- rs.close:set rs=nothing
- end if
- if div_tf=1 then
- SpecialNavistr=classNews_head & SpecialNavistr & classNews_bottom
- end if
- SpecialNavi = SpecialNavistr
- End Function
- 'RSS聚合_____________________________________________________________________
- Public Function RssFeed(f_Lablechar,f_type,f_Id)
- dim ClassID,RssFeedstr
- ClassID = split(split(f_Lablechar,"┆")(1),"$")(1)
- if trim(ClassID)<>"" then
- RssFeedstr = "<a href=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/xml/NS/"&ClassID&".xml""><img src=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/sys_images/rss.gif"" border=""0""></a>"
- elseif trim(f_id)<>"" then
- RssFeedstr = "<a href=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/xml/NS/"&f_id&".xml""><img src=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/sys_images/rss.gif"" border=""0""></a>"
- else
- RssFeedstr = ""
- end if
- RssFeed = RssFeedstr
- End Function
- '专题调用____________________________________________________________________
- Public Function SpecialCode(f_Lablechar,f_type,f_Id)
- 'SpecialCode┆栏目$2006┆图片显示$1┆图片尺寸$120,100┆导航内容$1┆导航内容字数$200┆栏目名称CSS$┆导航内容CSS$┆输出方式$out_Table┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆排列方式$0┆导航$·
- dim table_array,ClassID,titleNavi,SpecialCodestr,cols,pictf,picsize,piccss,piccssstr,ContentTF,ContentNumber,div_tf,titlecss,cssstyle,ContentCSS,ContentCSSstr,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2
- table_array=split(f_Lablechar,"┆")
- ClassID = split(split(f_Lablechar,"┆")(1),"$")(1)
- titleNavi = split(split(f_Lablechar,"┆")(16),"$")(1)
- titlecss = split(split(f_Lablechar,"┆")(6),"$")(1)
- ContentCSS = split(split(f_Lablechar,"┆")(7),"$")(1)
- cols=split(split(f_Lablechar,"┆")(15),"$")(1)
- pictf=split(split(f_Lablechar,"┆")(2),"$")(1)
- picsize=split(split(f_Lablechar,"┆")(3),"$")(1)
- piccss=split(split(f_Lablechar,"┆")(17),"$")(1)
- ContentTF = split(split(f_Lablechar,"┆")(4),"$")(1)
- ContentNumber= split(split(f_Lablechar,"┆")(5),"$")(1)
- if piccss<>"" then
- piccssstr = " class="""& piccss &""""
- else
- piccssstr = ""
- end if
- if trim(ClassID)="" then
- SpecialCodestr = "错误的标签,by Foosun.cn"
- end if
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf = 1
- cssstyle = ""
- else
- div_tf=0
- if titlecss<>"" then
- cssstyle = " class="""& titlecss &""""
- else
- cssstyle = ""
- end if
- if ContentCSS<>"" then
- ContentCSSstr = " class="""& ContentCSS &""""
- else
- ContentCSSstr = ""
- end if
- titleNavi = split(split(f_Lablechar,"┆")(16),"$")(1)
- end if
- classNews_head = table_str_list_head(div_tf,split(table_array(9),"$")(1),split(table_array(10),"$")(1),split(table_array(11),"$")(1),split(table_array(12),"$")(1))
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(13),"$")(1),split(table_array(14),"$")(1))
- classNews_middle2 = table_str_list_middle_2(div_tf)
- SpecialCodestr = ""
- dim rs
- set rs=Conn.execute("select SpecialCName,SpecialEName,SpecialContent,naviPic From FS_NS_Special Where SpecialEName='"& ClassID &"'")
- if rs.eof then
- SpecialCodestr = ""
- rs.close:set rs=nothing
- else'
- if div_tf=1 then
- if pictf="1" then
- if trim(picsize)="" then
- SpecialCodestr = SpecialCodestr & ""
- else
- SpecialCodestr = SpecialCodestr & " <a href="""&get_specialLink(rs("SpecialEName"))&"""><img "&piccssstr&" src="""&rs("naviPic")&""" width="""&split(picsize,",")(1)&""" height="""&split(picsize,",")(0)&""" border=""0"" /></a>" &vbNewLine
- end if
- end if
- SpecialCodestr = SpecialCodestr & classNews_middle1 & "<a href="""&get_specialLink(rs("SpecialEName"))&""">"& rs("SpecialCName") &"</a>" & classNews_middle2
- if ContentTF="1" then
- SpecialCodestr = SpecialCodestr & classNews_middle1 &" "& GetCStrLen(""&rs("SpecialContent"),ContentNumber) & " <a href="""& get_specialLink(rs("SpecialEName")) &""">详细</a>" & classNews_middle2
- end if
- SpecialCodestr = classNews_head & SpecialCodestr & classNews_bottom
- else
- SpecialCodestr = SpecialCodestr& "<table width=""99%"" border=""0"" cellspacing=""0"" cellpadding=""5"">"&vbNewLine&" <tr>"
- if pictf="1" then
- if trim(picsize)="" then
- SpecialCodestr = SpecialCodestr & ""
- else
- if cols="0" then
- SpecialCodestr = SpecialCodestr & "<td align=""center""><a href="""&get_specialLink(rs("SpecialEName"))&"""><img "&piccssstr&" src="""&rs("naviPic")&""" width="""&split(picsize,",")(1)&""" height="""&split(picsize,",")(0)&""" border=""0"" /></a></td>" &vbNewLine
- else
- SpecialCodestr = SpecialCodestr & "<td><a href="""&get_specialLink(rs("SpecialEName"))&"""><img "&piccssstr&" src="""&rs("naviPic")&""" width="""&split(picsize,",")(1)&""" height="""&split(picsize,",")(0)&""" border=""0"" /></a></td></tr>" &vbNewLine
- end if
- end if
- end if
- if cols="0" then
- SpecialCodestr = SpecialCodestr & "<td>"& titleNavi &"<a href="""&get_specialLink(rs("SpecialEName"))&""""&cssstyle&">"& rs("SpecialCName") &"</a>"
- if ContentTF="1" then
- SpecialCodestr = SpecialCodestr & "<br /><div align=""left"" "&ContentCSSstr&"> "& GetCStrLen(""&rs("SpecialContent"),ContentNumber)&" <a href="""& get_specialLink(rs("SpecialEName")) &""">详细</a></div></td>"&vbNewLine
- else
- SpecialCodestr = SpecialCodestr & "</td></tr>"&vbNewLine
- end if
- else
- SpecialCodestr = SpecialCodestr & " <tr><td>"& titleNavi &"<a href="""&get_specialLink(rs("SpecialEName"))&""""&cssstyle&">"& rs("SpecialCName") &"</a>"&vbNewLine
- if ContentTF="1" then
- SpecialCodestr = SpecialCodestr & "<br /><div align=""left"" "&ContentCSSstr&"> "& GetCStrLen(""&rs("SpecialContent"),ContentNumber)&" <a href="""& get_specialLink(rs("SpecialEName")) &""">详细</a></div></td></tr>"&vbNewLine
- else
- SpecialCodestr = SpecialCodestr & "</td></tr>"&vbNewLine
- end if
- end if
- SpecialCodestr = SpecialCodestr & "</table>"
- end if
- rs.close:set rs=nothing
- end if
- SpecialCode = SpecialCodestr
- End Function
- '栏目调用____________________________________________________________________
- Public Function ClassCode(f_Lablechar,f_type,f_Id)
- 'ClassCode┆栏目$20066┆图片显示$1┆图片尺寸$120,100┆导航内容$1┆导航内容字数$200┆栏目名称CSS$┆导航内容CSS$┆输出方式$out_Table┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆排列方式$0┆导航$·┆图片CSS$
- dim table_array,ClassID,titleNavi,ClassCodestr,cols,pictf,picsize,piccss,piccssstr,ContentTF,ContentNumber,div_tf,titlecss,cssstyle,ContentCSS,ContentCSSstr,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2
- table_array=split(f_Lablechar,"┆")
- ClassID = split(split(f_Lablechar,"┆")(1),"$")(1)
- titleNavi = split(split(f_Lablechar,"┆")(16),"$")(1)
- titlecss = split(split(f_Lablechar,"┆")(6),"$")(1)
- ContentCSS = split(split(f_Lablechar,"┆")(7),"$")(1)
- cols=split(split(f_Lablechar,"┆")(15),"$")(1)
- pictf=split(split(f_Lablechar,"┆")(2),"$")(1)
- picsize=split(split(f_Lablechar,"┆")(3),"$")(1)
- piccss=split(split(f_Lablechar,"┆")(17),"$")(1)
- ContentTF = split(split(f_Lablechar,"┆")(4),"$")(1)
- ContentNumber= split(split(f_Lablechar,"┆")(5),"$")(1)
- if piccss<>"" then
- piccssstr = " class="""& piccss &""""
- else
- piccssstr = ""
- end if
- if trim(ClassID)="" then
- ClassCodestr = "错误的标签,by Foosun.cn"
- end if
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf = 1
- cssstyle = ""
- else
- div_tf=0
- if titlecss<>"" then
- cssstyle = " class="""& titlecss &""""
- else
- cssstyle = ""
- end if
- if ContentCSS<>"" then
- ContentCSSstr = " class="""& ContentCSS &""""
- else
- ContentCSSstr = ""
- end if
- titleNavi = split(split(f_Lablechar,"┆")(16),"$")(1)
- end if
- classNews_head = table_str_list_head(div_tf,split(table_array(9),"$")(1),split(table_array(10),"$")(1),split(table_array(11),"$")(1),split(table_array(12),"$")(1))
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(13),"$")(1),split(table_array(14),"$")(1))
- classNews_middle2 = table_str_list_middle_2(div_tf)
- ClassCodestr = ""
- dim rs
- set rs=Conn.execute("select ClassID,ClassName,ClassNaviContent,ClassNaviPic From FS_NS_NewsClass Where ClassID='"& ClassID &"'")
- if rs.eof then
- ClassCodestr = ""
- rs.close:set rs=nothing
- else'
- if div_tf=1 then
- if pictf="1" then
- if trim(picsize)="" then
- ClassCodestr = ClassCodestr & ""
- else
- ClassCodestr = ClassCodestr & " <a href="""&get_ClassLink(rs("ClassID"))&"""><img "&piccssstr&" src="""&rs("ClassNaviPic")&""" width="""&split(picsize,",")(1)&""" height="""&split(picsize,",")(0)&""" border=""0"" /></a>" &vbNewLine
- end if
- end if
- ClassCodestr = ClassCodestr & classNews_middle1 & "<a href="""&get_ClassLink(rs("ClassID"))&""">"& rs("ClassName") &"</a>" & classNews_middle2
- if ContentTF="1" then
- ClassCodestr = ClassCodestr & classNews_middle1 &" "& GetCStrLen(""&rs("ClassNaviContent"),ContentNumber) & " <a href="""& get_ClassLink(rs("ClassID")) &""">详细</a>" & classNews_middle2
- end if
- ClassCodestr = classNews_head & ClassCodestr & classNews_bottom
- else
- ClassCodestr = ClassCodestr& "<table width=""99%"" border=""0"" cellspacing=""0"" cellpadding=""5"">"&vbNewLine&" <tr>"
- if pictf="1" then
- if trim(picsize)="" then
- ClassCodestr = ClassCodestr & ""
- else
- if cols="0" then
- ClassCodestr = ClassCodestr & "<td align=""center""><a href="""&get_ClassLink(rs("ClassID"))&"""><img "&piccssstr&" src="""&rs("ClassNaviPic")&""" width="""&split(picsize,",")(1)&""" height="""&split(picsize,",")(0)&""" border=""0"" /></a></td>" &vbNewLine
- else
- ClassCodestr = ClassCodestr & "<td><a href="""&get_ClassLink(rs("ClassID"))&"""><img "&piccssstr&" src="""&rs("ClassNaviPic")&""" width="""&split(picsize,",")(1)&""" height="""&split(picsize,",")(0)&""" border=""0"" /></a></td></tr>" &vbNewLine
- end if
- end if
- end if
- if cols="0" then
- ClassCodestr = ClassCodestr & "<td>"& titleNavi &"<a href="""&get_ClassLink(rs("ClassID"))&""""&cssstyle&">"& rs("ClassName") &"</a>"
- if ContentTF="1" then
- ClassCodestr = ClassCodestr & "<br /><div align=""left"" "&ContentCSSstr&"> "& GetCStrLen(""&rs("ClassNaviContent"),ContentNumber)&" <a href="""& get_ClassLink(rs("ClassID")) &""">详细</a></div></td>"&vbNewLine
- else
- ClassCodestr = ClassCodestr & "</td></tr>"&vbNewLine
- end if
- else
- ClassCodestr = ClassCodestr & " <tr><td>"& titleNavi &"<a href="""&get_ClassLink(rs("ClassID"))&""""&cssstyle&">"& rs("ClassName") &"</a>"&vbNewLine
- if ContentTF="1" then
- ClassCodestr = ClassCodestr & "<br /><div align=""left"" "&ContentCSSstr&"> "& GetCStrLen(""&rs("ClassNaviContent"),ContentNumber)&" <a href="""& get_ClassLink(rs("ClassID")) &""">详细</a></div></td></tr>"&vbNewLine
- else
- ClassCodestr = ClassCodestr & "</td></tr>"&vbNewLine
- end if
- end if
- ClassCodestr = ClassCodestr & "</table>"
- end if
- rs.close:set rs=nothing
- end if
- ClassCode = ClassCodestr
- End Function
- '不规则新闻开始______________________________________________________________
- Public Function DefineNews(f_Lablechar,f_type,f_Id)
- 'DefineNews┆输出方式$out_Table┆不规则ID$┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆标题CSS$
- dim DefineNewsstr,ClassId,TitleCss,TitleCssstr,table_array,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2
- dim div_tf,dot_str,TmpRsObj,RowValue,i,TitleNavi
- dim tmp_alt_title,tmp_rs,tmp_titleBorder,tmp_TitleItalic,tmp_TitleColor
- ClassId=split(split(f_Lablechar,"┆")(2),"$")(1)
- TitleCss=split(split(f_Lablechar,"┆")(9),"$")(1)
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf = 1
- TitleCssstr = ""
- else
- div_tf=0
- if trim(TitleCss)<>"" then
- TitleCssstr = " class="""& TitleCss &""""
- else
- TitleCssstr = ""
- end if
- TitleNavi = split(split(f_Lablechar,"┆")(10),"$")(1)
- end if
- table_array=split(f_Lablechar,"┆")
- 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))
- else
- classNews_head = "<table border=""0"" cellspacing=""0"" cellpadding=""3"" width=""100%"">"
- end if
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle2 = table_str_list_middle_2(div_tf)
- DefineNewsstr = ""
- if div_tf=0 then
- SET TmpRsObj = Server.CreateObject(G_FS_RS)
- TmpRsObj.open "Select UnregulatedMain,MainUnregNewsID,UnregNewsName,Rows from FS_NS_News_Unrgl Where UnregulatedMain='"&ClassId&"' order by Rows,id asc",Conn,1,3
- i=0
- Do While Not TmpRsObj.eof
- set tmp_rs = Conn.execute("select titleBorder,TitleItalic,TitleColor From FS_NS_News where NewsId='"& TmpRsObj("MainUnregNewsID")&"'")
- if not tmp_rs.eof then
- tmp_alt_title = TmpRsObj("UnregNewsName")
- if trim(tmp_rs("titleBorder"))=1 then
- tmp_alt_title = "<strong>"& tmp_alt_title &"</strong>"
- end if
- if trim(tmp_rs("TitleItalic"))=1 then
- tmp_alt_title = "<em>"&tmp_alt_title&"</em>"
- end if
- if trim(tmp_rs("TitleColor"))<>"" then
- tmp_alt_title = "<font color=""#"& tmp_rs("TitleColor")&""">"&tmp_alt_title&"</font>"
- end if
- tmp_rs.close:set tmp_rs = nothing
- end if
- if i = 0 then
- DefineNewsstr = DefineNewsstr & TitleNavi &"<a href="""&Get_NewsLink(TmpRsObj("MainUnregNewsID"))&""""&TitleCssstr&">"&tmp_alt_title&"</a>"
- else
- DefineNewsstr = DefineNewsstr &"<a href="""&Get_NewsLink(TmpRsObj("MainUnregNewsID"))&""""&TitleCssstr&">"&tmp_alt_title&"</a>"
- end if
- RowValue=Cint(TmpRsObj("Rows"))
- TmpRsObj.movenext
- if not TmpRsObj.eof then
- if Cint(TmpRsObj("Rows"))=RowValue then
- DefineNewsstr = DefineNewsstr & " "& vbNewLine
- else
- DefineNewsstr = DefineNewsstr & "<br />"& vbNewLine&TitleNavi
- end if
- end if
- i=i+1
- Loop
- TmpRsObj.close:set TmpRsObj = nothing
- DefineNewsstr = DefineNewsstr
- else
- SET TmpRsObj = Server.CreateObject(G_FS_RS)
- TmpRsObj.open "Select UnregulatedMain,MainUnregNewsID,UnregNewsName,Rows from FS_NS_News_Unrgl Where UnregulatedMain='"&ClassId&"' order by Rows,id asc",Conn,1,3
- i=0
- Do While Not TmpRsObj.eof
- set tmp_rs = Conn.execute("select titleBorder,TitleItalic,TitleColor From FS_NS_News where NewsId='"& TmpRsObj("MainUnregNewsID")&"'")
- if not tmp_rs.eof then
- tmp_alt_title = TmpRsObj("UnregNewsName")
- if trim(tmp_rs("titleBorder"))=1 then
- tmp_alt_title = "<strong>"& tmp_alt_title &"</strong>"
- end if
- if trim(tmp_rs("TitleItalic"))=1 then
- tmp_alt_title = "<em>"&tmp_alt_title&"</em>"
- end if
- if trim(tmp_rs("TitleColor"))<>"" then
- tmp_alt_title = "<font color=""#"& tmp_rs("TitleColor")&""">"&tmp_alt_title&"</font>"
- end if
- tmp_rs.close:set tmp_rs = nothing
- end if
- if i=0 then
- DefineNewsstr = DefineNewsstr &classNews_middle1&"<a href="""&Get_NewsLink(TmpRsObj("MainUnregNewsID"))&""""&TitleCssstr&">"&tmp_alt_title&"</a>"
- else
- DefineNewsstr = DefineNewsstr &"<a href="""&Get_NewsLink(TmpRsObj("MainUnregNewsID"))&""""&TitleCssstr&">"&tmp_alt_title&"</a>"
- end if
- RowValue=Cint(TmpRsObj("Rows"))
- TmpRsObj.movenext
- if not TmpRsObj.eof then
- if Cint(TmpRsObj("Rows"))=RowValue then
- DefineNewsstr = DefineNewsstr & " "
- else
- DefineNewsstr = DefineNewsstr &"</li>" & vbNewLine &classNews_middle1
- end if
- end if
- i=i+1
- Loop
- TmpRsObj.close:set TmpRsObj = nothing
- DefineNewsstr = classNews_head & DefineNewsstr & "</li>"&vbNewLine&classNews_bottom
- end if
- DefineNews = DefineNewsstr
- End Function
- '归档标签
- Public Function OldNews(f_Lablechar,f_type,f_Id)
- dim OldNews_time
- OldNews = ""
- if G_SEARCH_TYPE = 1 then
- OldNews_time = "开始日期:<input name=""s_date"" type=""text"" size=""9"" value="""&date-90&""" /> 结束日期:<input name=""e_date"" size=""9"" type=""text"" value="""&date-60&""" />"
- end if
- OldNews = OldNews & "<form id=""recordNewsForm"" name=""recordNewsForm"" method=""get"" action=""http://"& request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/Search.html""> 关键字:<input name=""keyword"" size=""15"" type=""text"" value="""" /> "& OldNews_time &" <input type=""submit"" value=""搜索"" /><input type=""hidden"" name=""SubSys"" value=""RD"" /> <input type=""reset"" name=""Submit2"" value=""重填"" /></form>"
- End Function
- '替换样式列表________________________________________________________________
- 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)
- 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
- Dim s_m_Rs,s_array,s_t_i,tmp_list,s_f_classSql,m_Rs_class,class_path,str_newstitle
- select case f_subsys_ListType
- case "ClassNews"
- get_SpecialEName = f_obj("SpecialEName")
- case "specialnews"
- get_SpecialEName = ""
- case else
- end select
- if f_openstyle=0 then
- f_target=" "
- else
- f_target=" target=""_blank"""
- end if
- if style_id<>"" then
- ListSql = "Select Content from FS_MF_Labestyle where ID=" & style_id & ""
- Set Rs_ListObj = Conn.Execute(ListSql)
- if Not Rs_ListObj.Eof then
- s_Content = Rs_ListObj("Content")
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_ID}")>0 then
- s_Content = replace(s_Content,"{NS:FS_ID}",f_obj("Id"))
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_NewsID}")>0 then
- s_Content = replace(s_Content,"{NS:FS_NewsID}",f_obj("NewsId"))
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_NewsTitle}")>0 then
- if f_subsys_ListType="readnews" then
- str_newstitle = f_obj("NewsTitle")
- else
- str_newstitle = GotTopic(f_obj("NewsTitle"),f_titlenumber)
- if trim(f_obj("titleBorder"))=1 then
- str_newstitle = "<strong>"&str_newstitle&"</strong>"
- end if
- if trim(f_obj("TitleItalic"))=1 then
- str_newstitle = "<em>"&str_newstitle&"</em>"
- end if
- if trim(f_obj("TitleColor"))<>"" then
- str_newstitle = "<font color=""#"& f_obj("TitleColor")&""">"&str_newstitle&"</font>"
- end if
- end if
- if f_picshowtf=1 then
- if f_obj("isPicNews")=1 then
- str_newstitle = ""&str_newstitle&"<img src="""&m_PathDir&"sys_images/img.gif"" alt=""图片"" border=""0"">"
- end if
- end if
- s_Content = replace(s_Content,"{NS:FS_NewsTitle}",str_newstitle)
- end if
- '_________________________________________________________________________________________________
- dim news_SavePath,s_Query_rs,news_Domain,news_UrlDomain,news_ClassEname,s_all_savepath
- if instr(s_Content,"{NS:FS_NewsURL}")>0 or instr(s_Content,"{NS:FS_Content}")>0 then
- s_all_savepath = get_NewsLink(f_obj("NewsId"))
- s_NewsPathUrl = s_all_savepath
- s_Content = replace(s_Content,"{NS:FS_NewsURL}",s_NewsPathUrl)
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_CurtTitle}")>0 then
- s_Content = replace(s_Content,"{NS:FS_CurtTitle}",""&f_obj("CurtTitle")&"")
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_NewsNaviContent}")>0 then
- if f_subsys_ListType="readnews" then
- s_Content = replace(s_Content,"{NS:FS_NewsNaviContent}",""&f_obj("NewsNaviContent"))
- else
- s_Content = replace(s_Content,"{NS:FS_NewsNaviContent}",replace(replace(GetCStrLen(""&f_obj("NewsNaviContent")&"",f_navinumber)," ",""),vbCrLf,"")&"")
- end if
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_Content}")>0 then
- if f_obj("isUrl")=1 then
- s_Content = replace(s_Content,"{NS:FS_Content}","<a href="""&f_obj("URLAddress")&""">"&f_obj("URLAddress")&"</a>")
- else
- if f_subsys_ListType="readnews" then
- if instr(f_obj("Content"),"[FS:PAGE]")>0 then
- s_Content = replace(s_Content,"{NS:FS_Content}","[FS:CONTENT_START]"&f_obj("Content")&"[FS:CONTENT_END]")
- else
- s_Content = replace(s_Content,"{NS:FS_Content}",""&f_obj("Content"))
- end if
- else
- s_Content = replace(s_Content,"{NS:FS_Content}",replace(replace(GetCStrLen(""&replace(""&f_obj("Content"),"[FS:PAGE]","")&"",f_contentnumber)," ",""),vbCrLf,"")&"...<a href="""& s_NewsPathUrl &""">详细内容</a>")
- end if
- end if
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_AddTime}")>0 then
- dim tmp_f_datestyle
- tmp_f_datestyle = f_datestyle
- if instr(f_datestyle,"YY02")>0 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"YY02",right(year(f_obj("AddTime")),2))
- end if
- if instr(f_datestyle,"YY04")>0 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"YY04",year(f_obj("AddTime")))
- end if
- if instr(f_datestyle,"MM")>0 then
- if month(f_obj("AddTime"))<10 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"MM","0"&month(f_obj("AddTime")))
- else
- tmp_f_datestyle= replace(tmp_f_datestyle,"MM",month(f_obj("AddTime")))
- end if
- end if
- if instr(f_datestyle,"DD")>0 then
- if day(f_obj("AddTime"))<10 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"DD","0"&day(f_obj("AddTime")))
- else
- tmp_f_datestyle= replace(tmp_f_datestyle,"DD",day(f_obj("AddTime")))
- end if
- end if
- if instr(f_datestyle,"HH")>0 then
- if hour(f_obj("AddTime"))<10 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"HH","0"&hour(f_obj("AddTime")))
- else
- tmp_f_datestyle= replace(tmp_f_datestyle,"HH",hour(f_obj("AddTime")))
- end if
- end if
- if instr(f_datestyle,"MI")>0 then
- if minute(f_obj("AddTime"))<10 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"MI","0"&minute(f_obj("AddTime")))
- else
- tmp_f_datestyle= replace(tmp_f_datestyle,"MI",minute(f_obj("AddTime")))
- end if
- end if
- if instr(f_datestyle,"SS")>0 then
- if second(f_obj("AddTime"))<10 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"SS","0"&second(f_obj("AddTime")))
- else
- tmp_f_datestyle= replace(tmp_f_datestyle,"SS",second(f_obj("AddTime")))
- end if
- end if
- s_Content = replace(s_Content,"{NS:FS_AddTime}",""&tmp_f_datestyle&"")
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_Author}")>0 then
- dim mid_str
- mid_str = mid(f_obj("NewsProperty"),7,1)
- set Rs_Authorobj = Conn.execute("select top 1 G_Name,G_Email from FS_NS_General where G_Type=3 and G_Name='"& f_obj("Author") &"'")
- if Rs_Authorobj.eof then
- if mid_str="1" then
- s_Content = replace(s_Content,"{NS:FS_Author}","<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&G_USER_DIR&"/ShowUser.asp?UserName="& f_obj("Author") &""" target=""_blank"">"&f_obj("Author")&"</a>")
- else
- s_Content = replace(s_Content,"{NS:FS_Author}",""&f_obj("Author")&"")
- end if
- Rs_Authorobj.close:set Rs_Authorobj=nothing
- else
- if mid_str="1" then
- s_Content = replace(s_Content,"{NS:FS_Author}","<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&G_USER_DIR&"/ShowUser.asp?UserName="& f_obj("Author") &""" target=""_blank"">"&f_obj("Author")&"</a>")
- else
- s_Content = replace(s_Content,"{NS:FS_Author}","<a href=""mailto:"&Rs_Authorobj("G_Email")&""">"&f_obj("Author")&"</a>")
- end if
- Rs_Authorobj.close:set Rs_Authorobj=nothing
- end if
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_Editer}")>0 then
- s_Content = replace(s_Content,"{NS:FS_Editer}",""&f_obj("Editor")&"")
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_hits}")>0 then
- if f_subsys_ListType="readnews" then
- dim ajax_str,hits_str
- hits_str = "<script language=""JavaScript"" src=""http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/Click.asp?type=ajax&SubSys=NS&spanid=NS_id_click_"&f_obj("NewsId")&"""></script>"
- s_Content = replace(s_Content,"{NS:FS_hits}",""& hits_str & "<span id=""NS_id_click_"&f_obj("NewsId")&"""></span> ")
- else
- s_Content = replace(s_Content,"{NS:FS_hits}",""& hits_str & ""&f_obj("hits"))
- end if
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_KeyWords}")>0 then
- if trim(f_obj("Keywords"))<>"" and Not isNull(trim(f_obj("Keywords"))) then
- k_tmp_Chararray = split(f_obj("Keywords"),",")
- k_tmp_Char=""
- k_tmp_uchar= ""
- for k_i = 0 to UBound(k_tmp_Chararray)
- if k_i=UBound(k_tmp_Chararray) then
- k_tmp_Char = k_tmp_Char & "<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/search.html?keyword="& k_tmp_Chararray(k_i) &"&Type=ns"" target=""_blank"">"& k_tmp_Chararray(k_i) &"</a>"
- k_tmp_uchar= k_tmp_uchar & k_tmp_Chararray(k_i)
- else
- k_tmp_Char = k_tmp_Char & "<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/search.html?keyword="& k_tmp_Chararray(k_i) &"&Type=ns"" target=""_blank"">"& k_tmp_Chararray(k_i) &"</a> "
- k_tmp_uchar= k_tmp_uchar & k_tmp_Chararray(k_i) &","
- end if
- next
- s_Content = replace(s_Content,"{NS:FS_KeyWords}",""&k_tmp_Char&"")
- s_Content = replace(s_Content,"{NS:FS_TitleKeyWords}}",""&k_tmp_uchar&"")
- else
- s_Content = replace(s_Content,"{NS:FS_KeyWords}","")
- s_Content = replace(s_Content,"{NS:FS_TitleKeyWords}}","")
- end if
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_TxtSource}")>0 then
- set Rs_Authorobj = Conn.execute("select top 1 G_Name,G_URL from FS_NS_General where G_Type=2 and G_Name='"& f_obj("Source") &"'")
- if Rs_Authorobj.eof then
- s_Content = replace(s_Content,"{NS:FS_TxtSource}",""&f_obj("Source")&"")
- else
- s_Content = replace(s_Content,"{NS:FS_TxtSource}","<a href="""&Rs_Authorobj("G_URL")&""" target=""_blank"">"&f_obj("Source")&"</a>")
- end if
- Rs_Authorobj.close:set Rs_Authorobj=nothing
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_SmallPicPath}")>0 then
- if trim(f_obj("NewsSmallPicFile"))<>"" then
- s_Content = replace(s_Content,"{NS:FS_SmallPicPath}",""&f_obj("NewsSmallPicFile"))
- else
- s_Content = replace(s_Content,"{NS:FS_SmallPicPath}","")
- end if
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_PicPath}")>0 then
- if trim(f_obj("NewsPicFile"))<>"" then
- s_Content = replace(s_Content,"{NS:FS_PicPath}",""&f_obj("NewsPicFile"))
- else
- s_Content = replace(s_Content,"{NS:FS_PicPath}","http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/sys_images/nopic_supply.gif")
- end if
- end if
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_FormReview}")>0 then
- s_Content = replace(s_Content,"{NS:FS_FormReview}","<label id=""Review_TF_"& f_obj("ID") &""">loading...</label><script language=""JavaScript"" type=""text/javascript"" src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewTF.asp?Id="& f_obj("ID") &"&Type=NS""></script>")
- end If
- '_________________________________________________________________________________________________
- If InStr(s_Content,"{NS:FS_PrevPage}")>0 Then
- s_Content = replace(s_Content,"{NS:FS_PrevPage}","<label id=""PrevPage_"& f_obj("NewsId") &"""></label><script language=""JavaScript"" type=""text/javascript"" src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/Showpage.asp?Id="& f_obj("NewsId") &"&Type=NS&PageType=PrevPage""></script>")
- End If
- '_________________________________________________________________________________________________
- If InStr(s_Content,"{NS:FS_NextPage}")>0 Then
- s_Content = replace(s_Content,"{NS:FS_NextPage}","<label id=""NextPage_"& f_obj("NewsId") &"""></label><script language=""JavaScript"" type=""text/javascript"" src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/Showpage.asp?Id="& f_obj("NewsId") &"&Type=NS&PageType=NextPage""></script>")
- End If
- '_________________________________________________________________________________________________
- if instr(s_Content,"{NS:FS_ReviewTF}")>0 then
- if f_obj("isShowReview")=1 then
- s_Content = replace(s_Content,"{NS:FS_ReviewTF}","<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewUrl.asp?Type=ns&Id="&f_obj("ID")&""">评论</a>")
- else
- s_Content = replace(s_Content,"{NS:FS_ReviewTF}","")
- end if
- end if
- '_________________________________________________________________________________________________
- If InStr(s_Content,"{NS:FS_ReviewURL}")>0 Then
- if f_obj("isShowReview")=1 then
- s_Content = replace(s_Content,"{NS:FS_ReviewURL}","<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ShowReviewList.asp?type=NS&Id="&f_obj("ID")&""">评</a>")
- else
- s_Content = replace(s_Content,"{NS:FS_ReviewURL}","")
- end if
- End if
- '_________________________________________________________________________________________________
- If instr(s_Content,"{NS:FS_ShowComment}")>0 Then
- s_Content = replace(s_Content,"{NS:FS_ShowComment}","<label id=""NS_show_review_"& f_obj("ID") &""">评论加载中...</label><script language=""JavaScript"" type=""text/javascript"" src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ShowReview.asp?Id="&f_obj("ID")&"&Type=NS&SpanId=NS_show_review_"& f_obj("ID") &"""></script>")
- End If
- '_________________________________________________________________________________________________
- If instr(s_Content,"{NS:FS_AddFavorite}")>0 Then
- s_Content = replace(s_Content,"{NS:FS_AddFavorite}","<a href=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/User/AddFavor.asp?Id="&f_obj("ID")&"&Type=ns""><img src="""& m_PathDir &"sys_images/Favorite.gif"" border=""0"" alt=""加入收藏夹""></a>")
- End If
- '_________________________________________________________________________________________________
- If instr(s_Content,"{NS:FS_SendFriend}")>0 Then
- s_Content = replace(s_Content,"{NS:FS_SendFriend}","<a href=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &"/"&G_USER_DIR&"/Sendmail.asp?Id="&f_obj("NewsId")&"&Type=ns""><img src="""& m_PathDir &"sys_images/sendmail.gif"" border=""0"" alt=""发送给好友""></a>")
- End If
- '_________________________________________________________________________________________________
- If instr(s_Content,"{NS:FS_SpecialList}")>0 Then
- if trim(get_SpecialEName)<>"" then
- tmp_list = ""
- s_array = split(get_SpecialEName,",")
- for s_t_i = 0 to ubound(s_array)
- set s_m_Rs=Conn.execute("select SpecialID,SpecialCName,SpecialEName From FS_NS_Special where SpecialEName='"&trim(s_array(s_t_i))&"' order by SpecialID desc")
- if not s_m_Rs.eof then
- tmp_list = tmp_list &"<a href="""& s_m_Rs("SpecialEName") &""">" & s_m_Rs("SpecialCName") &"</a> "
- else
- tmp_list = tmp_list
- end if
- s_m_Rs.close:set s_m_Rs=nothing
- next
- tmp_list = tmp_list
- end if
- s_Content = replace(s_Content,"{NS:FS_SpecialList}",tmp_list)
- end if
- '获得栏目地址_______________________________________________________________________________________________
- s_f_classSql = "select ClassID,ClassName,ClassEName,[Domain],ClassNaviContent,ClassNaviPic,SavePath,FileSaveType,ClassKeywords,Classdescription,FileExtName from FS_NS_NewsClass where ClassId='"&f_obj("ClassId")&"' and ReycleTF=0 order by OrderID desc,id desc"
- If instr(s_Content,"{NS:FS_ClassURL}")>0 then
- class_path=get_ClassLink(f_obj("ClassId"))
- s_Content = replace(s_Content,"{NS:FS_ClassURL}",class_path)
- End If
- if instr(s_Content,"{NS:FS_ClassName}")>0 then
- set m_Rs_class = Conn.execute(s_f_classSql)
- s_Content = replace(s_Content,"{NS:FS_ClassName}",""&m_Rs_class("ClassName")&"")
- m_Rs_class.close:set m_Rs_class=nothing
- end if
- if instr(s_Content,"{NS:FS_ClassNaviPicURL}")>0 then
- set m_Rs_class = Conn.execute(s_f_classSql)
- if trim(m_Rs_class("ClassNaviPic"))<>"" then
- s_Content = replace(s_Content,"{NS:FS_ClassNaviPicURL}",""& m_Rs_class("ClassNaviPic") &"")
- else
- s_Content = replace(s_Content,"{NS:FS_ClassNaviPicURL}","")
- end if
- m_Rs_class.close:set m_Rs_class=nothing
- end if
- if instr(s_Content,"{NS:FS_ClassNaviDescript}")>0 then
- set m_Rs_class = Conn.execute(s_f_classSql)
- if trim(m_Rs_class("ClassNaviContent"))<>"" then
- s_Content = replace(s_Content,"{NS:FS_ClassNaviDescript}",""& m_Rs_class("ClassNaviContent") &"")
- else
- s_Content = replace(s_Content,"{NS:FS_ClassNaviDescript}","")
- end if
- m_Rs_class.close:set m_Rs_class=nothing
- end if
- if instr(s_Content,"{NS:FS_ClassNaviContent}")>0 then
- set m_Rs_class = Conn.execute(s_f_classSql)
- s_Content = replace(s_Content,"{NS:FS_ClassNaviContent}",""&m_Rs_class("ClassNaviContent"))
- m_Rs_class.close:set m_Rs_class=nothing
- end if
- if instr(s_Content,"{NS:FS_ClassKeywords}")>0 then
- set m_Rs_class = Conn.execute(s_f_classSql)
- s_Content = replace(s_Content,"{NS:FS_ClassKeywords}",""&m_Rs_class("ClassKeywords"))
- m_Rs_class.close:set m_Rs_class=nothing
- end if
- if instr(s_Content,"{NS:FS_Classdescription}")>0 then
- set m_Rs_class = Conn.execute(s_f_classSql)
- s_Content = replace(s_Content,"{NS:FS_Classdescription}",""&m_Rs_class("Classdescription"))
- m_Rs_class.close:set m_Rs_class=nothing
- end if
- '这里暂时用*代替
- '以下为通用专题使用##############################################################################
- Dim m_Rs_special,m_sp_sql,array_special,i_special,s_SpecialName,m_save_special,special_UrlDomain
- if instr(s_Content,"{NS:FS_SpecialName}")>0 then
- if trim(get_SpecialEName)<>"" then
- s_SpecialName = ""
- array_special = split(get_SpecialEName,",")
- for i_special = 0 to Ubound(array_special)
- m_sp_sql = "select SpecialID,SpecialCName,SpecialEName,SpecialContent,SavePath,ExtName,isLock,naviPic From FS_NS_Special where isLock=0 and SpecialEName='"&trim(array_special(i_special))&"'"
- set m_Rs_special=Conn.execute(m_sp_sql)
- if not m_Rs_special.eof then
- m_save_special = get_specialLink(m_Rs_special("m_Rs_special"))
- if i_special=ubound(array_special) then
- s_SpecialName = s_SpecialName & "<a href="""&m_save_special&""">" &m_Rs_special("SpecialCName")&"</a>"
- else
- s_SpecialName = s_SpecialName & "<a href="""&m_save_special&""">" &m_Rs_special("SpecialCName")&"</a> "
- end if
- else
- s_SpecialName = ""
- end if
- next
- s_Content = replace(s_Content,"{NS:FS_SpecialName}",s_SpecialName)
- else
- s_Content = replace(s_Content,"{NS:FS_SpecialName}","")
- end if
- end if
- 'if instr(s_Content,"{NS:FS_SpecialURL}")>0 then
- 'dim m_sp_sql,m_Rs_special
- 'm_sp_sql = "select SpecialID,SpecialCName,SpecialEName,SpecialContent,SavePath,ExtName,isLock,naviPic From FS_NS_Special where isLock=0 and SpecialEName='"&trim(array_special(i_special))&"'"
- 'set m_Rs_special=Conn.execute(m_sp_sql)
- s_Content = replace(s_Content,"{NS:FS_SpecialURL}","")
- 'end if
- s_Content = replace(s_Content,"{NS:FS_SpecialNaviPicURL}","")
- s_Content = replace(s_Content,"{NS:FS_SpecialNaviDescript}","")
- '以下是自定义字段替换
- if instr(s_Content,"{NS=Define|")>0 then
- dim define_rs_sql,define_rs
- define_rs_sql="select ID,TableEName,ColumnName,ColumnValue,InfoID,InfoType From FS_MF_DefineData where InfoType='NS' and InfoID='"&f_obj("NewsId")&"' order by ID desc"
- set define_rs=Conn.execute(define_rs_sql)
- if not define_rs.eof then
- do while not define_rs.eof
- s_Content = replace(s_Content,"{NS=Define|"&define_rs("TableEName")&"}",""&define_rs("ColumnValue"))
- define_rs.movenext
- loop
- define_rs.close:set define_rs=nothing
- else
- dim define_class_sql,define_class_rs
- define_class_sql="select D_Coul From FS_MF_DefineTable where D_SubType='NS' order by DefineID desc"
- set define_class_rs=Conn.execute(define_class_sql)
- if not define_class_rs.eof then
- do while not define_class_rs.eof
- s_Content = replace(s_Content,"{NS=Define|"&define_class_rs("D_Coul")&"}","")
- define_class_rs.movenext
- loop
- end if
- define_class_rs.close:set define_class_rs=nothing
- define_rs.close:set define_rs=nothing
- end if
- end if
- '释放对象
- Rs_ListObj.close:set Rs_ListObj=nothing
- else
- m_Err_Info = "NS警告:此新闻找不到样式,没生成"
- m_Err_No="NS:nostyle"
- s_Content=""
- Rs_ListObj.close:set Rs_ListObj=nothing
- end if
- else
- m_Err_Info = "NS警告:找不到此新闻"
- m_Err_No="NS:nodata"
- s_Content=""
- end if
- getlist_news = s_Content
- End Function
- '得到新闻单个地址____________________________________________________________
- Public Function get_NewsLink(f_id)
- get_NewsLink = ""
- dim rs,config_rs,config_mf_rs,class_rs
- dim SaveNewsPath,FileName,FileExtName,ClassId,LinkType,MF_Domain,Url_Domain,ClassEName,c_Domain,c_SavePath,IsDomain
- set rs = Conn.execute("select ID,IsURL,URLAddress,ClassId,NewsId,SaveNewsPath,FileName,FileExtName From FS_NS_News where NewsId='"&f_id&"'")
- SaveNewsPath = rs("SaveNewsPath")
- FileName = rs("FileName")
- FileExtName = rs("FileExtName")
- ClassId = rs("ClassId")
- LinkType = Request.Cookies("FoosunNSCookies")("FoosunNSLinkType")
- IsDomain = Request.Cookies("FoosunNSCookies")("FoosunNSDomain")
- MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
- set class_rs = Conn.execute("select ClassEName,IsURL,URLAddress,[Domain],SavePath From FS_NS_NewsClass where ClassId='"&ClassId&"'")
- if not class_rs.eof then
- ClassEName = class_rs("ClassEName")
- c_Domain = class_rs("Domain")
- c_SavePath = class_rs("SavePath")
- class_rs.close:set class_rs=nothing
- else
- ClassEName = ""
- class_rs.close:set class_rs=nothing
- end if
- if not rs.eof then
- if rs("IsURL")=0 then
- if LinkType = 1 then
- if trim(c_Domain)<>"" then
- Url_Domain = "http://"&c_Domain
- else
- if trim(IsDomain)<>"" then
- Url_Domain = "http://"&IsDomain
- else
- Url_Domain = "http://"&MF_Domain
- end if
- end if
- else
- if trim(c_Domain)<>"" then
- Url_Domain = "http://"&c_Domain
- else
- if trim(IsDomain)<>"" then
- Url_Domain = "http://"&IsDomain
- else
- Url_Domain = ""
- end if
- end if
- end if
- if trim(c_Domain)<>"" then
- get_NewsLink = Url_Domain & SaveNewsPath &"/"&FileName&"."&FileExtName
- else
- get_NewsLink = Url_Domain & c_SavePath& "/" & ClassEName &SaveNewsPath &"/"&FileName&"."&FileExtName
- end if
- else
- get_NewsLink = rs("URLAddress")
- end if
- rs.close:set rs=nothing
- else
- get_NewsLink = ""
- rs.close:set rs=nothing
- end if
- get_NewsLink = get_NewsLink
- End Function
- '得到栏目地址________________________________________________________________
- Public function get_ClassLink(f_id)
- dim IsDomain,LinkType,MF_Domain,c_rs,ClassEName,c_Domain,Url_Domain,ClassSaveType,class_savepath,FileExtName,c_SavePath
- LinkType = Request.Cookies("FoosunNSCookies")("FoosunNSLinkType")
- IsDomain = Request.Cookies("FoosunNSCookies")("FoosunNSDomain")
- MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
- set c_rs=conn.execute("select id,IsURL,UrlAddress,ClassId,ClassEName,[Domain],FileSaveType,FileExtName,SavePath From FS_NS_NewsClass where ClassId='"&f_id&"'")
- if not c_rs.eof then
- if c_rs("IsURL")=0 then
- ClassEName = c_rs("ClassEName")
- c_Domain = c_rs("Domain")
- FileExtName = c_rs("FileExtName")
- ClassSaveType = c_rs("FileSaveType")
- c_SavePath= c_rs("SavePath")
- if trim(c_Domain)<>"" then
- if ClassSaveType=0 then
- class_savepath = "Index."&FileExtName
- elseif ClassSaveType=1 then
- class_savepath =ClassEName &"."&FileExtName
- else
- class_savepath = ClassEName &"."&FileExtName
- end if
- else
- if ClassSaveType=0 then
- class_savepath = ClassEName&"/Index."&FileExtName
- elseif ClassSaveType=1 then
- class_savepath = ClassEName&"/"& ClassEName &"."&FileExtName
- else
- class_savepath = ClassEName &"."&FileExtName
- end if
- end if
- if LinkType = 1 then
- if trim(c_Domain)<>"" then
- Url_Domain = "http://"&c_Domain
- else
- if trim(IsDomain)<>"" then
- Url_Domain = "http://"&IsDomain
- else
- Url_Domain = "http://"&MF_Domain
- end if
- end if
- else
- if trim(c_Domain)<>"" then
- Url_Domain = "http://"&c_Domain
- else
- if trim(IsDomain)<>"" then
- Url_Domain = "http://"&IsDomain
- else
- Url_Domain = ""
- end if
- end if
- end if
- if trim(c_Domain)<>"" then
- get_ClassLink = Url_Domain&Replace("/"&class_savepath,"//","/")
- else
- get_ClassLink = Url_Domain&Replace(c_SavePath&"/"&class_savepath,"//","/")
- end if
- else
- get_ClassLink = c_rs("UrlAddress")
- end if
- c_rs.close:set c_rs=nothing
- else
- c_rs.close:set c_rs=nothing
- get_ClassLink = ""
- end if
- get_ClassLink = get_ClassLink
- End function
- '得到专题地址________________________________________________________________
- Public function get_specialLink(f_id)
- dim IsDomain,LinkType,MF_Domain,c_rs,SpecialEName,ExtName,c_SavePath,Url_Domain
- LinkType = Request.Cookies("FoosunNSCookies")("FoosunNSLinkType")
- IsDomain = Request.Cookies("FoosunNSCookies")("FoosunNSDomain")
- MF_Domain = Request.Cookies("FoosunMFCookies")("FoosunMFDomain")
- set c_rs=conn.execute("select SpecialID,SpecialCName,SpecialEName,SavePath,ExtName,isLock From FS_NS_Special where SpecialEName='"&f_id&"'")
- if not c_rs.eof then
- SpecialEName = c_rs("SpecialEName")
- ExtName = c_rs("ExtName")
- c_SavePath= c_rs("SavePath")
- if LinkType = 1 then
- if trim(IsDomain)<>"" then
- Url_Domain = "http://"&IsDomain
- else
- Url_Domain = "http://"&MF_Domain
- end if
- else
- if trim(IsDomain)<>"" then
- Url_Domain = "http://"&IsDomain
- else
- Url_Domain = ""
- end if
- end if
- get_specialLink = Url_Domain&c_SavePath&"/special_"&SpecialEName&"."&ExtName
- c_rs.close:set c_rs=nothing
- else
- c_rs.close:set c_rs=nothing
- get_specialLink = ""
- end if
- get_specialLink = get_specialLink
- End function
- '得到子类____________________________________________________________________
- Public Function get_ClassList(TypeID,CompatStr,f_css)
- Dim ChildTypeListRs,ChildTypeListStr,TempStr,i,Sql
- Set ChildTypeListRs = Server.CreateObject(G_FS_RS)
- Sql = "Select ParentID,ClassID,ClassName from FS_NS_NewsClass where ParentID='" & TypeID & "' and ReycleTF=0 order by OrderID desc,id desc"
- ChildTypeListRs.open sql,conn,1,1
- TempStr = CompatStr
- do while Not ChildTypeListRs.Eof
- get_ClassList = get_ClassList & TempStr
- get_ClassList = get_ClassList & "<img src="""&m_PathDir&"sys_images/-.gif"" border=""0""><a href="""&get_ClassLink(ChildTypeListRs("ClassId"))&""" class="""& f_css &""">"&ChildTypeListRs("ClassName")&"</a>"&vbNewLine
- get_ClassList = get_ClassList & get_ClassList(ChildTypeListRs("ClassID"),TempStr,f_css)
- ChildTypeListRs.MoveNext
- loop
- ChildTypeListRs.Close:Set ChildTypeListRs = Nothing
- End Function
- '得到option子类______________________________________________________________
- Public Function get_optionNewsList(TypeID,CompatStr)
- Dim ChildTypeListRs,ChildTypeListStr,TempStr
- Set ChildTypeListRs = Conn.execute("Select ParentID,ClassID,ClassName from FS_NS_NewsClass where ParentID='" & TypeID & "' and ReycleTF=0 order by OrderID desc,id desc")
- TempStr = CompatStr & "┉"
- do while Not ChildTypeListRs.Eof
- get_optionNewsList = get_optionNewsList &"<option value="""&ChildTypeListRs("ClassId")&""">"& TempStr
- get_optionNewsList = get_optionNewsList & "┉"&ChildTypeListRs("ClassName")&"</option>"&vbNewLine
- get_optionNewsList = get_optionNewsList & get_optionNewsList(ChildTypeListRs("ClassID"),TempStr)
- ChildTypeListRs.MoveNext
- loop
- ChildTypeListRs.Close:Set ChildTypeListRs = Nothing
- End Function
- Public Function getNewsSubClass(typeID)
- Dim childClassRs,result,Str_SubClassID
- result=""
- Set childClassRs=Conn.execute("Select ParentID,ClassID from FS_NS_NewsClass where ParentID='" & TypeID & "' and ReycleTF=0 order by OrderID desc,id desc")
- While Not childClassRs.eof
- If result="" Then
- result="'"&childClassRs("classID")&"'"
- Else
- result=result&",'"&childClassRs("classID")&"'"
- End If
- Str_SubClassID=getNewsSubClass(childClassRs("classID"))
- If Str_SubClassID<>"" Then
- result=result&","&Str_SubClassID
- End If
- childClassRs.movenext
- Wend
- childClassRs.close:Set childClassRs=nothing
- getNewsSubClass=result
- End function
- End Class
- %>