📄 con_forum.asp
字号:
<!-- #include file="skin.asp" -->
<!-- #include file="../style/data_forum.asp" -->
<!-- #include file="jk_preview.asp" -->
<%
dim forum_config '论坛配置
joekoe_cms.ishealth=true
dim dim_forum,dim_forum_num,h_var3,ftit,forumid,viewid
dim_forum=split(web_dim(21),"|")
dim_forum_num=ubound(dim_forum)
h_var3=2
ftit=""
index_url="forum"
tit_fir=format_menu(index_url)
forumid=trim(request.querystring("forum_id"))
viewid=trim(request.querystring("view_id"))
m_channel=index_url
web_img_m="m_"&m_channel
web_img_h="h_"&m_channel
sub forum_load()
response.write joekoe_cms.js_put("style/joekoe_select.js",0)
end sub
sub forum_istops()
if var_null(application(joekoe_cms.web_cookies&"_forum_istops_state"))<>"" then
exit sub
end if
sql="select id,forum_id,username,topic,tcolor,tbb,icon,tim,istop,isvote,counter,re_counter,re_username,vote_num from bbs_topic where istop=2 order by re_tim desc"
call joekoe_cms.exec("",-1)
rs.open sql,conn,1,1
if not rs.eof then
application.lock
application(joekoe_cms.web_cookies&"_forum_istops_state")="yes"
application(joekoe_cms.web_cookies&"_forum_istops")=forum_get_istop(rs.getrows())
application.unlock
else
application.lock
application(joekoe_cms.web_cookies&"_forum_istops_state")="kong"
application(joekoe_cms.web_cookies&"_forum_istops")=""
application.unlock
end if
rs.close
end sub
function forum_get_istop(ttdim)
if not isarray(ttdim) then
forum_get_istop=""
exit function
end if
dim ttnum,tbb,topic,temp1
ttnum=ubound(ttdim,2)
for i=0 to ttnum
tbb=1
if ttdim(5,i)=false then
tbb=0
end if
topic=joekoe_cms.code_html(ttdim(3,i),1,0)
isvote=0
if ttdim(9,i) then
isvote=1
end if
temp1=temp1&vbcrlf&forum_list_body_istop(ttdim(0,i),ttdim(1,i),ttdim(2,i),topic,ttdim(4,i),tbb,ttdim(6,i),ttdim(7,i),ttdim(8,i),isvote,ttdim(10,i),ttdim(11,i),ttdim(12,i),ttdim(13,i))
next
erase ttdim
forum_get_istop=temp1
end function
sub forum_end()
call forum_end_clear()
end sub
'-------------------------------------版主权限--------------------------------------
function forum_power_true(pvar)
forum_power_true=false
if int(login_modep)=1 then
forum_power_true=true
exit function
end if
if int(login_modep)>2 or pvar="" or login_username="" then
exit function
end if
if instr("|"&lcase(pvar)&"|","|"&lcase(login_username)&"|")>0 then
forum_power_true=true
end if
end function
function forum_new_view_true(ftype,nname)
if int(ftype)>(dim_forum_num+1) then
forum_new_view_true=true
exit function
end if
forum_new_view_true=false
if ftype=0 then
dim use,u
use=split(nname,",")
for u=0 to ubound(use)
if login_username=use(u) then
forum_new_view_true=true
if isarray(use) then erase use
exit function
end if
next
forum_new_view_true=false
if isarray(use) then erase use
exit function
end if
dim f_type_var
f_type_var=dim_forum(ftype-1)
f_type_var=left(f_type_var,instr(f_type_var,":")-1)
if instr("."&f_type_var&".","."&login_modep&".")>0 then
forum_new_view_true=true
end if
end function
sub forum_end_clear()
erase dim_forum
if isarray(forum_list_sorts) then erase forum_list_sorts
if isarray(forum_config) then erase forum_config
end sub
function forum_super_view(vars,vt,n)
dim temp1,ddim,j,s_select_type
s_select_type=format_mid_num(44)
if int(vt)<>0 then
if vt=2 then vt=0
s_select_type=vt
end if
temp1="<img src='"&joekoe_cms.web_dir_skin&"forum/forum_power.gif' alt='论坛版主' align=absmiddle border=0>"
if s_select_type=0 then
if var_null(vars)="" or vars="" then
temp1=temp1&" <font class=gray>还没呢 </font>"
else
ddim=split(vars,"|")
for j=0 to ubound(ddim)
if j=n then
temp1=temp1&"<font class=gray> More</font>"
exit for
end if
temp1=temp1&" <a href='user_view.asp?username="&server.urlencode(ddim(j))&"' alt='查看(版主)"&ddim(j)&" 的详细资料' target=_blank>"&ddim(j)&"</a>"
next
end if
else
temp1=temp1&" <select name=forum_power_sel onchange=""if(this.options[this.selectedIndex].value!=''){window.open('user_view.asp?username='+this.options[this.selectedIndex].value);}""><option value='' class=gray>本版版主</option>"
if var_null(vars)="" or vars="" then
temp1=temp1&"<option value='' class=gray>还没呢</option>"
else
ddim=split(vars,"|")
for j=0 to ubound(ddim)
temp1=temp1&"<option value='"&ddim(j)&"'>"&ddim(j)&"</option>"
next
end if
temp1=temp1&"</select>"
end if
if isarray(ddim) then erase ddim
forum_super_view=temp1
end function
function forum_sea_go(st)
dim temp1
temp1=temp1&vbcrlf&"<table border=0 width='98%' cellspacing=0 cellpadding=0>" & _
vbcrlf&"<tr><td>"
if st="s" then
temp1=temp1&vbcrlf&" <table border=0>" & _
vbcrlf&" <form action='forum_search.asp?' method=get onsubmit=""javascript:frm_submitonce(this);"">" & _
vbcrlf&" <input type=hidden name=sea_fid value='"&forumid&"'>" & _
vbcrlf&" <input type=hidden name=action value='chk'>" & _
vbcrlf&" <input type=hidden name=page value='1'>" & _
vbcrlf&" <tr>" & _
vbcrlf&" <td>论坛搜索:</td>" & _
vbcrlf&" <td><select name=sea_type size=1>" & _
vbcrlf&"<option value='topic'>按主题</option>" & _
vbcrlf&"<option value='username'>按作者</option>" & _
vbcrlf&"</select></td>" & _
vbcrlf&" <td><input type=text name=keyword size=20 maxlength=20></td>" & _
vbcrlf&" <td> <input type=submit value='搜 索'></td>" & _
vbcrlf&" </tr>" & _
vbcrlf&" </form>" & _
vbcrlf&" </table>"
end if
temp1=temp1&vbcrlf&"</td>" & _
vbcrlf&"<td align=right>"&forum_go&"</td>" & _
vbcrlf&"</tr>" & _
vbcrlf&"<table>" & _
vbcrlf&ukong
forum_sea_go=temp1
end function
function forum_go()
dim gi,gj,gnum,ocid,gdim,temp1
ocid=0
temp1=temp1&vbcrlf&"<select name=forum_sort_sel size=1 onchange=""if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}"">" & _
vbcrlf&"<option value=''>快速跳转论坛至...</option>"
gnum=ubound(forum_list_sorts)
for gi=0 to gnum
gdim=split(forum_list_sorts(gi),"|")
temp1=temp1&vbcrlf&"<option value='forum_list.asp?forum_id="&gdim(0)&"'>"
if int(ocid)=int(gdim(1)) then
for gj=1 to int(gdim(2))
temp1=temp1&"│"
next
temp1=temp1&"├"
else
temp1=temp1&"╋"
ocid=gdim(1)
end if
temp1=temp1&gdim(3)&"</option>"
next
temp1=temp1&vbcrlf&"</select>"
if isarray(gdim) then erase gdim
forum_go=temp1
end function
function base_forum_istop(b_istop,b_isvote)
dim temp_b
temp_b="istop"
if b_isvote=1 then
temp_b="isvote"
elseif b_istop=2 then
temp_b="istops"
end if
base_forum_istop="<img src='"&joekoe_cms.web_dir_skin&"forum/"&temp_b&".gif' border=0>"
end function
function base_forum_isview(b_isvote,b_islock,b_re_counter,b_istop,b_isgood)
dim temp_b,hot_num
if forum_config(11)>0 then '论坛热贴数
hot_num=forum_config(11)
else
hot_num=dim_num(18)
end if
if fir_isvote then
temp_b=temp_b&"<img src='"&joekoe_cms.web_dir_skin&"forum/isvote.gif' border=0> "
else
if fir_islock=1 then
temp_b=temp_b&"<img src='"&joekoe_cms.web_dir_skin&"forum/islock.gif' border=0> "
else
if re_counter>=hot_num then
temp_b=temp_b&"<img src='"&joekoe_cms.web_dir_skin&"forum/ishot.gif' border=0> "
else
temp_b=temp_b&"<img src='"&joekoe_cms.web_dir_skin&"forum/isok.gif' border=0> "
end if
end if
end if
if fir_istop=1 then temp_b=temp_b&"<img src='"&joekoe_cms.web_dir_skin&"forum/istop.gif' border=0> "
if fir_istop=2 then temp_b=temp_b&"<img src='"&joekoe_cms.web_dir_skin&"forum/istops.gif' border=0> "
if fir_isgood=1 then temp_b=temp_b&"<img src='"&joekoe_cms.web_dir_skin&"forum/isgood.gif' border=0> "
base_forum_isview=temp_b
end function
function user_view_sex(us,utim)
dim tmpa,tmpb,tmpnum,tmpsex,tmpsname
tmpa="0"
tmpb="离线了"
tmpnum=DateDiff("s",utim,joekoe_cms.now_time)
if tmpnum<=(dim_num(2)*60) then
tmpa=""
tmpb="在线哦!有人找吗?"
end if
tmpsex="boy"
tmpsname=web_n_boy
if us=false then
tmpsex="girl"
tmpsname=web_n_girl
end if
user_view_sex="<img src='"&joekoe_cms.web_dir_skin&"small/"&tmpsex&tmpa&".gif' align=absmiddle alt='"&tmpsname&","&tmpb&"' border=0>"
end function
function forum_user_power_grade(u_int,u_power)
dim dim_power,dim_grade,si,snum,sdim,sdim2,gp_type,gp_types,gp_name,up_type,up_name,n_int,b
n_int=0
b=0
dim_power=dim_user
dim_grade=split(web_user_grade,"|")
snum=ubound(dim_power)
for si=0 to snum
sdim=split(dim_power(si),":")
if u_power=sdim(0) then
up_type=sdim(0)
up_name=sdim(1)
select case si
case 0
gp_types=up_type
gp_type="p"
case 1
gp_types=up_type
gp_type="p"
case 2
gp_type="p"
end select
end if
next
if up_type="" or up_name="" then
sdim=split(dim_power(0),":")
up_type=sdim(0)
up_name=sdim(1)
end if
snum=ubound(dim_grade)
for si=0 to snum
sdim=split(dim_grade(si),":")'''
if int(si)<>int(snum-1) then sdim2=split(dim_grade(si+1),":")
select case si
case snum-1
if int(u_int)>=int(sdim(0)) then
n_int=si
gp_name=sdim(1)
b=1
end if
case else
if int(u_int)<int(sdim2(0)) then
n_int=si
gp_name=sdim(1)
b=1
end if
end select
if b=1 then exit for
next
dim gp_type2,gp_type3
gp_type2=gp_type
gp_type3=gp_type&n_int
if gp_types<>"" and var_null(gp_types)<>"" then
gp_type3=gp_types
end if
if isarray(dim_power) then erase dim_power
if isarray(dim_grade) then erase dim_grade
if isarray(sdim) then erase sdim
if isarray(sdim2) then erase sdim2
forum_user_power_grade="<img src='"&joekoe_cms.web_dir_skin&"star/star_"&gp_type3&".gif' border=0><br>等级:<img border=0 src='"&joekoe_cms.web_dir_skin&"small/icon_"&up_type&".gif' alt='"&up_name&"' align=absmiddle> "&gp_name
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -