📄 con_forum_fir.asp
字号:
<%
dim forumf,forumn,forumw,forumstar,forumparent,forumname,forumpower,forumtype,forumpro,forumtopicnum,forumdatanum,n_names,utit
dim etc,etb,etcb,vote_n,max_word_size,min_word_size
'-------------------------------------初始化 1--------------------------------------
sub forum_first()
sql="select top 1 forum_id,class_id,forum_f,forum_n,forum_w,forum_star,forum_parent,forum_name,forum_power,forum_type,forum_pro,forum_topic_num,forum_data_num,forum_user,forum_config from bbs_forum where forum_id="&forumid&" and forum_hidden=0"
set rs=joekoe_cms.exec(sql,1)
if rs.eof then
rs.close
call format_redirect("forum.asp")
end if
'classid=rs(1)
forumf=rs(2)
forumn=rs(3)
forumw=rs(4)
forumstar=rs(5)
forumparent=rs(6)
forumname=rs(7)
forumpower=rs(8)
forumtype=rs(9)
forumpro=rs(10)
forumtopicnum=rs(11)
forumdatanum=rs(12)
n_names=rs(13)
forum_config=split(rs(14),"|")
rs.close
tit=forumname&"("&ftit&")"
utit=forumname
'if login_mode="admin" then exit sub
if forum_config(9)>0 then '颜色扣分
etc=forum_config(9)
else
etc=dim_num(11)
end if
if forum_config(10)>0 then '加粗扣分
etb=forum_config(10)
else
etb=dim_num(12)
end if
if forum_config(12)>0 then '论坛投票项数
vote_n=forum_config(12)
else
vote_n=dim_num(29)
end if
if forum_config(6)>0 then '最大字节长度
max_word_size=forum_config(6)
else
max_word_size=dim_num(4)
end if
if forum_config(5)>0 then '最小字节长度
min_word_size=forum_config(5)
else
min_word_size=dim_num(35)
end if
if forumtype=0 then
if login_username="" then call web_error("power")
dim names,n
names=split(n_names,",")
for n=0 to ubound(names)
if login_username=names(n) then
if isarray(names) then erase names
exit Sub
end if
next
call web_error("power")
end if
page_power=format_forum_type(forumtype,0,forumpro)
end sub
'-------------------------------------论坛分级--------------------------------------
sub forum_grade()
dim temp1,mdim,mnum,is_forum_grade
is_forum_grade=false
if int(format_mid_num(38))=1 or forum_config(0)=1 then is_forum_grade=true
temp1=application(joekoe_cms.web_cookies&"_forum_grade_"&forumid)
if var_null(temp1)="" then
sql="select forum_id,forum_name from bbs_forum where forum_id in ("&forumparent&") order by forum_star desc,forum_order"
call joekoe_cms.exec(sql,-1)
rs.open sql,conn,1,1
mdim=rs.getrows()
rs.close
mnum=ubound(mdim,2)
for i=0 to mnum
temp1=" → <a href='forum_list.asp?forum_id="&mdim(0,i)&"'>"&mdim(1,i)&"</a>"&temp1
next
erase mdim
application.lock
application(joekoe_cms.web_cookies&"_forum_grade_"&forumid)=temp1
application.unlock
end if
if is_forum_grade=false then
response.write vbcrlf&"<table border=0 cellspacing=1 cellpadding=1 class=table>" & _
vbcrlf&"<tr><td class=bg_td height=25>" & _
vbcrlf&"<table border=0 width='100%' class=tf><tr>" & _
vbcrlf&"<td width='88%' class=bw> <img src='skin/"&joekoe_cms.web_skin&"/forum/forum_tit.gif' align=absMiddle border=0> " & _
vbcrlf&"<a href='forum.asp'>"&tit_fir&"</a> "&temp1&" → <font title='"&joekoe_cms.code_html(ftit,1,0)&"'>"&joekoe_cms.code_html(ftit,1,35)&"</font>" & _
vbcrlf&"</td><table width='100%' border=0 cellspacing=0 cellpadding=0><td align=center><script language=javascript src='style/url.js'></script>" & _
vbcrlf&"</td>" & _
vbcrlf&"</tr></table>" & _
vbcrlf&"</td></tr>" & _
vbcrlf&"</table>"
end if
call forum_online_view()
end sub
sub forum_online_view()
dim f_online
sql="select count(l_forum_online) from user_login where l_forum_online="&forumid&""
set rs=joekoe_cms.exec(sql,1)
f_online=rs(0)
rs.close
response.write vbcrlf&"<script language=javascript>" & _
vbcrlf&"function forum_load_online(fname)" & _
vbcrlf&"{" & _
vbcrlf&" var targetimg =eval(""document.all.forum_online_img"");" & _
vbcrlf&" var targetDivtr =eval(""document.all.forum_online_tr"");" & _
vbcrlf&" var targetDiv =eval(""document.all.forum_online"");" & _
vbcrlf&" if (targetDivtr.style.display!=""block"")" & _
vbcrlf&" {" & _
vbcrlf&" document.all.forum_online_var.innerHTML=""[关闭在线列表]"";" & _
vbcrlf&" targetDivtr.style.display=""block"";" & _
vbcrlf&" targetimg.src=""/skin/"&joekoe_cms.web_skin&"/small/fk_minus.gif"";" & _
vbcrlf&" if (targetimg.loaded==""no"")" & _
vbcrlf&" {" & _
vbcrlf&" targetimg.loaded="""";" & _
vbcrlf&" document.frames[""hiddenframe""].location.replace(""forum_loadonline.asp?forum_id="&forumid&"&uppath=forum_list_view"");" & _
vbcrlf&" }" & _
vbcrlf&" }" & _
vbcrlf&" else" & _
vbcrlf&" {" & _
vbcrlf&" document.all.forum_online_var.innerHTML=""[打开在线列表]"";" & _
vbcrlf&" targetDivtr.style.display=""none"";" & _
vbcrlf&" targetimg.src=""/skin/"&joekoe_cms.web_skin&"/small/fk_plus.gif"";" & _
vbcrlf&" }" & _
vbcrlf&"}" & _
vbcrlf&"</script>" & _
vbcrlf&"<table border=0 cellspacing=1 cellpadding=1 class=table>" & _
vbcrlf&"<tr><td style=""border:1px dotted #0581c7""><table border=0 width='100%'><tr><td class=td>" & _
vbcrlf&" "&img_skin("m_forum")&"当前论坛在线 <font class=red>"&f_online&"</font> 人 <img id=forum_online_img loaded=no src='skin/"&joekoe_cms.web_skin&"/small/fk_plus.gif' align=absMiddle border=0> <span style=cursor:hand onclick='javascript:forum_load_online();' id=forum_online_var alt=打开当前论坛在线列表 style=""font-weight:100"">[打开在线列表]</a></span></td></tr>" & _
vbcrlf&"<tr style='display:none' id=forum_online_tr height=30><td id=forum_online width='100%'><div class=div_alt onclick='javascript:forum_load_online();'>正在读取在线用户数据,请稍侯……</div></td></tr></table></td></tr>" & _
vbcrlf&"</table>" & _
vbcrlf&ukong
end sub
'-------------------------------------论坛标头--------------------------------------
sub forum_top(ft)
dim temp1
temp1=vbcrlf&"<table border=0 cellspacing=0 cellpadding=0 width='98%'>" & _
vbcrlf&"<tr>" & _
vbcrlf&"<td><a href='forum_write.asp?forum_id="&forumid&"'><img src='skin/"&joekoe_cms.web_skin&"/forum/new_topic.gif' align=absMiddle border=0 title='在 "&forumname&" 里发表新主题'></a> " & _
vbcrlf&" <a href='forum_write.asp?forum_id="&forumid&"&isvote=yes'><img src='skin/"&joekoe_cms.web_skin&"/forum/new_vote.gif' align=absMiddle border=0 title='在 "&forumname&" 里发表新调查'></a> " & _
vbcrlf&" "&ft&"</td>" & _
vbcrlf&"<td align=right>"&forum_super_view(forumpower,forum_config(1),99)&" " & _
vbcrlf&"<a href=forum_xml.asp?forum_id="&forumid&" target=_blank><img src=images/rss_xml.gif border=0 align=absmiddle alt='RSS 2.0 支持'></a> <font class=gray>[<a href='forum_list.asp?forum_id="&forumid&"&action=isgood'>精华</a>] " & _
vbcrlf&"[<a href='forum_event.asp?forum_id="&forumid&"'>事件</a>] " & _
vbcrlf&"[<a href='forum_list.asp?forum_id="&forumid&"&action=manage'>管理</a>]</font></td>" & _
vbcrlf&"</tr></table>" & _
vbcrlf&ukong
response.write temp1
end sub
'-------------------------------------论坛等级--------------------------------------
function format_forum_type(fvars,ft,fpros)
if isnumeric(fpros) and int(ft)=1 then
if int(fpros)=1 then
format_forum_type="只读论坛"
exit function
end if
end if
dim fvar
fvar=fvars-1
format_forum_type=""
for i=0 to ubound(dim_forum)
if int(ft)=0 then
if fvar=i then
format_forum_type=left(dim_forum(i),instr(dim_forum(i),":")-1)
exit for
end if
else
if fvar=i then
format_forum_type=right(dim_forum(i),len(dim_forum(i))-instr(dim_forum(i),":"))
exit for
end if
end if
next
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -