⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config_forum.asp

📁 漂亮的企业网站系统v11 1、整体修改了上一版的一些BUG。 2、修改了页面底部的统计形式。 3、修改了“公告更新”栏目
💻 ASP
📖 第 1 页 / 共 4 页
字号:
end sub

function forum_go()
  dim rsclass,strsqlclass,rsboard,strsqlboard,fb:fb=""
  forum_go=vbcrlf & "<select onchange=""if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}"">" & _
	   vbcrlf & "<option selected>快速跳转论坛至...</option>"
  strsqlclass="select class_id,class_name from bbs_class order by class_order"
  set rsclass=conn.execute(strsqlclass)
  if not(rsclass.bof and rsclass.eof) then
    do while not rsclass.eof
      call forum_go_board(rsclass("class_id"),0,0,fb)
      forum_go=forum_go & vbcrlf & "<option class=bg_2>╋ "& rsclass("class_name") &"</option>"
      forum_go=forum_go & fb
      fb=""
      rsclass.movenext
    loop
  end if
  set rsclass=nothing:set rsboard=nothing
  forum_go=forum_go & vbcrlf & "<option class=bg_2>————————</option>" & _
	   vbcrlf & "<option value='forum.asp' class=bg_1>"&tit_fir&"首页</option>" & _
	   vbcrlf & "<option class=bg_2>————————</option>" & _
	   vbcrlf & "<option value='forum_action.asp?action=new'> ♀ 论坛新贴</option>" & _
	   vbcrlf & "<option value='forum_action.asp?action=tim'> ♀ 回复新贴</option>" & _
	   vbcrlf & "<option value='user_action.asp?action=list'> ♀ 用户列表</option>" & _
	   vbcrlf & "<option value='help.asp?action=forum'> ♀ 论坛帮助</option>" & _
	   vbcrlf & "</select>"
end function

'-------------------------------------主题分页--------------------------------------
function index_pagecute(viewurl,replynum,pagecutenum,pagecutecolor)
  dim pagecutepage,pagecutei
  index_pagecute=""
  if replynum mod pagecutenum > 0 then
    pagecutepage=replynum\pagecutenum+1
  else
    pagecutepage=replynum\pagecutenum
  end if
  if pagecutepage>1 then
    for pagecutei=2 to 3
      if pagecutei>pagecutepage then exit for
      index_pagecute=index_pagecute & vbcrlf & "<a href='" & viewurl & "&page=" & pagecutei & "'><font color='" & pagecutecolor & "' title='第 " & pagecutei & " 页'>[" & pagecutei & "]</font></a>"
    next
    if pagecutepage>3 then
      if pagecutepage=4 then
        index_pagecute=index_pagecute & vbcrlf & "<a href='" & viewurl & "&page=4'><font color='" & pagecutecolor & "' title='第 4 页'>[4]</font></a>"
      else
        index_pagecute=index_pagecute & vbcrlf & "<font color='" & pagecutecolor & "'>… </font>" & "<a href='" & viewurl & "&page=" & pagecutepage & "'><font color='" & pagecutecolor & "' title='第 " & pagecutepage & " 页'>[" & pagecutepage & "]</font></a>"
      end if
    end if
  end if
  if len(index_pagecute)>1 then index_pagecute="<img src='images/small/page_head.gif' align=absMiddle alt='快速分页' border=0>"&index_pagecute
end function

'---------------------------------------main----------------------------------------
sub forum_down(dt)
  dim udim,ui,j,dts,sql,rs,l_username,forum_table4,online
  online=trim(request.querystring("online"))
  j=5:dts=0:forum_table4=format_table(3,1)
  if forum_mode="full" then j=8
  if online="close" or dt=1 then dts=0
  if online="open" then dts=1
  response.write forum_table1
%>
<tr<%response.write forum_table2%>><td>&nbsp;<%response.write img_small("fk4") %>&nbsp;<font class=end><b>论坛图例</b></font></td></tr>
<tr<%response.write forum_table4%>><td align=center height=30><% response.write ip_sys(0,0) %></td></tr>
<tr<%response.write forum_table4%>><td align=center height=30><%response.write user_power_type(0)%></td></tr>
<tr<%response.write forum_table4%>><td align=center>
  <table border=0 width='98%'>
  <tr><td colspan=5>网站当前总共有 <font class=red><%response.write online_num%></font> 人在线,其中注册用户 <font class=red>
  <%sql="select count(l_id) from user_login where l_type=0"
  set rs=conn.execute(sql)
  response.write rs(0)
  rs.close%></font> 人。<img src='images/small/new.gif'> [ <a href='?mode=<%response.write forum_mode%>&online=<%
if dts=0 then
  response.write "open'>关闭"
else
  response.write "close'>打开"
end if
%>在线列表</a> ] </td></tr>
<%if dts<>1 then%>
  <tr><td width='20%'></td><td width='20%'></td><td width='20%'></td><td width='20%'></td><td width='20%'></td></tr>
<%
  sql="select user_login.*,user_data.power from user_data inner join user_login on user_login.l_username=user_data.username where user_login.l_type=0 order by user_login.l_id"
  set rs=conn.execute(sql)
  do while not rs.eof
    response.write "<tr>"
    for ui=1 to 5
      if rs.eof then exit for
      l_username=rs("l_username")
      response.write "<td>"&img_small("icon_"&rs("power"))&"<a href='user_view.asp?username="&server.urlencode(l_username)&"' title='目前位置:"&rs("l_where")&"<br>来访时间:"&rs("l_tim_login")&"<br>活动时间:"&rs("l_tim_end")&"<br>"&ip_types(rs("l_ip"),l_username,0)&"<br>"&view_sys(rs("l_sys"))&"' target=_blank>"&l_username&"</a></td>"
      rs.movenext
    next
    response.write "</tr>"
  loop
  rs.close
set rs=nothing

dim abc
  sql="select * from user_login where l_type=1 order by l_id"
  set rs=conn.execute(sql)
  do while not rs.eof
    response.write "<tr>"
    for ui=1 to 5
      if rs.eof then exit for
        l_username=rs("l_username")
		if l_username=request.cookies("joekoe_online")("guest_name") then
		abc="class=blue"
		else
		abc=""
		end if
        response.write "<td>"&img_small("icon_other")&"<font "&abc&" title='目前位置:"&rs("l_where")&"<br>来访时间:"&rs("l_tim_login")&"<br>活动时间:"&rs("l_tim_end")&"<br>"&ip_types(rs("l_ip"),l_username,0)&"<br>"&view_sys(rs("l_sys"))&"' target=_blank>游客</font></td>"
        rs.movenext
      next
    response.write "</tr>"
  loop
  rs.close
end if
set rs=nothing
%>
  </table>
</td></tr>
</table>
<table border=0 width='100%'>
<tr<%response.write forum_table4%>><td align=center height=50>
<%
udim=split(forum_type,"|")
for ui=0 to ubound(udim)
  response.write vbcrlf&"&nbsp;<img src='images/"&web_var(web_config,5)&"/label_"&ui+1&".gif' title='无新贴' border=0 align=absmiddle><img src='images/"&web_var(web_config,5)&"/label_"&ui+1&"n.gif' title='有新贴' border=0 align=absmiddle>&nbsp;"&right(udim(ui),len(udim(ui))-instr(udim(ui),":"))&"&nbsp;"
next
erase udim
%>
</td></tr>
<tr<%response.write forum_table4%>><td align=center height=20>
网站时间格式:<font class=gray>年-月-日 时:分:秒</font> 当前时间:<%response.write now_time%> &nbsp;论坛显示模式:<a href='?online=<%response.write online%>&mode=<%
if forum_mode="full" then
  response.write "half'>半屏"
else
  response.write "full'>全屏"
end if
%>模式</a>
</td></tr>
</table>
<%
  response.write kong
end sub
sub forum_cast(nh,nj,n_num,c_num)
  dim temp1,njj,topic,tbb:njj=""
  if nj<>"" then njj=img_small(nj)
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  sql="select top "&n_num&" id,topic,username,tim from bbs_cast where sort='forum' order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    topic=rs("topic")
    temp1=temp1&"<tr><td class=bw height="&space_mod&">"&njj&"<a href='update.asp?action=forum&id="&rs("id")&"' target=_blank title='公告标题:"&code_html(topic,1,0)&"<br>管 理 员:"&rs("username")&"<br>发布时间:"&time_type(rs("tim"),88)&"'>"&code_html(topic,1,c_num)&"</a></td></tr>"
    rs.movenext
  loop
  temp1=temp1&"</table>"
  response.write "<table  border='0' cellspacing='0' cellpadding='0'><tr><td width='100%' height=4></td></tr></table>"&forum_table1&"<tr"&forum_table2&"><td> "&img_small("fk4") &" <font class=end><b>论坛公告</b></font></td></tr><tr"&forum_table4&"><td align=center height=30>"&temp1&"</td></tr></table>"
end sub

sub forum_cast_2(nh,nj,n_num,c_num)
  dim temp1,njj,topic,tbb:njj=""
  if nj<>"" then njj=img_small(nj)
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  sql="select top "&n_num&" id,topic,username,tim from bbs_cast where sort='forum' order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    topic=rs("topic")
    temp1=temp1&"<tr><td class=bw height="&space_mod&"><img src='IMAGES/SMALL/forum_01.gif'>&nbsp;<a href='update.asp?action=forum&id="&rs("id")&"' target=_blank title='公告标题:"&code_html(topic,1,0)&"<br>管 理 员:"&rs("username")&"<br>发布时间:"&time_type(rs("tim"),88)&"'>"&code_html(topic,1,c_num)&"</a></td></tr>"
    rs.movenext
  loop
  temp1=temp1&"</table>"
  response.write temp1&kong
end sub

sub forum_new(nh,nj,fid,n_num,c_num,tb)
  dim temp1,njj,topic,tbb:njj="":tbb=""
  if nj<>"" then njj=img_small(nj)
  if tb=1 then tbb=" target=_blank"
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  sql="select top "&n_num&" id,forum_id,topic,tim,username,re_username from bbs_topic where forum_id not in (select forum_id from bbs_forum where forum_info_disp<>0)"
  if fid>0 then sql=sql&" and forum_id="&fid
  sql=sql&" order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    topic=rs("topic")
    temp1=temp1&"<tr><td class=bw height="&space_mod&" >"&njj&"<a href='forum_view.asp?forum_id="&rs("forum_id")&"&view_id="&rs("id")&"'"&tbb&" title='贴子主题:"&code_html(topic,1,c_num)&"<br>发 贴 人:"&rs("username")&"<br>发贴时间:"&time_type(rs("tim"),88)&"<br>最后回复:"&rs("re_username")&"'>"&code_html(topic,1,c_num)&"</a></td></tr>"
    rs.movenext
  loop
  temp1=temp1&"</table>"
  response.write"<table  border='0' cellspacing='0' cellpadding='0'><tr><td width='100%' height=4></td></tr></table>"&forum_table1&"<tr"&forum_table2&"><td> "&img_small("fk4") &" <font class=end><b>论坛新贴</b></font></td></tr><tr"&forum_table4&"><td align=center height=30>"&temp1&"</td></tr></table>"
end sub

sub forum_new_2(nh,nj,fid,n_num,c_num,tb)
  dim temp1,njj,topic,tbb:njj="":tbb=""
  if nj<>"" then njj=img_small(nj)
  if tb=1 then tbb=" target=_blank"
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  sql="select top "&n_num&" id,forum_id,topic,tim,username,re_username from bbs_topic where forum_id not in (select forum_id from bbs_forum where forum_info_disp<>0)"
  if fid>0 then sql=sql&" and forum_id="&fid
  sql=sql&" order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    topic=rs("topic")
    temp1=temp1&"<tr><td class=bw height="&space_mod&"><img src='IMAGES/SMALL/forum_02.gif'>&nbsp;<a href='forum_view.asp?forum_id="&rs("forum_id")&"&view_id="&rs("id")&"'"&tbb&" title='贴子主题:"&code_html(topic,1,c_num)&"<br>发 贴 人:"&rs("username")&"<br>发贴时间:"&time_type(rs("tim"),88)&"<br>最后回复:"&rs("re_username")&"'>"&code_html(topic,1,c_num)&"</a></td></tr>"
    rs.movenext
  loop
  temp1=temp1&"</table>"
    response.write temp1&kong
