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

📄 default.asp

📁 一个不错的ASP论坛源码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
			do until rsForum.Eof
				newposts = 0
				if ChkDisplayForum(rsForum("FORUM_ID")) then
					if rsForum("F_TYPE") <> "1" then 
						intPostCount  = intPostCount + rsForum("F_COUNT")
						intTopicCount = intTopicCount + rsForum("F_TOPICS")
						intForumCount = intForumCount + 1
						if rsForum("F_LAST_POST") > strLastPostDate then 
							strLastPostDate = rsForum("F_LAST_POST")
							intLastPostForum_ID = rsForum("FORUM_ID")
						end if
					end if
					if chkDisplayHeader then
%>

      <tr>
        <td bgcolor="<% =strCategoryCellColor %>" colspan="<%=sGetColspan(6, 5)%>">
<%		' This code will specify whether or not to show the forums under a category
		HideForumCat = "HideCat" & rs("Cat_ID")
		If Request.Cookies(HideForumCat) = "Y" then %>
<%			if (InStr(1, ScriptName, "default.asp", 1)) then %>
			        <a href="<% =ScriptName & "?" %><% =HideForumCat & "=N" %>">
					<% If newposts = 1 then %>
						<img src="<%=strImageURL %>icon_plus_new.gif" width="10" height="10" border="0"></a>
					<% 
					Else  %>
						<img src="<%=strImageURL %>icon_plus.gif" width="10" height="10" border="0"></a>
					<% End If %>
<%			else %>
				<a href="<% =ScriptName & "default.asp?" %><% =HideForumCat & "=N" %>">
					<% If newposts = 1 then %>
						<img src="<%=strImageURL %>icon_plus_new.gif" width="10" height="10" border="0"></a>
					<% 
					Else  %>
						<img src="<%=strImageURL %>icon_plus.gif" width="10" height="10" border="0"></a>
					<% End If %>
<%			end if %>
<%		Else %>
<%			if (InStr(1, ScriptName, "default.asp", 1)) then %>
				<a href="<% =ScriptName & "?" %><% =HideForumCat & "=Y" %>"><img src="<%=strImageURL %>icon_minus.gif" width="10" height="10" border="0"></a>
<%			else %>
				<a href="<% =ScriptName & "default.asp?" %><% =HideForumCat & "=Y" %>"><img src="<%=strImageURL %>icon_minus.gif" width="10" height="10" border="0"></a>
<%			end if %>
<%		end if %>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>" size"+1"><b><% =ChkString(rs("CAT_NAME"),"display") %></b></font>
<%						if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then 
							Response.Write "        <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
							call CategoryAdminOptions()
							Response.Write "</font></b></td>" & vbcrlf 
						end if 
						Response.Write "      </tr>" & vbcrlf
						chkDisplayHeader = false
					end if
