ME_Public.asp
资源名称:eat.rar [点击查看]
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:47k
源码类别:
数据库编程
开发平台:
ASP/ASPX
- <%
- Class cls_ME
- '风讯新闻刷新代码获得类,用于获得代码
- '方法: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(欢迎和您交流。^_^)
- '定义参数_____________________________________________________________________
- '获得参数_____________________________________________________________________
- Public Function get_LableChar(f_Lablechar,f_UserId)
- 'LogPage:Log_title
- if Request.Cookies("FoosunMECookies")("FoosunMELogDir") = "" then
- dim get_sysparam,blogs_dir
- set get_sysparam = User_Conn.execute("select top 1 Dir From FS_ME_iLogSysParam")
- if get_sysparam.eof then
- Response.Cookies("FoosunMECookies")("FoosunMELogDir") = "blog"
- get_sysparam.close:set get_sysparam = nothing
- else
- Response.Cookies("FoosunMECookies")("FoosunMELogDir") = get_sysparam(0)
- get_sysparam.close:set get_sysparam = nothing
- end if
- Response.Cookies("FoosunMECookies").Expires=Date()+1
- end if
- if split(f_Lablechar,":")(0)="LogPage" then
- get_LableChar = Log_Page(split(f_Lablechar,":")(1),f_UserId)
- else
- 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 "lastlog"
- if ubound(f_array)<>5 and ubound(f_array)<>11 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=LogList(f_Lablechar,"lastlog",f_UserId):end if
- case "toplog"
- if ubound(f_array)<>5 and ubound(f_array)<>11 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=LogList(f_Lablechar,"toplog",f_UserId):end if
- case "hotlog"
- if ubound(f_array)<>5 and ubound(f_array)<>11 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=LogList(f_Lablechar,"hotlog",f_UserId):end if
- case "classlist"
- if ubound(f_array)<>7 and ubound(f_array)<>13 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassList(f_Lablechar):end if
- case "topsubject"
- if ubound(f_array)<>5 and ubound(f_array)<>11 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=TopSubject(f_Lablechar,f_UserId):end if
- case "infoclass"
- if ubound(f_array)<>3 and ubound(f_array)<>9 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=InfoClass(f_Lablechar):end if
- case "photo_list"
- if ubound(f_array)<>14 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Photo_List(f_Lablechar,"photo_list"):end if
- case "showphoto"
- if ubound(f_array)<>4 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Photo_show(f_Lablechar,f_UserId):end if
- case "infolist"
- if ubound(f_array)<>5 and ubound(f_array)<>11 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=InfoList(f_Lablechar,"infolist",f_UserId):end if
- 'InfoList┆调用数量,标题字数$10,40┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_Table
- case "log_lastreview"
- if ubound(f_array)<>5 and ubound(f_array)<>11 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Log_LastReview(f_Lablechar,"log_lastreview",f_UserId):end if
- case "log_lastform"
- if ubound(f_array)<>3 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Log_LastForm(f_Lablechar,"log_lastform",f_UserId):end if
- case "log_publiclog"
- if ubound(f_array)<>3 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Log_PublicLog(f_Lablechar):end if
- case "log_search"
- if ubound(f_array)<>3 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Log_Search(f_Lablechar,f_id):end if
- case "log_navi"
- if ubound(f_array)<>3 and ubound(f_array)<>9 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Log_Navi(f_Lablechar):end if
- case "log_pagetitle"
- if ubound(f_array)<>3 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Log_PageTitle(f_Lablechar,f_id):end if
- case "log_title"
- if ubound(f_array)<>3 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Log_title(f_Lablechar,f_id):end if
- end select
- end if
- 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_&chr(10)
- table_str_list_head = table_str_list_head &" "& tr_&chr(10)
- else
- table_="<table border=""0"" cellspacing=""0"" cellpadding=""3"" width=""100%"">"
- table_str_list_head = table_&chr(10)
- 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__&chr(10)
- 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__&chr(10)
- else
- table__="</table>"
- table_str_list_bottom = ""
- end if
- table_str_list_bottom = table_str_list_bottom &table__&chr(10)
- End Function
- 'DIV输出结束_________________________________________________________________
- '最新日志____________________________________________________________________
- Public Function LogList(f_Lablechar,f_type,f_UserId)
- 'LastLog┆调用数量,标题字数$10,40┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_Table
- 'LastLog┆调用数量,标题字数$10,40┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_DIV"
- dim TitleNumber,TitleNumberChar,leftTitleNumber,datetf,dateType,TitleCss,div_tf,TitleCssstr,table_array,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2
- dim sql_char,f_sql,rs,inSQL_Search,LastLogstr,DateChar
- TitleNumber = split(split(f_Lablechar,"┆")(1),"$")(1)
- TitleNumberChar = split(TitleNumber,",")(0)
- leftTitleNumber = split(TitleNumber,",")(1)
- table_array=split(f_Lablechar,"┆")
- if trim(leftTitleNumber)<>"" and isnumeric(leftTitleNumber) then
- leftTitleNumber = leftTitleNumber
- else
- leftTitleNumber = 40
- end if
- if trim(TitleNumberChar)<>"" and isnumeric(TitleNumberChar) then
- TitleNumberChar = TitleNumberChar
- else
- TitleNumberChar = 10
- end if
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf = 1
- TitleCssstr = ""
- datetf= split(split(f_Lablechar,"┆")(9),"$")(1)
- dateType = split(split(f_Lablechar,"┆")(10),"$")(1)
- classNews_head = table_str_list_head(div_tf,split(table_array(2),"$")(1),split(table_array(3),"$")(1),split(table_array(4),"$")(1),split(table_array(5),"$")(1))
- classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(6),"$")(1),split(table_array(7),"$")(1))
- else
- div_tf=0
- TitleCss = split(split(f_Lablechar,"┆")(2),"$")(1)
- if trim(TitleCss)<>"" then
- TitleCssstr = " class="""& TitleCss &""""
- else
- TitleCssstr = ""
- end if
- datetf= split(split(f_Lablechar,"┆")(3),"$")(1)
- dateType = split(split(f_Lablechar,"┆")(4),"$")(1)
- end if
- if trim(f_UserId)<>"" then
- inSQL_Search = " and UserNumber='"& f_UserId &"'"
- else
- inSQL_Search = ""
- end if
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle2 = table_str_list_middle_2(div_tf)
- if f_type="lastlog" then
- sql_char = " order by iLogID desc"
- elseif f_type="toplog" then
- sql_char = " order by hits desc,iLogID Desc"
- elseif f_type="hotlog" then
- sql_char = " order by istop desc,hits desc,iLogID Desc"
- end if
- f_sql="select top "& TitleNumberChar &" iLogID,iLogStyle,Title,UserNumber,addtime from FS_ME_Infoilog where islock=0 and isDraft=0 and adminLock=0 "& inSQL_Search &" "&sql_char&""
- set rs = User_Conn.execute(f_sql)
- if rs.eof then
- LastLogstr = ""
- rs.close:Set rs =nothing
- else
- do while not rs.eof
- if datetf="1" then
- DateChar = get_DateChar(dateType,rs("AddTime"))
- else
- DateChar = ""
- end if
- if div_tf=0 then
- dim s_paths
- s_paths = replace("/"&G_VIRTUAL_ROOT_DIR&"sys_images/log/dot1.jpg","//","/")
- LastLogstr = LastLogstr & " <img src="""& s_paths &""" border=""0""><a href="""& Get_LogLink(rs("iLogID"))&""""&TitleCssstr&">"&GotTopic(rs("Title"),leftTitleNumber)&"</a>"&DateChar&"<br />"&chr(10)
- else
- LastLogstr = LastLogstr & classNews_middle1& "<a href="""& Get_LogLink(rs("iLogID"))&""">"&GotTopic(rs("Title"),leftTitleNumber)&"</a>"&DateChar&""&classNews_middle2
- end if
- rs.movenext
- loop
- rs.close:Set rs =nothing
- end if
- if div_tf=1 then
- LastLogstr = classNews_head & LastLogstr & classNews_bottom
- end if
- LogList = LastLogstr
- End Function
- '得到分类日志列表
- Public Function ClassList(f_Lablechar)
- 'ClassList┆调用数量$10┆ClassId$1┆标题字数$40┆标题CSS$css┆显示日期$0┆日期格式$MM月DD日┆输出格式$out_Table","")
- 'ClassList┆调用数量$10┆ClassId$1┆标题字数$40┆标题CSS$┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆显示日期$0┆日期格式$MM月DD日┆输出格式$out_DIV","")
- dim ClassId,TitleNumber,lefttile,CSS,div_tf,TitleCssstr,datetf,dateType,table_array,classNews_head,classNews_middle1,classNews_bottom,classNews_middle2
- dim f_sql,rs,DateChar
- ClassID = split(split(f_Lablechar,"┆")(2),"$")(1)
- if trim(ClassID)<>"" then
- TitleNumber = split(split(f_Lablechar,"┆")(1),"$")(1)
- if trim(TitleNumber)<>"" and isnumeric(TitleNumber) then
- TitleNumber = TitleNumber
- else
- TitleNumber = 10
- end if
- lefttile = split(split(f_Lablechar,"┆")(3),"$")(1)
- if trim(lefttile)<>"" and isnumeric(lefttile) then
- lefttile = lefttile
- else
- lefttile = 40
- end if
- CSS = split(split(f_Lablechar,"┆")(4),"$")(1)
- table_array=split(f_Lablechar,"┆")
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf = 1
- TitleCssstr = ""
- datetf= split(split(f_Lablechar,"┆")(11),"$")(1)
- dateType = split(split(f_Lablechar,"┆")(12),"$")(1)
- 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))
- else
- div_tf=0
- if trim(CSS)<>"" then
- TitleCssstr = " class="""& CSS &""""
- else
- TitleCssstr = ""
- end if
- datetf= split(split(f_Lablechar,"┆")(5),"$")(1)
- dateType = split(split(f_Lablechar,"┆")(6),"$")(1)
- end if
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle2 = table_str_list_middle_2(div_tf)
- f_sql="select top "& TitleNumber &" iLogID,MainID,iLogStyle,Title,UserNumber,addtime from FS_ME_Infoilog where islock=0 and isDraft=0 and adminLock=0 and MainID="&ClassId&" order by iLogID desc"
- set rs = User_Conn.execute(f_Sql)
- ClassList = ""
- if rs.eof then
- ClassList = ""
- rs.close:set rs = nothing
- else
- do while Not rs.eof
- if datetf="1" then
- DateChar = get_DateChar(dateType,rs("AddTime"))
- else
- DateChar = ""
- end if
- if div_tf=0 then
- dim s_paths
- s_paths = replace("/"&G_VIRTUAL_ROOT_DIR&"sys_images/log/dot1.jpg","//","/")
- ClassList = ClassList & " <img src="""& s_paths &""" border=""0""><a href="""& Get_LogLink(rs("iLogID"))&""""&TitleCssstr&">"&GotTopic(rs("Title"),lefttile)&"</a><a href="""&get_AuthorLink(rs("UserNumber"))&""" target=""_blank"">("&get_UserNameLink(rs("UserNumber"))&")</a>"&DateChar&"<br />"&chr(10)
- else
- ClassList = ClassList & classNews_middle1& "<a href=""http://"& Request.Cookies("FoosunMFCookies")("FoosunMFDomain") &Get_LogLink(rs("iLogID"))&""">"&GotTopic(rs("Title"),lefttile)&"</a><a href="""&get_AuthorLink(rs("UserNumber"))&""" target=""_blank"">("&get_UserNameLink(rs("UserNumber"))&")</a>"&DateChar&""&classNews_middle2
- end if
- rs.movenext
- loop
- rs.close:set rs = nothing
- end if
- if div_tf=1 then
- ClassList = classNews_head & ClassList & classNews_bottom
- end if
- ClassList = ClassList
- else
- ClassList = "错误的标签"
- end if
- end Function
- '专题
- Public Function TopSubject(f_Lablechar,f_UserId)
- 'TopSubject┆调用数量,标题字数$10,40┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_Table
- 'TopSubject┆调用数量,标题字数$10,40┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_DIV
- if f_UserId="" then
- TopSubject = ""
- else
- dim TitleNumber,leftTitle,table_array,TitleCssstr,CSS,datetf,dateType,classNews_head,classNews_middle1,classNews_bottom,classNews_middle2
- dim f_sql,rs,div_tf
- TitleNumber = split(split(split(f_Lablechar,"┆")(1),"$")(1),",")(0)
- leftTitle = split(split(split(f_Lablechar,"┆")(1),"$")(1),",")(1)
- if leftTitle <> "" then
- leftTitle = leftTitle
- else
- leftTitle = 30
- end if
- table_array=split(f_Lablechar,"┆")
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf = 1
- TitleCssstr = ""
- datetf= split(split(f_Lablechar,"┆")(9),"$")(1)
- dateType = split(split(f_Lablechar,"┆")(10),"$")(1)
- classNews_head = table_str_list_head(div_tf,split(table_array(2),"$")(1),split(table_array(3),"$")(1),split(table_array(4),"$")(1),split(table_array(5),"$")(1))
- classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(6),"$")(1),split(table_array(7),"$")(1))
- else
- div_tf=0
- CSS=split(split(f_Lablechar,"┆")(2),"$")(1)
- if trim(CSS)<>"" then
- TitleCssstr = " class="""& CSS &""""
- else
- TitleCssstr = ""
- end if
- datetf= split(split(f_Lablechar,"┆")(3),"$")(1)
- dateType = split(split(f_Lablechar,"┆")(4),"$")(1)
- end if
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle2 = table_str_list_middle_2(div_tf)
- f_sql = "select top "& TitleNumber &" ClassCName,ClassEName,ClassID,UserNumber from FS_ME_InfoClass where ClassTypes=7 and UserNumber='"& f_UserId &"'"
- set rs = User_Conn.execute(f_sql)
- TopSubject = ""
- if rs.eof then
- TopSubject = ""
- rs.close:set rs=nothing
- else
- do while not rs.eof
- if div_tf = 0 then
- TopSubject = TopSubject & "·<a href="""& get_subjectLink(rs("UserNumber"),rs("ClassEName"))&""""&TitleCssstr&">"& GotTopic(rs("ClassCName"),leftTitle)&"</a><br />"
- else
- TopSubject = TopSubject & classNews_middle1 & "<a href="""& get_subjectLink(rs("UserNumber"),rs("ClassEName"))&""">"& GotTopic(rs("ClassCName"),leftTitle)&"</a>"&classNews_middle2
- end if
- rs.movenext
- loop
- rs.close:set rs=nothing
- end if
- end if
- if div_tf=1 then
- TopSubject = classNews_head & TopSubject & classNews_bottom
- end if
- TopSubject = TopSubject
- End Function
- '总分类
- Public Function InfoClass(f_Lablechar)
- '"InfoClass┆CSS$┆显示日期$1┆输出格式$out_Table","")
- ''InfoClass┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆显示日期$1┆输出格式$out_DIV","")
- Dim table_array,div_tf,css,classNews_head,classNews_middle1,classNews_bottom,classNews_middle2
- dim f_sql,rs,sys_rs_obj,f_dir1
- table_array=split(f_Lablechar,"┆")
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf = 1
- css= split(split(f_Lablechar,"┆")(1),"$")(1)
- classNews_head = table_str_list_head(div_tf,split(table_array(1),"$")(1),split(table_array(2),"$")(1),split(table_array(3),"$")(1),split(table_array(4),"$")(1))
- classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(5),"$")(1),split(table_array(6),"$")(1))
- else
- div_tf = 0
- css= split(split(f_Lablechar,"┆")(1),"$")(1)
- if css<>"" then
- css = " class="""&css&""""
- else
- css = ""
- end if
- end if
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle2 = table_str_list_middle_2(div_tf)
- f_sql = "select id,ClassName from FS_ME_iLogClass order by id asc"
- set rs = User_Conn.execute(f_sql)
- InfoClass = ""
- if rs.eof then
- InfoClass = ""
- rs.close:set rs = nothing
- else
- do while not rs.eof
- if div_tf = 0 then
- InfoClass = InfoClass & "<a href="""&Replace("/"&G_VIRTUAL_ROOT_DIR&"/","//","/")& Request.Cookies("FoosunMECookies") &"/ListClass.asp?id="& rs("id") &""""&css&">"&rs("ClassName")&"</a> "
- else
- InfoClass = InfoClass & "<a href="""&Replace("/"&G_VIRTUAL_ROOT_DIR&"/","//","/")& Request.Cookies("FoosunMECookies") &"/ListClass.asp?id="& rs("id") &""">"&rs("ClassName")&"</a> "
- end if
- rs.movenext
- loop
- if div_tf = 1 then
- InfoClass = classNews_head & classNews_middle1 & InfoClass & classNews_middle2 & classNews_bottom
- end if
- rs.close:set rs = nothing
- end if
- InfoClass = InfoClass
- End Function
- '日志终极分类
- Public Function InfoList(f_Lablechar,f_type,f_UserId)
- 'InfoList┆调用数量,标题字数$10,40┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_Table
- 'InfoList┆调用数量,标题字数$10,40┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_DIV
- Dim CodeTitle,CodeTitlestr,TitleNumber,div_tf,titleCSS,DateTF,DateStyle,DivId,DivClass,Ulid,ulclass,liid,liclass
- Dim f_sql,rs,i,ReviewCountstr
- CodeTitle = split(split(f_Lablechar,"┆")(1),"$")(1)
- if split(CodeTitle,",")(0) = "" and isnumeric(split(CodeTitle,",")(0))=false then
- CodeTitlestr = 10
- else
- CodeTitlestr = split(CodeTitle,",")(0)
- end if
- if split(CodeTitle,",")(1) = "" and isnumeric(split(CodeTitle,",")(1))=false then
- TitleNumber = 40
- else
- TitleNumber = split(CodeTitle,",")(1)
- end if
- if instr(f_Lablechar,"out_Table")>0 then
- div_tf = 0
- titleCSS = split(split(f_Lablechar,"┆")(2),"$")(1)
- DateTF = split(split(f_Lablechar,"┆")(3),"$")(1)
- DateStyle = split(split(f_Lablechar,"┆")(4),"$")(1)
- else
- div_tf = 1
- DivId = split(split(f_Lablechar,"┆")(2),"$")(1)
- DivClass = split(split(f_Lablechar,"┆")(3),"$")(1)
- Ulid = split(split(f_Lablechar,"┆")(4),"$")(1)
- ulclass = split(split(f_Lablechar,"┆")(5),"$")(1)
- liid = split(split(f_Lablechar,"┆")(6),"$")(1)
- liclass = split(split(f_Lablechar,"┆")(7),"$")(1)
- titleCSS = split(split(f_Lablechar,"┆")(8),"$")(1)
- DateTF = split(split(f_Lablechar,"┆")(9),"$")(1)
- DateStyle = split(split(f_Lablechar,"┆")(10),"$")(1)
- if DivId<>"" then
- DivId = " id="""&DivId&""""
- else
- DivId = ""
- end if
- if DivClass<>"" then
- DivClass = " class="""&DivClass&""""
- else
- DivClass = ""
- end if
- end if
- if titleCSS<>"" then
- titleCSS = " class="""&titleCSS&""""
- else
- titleCSS = ""
- end if
- f_sql = "select iLogID,iLogStyle,Title,KeyWords,Content,UserNumber,ClassID,Hits,savePath,FileName,FileExtName,AddTime From FS_ME_Infoilog where isDraft=0 and adminLock=0 and UserNumber = '"& f_UserId &"' order by isTop desc,isTF desc,iLogID"
- set rs = User_Conn.execute(f_sql)
- InfoList = ""
- if rs.eof then
- InfoList = ""
- rs.close:set rs = nothing
- else
- i = 0
- do while not rs.eof
- if div_tf = 1 then
- InfoList = InfoList & "<a name=""top"" id=""top""></a>"&chr(10)&"<div"&DivId&DivClass&">"
- end if
- dim rs_review
- set rs_review = User_Conn.execute("select Count("&rs("iLogId")&") from FS_ME_Review where InfoID = "& rs("iLogId")&" and ReviewTypes=5 and AdminLock=0 and isLock=0")
- if rs_review.eof then
- ReviewCountstr = 0
- rs_review.close:set rs_review= nothing
- else
- ReviewCountstr = rs_review(0)
- rs_review.close:set rs_review= nothing
- end if
- dim date_tmp
- if DateTF="1" then
- date_tmp = get_DateChar(DateStyle,rs("AddTime")) &"┆"
- else
- date_tmp = ""
- end if
- InfoList = InfoList & "<h4><a href="""& Get_LogLink(rs("iLogID")) &""""&titleCSS&"><font style=""font-size:14px"">"&GotTopic(""&rs("Title"),TitleNumber)&"</a></font></h4>"&chr(10)
- InfoList = InfoList & ""&GetCStrLen(""&rs("Content"),800)&"...<br /><br />"&chr(10)
- if trim(replace(rs("KeyWords"),",",""))<>"" then
- dim o_i
- InfoList = InfoList & "<font style=""font-size:14px"">Tags: "
- for o_i = LBound(split(rs("KeyWords"),",")) to UBound(split(rs("KeyWords"),","))
- InfoList = InfoList & "<a href="""&replace("/"& G_VIRTUAL_ROOT_DIR&"/","//","/")&"Tags.asp?Tags="&split(rs("KeyWords"),",")(o_i)&""">"&split(rs("KeyWords"),",")(o_i)&"</a> "
- next
- InfoList = InfoList & "</font><br /><br />"
- end if
- InfoList = InfoList & "日期:<img src="""& replace("/"& G_VIRTUAL_ROOT_DIR&"/","//","/")&"sys_images/post_yellow.gif"" border=""0"" /> "& date_tmp &"<a href="""& Get_LogLink(rs("iLogID")) &""">阅读全文</a>┆发布:<a href="""& replace("/"& G_VIRTUAL_ROOT_DIR&"/","//","/")& G_USER_DIR &"/ShowUser.asp?UserNumber="&rs("UserNumber")&""" target=""_blank"">"&get_UserNameLink(rs("UserNumber"))&"</a>┆分类:<a href=""../LogClass.asp?Type=Log&ClassId="& rs("ClassID") &""">"&get_UserClassName(rs("ClassID"))&"</a>┆浏览:"&rs("hits")&"┆评论:"&ReviewCountstr&"┆<a href=""#"">↑TOP</a><br />"&chr(10)
- if div_tf = 1 then
- InfoList = InfoList & "</div>"
- end if
- rs.movenext
- i = i + 1
- if i mod CodeTitlestr =0 then
- if rs.recordcount <> i then
- InfoList = InfoList &"{Foosun_Page_news}{/Foosun_Page_news}"
- end if
- end if
- loop
- rs.close:set rs = nothing
- end if
- InfoList = InfoList & "{Foosun_Page_news}{/Foosun_Page_news}"
- End Function
- '最新评论
- Public Function Log_LastReview(f_Lablechar,f_type,f_UserId)
- 'Log_LastReview┆调用数量,标题字数$10,40┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_Table
- 'Log_LastReview┆调用数量,标题字数$10,40┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_DIV
- dim CodeNumber,TitleNumber,lefttitle,div_tf,CSS,DateTF,DateType
- dim rs
- CodeNumber = split(split(f_Lablechar,"┆")(1),"$")(1)
- TitleNumber = split(CodeNumber,",")(0)
- if TitleNumber="" or isnumeric(TitleNumber)=false then
- TitleNumber = 10
- else
- TitleNumber = TitleNumber
- end if
- lefttitle = split(CodeNumber,",")(1)
- if lefttitle="" or isnumeric(lefttitle)=false then
- lefttitle = 40
- else
- lefttitle = lefttitle
- end if
- if instr(f_Lablechar,"out_Table")>0 then
- div_tf = 0
- CSS = split(split(f_Lablechar,"┆")(2),"$")(1)
- DateTF = split(split(f_Lablechar,"┆")(3),"$")(1)
- DateType = split(split(f_Lablechar,"┆")(4),"$")(1)
- else
- div_tf = 1
- CSS = split(split(f_Lablechar,"┆")(8),"$")(1)
- DateTF = split(split(f_Lablechar,"┆")(9),"$")(1)
- DateType = split(split(f_Lablechar,"┆")(10),"$")(1)
- DivId = split(split(f_Lablechar,"┆")(2),"$")(1)
- if DivId = "" then
- DivId = ""
- else
- DivId = " id="""&DivId&""""
- end if
- DivClass = split(split(f_Lablechar,"┆")(3),"$")(1)
- if DivClass = "" then
- DivClass = ""
- else
- DivClass = " class="""&DivClass&""""
- end if
- Ulid = split(split(f_Lablechar,"┆")(4),"$")(1)
- if Ulid = "" then
- Ulid = ""
- else
- Ulid = " id="""&Ulid&""""
- end if
- ulclass = split(split(f_Lablechar,"┆")(5),"$")(1)
- if ulclass = "" then
- ulclass = ""
- else
- ulclass = " class="""&ulclass&""""
- end if
- liid = split(split(f_Lablechar,"┆")(6),"$")(1)
- if liid = "" then
- liid = ""
- else
- liid = " id="""&liid&""""
- end if
- liclass = split(split(f_Lablechar,"┆")(7),"$")(1)
- if liclass = "" then
- liclass = ""
- else
- liclass = " class="""&liclass&""""
- end if
- end if
- if CSS="" then
- CSS = ""
- else
- CSS = " class="""& CSS &""""
- end if
- set rs = User_Conn.execute("select top "& TitleNumber &" ReviewID,InfoID,UserNumber,ReviewTypes,Title,Content,AddTime From FS_ME_Review where infoId="&f_UserId&" and AdminLock=0 and isLock=0 order by ReviewID desc")
- Log_LastReview = ""
- if rs.eof then
- Log_LastReview = "没有评论"
- rs.close:set rs = nothing
- else
- if div_tf = 1 then
- Log_LastReview = Log_LastReview & "<div"&DivId&DivClass&"><ul"&Ulid&ulclass&">"&chr(10)
- end if
- do while not rs.eof
- dim date_tmp
- if DateTF="1" then
- date_tmp = get_DateChar(DateType,rs("AddTime"))
- else
- date_tmp = ""
- end if
- if div_tf = 1 then
- Log_LastReview = Log_LastReview & " <li"&liid&liclass&">"&GotTopic(""&rs("Title"),lefttitle)&" <a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&G_USER_DIR&"/ShowUser.asp?UserNumber="& rs("UserNumber")&""" target=""_blank"">"&get_UserNameLink(rs("UserNumber"))&"</a><font style=""font-size:11px""> "&date_tmp&"</font></li>"&chr(10)
- else
- Log_LastReview = Log_LastReview & "<span"&CSS&">·"&GotTopic(""&rs("Title"),lefttitle)&" <a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&G_USER_DIR&"/ShowUser.asp?UserNumber="& rs("UserNumber")&""" target=""_blank"">"&get_UserNameLink(rs("UserNumber"))&"</a><font style=""font-size:11px""> "&date_tmp&"</font></span><br />"
- end if
- rs.movenext
- loop
- rs.close:set rs = nothing
- end if
- if div_tf = 1 then
- Log_LastReview = Log_LastReview & chr(10) &"</ul></div><br /><div align=""right""><a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewUrl.asp?Id="&f_UserId&"&Type=Log"" target=""_blank"">更多...</a></div>"
- else
- Log_LastReview = Log_LastReview &"<div align=""right""><a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewUrl.asp?Id="&f_UserId&"&Type=Log"" target=""_blank"">更多...</a></div>"
- end if
- End Function
- '评论表单
- Public Function Log_LastForm(f_Lablechar,f_type,f_UserId)
- 'Log_LastForm┆CSS$┆显示日期$1┆}-->
- dim FormReview
- FormReview=" <form action=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewUrl.asp"" name=""reviewform"" method=""post"" onsubmit=""//return checkreview();""/>"&chr(10)
- FormReview=FormReview&" 用户名<input name=""UserNumber"" type=""text"" id=""UserNumber"" size=""15""/>"&chr(10)
- FormReview=FormReview&" 匿名<input name=""noname"" type=""checkbox"" id=""noname"" value=""1""/>"&chr(10)
- FormReview=FormReview&" 密码<input name=""password"" type=""password"" id=""password"" size=""12""/><input type=""hidden"" name=""newsid"" value="""&f_UserId&"""/><input type=""hidden"" name=""Action"" value=""add_save""/><br />"&chr(10)
- FormReview=FormReview&" 标 题<input name=""title"" type=""text"" id=""title"" size=""30""/><input type=""hidden"" name=""type"" value=""Log""/><br />"&chr(10)
- FormReview=FormReview&" <textarea name=""content"" cols=""50"" rows=""5"" id=""content""/></textarea><br />"&chr(10)
- FormReview=FormReview&" <input type=""submit"" name=""Submit"" value=""发表评论""/> <input type=""reset"" name=""Submit2"" value=""重新填写""/>"&chr(10)
- FormReview=FormReview&" </form>"&chr(10)
- Log_LastForm = FormReview
- End Function
- '发表日志接口
- Public Function Log_PublicLog(f_Lablechar)
- Log_PublicLog = "<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&G_USER_DIR&"/i_Blog/PublicLog.asp"" target=""_blank""><img src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/sys_images/Pub_log.gif"" border=""0"" alt=""发布日志""></a>"
- End Function
- '搜索
- Public Function Log_Search(f_Lablechar,f_id)
- 'Log_Search┆CSS$┆显示日期$1┆
- Log_Search = "<form action=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/Log_Search.asp"" name=""Log_Form"" method=""post"" id=""Log_Form""><input name=""keywords"" value="""" type=""text"" size=""12""><input name=""id"" value="""&f_id&""" type=""hidden"" size=""12""> <input name=""sumbit"" type=""submit"" value=""搜索""></form>"
- End Function
- '总站日志导航
- Public Function Log_Navi(f_Lablechar)
- 'Log_Navi┆CSS$┆显示日期$1┆输出格式$out_Table}-->
- 'Log_Navi┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆显示日期$1┆输出格式$out_DIV}-->
- dim div_tf,CSS,DivId,DivClass,Ulid,ulclass,liid,liclass
- dim rs
- if instr(f_Lablechar,"out_Table")>0 then
- div_tf = 0
- CSS = split(split(f_Lablechar,"┆")(1),"$")(1)
- else
- div_tf = 1
- CSS = split(split(f_Lablechar,"┆")(7),"$")(1)
- DivId = split(split(f_Lablechar,"┆")(2),"$")(1)
- if DivId = "" then:DivId = "":else:DivId = " id="""&DivId&"""":end if
- DivClass = split(split(f_Lablechar,"┆")(3),"$")(1)
- if DivClass = "" then:DivClass = "":else:DivClass = " class="""&DivClass&"""":end if
- Ulid = split(split(f_Lablechar,"┆")(4),"$")(1)
- if Ulid = "" then:Ulid = "":else:Ulid = " id="""&Ulid&"""":end if
- ulclass = split(split(f_Lablechar,"┆")(5),"$")(1)
- if ulclass = "" then:ulclass = "":else:ulclass = " class="""&ulclass&"""":end if
- liid = split(split(f_Lablechar,"┆")(6),"$")(1)
- if liid = "" then:liid = "":else:liid = " id="""&liid&"""":end if
- liclass = split(split(f_Lablechar,"┆")(7),"$")(1)
- if liclass = "" then:liclass = "":else:liclass = " class="""&liclass&"""":end if
- end if
- if CSS="" then:CSS = "":else:CSS = " class="""& CSS &"""":end if
- set rs = User_Conn.execute("select id,ClassName From FS_ME_iLogClass order by id desc")
- Log_Navi = ""
- if rs.eof then
- Log_Navi = "没系统分类"
- rs.close:set rs =nothing
- else
- if div_tf = 1 then
- Log_Navi = Log_Navi & "<div"&DivId&DivClass&">"&chr(10)&" <ul"&Ulid&ulclass&">"&chr(10)
- end if
- do while not rs.eof
- if div_tf = 1 then
- Log_Navi = Log_Navi & " <li"&liid&liclass&"><a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&Request.Cookies("FoosunMECookies")("FoosunMELogDir")&"/syslist.asp?id="&rs("id")&""">"&rs("ClassName")&"</a></li>"&chr(10)
- else
- Log_Navi = Log_Navi & " <span"&CSS&"><a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&Request.Cookies("FoosunMECookies")("FoosunMELogDir")&"/syslist.asp?id="&rs("id")&""">"&rs("ClassName")&"</a></span> "
- end if
- rs.movenext
- loop
- rs.close:set rs =nothing
- end if
- if div_tf = 1 then
- Log_Navi = Log_Navi &chr(10)&" <ul>"&chr(10)&"</div>"
- end if
- Log_Navi = Log_Navi
- End Function
- '页面标题
- Public Function Log_PageTitle(f_Lablechar,f_id)
- 'Log_PageTitle┆CSS$┆显示日期$1┆
- dim rs
- set rs = User_Conn.execute("select top 1 siteName From FS_ME_InfoiLogParam")
- if rs.eof then
- Log_PageTitle = rs(0)
- rs.close:set rs = nothing
- else
- Log_PageTitle = ""
- rs.close:set rs = nothing
- end if
- End Function
- '日志标题
- Public Function Log_Page(f_Lablechar,f_id)
- dim rs
- set rs =User_Conn.execute("select * From FS_ME_Infoilog where iLogID="&f_id)
- if rs.eof then
- Log_Page = ""
- rs.close:set rs = nothing
- else
- if instr(f_Lablechar,"Log_title")>0 then
- Log_Page = replace(f_Lablechar,"Log_title",""&rs("title"))
- end if
- if instr(f_Lablechar,"Log_Content")>0 then
- Log_Page = replace(f_Lablechar,"Log_Content",""&rs("Content"))
- end if
- if instr(f_Lablechar,"Log_Author")>0 then
- Log_Page = replace(f_Lablechar,"Log_Author","<a href=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ShowUser.asp?UserNumber="&rs("UserNumber")&""" target=""_blank"">"&get_UserNameLink(rs("UserNumber"))&"</a>")
- end if
- if instr(f_Lablechar,"Log_hits")>0 then
- Dim hits_str
- hits_str = "<script language=""JavaScript"" src=""http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/Click.asp?type=ajax&Subsys=Log&spanid=Log_id_click_"&rs("iLogID")&"""></script>"&chr(10)
- Log_Page = replace(f_Lablechar,"Log_hits",hits_str&"<span id=""Log_id_click_"&rs("iLogID")&""">loading...</span>")
- end if
- if instr(f_Lablechar,"Log_keywords")>0 then
- dim i
- if instr(rs("keywords"),",")>0 then
- for i = 0 to Ubound(split(rs("keywords"),","))
- if trim(split(rs("keywords"),",")(i))<>"" then
- Log_Page = Log_Page & replace(f_Lablechar,"Log_keywords","<a href=""http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/tags.asp?tags="& split(rs("keywords"),",")(i)&""" target=""_blank"">"&split(rs("keywords"),",")(i)&"</a> ")
- else
- Log_Page = ""
- end if
- next
- end if
- end if
- if instr(f_Lablechar,"Log_AddTime")>0 then
- Log_Page = replace(f_Lablechar,"Log_AddTime",""&rs("AddTime"))
- end if
- if instr(f_Lablechar,"Log_AddTime")>0 then
- Log_Page = replace(f_Lablechar,"Log_AddTime",""&rs("AddTime"))
- end if
- if instr(f_Lablechar,"Log_LogType")>0 then
- Log_Page = replace(f_Lablechar,"Log_LogType","主分类:<a href=""http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"& Request.Cookies("FoosunMECookies")("FoosunMELogDir") &"/sysClass.asp?Type=Log&ClassId="& rs("MainID") &""">"&get_UsersysClassName(rs("MainID"))&"</a>,个人分类:<a href=""http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"& Request.Cookies("FoosunMECookies")("FoosunMELogDir") &"/LogClass.asp?Type=Log&ClassId="& rs("ClassID") &""">"&get_UserClassName(rs("ClassID"))&"</a>")
- end if
- if instr(f_Lablechar,"Log_LogType")>0 then
- Log_Page = replace(f_Lablechar,"Log_LogType","主分类:<a href=""http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"& Request.Cookies("FoosunMECookies")("FoosunMELogDir") &"/sysClass.asp?Type=Log&ClassId="& rs("MainID") &""">"&get_UsersysClassName(rs("MainID"))&"</a>,个人分类:<a href=""http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"& Request.Cookies("FoosunMECookies")("FoosunMELogDir") &"/LogClass.asp?Type=Log&ClassId="& rs("ClassID") &""">"&get_UserClassName(rs("ClassID"))&"</a>")
- end if
- if instr(f_Lablechar,"Log_ReviewList")>0 then
- Log_Page = replace(f_Lablechar,"Log_ReviewList","<script language=""JavaScript"" type=""text/javascript"" src=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ShowReview.asp?Id="&RS("iLogID")&"&Type=Log&SpanId=Log_show_review_"& rs("iLogID") &"""></script><label id=""Log_show_review_"& rs("iLogID") &""">评论加载中...</label>")
- end if
- if instr(f_Lablechar,"Log_ReviewForm")>0 then
- dim FormReview
- FormReview=" <form action=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewUrl.asp"" name=""reviewform"" method=""post"" onsubmit=""//return checkreview();""/>"&chr(10)
- FormReview=FormReview&" 用户名<input name=""UserNumber"" type=""text"" id=""UserNumber"" size=""15""/>"&chr(10)
- FormReview=FormReview&" 匿名<input name=""noname"" type=""checkbox"" id=""noname"" value=""1""/>"&chr(10)
- FormReview=FormReview&" 密码<input name=""password"" type=""password"" id=""password"" size=""12""/><input type=""hidden"" name=""newsid"" value="""&rs("iLogID")&"""/><input type=""hidden"" name=""Action"" value=""add_save""/><br />"&chr(10)
- FormReview=FormReview&" 标 题<input name=""title"" type=""text"" id=""title"" size=""30""/><input type=""hidden"" name=""type"" value=""Log""/><br />"&chr(10)
- FormReview=FormReview&" <textarea name=""content"" cols=""50"" rows=""5"" id=""content""/></textarea><br />"&chr(10)
- FormReview=FormReview&" <input type=""submit"" name=""Submit"" value=""发表评论""/> <input type=""reset"" name=""Submit2"" value=""重新填写""/>"&chr(10)
- FormReview=FormReview&" </form>"&chr(10)
- Log_Page = replace(f_Lablechar,"Log_ReviewForm",FormReview)
- end if
- rs.close:set rs = nothing
- end if
- End Function
- '得到日志连接
- Public Function Get_LogLink(f_id)
- dim rs,rs_sys
- set rs = User_Conn.execute("select iLogID,FileName,FileExtName,UserNumber,savePath From FS_ME_Infoilog where iLogID="&f_id)
- Get_LogLink = "http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"& replace(Request.Cookies("FoosunMECookies")("FoosunMELogDir")&"/Blog.asp?id="&rs("iLogID"),"//","/")
- rs.close:set rs=nothing
- Get_LogLink = Get_LogLink
- End Function
- '相册调用
- Public Function Photo_List(f_Lablechar,f_type)
- 'Photo_List┆类型$1┆数量$10┆列数$1┆字数$30┆图片大小$100,80┆图片CSS$┆标题CSS$┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆输入格式$out_DIV
- Dim table_array,CodeType,TitleNumber,ColsNumber,leftTitle,PizSize,div_tf,PicCSS,TitleCSS
- Dim classNews_head,classNews_middle1,classNews_bottom,classNews_middle2,pizh,pizw
- dim f_sql,rs,DivId,DivClass,Url_Domain_path,a_href_link,orderby,rec_tf,tmp_I
- table_array=split(f_Lablechar,"┆")
- CodeType = split(split(f_Lablechar,"┆")(1),"$")(1)
- TitleNumber = split(split(f_Lablechar,"┆")(2),"$")(1)
- if TitleNumber="" or isnumeric(TitleNumber)=false then
- TitleNumber = 10
- else
- TitleNumber = TitleNumber
- end if
- ColsNumber = split(split(f_Lablechar,"┆")(3),"$")(1)
- if ColsNumber="" or isnumeric(ColsNumber)=false then
- ColsNumber = 5
- else
- ColsNumber = ColsNumber
- end if
- leftTitle = split(split(f_Lablechar,"┆")(4),"$")(1)
- PizSize = split(split(f_Lablechar,"┆")(5),"$")(1)
- if PizSize<>"" and instr(PizSize,",")>0 then
- if split(PizSize,",")(0)= "0" then
- pizh = ""
- pizw = " width="""&split(PizSize,",")(1)&""""
- else
- if split(PizSize,",")(1)= "0" then
- pizw = ""
- pizh = " width="""&split(PizSize,",")(0)&""""
- else
- pizh = " height="""& split(PizSize,",")(0) &""""
- pizw = " width="""&split(PizSize,",")(1)&""""
- end if
- end if
- else
- pizh = " height=""100"""
- pizw = " width=""80"""
- end if
- PicCSS = split(split(f_Lablechar,"┆")(6),"$")(1)
- TitleCSS = split(split(f_Lablechar,"┆")(7),"$")(1)
- DivId = split(split(f_Lablechar,"┆")(8),"$")(1)
- DivClass = split(split(f_Lablechar,"┆")(9),"$")(1)
- if PicCSS<>"" then
- PicCSS = " class="""&PicCSS&""""
- else
- PicCSS = ""
- end if
- if TitleCSS<>"" then
- TitleCSS = " class="""&TitleCSS&""""
- else
- TitleCSS = ""
- end if
- if instr(f_Lablechar,"out_DIV")>0 then
- div_tf=1
- classNews_head = table_str_list_head(div_tf,split(table_array(8),"$")(1),split(table_array(9),"$")(1),split(table_array(10),"$")(1),split(table_array(11),"$")(1))
- classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(12),"$")(1),split(table_array(13),"$")(1))
- else
- div_tf=0
- end if
- classNews_bottom = table_str_list_bottom(div_tf)
- classNews_middle2 = table_str_list_middle_2(div_tf)
- if CodeType = "0" then
- orderby = " order by id desc"
- rec_tf = ""
- elseif CodeType="1" then
- orderby = " order by id desc"
- rec_tf = " and isRec=1"
- else
- orderby = " order by Hits desc,id desc"
- rec_tf = ""
- end if
- f_sql = "select top "& TitleNumber &" Id,title,PicSavePath,Content,Addtime,UserNumber,PicSize,Hits,isRec From FS_ME_Photo where 1=1 "&rec_tf&" "&orderby&""
- set rs = User_Conn.execute(f_sql)
- Photo_List = ""
- Url_Domain_path = "http://" & request.Cookies("FoosunMFCookies")("FoosunMFDomain")
- if rs.eof then
- Photo_List = ""
- rs.close:set rs = nothing
- else
- tmp_I = 0
- do while not rs.eof
- a_href_link=Url_Domain_path & "/"&Request.Cookies("FoosunMECookies")("FoosunMELogDir")&"/ShowPhoto.asp?Id="&rs("Id")&""
- if div_tf=1 then
- if DivId<>"" Then:DivId = " id="""&DivId&"""":else:DivId = "":end if
- if DivClass<>"" Then:DivClass = " class="""&DivClass&"""":else:DivClass = "":end if
- Photo_List = Photo_List & " <div"& DivId & DivClass &" align=""center""><a href="""&a_href_link&"""><img src="""& Url_Domain_path & rs("PicSavePath") &""""&PicCSS&""& pizh & pizw &" border=""0"" /></a><br /><a href="""&a_href_link&""""&TitleCSS&">"&GotTopic(""&rs("title"),TitleNumber)&"</a></div>"&chr(10)
- else
- Photo_List = Photo_List & " <td width="""&cint(100/ColsNumber)&"%"" align=""center""><a href="""&a_href_link&"""><img src="""& Url_Domain_path & rs("PicSavePath") &""""&PicCSS&""& pizh & pizw &" border=""0"" /></a><br /><a href="""&a_href_link&""""&TitleCSS&">"&GotTopic(""&rs("title"),TitleNumber)&"</a></td>"&chr(10)
- end if
- rs.movenext
- if div_tf = 0 then
- tmp_I = tmp_I + 1
- if tmp_I mod ColsNumber =0 then
- Photo_List = Photo_List & "</tr><tr>"
- end if
- end if
- loop
- rs.close:set rs = nothing
- end if
- if div_tf=1 then
- 'Photo_List = classNews_head & Photo_List & classNews_bottom
- Photo_List = Photo_List
- else
- Photo_List = "<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""5""><tr>" & Photo_List & "</tr></table>"
- end if
- Photo_List = Photo_List
- End Function
- '相册浏览
- Public Function Photo_show(f_Lablechar,f_id)
- 'ShowPhoto┆字数$30┆图片大小$300,200┆图片CSS$┆标题CSS$
- Dim lefttitle,Picsize,piccss,titlecss,picheight,picwidth,rs,f_sql
- lefttitle = split(split(f_Lablechar,"┆")(1),"$")(1)
- Picsize = split(split(f_Lablechar,"┆")(2),"$")(1)
- piccss = split(split(f_Lablechar,"┆")(3),"$")(1)
- titlecss = split(split(f_Lablechar,"┆")(4),"$")(1)
- if not isnumeric(lefttitle) then:lefttitle =50:else:lefttitle = cint(lefttitle):end if
- if trim(piccss)<>"" then
- piccss =" class="""& piccss &""""
- else
- piccss = ""
- end if
- if trim(titlecss)<>"" then:titlecss =" class="""& titlecss &"""":else:titlecss = "":end if
- picheight = split(Picsize,",")(0)
- if picheight <> "0" then
- picheight = " height ="""&picheight&""""
- else
- picheight = ""
- end if
- picwidth = split(Picsize,",")(1)
- if picwidth <> "0" then
- picwidth = " width ="""&picwidth&""""
- else
- picwidth = ""
- end if
- Photo_show = ""
- if not isnumeric(f_id) then
- Photo_show = "错误参数"
- else
- f_sql = "select top 1 id,title,Content,PicSavePath,Addtime,UserNumber,Hits From FS_ME_Photo where id="& clng(f_id)
- 'response.Write(f_sql)
- 'response.end
- set rs = User_Conn.execute(f_sql)
- if rs.eof then
- Photo_show = "错误参数"
- rs.close:set rs = nothing
- else
- Photo_show = Photo_show & "<a href="""& rs("PicSavePath") &""" target=""_blank""><img src = """& rs("PicSavePath") &""""& piccss & picheight & picwidth &" /></a><br /><br />"& rs("title")& "<br /><div align=""left"">说明:"& rs("Content")& "</div><br /><br />"
- Photo_show = Photo_show & "作者:<a href=""http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&G_USER_DIR&"/ShowUser.asp?UserNumber="&rs("UserNumber")&""" target=""_blank"">"&get_UserNameLink(rs("UserNumber"))&"</a> 日期:"&rs("Addtime")&" 阅读次数:<script language=""JavaScript"" src=""http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/Click.asp?type=ajax&SubSys=PHOTO&spanid=PH_id_click_"&rs("id")&"""></script><div id=PH_id_click_"&rs("id")&"></div>"
- rs.close:set rs = nothing
- end if
- end if
- End function
- '专题地址
- Public Function get_subjectLink(f_Usernumber,f_dir)
- get_subjectLink = "http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&Request.Cookies("FoosunMECookies")("FoosunMELogDir")&"/"&f_Usernumber&"/"&f_dir&".html"
- End Function
- '得到作者地址
- Public Function get_AuthorLink(f_user)
- get_AuthorLink = "http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&G_USER_DIR&"/ShowUser.asp?UserNumber="&f_user&""
- End Function
- '得到作者用户名
- Public Function get_UserNameLink(f_usernumber)
- dim rs
- set rs = User_Conn.execute("select UserName From FS_ME_Users where UserNumber='"&f_usernumber&"'")
- if rs.eof then
- get_UserNameLink = ""
- rs.close:set rs=nothing
- else
- get_UserNameLink = rs("UserName")
- rs.close:set rs=nothing
- end if
- end Function
- '得到分类名称
- Public Function get_UserClassName(f_id)
- dim rs
- set rs = User_Conn.execute("select ClassCName From FS_ME_InfoClass where ClassID="&f_id&"")
- if rs.eof then
- get_UserClassName = "未分类"
- rs.close:set rs=nothing
- else
- get_UserClassName = rs("ClassCName")
- rs.close:set rs=nothing
- end if
- end Function
- '得到系统分类名称
- Public Function get_UsersysClassName(f_id)
- dim rs
- set rs = User_Conn.execute("select ClassName From FS_ME_iLogClass where id="&f_id&"")
- if rs.eof then
- get_UsersysClassName = "未分类"
- rs.close:set rs=nothing
- else
- get_UsersysClassName = rs("ClassName")
- rs.close:set rs=nothing
- end if
- end Function
- '得到日期格式
- Public Function get_DateChar(f_datestyle,f_addtime)
- 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_addtime),2))
- end if
- if instr(f_datestyle,"YY04")>0 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"YY04",year(f_addtime))
- end if
- if instr(f_datestyle,"MM")>0 then
- if month(f_addtime)<10 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"MM","0"&month(f_addtime))
- else
- tmp_f_datestyle= replace(tmp_f_datestyle,"MM",month(f_addtime))
- end if
- end if
- if instr(f_datestyle,"DD")>0 then
- if day(f_addtime)<10 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"DD","0"&day(f_addtime))
- else
- tmp_f_datestyle= replace(tmp_f_datestyle,"DD",day(f_addtime))
- end if
- end if
- if instr(f_datestyle,"HH")>0 then
- if hour(f_addtime)<10 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"HH","0"&hour(f_addtime))
- else
- tmp_f_datestyle= replace(tmp_f_datestyle,"HH",hour(f_addtime))
- end if
- end if
- if instr(f_datestyle,"MI")>0 then
- if minute(f_addtime)<10 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"MI","0"&minute(f_addtime))
- else
- tmp_f_datestyle= replace(tmp_f_datestyle,"MI",minute(f_addtime))
- end if
- end if
- if instr(f_datestyle,"SS")>0 then
- if second(f_addtime)<10 then
- tmp_f_datestyle= replace(tmp_f_datestyle,"SS","0"&second(f_addtime))
- else
- tmp_f_datestyle= replace(tmp_f_datestyle,"SS",second(f_addtime))
- end if
- end if
- get_DateChar = tmp_f_datestyle
- end Function
- End Class
- %>