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

数据库编程

开发平台:

ASP/ASPX

  1. <%
  2. Class cls_ME
  3. '风讯新闻刷新代码获得类,用于获得代码
  4. '方法:Fs_ns.Get_LableChar("标签代码","")
  5. 'Copyright (c)2002-2006 Foosun.cn code by simpwind.xie LastTime:06年9月7日
  6. '非经风讯公司正版许可,请勿用于商业用途
  7. '官方站:Foosun.cn
  8. '技术支持论坛:bbs.foosun.net
  9. 'QQ:655071(欢迎和您交流。^_^)
  10. '定义参数_____________________________________________________________________
  11. '获得参数_____________________________________________________________________
  12. Public Function get_LableChar(f_Lablechar,f_UserId)
  13. 'LogPage:Log_title
  14. if Request.Cookies("FoosunMECookies")("FoosunMELogDir") = "" then
  15. dim get_sysparam,blogs_dir
  16. set get_sysparam = User_Conn.execute("select top 1 Dir From FS_ME_iLogSysParam")
  17. if get_sysparam.eof then
  18. Response.Cookies("FoosunMECookies")("FoosunMELogDir") = "blog"
  19. get_sysparam.close:set get_sysparam = nothing
  20. else
  21. Response.Cookies("FoosunMECookies")("FoosunMELogDir") = get_sysparam(0)
  22. get_sysparam.close:set get_sysparam = nothing
  23. end if
  24. Response.Cookies("FoosunMECookies").Expires=Date()+1
  25. end if
  26. if split(f_Lablechar,":")(0)="LogPage" then
  27. get_LableChar = Log_Page(split(f_Lablechar,":")(1),f_UserId)
  28. else
  29. Dim f_array
  30. f_array= split(f_Lablechar,"┆")
  31. if ubound(f_array)=0 and not isarray(f_array) then
  32. get_LableChar=""
  33. exit Function
  34. else
  35. select case LCase(f_array(0))
  36. case "lastlog"
  37. 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
  38. case "toplog"
  39. 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
  40. case "hotlog"
  41. 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
  42. case "classlist"
  43. if ubound(f_array)<>7  and  ubound(f_array)<>13 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=ClassList(f_Lablechar):end if
  44. case "topsubject"
  45. 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
  46. case "infoclass"
  47. if ubound(f_array)<>3  and  ubound(f_array)<>9 then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=InfoClass(f_Lablechar):end if
  48. case "photo_list"
  49. if ubound(f_array)<>14   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Photo_List(f_Lablechar,"photo_list"):end if
  50. case "showphoto"
  51. if ubound(f_array)<>4   then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Photo_show(f_Lablechar,f_UserId):end if
  52. case "infolist"
  53. 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
  54. 'InfoList┆调用数量,标题字数$10,40┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_Table
  55. case "log_lastreview"
  56. 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
  57. case "log_lastform"
  58. if ubound(f_array)<>3  then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Log_LastForm(f_Lablechar,"log_lastform",f_UserId):end if
  59. case "log_publiclog"
  60. if ubound(f_array)<>3  then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Log_PublicLog(f_Lablechar):end if
  61. case "log_search"
  62. if ubound(f_array)<>3  then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Log_Search(f_Lablechar,f_id):end if
  63. case "log_navi"
  64. 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
  65. case "log_pagetitle"
  66. if ubound(f_array)<>3  then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Log_PageTitle(f_Lablechar,f_id):end if
  67. case "log_title"
  68. if ubound(f_array)<>3  then:get_LableChar="标签错误,by Foosun.cn":else:get_LableChar=Log_title(f_Lablechar,f_id):end if
  69. end select
  70. end if
  71. end if
  72. End Function
  73. 'DIV输出_____________________________________________________________________
  74. '得到div,table_______________________________________________________________
  75. Public Function table_str_list_head(f_tf,f_divid,f_divclass,f_ulid,f_ulclass)   
  76. Dim table_,tr_
  77. Dim f_divid_1,f_divclass_1,f_ulid_1,f_ulclass_1
  78. if f_tf=1 then
  79. if f_divid<>"" then:f_divid_1 = " id="""& f_divid &"""":else:f_divid_1 = "":end if
  80. if f_divclass<>"" then:f_divclass_1 = " class="""& f_divclass &"""":else:f_divclass_1 = "":end if
  81. if f_ulid<>"" then:f_ulid_1 = " id="""& f_ulid &"""":else:f_ulid_1 = "":end if
  82. if f_ulclass<>"" then:f_ulclass_1 = " class="""& f_ulclass &"""":else:f_ulclass_1 = "":end if
  83. table_="<div"& f_divid_1 & f_divclass_1 &">"
  84. tr_="<ul"& f_ulid_1 & f_ulclass_1 &">"
  85. table_str_list_head =  table_&chr(10)
  86. table_str_list_head = table_str_list_head &" "& tr_&chr(10)
  87. else
  88. table_="<table border=""0"" cellspacing=""0"" cellpadding=""3"" width=""100%"">"
  89. table_str_list_head =  table_&chr(10)
  90. end if
  91. End Function
  92. '得到div,table_________________________________________________________________________________
  93. public Function table_str_list_middle_1(f_tf,f_liid,f_liclass)
  94. Dim f_liid_1,f_liclass_1,td_
  95. if f_tf=1 then
  96. if f_liid<>"" then:f_liid_1 = " id="""& f_liid &"""":else:f_liid_1 = "":end if
  97. if f_liclass<>"" then:f_liclass_1 = " class="""& f_liclass &"""":else:f_liclass_1 = "":end if
  98. td_="<li"&f_liid_1&f_liclass_1&">"
  99. table_str_list_middle_1 ="  "&td_
  100. end if
  101. End Function
  102. '得到div,table_________________________________________________________________________________
  103. public Function table_str_list_middle_2(f_tf)
  104. Dim td__,tr__
  105. if f_tf=1 then
  106. td__="</li>"
  107. else
  108. td__="</td>"
  109. end if
  110. table_str_list_middle_2 =  td__&chr(10)
  111. End Function
  112. '得到div,table_________________________________________________________________________________
  113. Public Function table_str_list_middle_3(f_tf)
  114. if f_tf=1 then
  115. table_str_list_middle_3 = ""
  116. else
  117. table_str_list_middle_3 = "</tr>"
  118. end if
  119. End Function
  120. '得到div,table_________________________________________________________________________________
  121. Public Function table_str_list_bottom(f_tf)
  122. Dim table__,tr__
  123. if f_tf=1 then
  124. table__="</div>"
  125. tr__="</ul>"
  126. table_str_list_bottom = " "&tr__&chr(10)
  127. else
  128. table__="</table>"
  129. table_str_list_bottom = ""
  130. end if
  131. table_str_list_bottom = table_str_list_bottom &table__&chr(10)
  132. End Function
  133. 'DIV输出结束_________________________________________________________________
  134. '最新日志____________________________________________________________________
  135. Public Function LogList(f_Lablechar,f_type,f_UserId)
  136. 'LastLog┆调用数量,标题字数$10,40┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_Table
  137. 'LastLog┆调用数量,标题字数$10,40┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_DIV"
  138. dim TitleNumber,TitleNumberChar,leftTitleNumber,datetf,dateType,TitleCss,div_tf,TitleCssstr,table_array,classNews_head,classNews_bottom,classNews_middle1,classNews_middle2
  139. dim sql_char,f_sql,rs,inSQL_Search,LastLogstr,DateChar
  140. TitleNumber = split(split(f_Lablechar,"┆")(1),"$")(1)
  141. TitleNumberChar = split(TitleNumber,",")(0)
  142. leftTitleNumber = split(TitleNumber,",")(1)
  143. table_array=split(f_Lablechar,"┆")
  144. if trim(leftTitleNumber)<>"" and isnumeric(leftTitleNumber) then
  145. leftTitleNumber = leftTitleNumber
  146. else
  147. leftTitleNumber = 40
  148. end if
  149. if trim(TitleNumberChar)<>"" and isnumeric(TitleNumberChar) then
  150. TitleNumberChar = TitleNumberChar
  151. else
  152. TitleNumberChar = 10
  153. end if
  154. if instr(f_Lablechar,"out_DIV")>0 then
  155. div_tf = 1
  156. TitleCssstr = ""
  157. datetf= split(split(f_Lablechar,"┆")(9),"$")(1)
  158. dateType = split(split(f_Lablechar,"┆")(10),"$")(1)
  159. 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))
  160. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(6),"$")(1),split(table_array(7),"$")(1))
  161. else
  162. div_tf=0
  163. TitleCss = split(split(f_Lablechar,"┆")(2),"$")(1)
  164. if trim(TitleCss)<>"" then
  165. TitleCssstr = " class="""& TitleCss &""""
  166. else
  167. TitleCssstr = ""
  168. end if
  169. datetf= split(split(f_Lablechar,"┆")(3),"$")(1)
  170. dateType = split(split(f_Lablechar,"┆")(4),"$")(1)
  171. end if
  172. if trim(f_UserId)<>"" then
  173. inSQL_Search = " and UserNumber='"& f_UserId &"'"
  174. else
  175. inSQL_Search = ""
  176. end if
  177. classNews_bottom = table_str_list_bottom(div_tf)
  178. classNews_middle2 = table_str_list_middle_2(div_tf)
  179. if f_type="lastlog" then
  180. sql_char = " order by iLogID desc"
  181. elseif f_type="toplog" then
  182. sql_char = " order by hits desc,iLogID Desc"
  183. elseif f_type="hotlog" then
  184. sql_char = " order by istop desc,hits desc,iLogID Desc"
  185. end if
  186. 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&""
  187. set rs = User_Conn.execute(f_sql)
  188. if rs.eof then
  189. LastLogstr = ""
  190. rs.close:Set rs =nothing
  191. else
  192. do while not rs.eof
  193. if datetf="1" then
  194. DateChar = get_DateChar(dateType,rs("AddTime"))
  195. else
  196. DateChar = ""
  197. end if
  198. if div_tf=0 then
  199. dim s_paths
  200. s_paths = replace("/"&G_VIRTUAL_ROOT_DIR&"sys_images/log/dot1.jpg","//","/")
  201. LastLogstr = LastLogstr & " <img src="""& s_paths &""" border=""0""><a href="""& Get_LogLink(rs("iLogID"))&""""&TitleCssstr&">"&GotTopic(rs("Title"),leftTitleNumber)&"</a>"&DateChar&"<br />"&chr(10)
  202. else
  203. LastLogstr = LastLogstr & classNews_middle1& "<a href="""& Get_LogLink(rs("iLogID"))&""">"&GotTopic(rs("Title"),leftTitleNumber)&"</a>"&DateChar&""&classNews_middle2
  204. end if
  205. rs.movenext
  206. loop
  207. rs.close:Set rs =nothing
  208. end if
  209. if div_tf=1 then
  210. LastLogstr = classNews_head & LastLogstr & classNews_bottom
  211. end if
  212. LogList = LastLogstr
  213. End Function
  214. '得到分类日志列表
  215. Public Function ClassList(f_Lablechar)
  216. 'ClassList┆调用数量$10┆ClassId$1┆标题字数$40┆标题CSS$css┆显示日期$0┆日期格式$MM月DD日┆输出格式$out_Table","")
  217. 'ClassList┆调用数量$10┆ClassId$1┆标题字数$40┆标题CSS$┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆显示日期$0┆日期格式$MM月DD日┆输出格式$out_DIV","")
  218. dim ClassId,TitleNumber,lefttile,CSS,div_tf,TitleCssstr,datetf,dateType,table_array,classNews_head,classNews_middle1,classNews_bottom,classNews_middle2
  219. dim f_sql,rs,DateChar
  220. ClassID = split(split(f_Lablechar,"┆")(2),"$")(1)
  221. if trim(ClassID)<>"" then
  222. TitleNumber = split(split(f_Lablechar,"┆")(1),"$")(1)
  223. if trim(TitleNumber)<>"" and isnumeric(TitleNumber) then
  224. TitleNumber = TitleNumber
  225. else
  226.    TitleNumber = 10
  227. end if
  228. lefttile = split(split(f_Lablechar,"┆")(3),"$")(1)
  229. if trim(lefttile)<>"" and isnumeric(lefttile) then
  230. lefttile = lefttile
  231. else
  232. lefttile = 40
  233. end if
  234. CSS = split(split(f_Lablechar,"┆")(4),"$")(1)
  235. table_array=split(f_Lablechar,"┆")
  236. if instr(f_Lablechar,"out_DIV")>0 then
  237. div_tf = 1
  238. TitleCssstr = ""
  239. datetf= split(split(f_Lablechar,"┆")(11),"$")(1)
  240. dateType = split(split(f_Lablechar,"┆")(12),"$")(1)
  241. 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))
  242. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(9),"$")(1),split(table_array(10),"$")(1))
  243. else
  244. div_tf=0
  245. if trim(CSS)<>"" then
  246. TitleCssstr = " class="""& CSS &""""
  247. else
  248. TitleCssstr = ""
  249. end if
  250. datetf= split(split(f_Lablechar,"┆")(5),"$")(1)
  251. dateType = split(split(f_Lablechar,"┆")(6),"$")(1)
  252. end if
  253. classNews_bottom = table_str_list_bottom(div_tf)
  254. classNews_middle2 = table_str_list_middle_2(div_tf)
  255. 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"
  256. set rs = User_Conn.execute(f_Sql)
  257. ClassList = ""
  258. if rs.eof then
  259. ClassList = ""
  260. rs.close:set rs = nothing
  261. else
  262. do while Not rs.eof
  263. if datetf="1" then
  264. DateChar = get_DateChar(dateType,rs("AddTime"))
  265. else
  266. DateChar = ""
  267. end if
  268. if div_tf=0 then
  269. dim s_paths
  270. s_paths = replace("/"&G_VIRTUAL_ROOT_DIR&"sys_images/log/dot1.jpg","//","/")
  271. 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)
  272. else
  273. 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
  274. end if
  275. rs.movenext
  276. loop
  277. rs.close:set rs = nothing
  278. end if
  279. if div_tf=1 then
  280. ClassList = classNews_head & ClassList & classNews_bottom
  281. end if
  282. ClassList = ClassList
  283. else
  284. ClassList = "错误的标签"
  285. end if
  286. end Function
  287. '专题
  288. Public Function TopSubject(f_Lablechar,f_UserId)
  289. 'TopSubject┆调用数量,标题字数$10,40┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_Table
  290. 'TopSubject┆调用数量,标题字数$10,40┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_DIV
  291. if f_UserId="" then
  292. TopSubject = ""
  293. else
  294. dim TitleNumber,leftTitle,table_array,TitleCssstr,CSS,datetf,dateType,classNews_head,classNews_middle1,classNews_bottom,classNews_middle2
  295. dim f_sql,rs,div_tf
  296. TitleNumber = split(split(split(f_Lablechar,"┆")(1),"$")(1),",")(0)
  297. leftTitle = split(split(split(f_Lablechar,"┆")(1),"$")(1),",")(1)
  298. if leftTitle <> "" then
  299. leftTitle = leftTitle
  300. else
  301. leftTitle = 30 
  302. end if
  303. table_array=split(f_Lablechar,"┆")
  304. if instr(f_Lablechar,"out_DIV")>0 then
  305. div_tf = 1
  306. TitleCssstr = ""
  307. datetf= split(split(f_Lablechar,"┆")(9),"$")(1)
  308. dateType = split(split(f_Lablechar,"┆")(10),"$")(1)
  309. 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))
  310. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(6),"$")(1),split(table_array(7),"$")(1))
  311. else
  312. div_tf=0
  313. CSS=split(split(f_Lablechar,"┆")(2),"$")(1)
  314. if trim(CSS)<>"" then
  315. TitleCssstr = " class="""& CSS &""""
  316. else
  317. TitleCssstr = ""
  318. end if
  319. datetf= split(split(f_Lablechar,"┆")(3),"$")(1)
  320. dateType = split(split(f_Lablechar,"┆")(4),"$")(1)
  321. end if
  322. classNews_bottom = table_str_list_bottom(div_tf)
  323. classNews_middle2 = table_str_list_middle_2(div_tf)
  324. f_sql = "select top "& TitleNumber &" ClassCName,ClassEName,ClassID,UserNumber from FS_ME_InfoClass where ClassTypes=7 and UserNumber='"& f_UserId &"'"
  325. set rs = User_Conn.execute(f_sql)
  326. TopSubject = ""
  327. if rs.eof then
  328. TopSubject = ""
  329. rs.close:set rs=nothing
  330. else
  331. do while not rs.eof
  332. if div_tf = 0 then
  333. TopSubject = TopSubject & "·<a href="""& get_subjectLink(rs("UserNumber"),rs("ClassEName"))&""""&TitleCssstr&">"& GotTopic(rs("ClassCName"),leftTitle)&"</a><br />"
  334. else
  335. TopSubject = TopSubject & classNews_middle1 & "<a href="""& get_subjectLink(rs("UserNumber"),rs("ClassEName"))&""">"& GotTopic(rs("ClassCName"),leftTitle)&"</a>"&classNews_middle2
  336. end if
  337. rs.movenext
  338. loop
  339. rs.close:set rs=nothing
  340. end if
  341. end if
  342. if div_tf=1 then
  343. TopSubject = classNews_head & TopSubject & classNews_bottom
  344. end if
  345. TopSubject = TopSubject
  346. End Function
  347. '总分类
  348. Public Function InfoClass(f_Lablechar)
  349. '"InfoClass┆CSS$┆显示日期$1┆输出格式$out_Table","")
  350. ''InfoClass┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆显示日期$1┆输出格式$out_DIV","")
  351. Dim table_array,div_tf,css,classNews_head,classNews_middle1,classNews_bottom,classNews_middle2
  352. dim f_sql,rs,sys_rs_obj,f_dir1
  353. table_array=split(f_Lablechar,"┆")
  354. if instr(f_Lablechar,"out_DIV")>0 then
  355. div_tf = 1
  356. css= split(split(f_Lablechar,"┆")(1),"$")(1)
  357. 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))
  358. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(5),"$")(1),split(table_array(6),"$")(1))
  359. else
  360. div_tf = 0
  361. css= split(split(f_Lablechar,"┆")(1),"$")(1)
  362. if css<>"" then
  363. css = " class="""&css&""""
  364. else
  365. css = ""
  366. end if
  367. end if
  368. classNews_bottom = table_str_list_bottom(div_tf)
  369. classNews_middle2 = table_str_list_middle_2(div_tf)
  370. f_sql = "select id,ClassName from FS_ME_iLogClass order by id asc"
  371. set rs = User_Conn.execute(f_sql)
  372. InfoClass = ""
  373. if rs.eof then
  374. InfoClass = ""
  375. rs.close:set rs = nothing
  376. else
  377. do while not rs.eof
  378. if div_tf = 0 then
  379. InfoClass = InfoClass & "<a href="""&Replace("/"&G_VIRTUAL_ROOT_DIR&"/","//","/")& Request.Cookies("FoosunMECookies") &"/ListClass.asp?id="& rs("id") &""""&css&">"&rs("ClassName")&"</a>&nbsp;"
  380. else
  381. InfoClass = InfoClass & "<a href="""&Replace("/"&G_VIRTUAL_ROOT_DIR&"/","//","/")& Request.Cookies("FoosunMECookies") &"/ListClass.asp?id="& rs("id") &""">"&rs("ClassName")&"</a>&nbsp;"
  382. end if
  383. rs.movenext
  384. loop
  385. if div_tf = 1 then
  386. InfoClass =  classNews_head & classNews_middle1 & InfoClass & classNews_middle2 & classNews_bottom
  387. end if
  388. rs.close:set rs = nothing
  389. end if
  390. InfoClass = InfoClass
  391. End Function
  392. '日志终极分类
  393. Public Function InfoList(f_Lablechar,f_type,f_UserId)
  394. 'InfoList┆调用数量,标题字数$10,40┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_Table
  395. 'InfoList┆调用数量,标题字数$10,40┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_DIV
  396. Dim CodeTitle,CodeTitlestr,TitleNumber,div_tf,titleCSS,DateTF,DateStyle,DivId,DivClass,Ulid,ulclass,liid,liclass
  397. Dim f_sql,rs,i,ReviewCountstr
  398. CodeTitle = split(split(f_Lablechar,"┆")(1),"$")(1)
  399. if split(CodeTitle,",")(0) = "" and isnumeric(split(CodeTitle,",")(0))=false then
  400. CodeTitlestr = 10
  401. else
  402. CodeTitlestr = split(CodeTitle,",")(0)
  403. end if
  404. if split(CodeTitle,",")(1) = "" and isnumeric(split(CodeTitle,",")(1))=false then
  405. TitleNumber = 40
  406. else
  407. TitleNumber = split(CodeTitle,",")(1)
  408. end if
  409. if instr(f_Lablechar,"out_Table")>0 then
  410. div_tf = 0
  411. titleCSS = split(split(f_Lablechar,"┆")(2),"$")(1)
  412. DateTF = split(split(f_Lablechar,"┆")(3),"$")(1)
  413. DateStyle = split(split(f_Lablechar,"┆")(4),"$")(1)
  414. else
  415. div_tf = 1
  416. DivId = split(split(f_Lablechar,"┆")(2),"$")(1)
  417. DivClass = split(split(f_Lablechar,"┆")(3),"$")(1)
  418. Ulid = split(split(f_Lablechar,"┆")(4),"$")(1)
  419. ulclass = split(split(f_Lablechar,"┆")(5),"$")(1)
  420. liid = split(split(f_Lablechar,"┆")(6),"$")(1)
  421. liclass = split(split(f_Lablechar,"┆")(7),"$")(1)
  422. titleCSS = split(split(f_Lablechar,"┆")(8),"$")(1)
  423. DateTF = split(split(f_Lablechar,"┆")(9),"$")(1)
  424. DateStyle = split(split(f_Lablechar,"┆")(10),"$")(1)
  425. if DivId<>"" then
  426. DivId = " id="""&DivId&""""
  427. else
  428. DivId = ""
  429. end if
  430. if DivClass<>"" then
  431. DivClass = " class="""&DivClass&""""
  432. else
  433. DivClass = ""
  434. end if
  435. end if
  436. if titleCSS<>"" then
  437. titleCSS = " class="""&titleCSS&""""
  438. else
  439. titleCSS = ""
  440. end if
  441. 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"
  442. set rs = User_Conn.execute(f_sql)
  443. InfoList = ""
  444. if rs.eof then
  445. InfoList = ""
  446. rs.close:set rs = nothing
  447. else
  448. i = 0 
  449. do while not rs.eof
  450. if div_tf = 1 then
  451. InfoList = InfoList & "<a name=""top"" id=""top""></a>"&chr(10)&"<div"&DivId&DivClass&">"
  452. end if
  453. dim rs_review
  454. 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")
  455. if rs_review.eof then
  456. ReviewCountstr = 0
  457. rs_review.close:set rs_review= nothing
  458. else
  459. ReviewCountstr = rs_review(0)
  460. rs_review.close:set rs_review= nothing
  461. end if
  462. dim date_tmp
  463. if DateTF="1" then
  464. date_tmp = get_DateChar(DateStyle,rs("AddTime")) &"┆"
  465. else
  466. date_tmp = ""
  467. end if
  468. InfoList = InfoList & "<h4><a href="""& Get_LogLink(rs("iLogID")) &""""&titleCSS&"><font style=""font-size:14px"">"&GotTopic(""&rs("Title"),TitleNumber)&"</a></font></h4>"&chr(10)
  469. InfoList = InfoList & ""&GetCStrLen(""&rs("Content"),800)&"...<br /><br />"&chr(10)
  470. if trim(replace(rs("KeyWords"),",",""))<>"" then
  471. dim o_i
  472. InfoList = InfoList & "<font style=""font-size:14px"">Tags: "
  473. for o_i = LBound(split(rs("KeyWords"),",")) to UBound(split(rs("KeyWords"),","))
  474. InfoList = InfoList & "<a href="""&replace("/"& G_VIRTUAL_ROOT_DIR&"/","//","/")&"Tags.asp?Tags="&split(rs("KeyWords"),",")(o_i)&""">"&split(rs("KeyWords"),",")(o_i)&"</a>&nbsp;"
  475. next
  476. InfoList = InfoList & "</font><br /><br />"
  477. end if
  478. InfoList = InfoList & "日期:<img src="""& replace("/"& G_VIRTUAL_ROOT_DIR&"/","//","/")&"sys_images/post_yellow.gif"" border=""0"" />&nbsp;"& 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)
  479. if div_tf = 1 then
  480. InfoList = InfoList & "</div>"
  481. end if
  482. rs.movenext
  483. i = i + 1
  484. if i mod CodeTitlestr =0 then
  485. if rs.recordcount <> i then
  486. InfoList = InfoList &"{Foosun_Page_news}{/Foosun_Page_news}"
  487. end if
  488. end if
  489. loop
  490. rs.close:set rs = nothing
  491. end if 
  492. InfoList = InfoList & "{Foosun_Page_news}{/Foosun_Page_news}"
  493. End Function
  494. '最新评论
  495. Public Function Log_LastReview(f_Lablechar,f_type,f_UserId)
  496. 'Log_LastReview┆调用数量,标题字数$10,40┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_Table
  497. 'Log_LastReview┆调用数量,标题字数$10,40┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆显示日期$1┆日期样式$MM-DD┆输出格式$out_DIV
  498. dim CodeNumber,TitleNumber,lefttitle,div_tf,CSS,DateTF,DateType
  499. dim rs
  500. CodeNumber = split(split(f_Lablechar,"┆")(1),"$")(1)
  501. TitleNumber = split(CodeNumber,",")(0)
  502. if TitleNumber="" or isnumeric(TitleNumber)=false then
  503. TitleNumber = 10
  504. else
  505. TitleNumber = TitleNumber
  506. end if
  507. lefttitle = split(CodeNumber,",")(1)
  508. if lefttitle="" or isnumeric(lefttitle)=false then
  509. lefttitle = 40
  510. else
  511. lefttitle = lefttitle
  512. end if
  513. if instr(f_Lablechar,"out_Table")>0 then
  514. div_tf = 0
  515. CSS = split(split(f_Lablechar,"┆")(2),"$")(1)
  516. DateTF = split(split(f_Lablechar,"┆")(3),"$")(1)
  517. DateType = split(split(f_Lablechar,"┆")(4),"$")(1)
  518. else
  519. div_tf = 1
  520. CSS = split(split(f_Lablechar,"┆")(8),"$")(1)
  521. DateTF = split(split(f_Lablechar,"┆")(9),"$")(1)
  522. DateType = split(split(f_Lablechar,"┆")(10),"$")(1)
  523. DivId = split(split(f_Lablechar,"┆")(2),"$")(1)
  524. if DivId = "" then
  525. DivId = ""
  526. else
  527. DivId = " id="""&DivId&""""
  528. end if
  529. DivClass = split(split(f_Lablechar,"┆")(3),"$")(1)
  530. if DivClass = "" then
  531. DivClass = ""
  532. else
  533. DivClass = " class="""&DivClass&""""
  534. end if
  535. Ulid = split(split(f_Lablechar,"┆")(4),"$")(1)
  536. if Ulid = "" then
  537. Ulid = ""
  538. else
  539. Ulid = " id="""&Ulid&""""
  540. end if
  541. ulclass = split(split(f_Lablechar,"┆")(5),"$")(1)
  542. if ulclass = "" then
  543. ulclass = ""
  544. else
  545. ulclass = " class="""&ulclass&""""
  546. end if
  547. liid = split(split(f_Lablechar,"┆")(6),"$")(1)
  548. if liid = "" then
  549. liid = ""
  550. else
  551. liid = " id="""&liid&""""
  552. end if
  553. liclass = split(split(f_Lablechar,"┆")(7),"$")(1)
  554. if liclass = "" then
  555. liclass = ""
  556. else
  557. liclass = " class="""&liclass&""""
  558. end if
  559. end if
  560. if CSS="" then
  561. CSS = ""
  562. else
  563. CSS = " class="""& CSS &""""
  564. end if
  565. 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")
  566. Log_LastReview = ""
  567. if rs.eof then
  568. Log_LastReview = "没有评论"
  569. rs.close:set rs = nothing
  570. else
  571. if div_tf = 1 then
  572. Log_LastReview = Log_LastReview & "<div"&DivId&DivClass&"><ul"&Ulid&ulclass&">"&chr(10)
  573. end if
  574. do while not rs.eof 
  575. dim date_tmp
  576. if DateTF="1" then
  577. date_tmp = get_DateChar(DateType,rs("AddTime"))
  578. else
  579. date_tmp = ""
  580. end if
  581. if div_tf = 1 then
  582. 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)
  583. else
  584. 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 />"
  585. end if 
  586. rs.movenext
  587. loop
  588. rs.close:set rs = nothing
  589. end if
  590. if div_tf = 1 then
  591. 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>"
  592. else
  593. 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>"
  594. end if 
  595. End Function
  596. '评论表单
  597. Public Function Log_LastForm(f_Lablechar,f_type,f_UserId)
  598. 'Log_LastForm┆CSS$┆显示日期$1┆}-->
  599. dim FormReview
  600. FormReview=" <form action=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewUrl.asp"" name=""reviewform"" method=""post"" onsubmit=""//return checkreview();""/>"&chr(10)
  601. FormReview=FormReview&"   用户名<input name=""UserNumber"" type=""text"" id=""UserNumber"" size=""15""/>"&chr(10)
  602. FormReview=FormReview&"   匿名<input name=""noname"" type=""checkbox"" id=""noname"" value=""1""/>"&chr(10)
  603. 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)
  604. FormReview=FormReview&"   标 题<input name=""title"" type=""text"" id=""title"" size=""30""/><input type=""hidden"" name=""type"" value=""Log""/><br />"&chr(10)
  605. FormReview=FormReview&"   <textarea name=""content"" cols=""50"" rows=""5"" id=""content""/></textarea><br />"&chr(10)
  606. FormReview=FormReview&"   <input type=""submit"" name=""Submit"" value=""发表评论""/>&nbsp;&nbsp;<input type=""reset"" name=""Submit2"" value=""重新填写""/>"&chr(10)
  607. FormReview=FormReview&" </form>"&chr(10)
  608. Log_LastForm = FormReview
  609. End Function
  610. '发表日志接口
  611. Public Function Log_PublicLog(f_Lablechar)
  612. 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>"
  613. End Function
  614. '搜索
  615. Public Function Log_Search(f_Lablechar,f_id)
  616. 'Log_Search┆CSS$┆显示日期$1┆
  617. 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"">&nbsp;<input name=""sumbit"" type=""submit"" value=""搜索""></form>"
  618. End Function
  619. '总站日志导航
  620. Public Function Log_Navi(f_Lablechar)
  621. 'Log_Navi┆CSS$┆显示日期$1┆输出格式$out_Table}-->
  622. 'Log_Navi┆DivID$┆DivClass$┆ulid$┆ulclass$┆liid$┆liclass$┆CSS$┆显示日期$1┆输出格式$out_DIV}-->
  623. dim div_tf,CSS,DivId,DivClass,Ulid,ulclass,liid,liclass
  624. dim rs
  625. if instr(f_Lablechar,"out_Table")>0 then
  626. div_tf = 0 
  627. CSS = split(split(f_Lablechar,"┆")(1),"$")(1)
  628. else
  629. div_tf = 1
  630. CSS = split(split(f_Lablechar,"┆")(7),"$")(1)
  631. DivId = split(split(f_Lablechar,"┆")(2),"$")(1)
  632. if DivId = "" then:DivId = "":else:DivId = " id="""&DivId&"""":end if
  633. DivClass = split(split(f_Lablechar,"┆")(3),"$")(1)
  634. if DivClass = "" then:DivClass = "":else:DivClass = " class="""&DivClass&"""":end if
  635. Ulid = split(split(f_Lablechar,"┆")(4),"$")(1)
  636. if Ulid = "" then:Ulid = "":else:Ulid = " id="""&Ulid&"""":end if
  637. ulclass = split(split(f_Lablechar,"┆")(5),"$")(1)
  638. if ulclass = "" then:ulclass = "":else:ulclass = " class="""&ulclass&"""":end if
  639. liid = split(split(f_Lablechar,"┆")(6),"$")(1)
  640. if liid = "" then:liid = "":else:liid = " id="""&liid&"""":end if
  641. liclass = split(split(f_Lablechar,"┆")(7),"$")(1)
  642. if liclass = "" then:liclass = "":else:liclass = " class="""&liclass&"""":end if
  643. end if
  644. if CSS="" then:CSS = "":else:CSS = " class="""& CSS &"""":end if
  645. set rs = User_Conn.execute("select id,ClassName From FS_ME_iLogClass order by id desc")
  646. Log_Navi = ""
  647. if rs.eof then
  648. Log_Navi = "没系统分类"
  649. rs.close:set rs =nothing
  650. else
  651. if div_tf = 1 then
  652. Log_Navi = Log_Navi & "<div"&DivId&DivClass&">"&chr(10)&" <ul"&Ulid&ulclass&">"&chr(10)
  653. end if 
  654. do while not rs.eof
  655. if div_tf = 1 then
  656. 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)
  657. else
  658. 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>&nbsp;"
  659. end if
  660. rs.movenext
  661. loop
  662. rs.close:set rs =nothing
  663. end if
  664. if div_tf = 1 then
  665. Log_Navi = Log_Navi &chr(10)&" <ul>"&chr(10)&"</div>"
  666. end if
  667. Log_Navi = Log_Navi
  668. End Function
  669. '页面标题
  670. Public Function Log_PageTitle(f_Lablechar,f_id)
  671. 'Log_PageTitle┆CSS$┆显示日期$1┆
  672. dim rs
  673. set rs = User_Conn.execute("select top 1 siteName From FS_ME_InfoiLogParam")
  674. if rs.eof then
  675. Log_PageTitle = rs(0)
  676. rs.close:set rs = nothing
  677. else
  678. Log_PageTitle = ""
  679. rs.close:set rs = nothing
  680. end if
  681. End Function
  682. '日志标题
  683. Public Function Log_Page(f_Lablechar,f_id)
  684. dim rs
  685. set rs =User_Conn.execute("select * From FS_ME_Infoilog where iLogID="&f_id)
  686. if rs.eof then
  687. Log_Page = ""
  688. rs.close:set rs = nothing
  689. else
  690. if instr(f_Lablechar,"Log_title")>0 then
  691. Log_Page =  replace(f_Lablechar,"Log_title",""&rs("title"))
  692. end if
  693. if instr(f_Lablechar,"Log_Content")>0 then
  694. Log_Page =  replace(f_Lablechar,"Log_Content",""&rs("Content"))
  695. end if
  696. if instr(f_Lablechar,"Log_Author")>0 then
  697. 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>")
  698. end if
  699. if instr(f_Lablechar,"Log_hits")>0 then
  700. Dim hits_str
  701. 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)
  702. Log_Page =  replace(f_Lablechar,"Log_hits",hits_str&"<span id=""Log_id_click_"&rs("iLogID")&""">loading...</span>")
  703. end if
  704. if instr(f_Lablechar,"Log_keywords")>0 then
  705. dim i 
  706. if instr(rs("keywords"),",")>0 then
  707. for i = 0 to Ubound(split(rs("keywords"),","))
  708. if trim(split(rs("keywords"),",")(i))<>"" then
  709. 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>&nbsp;")
  710. else
  711. Log_Page = ""
  712. end if
  713. next
  714. end if
  715. end if
  716. if instr(f_Lablechar,"Log_AddTime")>0 then
  717. Log_Page =  replace(f_Lablechar,"Log_AddTime",""&rs("AddTime"))
  718. end if
  719. if instr(f_Lablechar,"Log_AddTime")>0 then
  720. Log_Page =  replace(f_Lablechar,"Log_AddTime",""&rs("AddTime"))
  721. end if
  722. if instr(f_Lablechar,"Log_LogType")>0 then
  723. 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>")
  724. end if
  725. if instr(f_Lablechar,"Log_LogType")>0 then
  726. 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>")
  727. end if
  728. if instr(f_Lablechar,"Log_ReviewList")>0 then
  729. 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>")
  730. end if
  731. if instr(f_Lablechar,"Log_ReviewForm")>0 then
  732. dim FormReview
  733. FormReview=" <form action=""http://"&Request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/ReviewUrl.asp"" name=""reviewform"" method=""post"" onsubmit=""//return checkreview();""/>"&chr(10)
  734. FormReview=FormReview&"   用户名<input name=""UserNumber"" type=""text"" id=""UserNumber"" size=""15""/>"&chr(10)
  735. FormReview=FormReview&"   匿名<input name=""noname"" type=""checkbox"" id=""noname"" value=""1""/>"&chr(10)
  736. 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)
  737. FormReview=FormReview&"   标 题<input name=""title"" type=""text"" id=""title"" size=""30""/><input type=""hidden"" name=""type"" value=""Log""/><br />"&chr(10)
  738. FormReview=FormReview&"   <textarea name=""content"" cols=""50"" rows=""5"" id=""content""/></textarea><br />"&chr(10)
  739. FormReview=FormReview&"   <input type=""submit"" name=""Submit"" value=""发表评论""/>&nbsp;&nbsp;<input type=""reset"" name=""Submit2"" value=""重新填写""/>"&chr(10)
  740. FormReview=FormReview&" </form>"&chr(10)
  741. Log_Page = replace(f_Lablechar,"Log_ReviewForm",FormReview)
  742. end if
  743. rs.close:set rs = nothing
  744. end if
  745. End Function
  746. '得到日志连接
  747. Public Function Get_LogLink(f_id)
  748. dim rs,rs_sys
  749. set rs = User_Conn.execute("select iLogID,FileName,FileExtName,UserNumber,savePath From FS_ME_Infoilog where iLogID="&f_id)
  750. Get_LogLink = "http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"& replace(Request.Cookies("FoosunMECookies")("FoosunMELogDir")&"/Blog.asp?id="&rs("iLogID"),"//","/")
  751. rs.close:set rs=nothing
  752. Get_LogLink = Get_LogLink
  753. End Function
  754. '相册调用
  755. Public Function Photo_List(f_Lablechar,f_type)
  756. 'Photo_List┆类型$1┆数量$10┆列数$1┆字数$30┆图片大小$100,80┆图片CSS$┆标题CSS$┆DivID$┆Divclass$┆ulid$┆ulclass$┆liid$┆liclass$┆输入格式$out_DIV
  757. Dim table_array,CodeType,TitleNumber,ColsNumber,leftTitle,PizSize,div_tf,PicCSS,TitleCSS
  758. Dim classNews_head,classNews_middle1,classNews_bottom,classNews_middle2,pizh,pizw
  759. dim f_sql,rs,DivId,DivClass,Url_Domain_path,a_href_link,orderby,rec_tf,tmp_I
  760. table_array=split(f_Lablechar,"┆")
  761. CodeType = split(split(f_Lablechar,"┆")(1),"$")(1)
  762. TitleNumber = split(split(f_Lablechar,"┆")(2),"$")(1)
  763. if TitleNumber="" or isnumeric(TitleNumber)=false then
  764. TitleNumber = 10
  765. else
  766. TitleNumber = TitleNumber
  767. end if
  768. ColsNumber = split(split(f_Lablechar,"┆")(3),"$")(1)
  769. if ColsNumber="" or isnumeric(ColsNumber)=false then
  770. ColsNumber = 5
  771. else
  772. ColsNumber = ColsNumber
  773. end if
  774. leftTitle = split(split(f_Lablechar,"┆")(4),"$")(1)
  775. PizSize = split(split(f_Lablechar,"┆")(5),"$")(1)
  776. if PizSize<>"" and instr(PizSize,",")>0 then
  777. if split(PizSize,",")(0)= "0" then
  778. pizh = ""
  779. pizw = " width="""&split(PizSize,",")(1)&""""
  780. else
  781. if split(PizSize,",")(1)= "0" then
  782. pizw = ""
  783. pizh = " width="""&split(PizSize,",")(0)&""""
  784. else
  785. pizh = " height="""& split(PizSize,",")(0) &""""
  786. pizw = " width="""&split(PizSize,",")(1)&""""
  787. end if
  788. end if
  789. else
  790. pizh = " height=""100"""
  791. pizw = " width=""80"""
  792. end if
  793. PicCSS = split(split(f_Lablechar,"┆")(6),"$")(1)
  794. TitleCSS = split(split(f_Lablechar,"┆")(7),"$")(1)
  795. DivId = split(split(f_Lablechar,"┆")(8),"$")(1)
  796. DivClass = split(split(f_Lablechar,"┆")(9),"$")(1)
  797. if PicCSS<>"" then
  798. PicCSS = " class="""&PicCSS&""""
  799. else
  800. PicCSS = ""
  801. end if
  802. if TitleCSS<>"" then
  803. TitleCSS = " class="""&TitleCSS&""""
  804. else
  805. TitleCSS = ""
  806. end if
  807. if instr(f_Lablechar,"out_DIV")>0 then
  808. div_tf=1
  809. 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))
  810. classNews_middle1 = table_str_list_middle_1(div_tf,split(table_array(12),"$")(1),split(table_array(13),"$")(1))
  811. else
  812. div_tf=0
  813. end if
  814. classNews_bottom = table_str_list_bottom(div_tf)
  815. classNews_middle2 = table_str_list_middle_2(div_tf)
  816. if CodeType = "0" then
  817. orderby = " order by id desc"
  818. rec_tf = ""
  819. elseif CodeType="1" then
  820. orderby = " order by id desc"
  821. rec_tf = " and isRec=1"
  822. else
  823. orderby = " order by Hits desc,id desc"
  824. rec_tf = ""
  825. end if
  826. f_sql = "select top "& TitleNumber &" Id,title,PicSavePath,Content,Addtime,UserNumber,PicSize,Hits,isRec From FS_ME_Photo where 1=1 "&rec_tf&" "&orderby&""
  827. set rs = User_Conn.execute(f_sql)
  828. Photo_List = ""
  829. Url_Domain_path = "http://" & request.Cookies("FoosunMFCookies")("FoosunMFDomain")
  830. if rs.eof then
  831. Photo_List = ""
  832. rs.close:set rs = nothing
  833. else
  834. tmp_I = 0 
  835. do while not rs.eof
  836. a_href_link=Url_Domain_path & "/"&Request.Cookies("FoosunMECookies")("FoosunMELogDir")&"/ShowPhoto.asp?Id="&rs("Id")&""
  837. if div_tf=1 then
  838. if DivId<>"" Then:DivId = " id="""&DivId&"""":else:DivId = "":end if
  839. if DivClass<>"" Then:DivClass = " class="""&DivClass&"""":else:DivClass = "":end if
  840. 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)
  841. else
  842. 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)
  843. end if
  844. rs.movenext
  845. if div_tf = 0 then
  846. tmp_I = tmp_I + 1
  847. if tmp_I mod ColsNumber =0 then
  848. Photo_List = Photo_List & "</tr><tr>"
  849. end if
  850. end if
  851. loop
  852. rs.close:set rs = nothing
  853. end if
  854. if div_tf=1 then
  855. 'Photo_List = classNews_head & Photo_List & classNews_bottom
  856. Photo_List =  Photo_List 
  857. else
  858. Photo_List = "<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""5""><tr>" & Photo_List & "</tr></table>"
  859. end if
  860. Photo_List = Photo_List
  861. End Function
  862. '相册浏览
  863. Public Function Photo_show(f_Lablechar,f_id)
  864. 'ShowPhoto┆字数$30┆图片大小$300,200┆图片CSS$┆标题CSS$
  865. Dim lefttitle,Picsize,piccss,titlecss,picheight,picwidth,rs,f_sql
  866. lefttitle = split(split(f_Lablechar,"┆")(1),"$")(1)
  867. Picsize = split(split(f_Lablechar,"┆")(2),"$")(1)
  868. piccss = split(split(f_Lablechar,"┆")(3),"$")(1)
  869. titlecss = split(split(f_Lablechar,"┆")(4),"$")(1)
  870. if not isnumeric(lefttitle) then:lefttitle =50:else:lefttitle = cint(lefttitle):end if
  871. if trim(piccss)<>"" then
  872. piccss =" class="""& piccss &""""
  873. else
  874. piccss = ""
  875. end if
  876. if trim(titlecss)<>"" then:titlecss =" class="""& titlecss &"""":else:titlecss = "":end if
  877. picheight = split(Picsize,",")(0)
  878. if picheight <> "0" then
  879. picheight = " height ="""&picheight&""""
  880. else
  881. picheight = ""
  882. end if
  883. picwidth = split(Picsize,",")(1)
  884. if picwidth <> "0" then
  885. picwidth = " width ="""&picwidth&""""
  886. else
  887. picwidth = ""
  888. end if
  889. Photo_show = ""
  890. if not isnumeric(f_id) then
  891. Photo_show = "错误参数"
  892. else
  893. f_sql = "select top 1 id,title,Content,PicSavePath,Addtime,UserNumber,Hits From FS_ME_Photo where id="& clng(f_id)
  894. 'response.Write(f_sql)
  895. 'response.end
  896. set rs = User_Conn.execute(f_sql)
  897. if rs.eof then
  898. Photo_show = "错误参数"
  899. rs.close:set rs = nothing
  900. else
  901. 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 />"
  902. 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>&nbsp;&nbsp;日期:"&rs("Addtime")&"&nbsp;&nbsp;阅读次数:<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>"
  903. rs.close:set rs = nothing
  904. end if
  905. end if
  906. End function
  907. '专题地址
  908. Public Function get_subjectLink(f_Usernumber,f_dir)
  909. get_subjectLink = "http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&Request.Cookies("FoosunMECookies")("FoosunMELogDir")&"/"&f_Usernumber&"/"&f_dir&".html"
  910. End Function
  911. '得到作者地址
  912. Public Function get_AuthorLink(f_user)
  913. get_AuthorLink = "http://"&request.Cookies("FoosunMFCookies")("FoosunMFDomain")&"/"&G_USER_DIR&"/ShowUser.asp?UserNumber="&f_user&""
  914. End Function
  915. '得到作者用户名
  916. Public Function get_UserNameLink(f_usernumber)
  917. dim rs
  918. set rs = User_Conn.execute("select UserName From FS_ME_Users where UserNumber='"&f_usernumber&"'")
  919. if rs.eof then
  920. get_UserNameLink = ""
  921. rs.close:set rs=nothing
  922. else
  923. get_UserNameLink = rs("UserName")
  924. rs.close:set rs=nothing
  925. end if
  926. end Function
  927. '得到分类名称
  928. Public Function get_UserClassName(f_id)
  929. dim rs
  930. set rs = User_Conn.execute("select ClassCName From FS_ME_InfoClass where ClassID="&f_id&"")
  931. if rs.eof then
  932. get_UserClassName = "未分类"
  933. rs.close:set rs=nothing
  934. else
  935. get_UserClassName = rs("ClassCName")
  936. rs.close:set rs=nothing
  937. end if
  938. end Function
  939. '得到系统分类名称
  940. Public Function get_UsersysClassName(f_id)
  941. dim rs
  942. set rs = User_Conn.execute("select ClassName From FS_ME_iLogClass where id="&f_id&"")
  943. if rs.eof then
  944. get_UsersysClassName = "未分类"
  945. rs.close:set rs=nothing
  946. else
  947. get_UsersysClassName = rs("ClassName")
  948. rs.close:set rs=nothing
  949. end if
  950. end Function
  951. '得到日期格式
  952. Public Function get_DateChar(f_datestyle,f_addtime)
  953. dim tmp_f_datestyle
  954. tmp_f_datestyle = f_datestyle
  955. if instr(f_datestyle,"YY02")>0 then
  956. tmp_f_datestyle= replace(tmp_f_datestyle,"YY02",right(year(f_addtime),2))
  957. end if
  958. if instr(f_datestyle,"YY04")>0 then
  959. tmp_f_datestyle= replace(tmp_f_datestyle,"YY04",year(f_addtime))
  960. end if
  961. if instr(f_datestyle,"MM")>0 then
  962. if month(f_addtime)<10 then
  963. tmp_f_datestyle= replace(tmp_f_datestyle,"MM","0"&month(f_addtime))
  964. else
  965. tmp_f_datestyle= replace(tmp_f_datestyle,"MM",month(f_addtime))
  966. end if
  967. end if
  968. if instr(f_datestyle,"DD")>0 then
  969. if day(f_addtime)<10 then
  970. tmp_f_datestyle= replace(tmp_f_datestyle,"DD","0"&day(f_addtime))
  971. else
  972. tmp_f_datestyle= replace(tmp_f_datestyle,"DD",day(f_addtime))
  973. end if
  974. end if
  975. if instr(f_datestyle,"HH")>0 then
  976. if hour(f_addtime)<10 then
  977. tmp_f_datestyle= replace(tmp_f_datestyle,"HH","0"&hour(f_addtime))
  978. else
  979. tmp_f_datestyle= replace(tmp_f_datestyle,"HH",hour(f_addtime))
  980. end if
  981. end if
  982. if instr(f_datestyle,"MI")>0 then
  983. if minute(f_addtime)<10 then
  984. tmp_f_datestyle= replace(tmp_f_datestyle,"MI","0"&minute(f_addtime))
  985. else
  986. tmp_f_datestyle= replace(tmp_f_datestyle,"MI",minute(f_addtime))
  987. end if
  988. end if
  989. if instr(f_datestyle,"SS")>0 then
  990. if second(f_addtime)<10 then
  991. tmp_f_datestyle= replace(tmp_f_datestyle,"SS","0"&second(f_addtime))
  992. else
  993. tmp_f_datestyle= replace(tmp_f_datestyle,"SS",second(f_addtime))
  994. end if
  995. end if
  996. get_DateChar = tmp_f_datestyle
  997. end Function
  998. End Class
  999. %>