if Request.Cookies(HideForumCat) <> "Y" then 
  					Response.Write	"      <tr>" & vbcrlf & _
									"        <td bgcolor=""" & strForumCellColor & """ align=center valign=top>" & vbcrlf
					if rsForum("F_TYPE") = 0 then
						if rs("CAT_STATUS") = 0 then 
							Response.Write "        <a href=""forum.asp?FORUM_ID=" & rsForum("FORUM_ID") & "&CAT_ID=" & rsForum("CAT_ID") & "&Forum_Title=" & ChkString(rsForum("F_SUBJECT"),"urlpath") & """>"
							if rsForum("F_LAST_POST") > Session(strCookieURL & "last_here_date") then
								Response.Write "<img src=""" & strImageURL & "icon_folder_new_locked.gif"" height=15 width=15 border=0 hspace=0 alt=""分类已锁定""></a>"
							else
								Response.Write "<img src=""" & strImageURL & "icon_folder_locked.gif"" height=15 width=15 border=0 hspace=0 alt=""分类已锁定""></a>"
							end if     
						else 
							if rsForum("F_STATUS") <> 0 then 
								Response.Write "        <a href=""forum.asp?FORUM_ID=" & rsForum("FORUM_ID") & "&CAT_ID=" & rsForum("CAT_ID") & "&Forum_Title=" & ChkString(rsForum("F_SUBJECT"),"urlpath") & """>" & ChkIsNew(rsForum("F_LAST_POST"),"") & "</a>"
							else
								Response.Write "        <a href=""forum.asp?FORUM_ID=" & rsForum("FORUM_ID") & "&CAT_ID=" & rsForum("CAT_ID") & "&Forum_Title=" & ChkString(rsForum("F_SUBJECT"),"urlpath") & """>"
								if rsForum("F_LAST_POST") > Session(strCookieURL & "last_here_date") then
									Response.Write "<img src=""" & strImageURL & "icon_folder_new_locked.gif"" height=15 width=15 border=0 hspace=0 alt=""论坛已锁定""></a>"
								else
									Response.Write "<img src=""" & strImageURL & "icon_folder_locked.gif"" height=15 width=15 border=0 hspace=0 alt=""论坛已锁定""></a>"
								end if
							end if
						end if
					else 
						if  rsForum("F_TYPE") = 1 then 
							Response.Write "<a href=""" & rsForum("F_URL") & """ target=""_blank""><img src=""" & strImageURL & "icon_url.gif"" height=16 width=16 border=0 hspace=0></a>"
						end if
					end if 
					Response.Write	"        </td>" & vbcrlf
%>
        <td <% if rsForum("F_TYPE") = 1 then Response.Write(" colspan=1") %> bgcolor="<% =strForumCellColor %>" valign="top">
        <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if rsForum("F_TYPE") = 0 then Response.Write("forum.asp?FORUM_ID=" & rsForum("FORUM_ID") & "&CAT_ID=" & rsForum("CAT_ID") & "&Forum_Title=" & ChkString(rsForum("F_SUBJECT"),"urlpath")) else if rsForum("F_TYPE") = 1 then Response.Write(rsForum("F_URL") & """ target=""_blank") end if %>"><% =ChkString(rsForum("F_SUBJECT"),"display") %></a>
<%					if (mlev = 4 or mlev = 3) or (lcase(strNoCookies) = "1") then %> <% call ForumAdminOptions %>
<%					end if %><br>
        <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
        <% = rsForum("F_DESCRIPTION") %>
        </font></td>
		<% if rsForum("F_TYPE") = 1 then %>
        <td bgcolor="<% =strForumCellColor %>" colspan="3"><% if rsForum("F_URLIMAGE") <> "" then %><a href="<%= rsForum("F_URL")%>"><img src="<%=rsForum("F_URLIMAGE")%>" border=0 hspace=0></a><% End If %></td>
		<% end if %>

<%
					if rsForum("F_TYPE") = 0 then
						if IsNull(rsForum("F_TOPICS")) then 
%>
        <td bgcolor="<% =strForumCellColor %>" align=center valign=top><font face="<% =strDefaultFontFace %>" color="<% =strForumFontColor %>" size="<% =strDefaultFontSize %>">0</font></td>
<%
						else 
%>
        <td bgcolor="<% =strForumCellColor %>" align=center valign=top><font face="<% =strDefaultFontFace %>" color="<% =strForumFontColor %>" size="<% =strDefaultFontSize %>"><% =rsForum("F_TOPICS") %></font></td>
<%
						end if 
						if IsNull(rsForum("F_COUNT")) then 
%>
        <td bgcolor="<% =strForumCellColor %>" align=center valign=top><font face="<% =strDefaultFontFace %>" color="<% =strForumFontColor %>" size="<% =strDefaultFontSize %>">0</font></td>
<%
						else 
%>
        <td bgcolor="<% =strForumCellColor %>" align=center valign=top><font face="<% =strDefaultFontFace %>" color="<% =strForumFontColor %>" size="<% =strDefaultFontSize %>"><% =rsForum("F_COUNT") %></font></td>
<%
						end if 
						if IsNull(rsForum("MEMBER_ID")) then
							strLastUser = ""
						else
							strLastUser = "<br>作者:" 
							if strUseExtendedProfile then
								strLastUser = strLastUser & "<a href=""pop_profile.asp?mode=display&id="& RsForum("MEMBER_ID") & """>"
							else
								strLastUser = strLastUser & "<a href=""JavaScript:openWindow2('pop_profile.asp?mode=display&id=" & rsForum("MEMBER_ID") & "')"">"
							end if
							strLastUser = strLastUser & rsForum("M_NAME") & "</a>"
						end if%>

        <td bgcolor="<% =strForumCellColor %>" align=center valign=top nowrap><font face="<% =strDefaultFontFace %>" color="<% =strForumFontColor %>" size="<% =strFooterFontSize %>"><b><% =ChkDate(rsForum("F_LAST_POST")) %></b><br>
        <% =ChkTime(rsForum("F_LAST_POST")) %><%= strLastUser %></font></td>
<%					else %>
<%						if rsForum("F_TYPE") = 1 then %>
<%					'## Do Nothing %>
<%						end if %>
<%					end if %>
<%					if (strShowModerators = "1") or (mlev = 4 or mlev = 3) then %>
        <td bgcolor="<% =strForumCellColor %>" align=left valign=top><font face="<% =strDefaultFontFace %>" color="<% =strForumFontColor %>" size="<% =strDefaultFontSize %>"><% if (listForumModerators(rsForum("FORUM_ID")) <> "") then Response.Write(listForumModerators(rsForum("FORUM_ID"))) else Response.Write("&nbsp;") end if %></font></td>
<%					end if %>

      </tr>
<%				end if %>
<%		end if %>
<%				rsForum.movenext %>
<%			loop %>
<%		end if %>
<%		rs.MoveNext %>
<%	loop %>
<% end if 
if strShowStatistics = "1" then %>
<!--#include file="statistics.asp"-->
<% End If %>
<!--#include file="online2.asp"-->

    </table>           
    </td>
  </tr>
</table>

    <table width="100%">
      <tr>
        <td>
        <font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
        <img alt="新文章" src="<%=strImageURL %>icon_folder_new.gif" width=8 height=9> 自从上次访问后有新文章<br>
        <img alt="旧文章" src="<%=strImageURL %>icon_folder.gif" width=8 height=9> 自从上次访问后无新文章<br>
        </font>
        </td>
      </tr>
    </table>

<%
set rs = nothing 
set rsForum = nothing 
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<% 
sub PostingOptions() 
	if (mlev = 4) or (lcase(strNoCookies) = "1") then 
		Response.Write "<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""post.asp?method=Category""><img border=0 src=""" & strImageURL & "icon_folder_new_topic.gif"" alt=""建立分类"" height=15 width=15 border=0></a></font>" & vbcrlf 
		Response.Write "<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""post.asp?method=SortCategory""><img border=0 src=""" & strImageURL & "icon_folder_sort.gif"" alt=""分类排序"" height=15 width=15 border=0></a></font>" & vbcrlf
	else
		Response.Write "&nbsp;" & vbcrlf 
	end if 
end sub 

sub CategoryAdminOptions()

	if (mlev = 4) or (lcase(strNoCookies) = "1") then 
		if (rs("CAT_STATUS") <> 0) then 
			Response.Write "          [<a href=""JavaScript:openWindow('pop_lock.asp?mode=Category&CAT_ID=" & rs("CAT_ID") & "&Cat_Title=" & ChkString(rs("CAT_NAME"),"jsURLPath") & "')"">锁定分类</a>" & vbcrlf
		else
			Response.Write "          [<a href=""JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=" & rs("CAT_ID") & "')"">解锁分类</a>" & vbcrlf
		end if 
		if (rs("CAT_STATUS") <> 0) or (mlev = 4) then
			Response.Write "          | <a href=""post.asp?method=EditCategory&CAT_ID=" & rs("CAT_ID") & "&Cat_Title=" & ChkString(rs("CAT_NAME"),"urlpath") & """>修改分类</a>" & vbcrlf
		end if
			Response.Write "          | <a href=""JavaScript:openWindow('pop_delete.asp?mode=Category&CAT_ID=" & rs("CAT_ID") & "&Cat_Title=" & ChkString(rs("CAT_NAME"),"JSurlpath") & "')"">删除分类</a>" & vbcrlf
		if (rs("CAT_STATUS") <> 0) or (mlev = 4) then
			Response.Write "          | <a href=""post.asp?method=Forum&CAT_ID=" & rs("CAT_ID") & "&type=0"">建立论坛</a>" & vbcrlf
		end if 
		if (rs("CAT_STATUS") <> 0) or (mlev = 4) then
			Response.Write "          | <a href=""post.asp?method=URL&CAT_ID=" & rs("CAT_ID") & "&type=1"">建立连接</a>]" & vbcrlf
		end if 
	else
		Response.Write "          &nbsp;" & vbcrlf
	end if
end sub 

sub ForumAdminOptions() 
	if (mLev = 4) or (chkForumModerator(rsForum("FORUM_ID"), strDBNTUserName) = "1") or (lcase(strNoCookies) = "1") then
		 
		if rsForum("F_TYPE") = 0 then
			if rs("CAT_STATUS") = 0 then
				if (mlev = 4) then 
%>
          <a href="JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=<% =rs("CAT_ID") %>')"><img src="<%=strImageURL %>icon_unlock.gif" alt="解开分类锁定" border="0" hspace="0"></a>
<%
				end if
			else 
				if rsForum("F_STATUS") = 1 then 
%>
          <a href="JavaScript:openWindow('pop_lock.asp?mode=Forum&FORUM_ID=<% =rsForum("FORUM_ID") %>&CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"JSurlpath")%>')"><img src="<%=strImageURL %>icon_lock.gif" alt="锁定论坛" border="0" hspace="0"></a>
<%
				else 
%>
          <a href="JavaScript:openWindow('pop_open.asp?mode=Forum&FORUM_ID=<% =rsForum("FORUM_ID") %>&CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"JSurlpath")%>')"><img src="<%=strImageURL %>icon_unlock.gif" alt="解开论坛锁定" border="0" hspace="0"></a>
<%
				end if 
			end if
		end if
		if rsForum("F_TYPE") = 0 then
			if (rs("CAT_STATUS") <> 0 and rsForum("F_STATUS") <> 0) or (mlev = 4 or mlev = 3) then 
%>
           <a href="post.asp?method=EditForum&FORUM_ID=<% =rsForum("FORUM_ID") %>&CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"urlpath") %>&type=0"><img src="<%=strImageURL %>icon_pencil.gif" alt="编辑论坛属性" border="0" hspace="0"></a>
<%
			end if
		else 
			if rsForum("F_TYPE") = 1 then 
%>
           <a href="post.asp?method=EditURL&FORUM_ID=<% =rsForum("FORUM_ID") %>&CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"urlpath") %>&type=1"><img src="<%=strImageURL %>icon_pencil.gif" alt="编辑连接属性" border="0" hspace="0"></a>
<%
			end if 
		end if 
		if (mlev = 4) or (lcase(strNoCookies) = "1") then 
%>
           <a href="JavaScript:openWindow('pop_delete.asp?mode=Forum&FORUM_ID=<% =rsForum("FORUM_ID") %>&CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"JSurlpath") %>')"><img src="<%=strImageURL %>icon_trashcan.gif" alt="删除论坛" border="0" hspace="0"></a>
<%
		end if
		if rsForum("F_TYPE") = 0 then
			if (mlev = 4) or (lcase(strNoCookies) = "1") then 
%>
           <a href="post.asp?method=Topic&FORUM_ID=<% =rsForum("FORUM_ID") %>&CAT_ID=<% =rsForum("CAT_ID") %>&Forum_Title=<% =ChkString(rsForum("F_SUBJECT"),"urlpath") %>"><img src="<%=strImageURL %>icon_folder_new_topic.gif" alt="发表新主题" height=15 width=15 border=0></a>
<%
			end if
		end if 
	else
		Response.Write "&nbsp;"
	end if
end sub 
%>

⌨️ 快捷键说明

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