📄 con_forum_list.asp
字号:
<%
dim isvote
sub forum_list_main()
dim forum_w,forum_w2,f_remark,forum_new_info,f_new_view,mdim,mnum,o_dim,j,f_online
sql="select l_forum_online from user_login where l_forum_online<>0"
call joekoe_cms.exec("",-1)
rs.open sql,conn,1,1
if not rs.eof then o_dim=rs.getrows()
rs.close
sql="select forum_id,forum_n,forum_w,forum_name,forum_type,forum_pro,forum_new_info,forum_new_num,forum_topic_num,forum_data_num,forum_power,forum_remark,forum_pic,forum_user,forum_config " & _
"from bbs_forum where forum_f="&forumid&" and forum_hidden=0 order by forum_order,forum_id"
call joekoe_cms.exec(sql,-1)
rs.open sql,conn,1,1
mnum=-1
if not rs.eof then
mdim=rs.getrows()
mnum=ubound(mdim,2)
end if
rs.close
for i=0 to mnum
forum_w=mdim(2,i)
f_remark=mdim(11,i)
f_remark=replace(f_remark,vbcrlf,"<br>")
forum_w2=1
if forum_w=false then forum_w2=0
forum_new_info=""
f_new_view=forum_new_view_true(mdim(4,i),mdim(13,i))
if f_new_view=true then
forum_new_info=mdim(6,i)
end if
f_online=0
if isarray(o_dim) then
for j=0 to ubound(o_dim,2)
if o_dim(0,j)=mdim(0,i) then f_online=f_online+1
next
end if
response.write vbcrlf&forum_main_body(mdim(0,i),mdim(1,i),forum_w2,mdim(3,i),mdim(4,i),mdim(5,i),forum_new_info,mdim(7,i),mdim(8,i),mdim(9,i),mdim(10,i),f_remark,mdim(12,i),f_new_view,mdim(14,i),f_online)
next
if int(mnum)>-1 then erase mdim
if isarray(o_dim) then erase o_dim
end sub
sub forum_list_istop()
page=trim(request.querystring("page"))
if not(isnumeric(page)) then page=1
if int(page)>1 or action="manage" then exit sub
dim istop_true,forum_istop_var
istop_true=false
forum_istop_var=application(joekoe_cms.web_cookies&"_forum_istop_"&forumid)
if application(joekoe_cms.web_cookies&"_forum_istops_state")="yes" or var_null(forum_istop_var)<>"" then istop_true=true
if instr(application(joekoe_cms.web_cookies&"_forum_istop_state"),","&forumid&",")=0 or var_null(application(joekoe_cms.web_cookies&"_forum_istop_state_"&forumid))="" or var_null(forum_istop_var)="" then
sql="select id,forum_id,username,topic,tcolor,tbb,icon,tim,istop,isvote,counter,re_counter,re_username,vote_num from bbs_topic where forum_id="&forumid&" and istop=1 order by re_tim desc"
call joekoe_cms.exec(sql,-1)
rs.open sql,conn,1,1
application.lock
if not rs.eof then
application(joekoe_cms.web_cookies&"_forum_istop_state_"&forumid)="yes"
application(joekoe_cms.web_cookies&"_forum_istop_"&forumid)=forum_get_istop(rs.getrows())
istop_true=true
else
application(joekoe_cms.web_cookies&"_forum_istop_state_"&forumid)="kong"
application(joekoe_cms.web_cookies&"_forum_istop_"&forumid)=""
end if
application(joekoe_cms.web_cookies&"_forum_istop_state")=application(joekoe_cms.web_cookies&"_forum_istop_state")&","&forumid&","
application.unlock
rs.close
forum_istop_var=application(joekoe_cms.web_cookies&"_forum_istop_"&forumid)
end if
if istop_true then response.write vbcrlf&forum_list_istop_top()
if application(joekoe_cms.web_cookies&"_forum_istops_state")="yes" then response.write application(joekoe_cms.web_cookies&"_forum_istops")
if var_null(forum_istop_var)<>"" then response.write forum_istop_var
if istop_true then
response.write vbcrlf&forum_list_istop_end()
call web_branch(0)
end if
end sub
sub list_body()
dim bdim,btrue,tbb,topic,sql_add,pageurl
btrue=true
pageurl="?forum_id="&forumid&"&action="&action&"&"
sql_add=""
if action="isgood" then
sql_add=" and isgood=1"
sql="select count(id) from bbs_topic where istop=0 and forum_id="&forumid&sql_add
set rs=joekoe_cms.exec(sql,1)
forumtopicnum=rs(0)
rs.close
end if
response.write vbcrlf&forum_list_top(nummer)
rssum=forumtopicnum
call format_pagecute()
sql="select top "&nummer*viewpage&" id,forum_id,username,topic,tcolor,tbb,mode,tim,counter,re_username,re_counter,re_tim,istop,islock,isgood,isvote,vote_num from bbs_topic where istop=0 and forum_id="&forumid&sql_add&" order by re_tim desc"
call joekoe_cms.exec(sql,-1)
rs.open sql,conn,1,1
'rs.movefirst
if int(viewpage)>1 then rs.move (viewpage-1)*nummer
if rs.eof then
rs.close
btrue=false
end if
if btrue then
bdim=rs.getrows(nummer)
rs.close
for i=0 to ubound(bdim,2)
tbb=1
if bdim(5,i)=false then tbb=0
topic=joekoe_cms.code_html(bdim(3,i),1,0)
isvote=0
if bdim(15,i) then isvote=1
response.write vbcrlf&forum_list_body("",bdim(0,i),bdim(1,i),bdim(2,i),topic,bdim(4,i),tbb,Trim(bdim(6,i)),joekoe_cms.time_type(bdim(7,i),1),bdim(8,i),bdim(9,i),bdim(10,i),joekoe_cms.time_type(bdim(11,i),1),bdim(12,i),bdim(13,i),bdim(14,i),isvote,bdim(16,i))
next
erase bdim
end if
response.write vbcrlf&forum_list_end & _
vbcrlf&forum_list_pagecute(nummer,rssum,viewpage,thepages,pageurl)
end sub
sub list_end(ft)
response.write forum_sea_go("s")
response.write forum_img_topic
end sub
function forum_list_istop_top()
forum_list_istop_top=CMS_Skin.GetDB("forum_top_bar")
end function
function forum_list_body_istop(l_id,l_forum_id,l_username,l_topic,l_tcolor,l_tbb,l_icon,l_tim,l_istop,l_isvote,l_counter,l_re_counter,l_re_username,l_vote_num)
dim tmp,l_istop_var,new_win,folder_istop,topic_head,topic_color,topic_bb,vote
l_istop_var="istop"
new_win="new_win"
folder_istop=base_forum_istop(l_istop,l_isvote)
topic_head=" "
topic_color=""
if l_tcolor<>"" then topic_color="><font color='"&l_tcolor&"'"
topic_bb=""
if l_tbb=1 or l_tbb="1" then topic_bb="<b>"
if topic_is_new(l_tim)="new" then new_win="new"
if l_isvote=1 then
vote="<td colspan=2>共 <font class=red>"&l_vote_num&"</font> 票</td>"
else
vote="<td>"&l_re_counter&"</td><td>"&l_counter&"</td>"
end if
tmp=CMS_Skin.GetDB("forum_top")
tmp=Replace(tmp,"{$folder_istop}",folder_istop)
tmp=Replace(tmp,"{$web_dir}",joekoe_cms.web_dir)
tmp=Replace(tmp,"{$icon}",l_icon)
tmp=Replace(tmp,"{$topic_head}",topic_head)
tmp=Replace(tmp,"{$topic_bb}",topic_bb)
tmp=Replace(tmp,"{$forum_id}",l_forum_id)
tmp=Replace(tmp,"{$id}",l_id)
tmp=Replace(tmp,"{$topic_color}",topic_color)
tmp=Replace(tmp,"{$topics}",joekoe_cms.code_html(l_topic,1,0))
tmp=Replace(tmp,"{$tim}",l_tim)
tmp=Replace(tmp,"{$list_pagecute}",joekoe_cms.js_put("document.write (list_pagecute('forum_view.asp?forum_id="&l_forum_id&"&view_id="&l_id&"',"&l_re_counter+1&","&dim_num(1)&"));",1))
tmp=Replace(tmp,"{$topic}",joekoe_cms.code_html(l_topic,1,0))
tmp=Replace(tmp,"{$format_user}",format_user_name(l_username,1,""))
tmp=Replace(tmp,"{$last_user}",format_user_name(l_re_username,1,""))
tmp=Replace(tmp,"{$web_skin}",joekoe_cms.web_dir_skin)
tmp=Replace(tmp,"{$new_win}",new_win)
tmp=Replace(tmp,"{$vote}",vote)
tmp=Replace(tmp,"{$time_type}",joekoe_cms.time_type(l_tim,3))
forum_list_body_istop=tmp
end function
function forum_list_istop_end()
forum_list_istop_end="</table>"&ukong
end function
function forum_list_top(l_nummer)
forum_list_top=CMS_Skin.GetDB("forum_list_bar")
forum_list_top=Replace(forum_list_top,"{$nummer}",l_nummer)
forum_list_top=Replace(forum_list_top,"{$web_skin}",joekoe_cms.web_dir_skin)
if action="manage" then forum_list_top=forum_list_top&"<form name=del_frm action='forum_isaction.asp' method=get>"
end function
function forum_list_body(l_istop_var,l_id,l_forum_id,l_username,l_topic,l_tcolor,l_tbb,l_mode,l_tim,l_counter,l_re_username,l_re_counter,l_re_tim,l_istop,l_islock,l_isgood,l_isvote,l_vote_num)
dim tmp,folder_is,new_win,topic_head,topic_color,topic_bb,vote,topics,topic
folder_is=base_forum_is(l_re_counter,l_istop,l_islock,l_isgood,l_isvote,l_vote_num)
new_win="new_win"
if l_mode<>"" then
l_mode="<img src='"&joekoe_cms.web_dir&"images/mode/"&l_mode&".gif' border=0>"
else
l_mode=""
end if
topics=joekoe_cms.code_html(l_topic,1,0)
topic=joekoe_cms.code_html(l_topic,1,28)
topic_head="<img src='"&joekoe_cms.web_dir_skin&"small/fk_minus.gif' border=0 align=absMiddle id=followImg"&l_istop_var&l_id&">"
topic_color=""
if l_tcolor<>"" then topic_color="><font color='"&l_tcolor&"'"
topic_bb=""
if l_tbb=1 or l_tbb="1" then topic_bb="<b>"
if topic_is_new(l_tim)="new" then new_win="new"
if l_re_counter>0 then topic_head="<img loaded=no src='"&joekoe_cms.web_dir_skin&"small/fk_plus.gif' border=0 align=absMiddle id=followImg"&l_istop_var&l_id&" style=""cursor:hand;"" onclick=""javascript:load_tree("&l_forum_id&","&l_id&",'"&l_istop_var&"')"" alt='展开贴子列表'>"
if action="manage" and int(forumid)=int(l_forum_id) and l_istop_var="" then topic_head="<input type=checkbox name=sel_id value='"&l_id&"' class=bg_tds>"
if l_isvote=1 then
vote="<td colspan=2>共 <font class=red>"&l_vote_num&"</font> 票</td>"
else
vote="<td>"&l_re_counter&"</td><td>"&l_counter&"</td>"
end if
tmp=CMS_Skin.GetDB("forum_list")
tmp=Replace(tmp,"{$folder_is}",folder_is)
tmp=Replace(tmp,"{$topic_head}",topic_head)
tmp=Replace(tmp,"{$topic_bb}",topic_bb)
tmp=Replace(tmp,"{$mode}",l_mode)
tmp=Replace(tmp,"{$forum_id}",l_forum_id)
tmp=Replace(tmp,"{$id}",l_id)
tmp=Replace(tmp,"{$topic_color}",topic_color)
tmp=Replace(tmp,"{$topics}",topics)
tmp=Replace(tmp,"{$topic}",topic)
tmp=Replace(tmp,"{$tim}",l_tim)
tmp=Replace(tmp,"{$list_pagecute}",joekoe_cms.js_put("document.write (list_pagecute('forum_view.asp?forum_id="&l_forum_id&"&view_id="&l_id&"',"&l_re_counter+1&","&dim_num(1)&"));",1))
tmp=Replace(tmp,"{$format_user}",format_user_name(l_username,1,""))
tmp=Replace(tmp,"{$last_user}",format_user_name(l_re_username,1,""))
tmp=Replace(tmp,"{$web_skin}",joekoe_cms.web_dir_skin)
tmp=Replace(tmp,"{$new_win}",new_win)
tmp=Replace(tmp,"{$vote}",vote)
tmp=Replace(tmp,"{$time_type}",joekoe_cms.time_type(l_re_tim,3))
tmp=Replace(tmp,"{$istop_var}",l_istop_var)
forum_list_body=tmp
end function
function forum_list_end()
dim temp1
if action="manage" then
temp1=temp1&vbcrlf&"<input type=hidden name=forum_id value='"&forumid&"'>" & _
vbcrlf&"<tr class=bg_td><td colspan=8 height=30 align=center>" & _
vbcrlf&" <table border=0>" & _
vbcrlf&" <tr>" & _
vbcrlf&" <td>版面管理:</td>" & _
vbcrlf&" <td><input class=bg_td type=checkbox name=sel_all onClick=""javascript:select_all(this.form);""> 选中所有</td>" & _
vbcrlf&" <td><input class=bg_td type=radio name=action value='revert' checked>还原</td>" & _
vbcrlf&" <td><input class=bg_td type=radio name=action value='restore'>修复</td>" & _
vbcrlf&" <td><input class=bg_td type=radio name=action value='rap'>奖惩</td>" & _
vbcrlf&" <td><input class=bg_td type=radio name=action value='move'>转移</td>" & _
vbcrlf&" <td><input class=bg_td type=radio name=action value='istop'>固顶</td>" & _
vbcrlf&" <td><input class=bg_td type=radio name=action value='istops'>总固顶</td>" & _
vbcrlf&" <td><input class=bg_td type=radio name=action value='isgood'>精华</td>" & _
vbcrlf&" <td><input class=bg_td type=radio name=action value='islock'>锁定</td>" & _
vbcrlf&" <td><input class=bg_td type=radio name=action value='delete'>删除</td>" & _
vbcrlf&" <td width=2></td>" & _
vbcrlf&" <td><input type=submit value='执行操作' onclick=""javascript:return sel_click(this.form);""></td>" & _
vbcrlf&" </tr>" & _
vbcrlf&" </table>" & _
vbcrlf&"</td></tr>" & _
vbcrlf&"</form>"
end if
temp1=temp1&vbcrlf&"</table>"
forum_list_end=temp1
end function
function forum_list_pagecute(p_nummer,p_rssum,p_viewpage,p_thepages,p_pageurl)
dim temp1
temp1=temp1&vbcrlf&"<table cellspacing=1 cellpadding=1 class=table>" & _
vbcrlf&"<tr height=28><td class=bg_tds>" & _
vbcrlf&" 主题:<font class=red>"&forumtopicnum&"</font> " & _
vbcrlf&"页次:<font class=red>"&p_viewpage&"</font>/<font class=red>"&p_thepages&"</font> " & _
vbcrlf&" 分页:"&jk_pagecute(p_nummer,p_thepages,p_viewpage,p_pageurl,10,"#ff0000") & _
vbcrlf&"</td><form method=post action='forum_list.asp"&p_pageurl&p_thepages&"'><td align=right class=bg_tds>转到:<input type=text name=Page size=3 maxlength=10 value='"&p_viewpage&"'> <input type=submit value=Go name=submit> </td></form></tr>" & _
vbcrlf&"</table>"&ukong
forum_list_pagecute=temp1
end function
function topic_is_new(t_time)
dim isnew
isnew=""
if datediff("d",t_time,joekoe_cms.now_time)<2 then isnew="new"
topic_is_new=isnew
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -