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

📄 config_forum.asp

📁 漂亮的企业网站系统v11 1、整体修改了上一版的一些BUG。 2、修改了页面底部的统计形式。 3、修改了“公告更新”栏目
💻 ASP
📖 第 1 页 / 共 4 页
字号:
  if us=false then
    user_view_sex="<img src='images/small/offgirl.gif' align=absmiddle title='青春女孩,离线' border=0>"
  else
    user_view_sex="<img src='images/small/offboy.gif' align=absmiddle title='阳光男孩,离线' border=0>"
  end if
   rs8.close
   set rs8=nothing
    else
  if us=false then
    user_view_sex="<img src='images/small/ongirl.gif' align=absmiddle title='青春女孩,在线' border=0>"
  else
    user_view_sex="<img src='images/small/onboy.gif' align=absmiddle title='阳光男孩,在线' border=0>":
  end if
   rs8.close
   set rs8=nothing
    end if
end function

function user_view_power(uvp,ut)
  user_view_power=img_small("icon_"&uvp)
  if ut=1 then user_view_power=user_view_power&"<font class=red_3>"&format_power(uvp,1)&"</font>"
end function
'-----------------------论坛小字报---------------------------------
dim lx:lx=web_var(web_num,21)
sub xzb_scroll(sh,nsql,s_num,c_num,sbg)
  dim cnum,temp1,topic,rs,xzb
  if sbg=1 then
    temp1=vbcrlf&""
  else
    temp1=vbcrlf&""
  end if
  temp1=temp1&"<marquee width='98%' scrollamount=2 scrolldelay=2 onMouseOut=""if (document.all!=null){this.start()}"" onMouseOver=""if (document.all!=null){this.stop()}"">"
  set rs=conn.execute("SELECT TOP 5 id,username,topic,tim FROM gongao where forum_id="&forumid&" and sort=1 and datediff('d',tim,Now())<"&lx&" ORDER BY tim desc")
  do while not rs.eof
  temp1=temp1&"<img src=images/small/nologin.gif width=10 height=10 border=0> <font class=blue>"&(rs(1))&"</font> 说:&nbsp;<a href='viewxzb.asp?action=1&id="&rs("id")&"'>"&code_html(rs(2),0,20)&"</a> <font size=1>("&time_type(rs(3),66)&")</font>&nbsp;&nbsp;&nbsp;&nbsp;"
  rs.movenext
  loop
  rs.close
  temp1=temp1&"</marquee>"
  if sbg=1 then
    temp1=temp1&""
  else
    temp1=temp1&""
  end if
  response.write temp1
end sub
'-----------------------以下良友在线添加---------------------------------
function getPollPosts(fTopicID)
  dim strsql,rsPollTopic,strPollNum,strPollNumArr
	getPollPosts = 0
	If fTopicID = 0 or ""&fTopicID&"" = "" Then
		Exit function
	End If

	strSql = "SELECT V_NUM FROM BBS_VOTE"
	strSql = strSql & " WHERE TOPIC_ID = " & fTopicID
	strSql = strSql & " ORDER BY V_ID DESC"

	set rsPollTopic = Conn.Execute (strSql)

	if rsPollTopic.BOF or rsPollTopic.EOF then
		'### Nothing
	else
		strPollNum = rsPollTopic("V_NUM")
		strPollNumArr = Split(strPollNum, ",")
		For i = 0 To UBound(strPollNumArr)
			getPollPosts = getPollPosts + cInt(strPollNumArr(i))
		Next
	end if

	rsPollTopic.close
	set rsPollTopic = nothing
end function

'------------------------------以下爱的泪了添加----------------------------------------
sub preview_form(pfrm,pword)
%>
<form name=pre_frm action='preview.asp' method=post target='preview'>
<input type=hidden name=p_topic value=''>
<input type=hidden name=p_word value=''>
</form>
<script language=javascript>
<!--
function preview_type()
{
  document.pre_frm.p_word.value=document.<%response.write pfrm%>.<%response.write pword%>.value;
  open_win('about:blank','preview',774,350,'yes');
  document.pre_frm.submit();
}
-->
</script>
<%
end sub

function preview_b(pfrm,pword,pv)
  preview_b="<input type=button onclick=""javascript:preview_type('"&pfrm&"','"&pword&"');"" value='"&pv&"'>"
end function


