📄 con_forum_main.asp
字号:
<%
Sub forum_bar_top(tit,body)
dim tmp
tmp=CMS_Skin.GetDB("forum_bar")
tmp=Replace(tmp,"{$img}",img_skin(web_img_m))
tmp=Replace(tmp,"{$tit}",tit)
tmp=Replace(tmp,"{$body}",body)
tmp=Replace(tmp,"{$ukong}",CMS_Skin.skukong)
Response.Write(vbcrlf&tmp)
end Sub
function login_forum()
dim tmp
if login_mode="" then
tmp=CMS_Skin.GetDB("login_forum1")
tmp=Replace(tmp,"{$web_skin}",joekoe_cms.web_dir_skin)
login_forum=tmp
exit function
end if
tmp=CMS_Skin.GetDB("login_forum2")
tmp=Replace(tmp,"{$web_skin}",joekoe_cms.web_dir_skin)
tmp=Replace(tmp,"{$login_username}",login_username)
tmp=Replace(tmp,"{$login_mode}",format_power(login_mode,1))
tmp=Replace(tmp,"{$login_integral}",login_integral)
tmp=Replace(tmp,"{$login_emoney}",login_emoney)
tmp=Replace(tmp,"{$login_msg}",login_msg)
login_forum=tmp
end function
function forum_main()
dim classid,forum_w,forum_w2,f_remark,fcid,forum_new_info,f_new_view,mdim,mnum,n,n2,o_dim,j,f_online
fcid=0
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,class_id,forum_user,forum_config from bbs_forum where forum_hidden=0 and forum_star<2 order by class_id,forum_order,forum_star"
call joekoe_cms.exec("",-1)
rs.open sql,conn,1,1
if not rs.eof then mdim=rs.getrows()
rs.close
mnum=-1
if isarray(mdim) then mnum=ubound(mdim,2)
for i=0 to mnum
classid=mdim(13,i)
if cint(fcid)<>cint(classid) then
if cint(classid)>cint(fcid) and cint(fcid)>0 then response.write vbcrlf&forum_main_end("")
response.write vbcrlf&forum_main_head(mdim(3,i),mdim(0,i))
fcid=classid
else
forum_w=mdim(2,i)
f_remark=mdim(11,i)
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(14,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(15,i),f_online)
response.buffer
end if
next
if mnum>=0 then erase mdim
if isarray(o_dim) then erase o_dim
if cint(fcid)>0 then response.write vbcrlf&forum_main_end("")
end function
sub forum_user_stat(w_num)
dim temp1,tmp
temp1=application(joekoe_cms.web_cookies&"_forum_cast")
if var_null(temp1)="" then
sql="select top "&w_num&" id,topic,tim from bbs_cast where sort='forum' order by id desc"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then
temp1="<a href='update.asp?action=forum#"&rs("id")&"' target=_blank>"&joekoe_cms.code_html(rs("topic"),1,0)&"</a> <font class=tims>"&joekoe_cms.time_type(rs("tim"),4)&"</font>"
end if
rs.close
application(joekoe_cms.web_cookies&"_forum_cast")=temp1
end if
tmp=CMS_Skin.GetDB("forum_data")
tmp=Replace(tmp,"{$hei}",m_hei)
tmp=Replace(tmp,"{$web_skin}",joekoe_cms.web_dir_skin)
tmp=Replace(tmp,"{$num_topic}",num_topic)
tmp=Replace(tmp,"{$num_data}",num_data)
tmp=Replace(tmp,"{$new_num}",new_num)
tmp=Replace(tmp,"{$last_num}",bbs_lday)
tmp=Replace(tmp,"{$num_reg}",num_reg)
tmp=Replace(tmp,"{$online_num}",online_num)
tmp=Replace(tmp,"{$new_user}",format_user_name(new_username,0,""))
tmp=Replace(tmp,"{$gg}",temp1)
tmp=Replace(tmp,"{$login_forum}",login_forum())
call forum_bar_top("论坛数据",tmp)
end sub
sub forum_down()
dim udim,counter_r,tmp,recycle,birthday,f_online_view
sql="select count(*) from user_login where l_type=0"
set rs=joekoe_cms.exec(sql,1)
counter_r=rs(0)
rs.close
if login_mode="admin" then recycle="<td width=30 align=center><img src="&joekoe_cms.web_dir_skin&"forum/other_forum.gif border=0></td><td><a href=forum_recycle.asp>论坛回收站</a></td>"
if format_mid_num(42)<>1 then
birthday="<td width=30 align=center><img src="&joekoe_cms.web_dir_skin&"forum/other_forum.gif border=0 align=absmiddle></td><td><a href=forum.asp?birthday=view>打开今日生日栏</a></td>"
if trim(request.querystring("birthday"))="view" then birthday="<td width=30 align=center><img src="&joekoe_cms.web_dir_skin&"forum/other_forum.gif border=0 align=absmiddle></td><td><a href=forum.asp>关闭今日生日栏</a></td>"
end if
f_online_view="<td width=30 align=center><img src="&joekoe_cms.web_dir_skin&"forum/other_forum.gif border=0></td><td><a href=online1.asp?action=forum_view>查看在线用户论坛位置</a></td>"
tmp=CMS_Skin.GetDB("forum_more")
tmp=Replace(tmp,"{$img_user}",img_user)
tmp=Replace(tmp,"{$user_ip}",user_ip)
tmp=Replace(tmp,"{$user_sys}",user_sys_type(user_sys))
tmp=Replace(tmp,"{$hei}",m_hei)
tmp=Replace(tmp,"{$online_num}",online_num)
tmp=Replace(tmp,"{$counter_r}",counter_r)
tmp=Replace(tmp,"{$guest_num}",(online_num-counter_r))
tmp=Replace(tmp,"{$web_skin}",joekoe_cms.web_dir_skin)
tmp=Replace(tmp,"{$f_online_view}",f_online_view)
tmp=Replace(tmp,"{$birthday}",birthday)
tmp=Replace(tmp,"{$recycle}",recycle)
tmp=Replace(tmp,"{$now_time}",joekoe_cms.now_time)
call forum_bar_top("论坛图例",tmp)
end sub
sub user_birthday()
dim temp1,nnum,username,power,ta
temp1=""
nnum=0
ta="'"
sql="select username,sex,power,tim,last_tim from user_data where hidden=1 and month(birthday)="&month(joekoe_cms.now_time)&" and day(birthday)="&day(joekoe_cms.now_time)&" order by id"
call joekoe_cms.exec(sql,-1)
rs.open sql,conn,1,1
do while not rs.eof
temp1=temp1&"<tr>"
for i=1 to 5
if rs.eof then exit for
username=rs(0)
power=rs(2)
temp1=temp1&"<td>"&user_view_sex(rs(1),rs(4))&" <a href='user_view.asp?username="&server.urlencode(username)&"' alt='用户类型:"&format_power(power,1)&"<br>注册时间:"&joekoe_cms.time_type(rs(3),1)&"' target=_blank>"&username&"</a></td>"
rs.movenext
nnum=nnum+1
next
temp1=temp1&"</tr>"
loop
rs.close
response.write vbcrlf&"<table cellspacing=1 cellpadding=1 class=table>" & _
vbcrlf&"<tr><td class=td> "&img_skin(web_img_m)&" 今天过生日的用户(共 <font class=red>"&nnum&"</font> 人)</td></tr>" & _
vbcrlf&"<tr><td class=bg_td align=center>" & _
vbcrlf&" <table border=0 width='98%' cellspacing=0 cellpadding=2>" & _
vbcrlf&" <tr><td width='20%' height=5></td><td width='20%'></td><td width='20%'></td><td width='20%'></td><td width='20%'></td></tr>"
if temp1="" then
response.write vbcrlf&"<tr><td colspan=5 class=gray> 今天没有过生日的用户</td></tr>"
else
response.write vbcrlf&temp1
end if
response.write vbcrlf&" <tr><td height=5></td></tr>" & _
vbcrlf&" </table>" & _
vbcrlf&"</td></tr>" & _
vbcrlf&"</table>"
end sub
sub forum_links()
%>
<table cellspacing=1 cellpadding=1 class=table>
<tr><td class=td> <%response.write img_skin(web_img_m)%> 论坛链接</td></tr>
<tr><td class=bg_td align=center>
<script language=javascript src='style/data_link_forum_main.js'></script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -