'############################################################################
'# 使用方法:后台模板调用:{$BBS_List(1,0,0,0,16,12)} #
'# power by gannyle www.ehbsz.com www.gyct.cn 2006.8.21 #
'############################################################################
function BBS_List(tmp_type,getfid,imgmark,opentype,getnum,getlen,getcss)
dim tmp1,tmp_title,tmp_tit,tmp_count,tmp_record,tmp_table,tmp_where,tmp_url,tmp_name,tmp_color,body,new_windown
new_windown=""
tmp_where=" and forum_id<>999999999"
if getfid>0 then tmp_where=tmp_where&" and forum_id="&getfid
if imgmark>0 then
imgmark="<img url='"&joekoe_cms.web_path&"images/number/"&id&".gif'>"
else
imgmark="·"
end if
if opentype=1 then new_windown="target='_blank'"
tmp_title=" 论坛新帖"
tmp_tit="论坛标题"
tmp_name="发 布 人"
tmp_count="论坛回复"
tmp_tim="整理时间"
tmp_table="bbs_topic"
tmp_record="id,topic,username,tim,re_counter,tcolor,forum_id,isgood,istop"
tmp_where="forum_id>0"
'############################################################################
'#最新贴:tmp_type="" 精华帖:tmp_type="isgood=1" 最新通告:istop=2 or istop=1#
'# power by gannyle www.ehbsz.com www.gyct.cn 2006.8.21 #
'############################################################################
if tmp_type=1 then
tmp_where=tmp_where&" and isgood=1 "
elseif tmp_type=2 then
tmp_where=tmp_where&" and istop=2 or istop=1 "
elseif tmp_type=0 then
tmp_where=tmp_where&" "
end if
'############################################################################
iscolor=true
sql="select top "&getnum&" "&tmp_record&" from "&tmp_table&" where "&tmp_where&" order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
tmp_color=""
if var_null(rs(5))<>"" then tmp_color="style=""color:"&rs(5)&";"""
tmp_url="forum/view.asp?forum_id="&rs(6)&"&view_id="&rs(0)
tmp1=tmp1&vbcrlf&"<tr class="&getcss&"><td>"&imgmark&"<a href='"&tmp_url&"' "&tmp_color&" alt='"&tmp_tit&":"&joekoe_cms.code_html(rs(1),1,0)&"<br>"&tmp_name&":"&rs(2)&"<br>"&tmp_count&":"&rs(4)&" 人次<br>"&tmp_tim&":"&rs(3)&"<br>"&tmp_typess&""&typess&"' "&new_windown&">"&joekoe_cms.code_html(rs(1),1,getlen)&"</a></td></tr><tr><td height=1 colspan=2 background='images/bg_dian.gif'></td></tr>"
rs.movenext
loop
rs.close
BBS_List=tmp1
end function






正在处理数据..