sub user_me()
  dim username,userpower,usercp,integral,emoney,renqi,bbs_counter
  dim tim_login,kd,uf
  sql="select l_tim_login from user_login where l_username='"&login_username&"'"
  set rs=conn.execute(sql)
  if rs.eof and rs.bof then
    tim_login=0
  else
    tim_login=rs(0)
  end if
  rs.close
  
  sql="select * from user_data where username='"&login_username&"'"
  set rs=conn.execute(sql)
%>
<TR>
<td width="50%"><font color="#006600"><img src="IMAGES/small/forum_03.gif">&nbsp;威望:</font><font color="#FF0000"><%response.write rs("userpower")%></font></td>
<td width="50%">&nbsp;<font color="#006600"><img src="IMAGES/small/forum_03.gif">&nbsp;魅力:</font><font color="#FF0000"><%response.write rs("usercp")%></font></td>
</tr>
<tr> 
<td><font color="#006600"><img src="IMAGES/small/forum_03.gif">&nbsp;人气:</font><font color="#FF0000"><%response.write rs("renqi")%></font></td>
<td>&nbsp;<font color="#006600"><img src="IMAGES/small/forum_03.gif">&nbsp;贴子:</font><font color="#FF0000"><%response.write rs("bbs_counter")%></font></td>
</tr>
<tr> 
<td height="18"><font color="#006600"><img src="IMAGES/small/forum_03.gif">&nbsp;积分:</font><font color="#FF0000"><%response.write rs("integral")%>&nbsp;</font></td>
<td height="18">&nbsp;<font color="#006600"><img src="IMAGES/small/forum_03.gif">&nbsp;财富:</font><font color="#FF0000"><%response.write rs("emoney")%></font></td>
</tr>
<%
end sub

sub forum_cast1(nh,nj,n_num,c_num)
  dim temp1,njj,topic,word,tbb:njj=""
  if nj<>"" then njj=img_small(nj)
  sql="select top "&n_num&" id,topic,word,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")
    word=rs("word")
    temp1=temp1&"<a class=red href='update.asp?action=forum&id="&rs("id")&"'>"&code_html(topic,1,c_num)&"</a>"
    rs.movenext
  loop
    response.write temp1
end sub

sub db_error()
session("errormsg")=errmsg
response.redirect "error.asp"
response.end
end sub

function isInteger(para)
       on error resume next
       dim str
       dim l,i
       if isNUll(para) then 
          isInteger=false
          exit function
       end if
       str=cstr(para)
       if trim(str)="" then
          isInteger=false
          exit function
       end if
       l=len(str)
       for i=1 to l
           if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
              isInteger=false 
              exit function
           end if
       next
       isInteger=true
       if err.number<>0 then err.clear
end function
'------------------------------------------------多级论坛------------------------------------------------------
sub forum_board(ft,c_id,f_id,f_name)
  dim rsforum,strsqlforum,rstopic,sqltopic,topics,classid,forumid,forumname,forum_type,forum_new_info,forum_pic,new_info_dim,forumpic,newinfo_disp,forumn,forumw,ftn,forum_pro,forum_disp
  response.write vbcrlf & forum_table1 & "<tr"&forum_table2&"><td height=25 colspan=4 background='images/" & web_var(web_config,5) & "/bg_td.gif'> " & img_small(ffk) & vbcrlf &"<font class=end><b>" & f_name &"</b></font></td></tr>"
  strsqlforum="select forum_id,forum_n,forum_w,forum_name,forum_info_disp,forum_type,forum_new_info,forum_topic_num,forum_data_num,forum_power,forum_remark,forum_pic,forum_pro " & _
	      "from bbs_forum where forum_f="&f_id&" and class_id="&c_id&" and forum_hidden=0 order by forum_order,forum_id desc"
  set rsforum=conn.execute(strsqlforum)
  do while not rsforum.eof
    forumn=rsforum("forum_n"):forumw=rsforum("forum_w")
    forumid=rsforum("forum_id"):forumname=rsforum("forum_name")
    forum_type=rsforum("forum_type"):forum_pro=rsforum("forum_pro")
    forum_new_info=rsforum("forum_new_info")
    forum_pic=rsforum("forum_pic")
	forum_disp=rsforum("forum_info_disp")
    ftn=""
    if len(forum_new_info)>3 then
      new_info_dim=split(forum_new_info,"|")
      new_info_dim(0)=format_user_view(new_info_dim(0),1,"")
      if isdate(new_info_dim(1)) then new_info_dim(1)=time_type(new_info_dim(1),8)
      new_info_dim(3)="<a href='forum_view.asp?forum_id="&forumid&"&view_id="&new_info_dim(2)&"' title='"&code_html(new_info_dim(3),0,0)&"'>"&code_html(new_info_dim(3),0,8)&"</a>"
      if time_type(new_info_dim(1),3)=time_type(now_time,3) then ftn="n"
    else
      redim new_info_dim(3)
    end if
    if len(forum_pic)>1 then
      if left(forum_pic,1)="$" then forum_pic="images/forum/"&right(forum_pic,len(forum_pic)-1)
      forum_pic="<td align=right><img src='"&forum_pic&"' border=0></td>"
    end if
	if forum_disp=0 then
	newinfo_disp="<img src=images/small/zhuti.gif width=9 height=10>&nbsp;新贴:"&new_info_dim(3)&"<br><img src=images/small/zuozhe.gif width=9 height=10>&nbsp;作者:"&new_info_dim(0)&"<br><img src=images/small/lasttime.gif width=9 height=10>&nbsp;时间:"&new_info_dim(1)
	else
	newinfo_disp="(帖子信息保密)"
	end if
	   response.write vbcrlf&"<tr"&format_table(3,1)&"><td width='12%' rowspan=2 align=center><img src='images/"&web_var(web_config,5)&"/label_"&forum_type&ftn&".gif' border=0><br><br>【"&format_forum_type(forum_type,1,forum_pro)&"】 </td>" & _
		     vbcrlf&"<td width='24%' height=20 align='center' "&forum_table3&"><font color=red>&nbsp;『&nbsp;</font><a href='forum_list.asp?forum_id="&forumid&"'>" & forumname & "</a><font color=red>&nbsp;』&nbsp;</font></td>"
    if forumw=true then
      response.write vbcrlf&"<td width='38%'"&forum_table3&">" & _
		     vbcrlf&"  <table border=0 width='100%'><tr>"& _
			 vbcrlf&"  <td width='30%'><img src='images/small/forum_num_topic.gif' title='<font color=red>" & forumname & "</font>共有主题<font class=red_3>"&rsforum("forum_topic_num")&"</font>帖' border=0>&nbsp;&nbsp;<font class=red_3>"&rsforum("forum_topic_num")&"</font></td>" & _
		     vbcrlf&"  <td width='30%'><img src='images/small/forum_num_data.gif' title='<font color=red>" & forumname & "</font>共有帖子<font class=red_3>"&rsforum("forum_data_num")&"</font>帖' border=0>&nbsp;&nbsp;<font class=red_3>"&rsforum("forum_data_num")&"</font></td>" & _
 		     vbcrlf&"  <td width='20%'><a href='forum_write.asp?forum_id="&forumid&"&poll=yes'><img src='images/small/toupiao.gif' align=absmiddle title='在<font color=red>" & forumname & "</font>中发表新投票' border=0></a>&nbsp;<font color=black>投票</font></td>" & _
             vbcrlf&"  <td width='20%'><a href='forum_write.asp?forum_id="&forumid&"'><img src='images/small/mini_write.gif' align=absmiddle title='在<font color=red>" & forumname & "</font>中发表新主题' border=0></a>&nbsp;<font color=black>发表</font></td></tr></table>"
    else
      response.write vbcrlf&"<td width='38%' "&forum_table3&" align=center class=gray>本论坛下面有 <font class=red>"&forumn&"</font> 分论坛</td>"
    end if
      response.write vbcrlf&"</td>" & _
		     vbcrlf&"<td width='26%'"&forum_table3&">"&forum_power(rsforum("forum_power"),ptnums)&"</td></tr>" & _
		     vbcrlf&"<tr"&format_table(3,1)&"><td colspan=2 align=center><table border=0 width='99%'><tr><td class=htd><a href='forum_list.asp?forum_id="&forumid&"'><img src=images/small/Forum_readme.gif title='哈哈,发现没有点击此图标也可进入分论坛!' border=0></a>&nbsp;&nbsp;"&code_html(rsforum("forum_remark"),2,0)&"</td>"&forum_pic&"</table></td>" & _
		     vbcrlf&"<td align=left valign=top class=htd>"
    if forumw=true then
      response.write newinfo_disp
    else
      response.write vbcrlf&"<br><a href='forum_list.asp?forum_id="&forumid&"'><p class=gray align=center>点击浏览分论坛信息</p></a>"
    end if
      response.write "</td></tr>"
    erase new_info_dim
  rsforum.movenext
loop
  rsforum.close:set rsforum=nothing
  response.write "</table>"&kong
end sub

%>

⌨️ 快捷键说明

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