end sub

function forum_main(mh)
  dim rsclass,strsqlclass,rsforum,strsqlforum,rstopic,sqltopic,topics,classid,forumid,forumname,forum_type,forum_new_info,forum_pic,new_info_dim,forumpic,forumn,forumw,ftn
  strsqlclass="select class_id,class_name from bbs_class order by class_order"
  set rsclass=conn.execute(strsqlclass)
  do while not rsclass.eof
    classid=rsclass("class_id")
    call forum_board(0,classid,0,rsclass("class_name"))
    rsclass.movenext
  loop
  rsclass.close:set rsclass=nothing
end function

sub forum_tools()
  dim temp1,nh
  temp1="<table border=0 width=98% cellspacing=0 cellpadding=2 class=tf>"
  temp1=temp1&"<tr><td class=bw><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td><div align=center><a href=user_action.asp?action=list target=_self><img onmouseover=alpha_aba(this) style='FILTER: alpha(opacity=100)' src=images/forum/user.gif width=70 height=70 border=0></a></div></td><td><div align=center><a href=user_emoney.asp?action=emoney target=_self><img onmouseover=alpha_aba(this) style='FILTER: alpha(opacity=100)' src=images/forum/money.gif width=70 height=70 border=0></a></div></td><td><div align=center><a href=forum_action.asp?action=new target=_self><img onmouseover=alpha_aba(this) style='FILTER: alpha(opacity=100)' src=images/forum/new.gif width=70 height=70 border=0></a></div></td><td><div align=center><a href=forum_action.asp?action=good target=_self><img onmouseover=alpha_aba(this) style='FILTER: alpha(opacity=100)' src=images/forum/good.gif width=70 height=70 border=0></a></div></td><td><div align=center><a href=help.asp?action=forum target=_self>"
  temp1=temp1&"<img onmouseover=alpha_aba(this) style='FILTER: alpha(opacity=100)' src=images/forum/help.gif width=70 height=70 border=0></a></div></td><td><div align=center><a href=forum_action.asp?action=hot target=_self><img onmouseover=alpha_aba(this) style='FILTER: alpha(opacity=100)' src=images/forum/hot.gif width=70 height=70 border=0></a></div></td><td><div align=center><a href=forum_action.asp?action=top target=_self><img onmouseover=alpha_aba(this) style='FILTER: alpha(opacity=100)' src=images/forum/top.gif width=70 height=70 border=0></a></div></td><td><div align=center><a href=search.asp?action=help target=_self><img onmouseover=alpha_aba(this) style='FILTER: alpha(opacity=100)' src=images/forum/search.gif width=70 height=70 border=0></a></div></td><td><div align=center><a href=user_edit.asp target=_self><img onmouseover=alpha_aba(this) style='FILTER: alpha(opacity=100)' src=images/forum/info.gif width=70 height=70 border=0></a></div></td><td><div align=center><a href=z_zvm_index.asp target=_self><img onmouseover=alpha_aba(this) style='FILTER: alpha(opacity=100)' src=images/forum/banzhu.gif width=70 height=70 border=0></a></div></td></tr></table></td></tr>"
  temp1=temp1&"</table>"
  response.write"<table border=0 width=100% cellspacing=1 cellpadding=1 bgcolor="&web_var(web_color,3)&"><tr bordercolor='#5EACD7'><td background=images/"&web_var(web_config,5)&"/bg_td.gif height=25><img border=0 src='images/"&web_var(web_config,5)&"/fk4.gif' align=absmiddle>  <font class=end><b>≡≡论坛工具≡≡</b></font></td></tr><tr bgcolor='#FFFFFF' bordercolor='#FFFFFF'><td align=center height=30>"&temp1&"</td></tr></table>"
end sub

sub user_birthday()   '用户生日
  dim temp1
  dim age
  dim birthuser,birthnum
  dim birthday
  birthnum=0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -