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

📄 forum.asp

📁 一个不错的ASP论坛源码
💻 ASP
📖 第 1 页 / 共 3 页
字号:
	rsCount.close
	
	set rs = Server.CreateObject("ADODB.Recordset")
'	rs.cachesize=20

	rs.open  strSql, my_Conn, 3
	if not (rs.EOF or rs.BOF) then
		rs.movefirst
	end if
 
else 'end MySql specific code

	set rs = Server.CreateObject("ADODB.Recordset")
	rs.cachesize=20

	rs.open  strSql, my_Conn, 3
	if not (rs.EOF or rs.BOF) then
		rs.movefirst
		rs.pagesize = strPageSize
		maxpages = cint(rs.pagecount)
		rs.absolutepage = mypage
	end if
	
end if

'## Forum_SQL - Get all Forum Categories From DB
strSql = "SELECT CAT_ID FROM " & strTablePrefix & "CATEGORY"

set rsCat = my_Conn.Execute (StrSql)

%>
<script language="JavaScript">
<!----- 
function jumpTo(s) {if (s.selectedIndex != 0) top.location.href = s.options[s.selectedIndex].value;return 1;}
function setDays(order) 
{	
	if (order.search('a') > 0)
		document.DaysFilter.sortimg.value = '<%=strImageURL %>icon_sortUp.gif'
	else
		document.DaysFilter.sortimg.value = '<%=strImageURL %>icon_sortDown.gif';
	if (order != '') 
		document.DaysFilter.newsort.value = order; 
		document.DaysFilter.submit(); 
		return 0;
}
// -->
</script>
<%if rsCStatus.EOF = true OR rsFStatus.EOF = true then	Response.Redirect("default.asp")end if%> 
<table border="0" width="100%">
  <tr>
    <td width="33%" align="left" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
    <a href="default.asp"><img src="<%=strImageURL %>icon_folder_open.gif" alt="返回论坛首页" height=15 width=15 border="0"></a>&nbsp;<a href="default.asp">返回论坛首页</a>&nbsp;<img src="<% if rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 then Response.Write("" & strImageURL & "icon_folder_open_topic.gif") else Response.Write("" & strImageURL & "icon_folder_closed_topic.gif") %>" height=15 width=15 border="0">&nbsp;<% =ChkString(Request.QueryString("FORUM_Title"),"display") %></font>
    </font></td>
    <td align="center" width="33%"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<% if (mlev = 4 or mlev = 3 or mlev = 2 or mlev = 1) or (lcase(strNoCookies) = "1") or (Request.Cookies(strCookieURL & "User")("Name") = "" or Request.Cookies(strCookieURL & "User")("Pword") = "") then %>
		<center><% call PostNewTopic() %></center>       
<% else %>
        &nbsp;
<% end if %>
    </font></td>
    <td align="center" width="33%">
    <form action="<% =Request.ServerVariables("SCRIPT_NAME") & "?" & Request.Querystring  %>" method="post" name="DaysFilter">
    <select name="Days" onchange="javascript:setDays('5a');">
      <option value="0" <% if ndays = "0" then Response.Write(" SELECTED")%>>显示所有主题</option>
      <option value="-1" <% if ndays = "-1" then Response.Write(" SELECTED")%>>显示所有开放的主题</option>
      <option value="1" <% if ndays = "1" then Response.Write(" SELECTED")%>>显示最近一天的主题</option>
      <option value="2" <% if ndays = "2" then Response.Write(" SELECTED")%>>显示最近两天的主题</option>
      <option value="5" <% if ndays = "5" then Response.Write(" SELECTED")%>>显示最近五天的主题</option>
      <option value="7" <% if ndays = "7" then Response.Write(" SELECTED")%>>显示最近一周的主题</option>
      <option value="14" <% if ndays = "14" then Response.Write(" SELECTED")%>>显示最近两周的主题</option>
      <option value="30" <% if ndays = "30" then Response.Write(" SELECTED")%>>显示最近一个月的主题</option>
      <option value="60" <% if ndays = "60" then Response.Write(" SELECTED")%>>显示最近两个月的主题</option>
      <option value="120" <% if ndays = "120" then Response.Write(" SELECTED")%>>显示最近四个月的主题</option>
      <option value="365" <% if ndays = "365" then Response.Write(" SELECTED")%>>显示最近一整年的主题</option>
    </select>
<% '############################################ %>
	<input type="hidden" name="newsort" value="<%=SortOrder %>">	
	<input type="hidden" name="sortimg" value="<%=SortImg %>">	
<% '############################################ %>
<% '######################## %>	
	<br><input type="Checkbox" name="OlderThan" value ="1" <% if OlderThan = "1" then Response.Write(" checked")%> onclick="javascript:setDays('5a');">显示日期之外的主题
<% '######################## %>	
    <input type="hidden" name="Cookie" value="1">
   </form>
    </td>
  </tr>
  <tr>
	<td colspan=2>
	</td>
     <td align="right">
<% if maxpages > 1 then %>
    <table border=0 align="right">
      <tr>
        <td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>页数:</b> &nbsp;</font></td>
        <td valign="top"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% Call Paging() %></font></td>
      </tr>
    </table>
<% else %>
    &nbsp;
<% end if %>
    </td>
  </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<%'############### READ/WRITE ACCESS ###########################%>
<p><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><b>
<%
	select case cInt(strPrivateForums)
		case 10
			response.write "只有管理员和版主可以在本论坛回复主题"
		case 11
			response.write "只有管理员和版主可以在本论坛发表新主题"
		case 12
			response.write "这是一个加密论坛,无法发表"
		case else
	end select
%>
</b></font></p>
<%'############### READ/WRITE ACCESS ###########################%>
  <tr>
    <td bgcolor="<% =strTableBorderColor %>">
    <table border="0" width="100%" cellspacing="1" cellpadding="4">
      <tr>
<% '############################################ %>
        <td align="center" bgcolor="<% =strHeadCellColor %>">
	  <b>
	     <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
		<img name="SortImg" src="<%= sortimg %>"  border="0" alt="">
	     </font>
	  </b>
	</td>
        <td align="center" bgcolor="<% =strHeadCellColor %>">
	  <b>
	     <% if sortorder = "1d" then %>
	        <a href="javascript:setDays('1a')">
	     <% else %>
	        <a href="javascript:setDays('1d')">
	     <% end if %>
	     <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">
		主 题</font></a>
	  </b><% '############################################ %>
<% if (AdminAllowed > 0) or (lcase(strNoCookies) = "1") then %>
<b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><%	call ForumAdminOptions() %></font></b><% end if %>
	</td>
        <td align="center" bgcolor="<% =strHeadCellColor %>">
	  <b>
	     <% if sortorder = "2d" then %>
	        <a href="javascript:setDays('2a')">
	     <% else %>
	        <a href="javascript:setDays('2d')">
	     <% end if %>
	     <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">
		作者</font></A>
	  </b>
	</td>
        <td align="center" bgcolor="<% =strHeadCellColor %>">
	  <b>
	     <% if sortorder = "3d" then %>
	        <a href="javascript:setDays('3a')">
	     <% else %>
	        <a href="javascript:setDays('3d')">
	     <% end if %>
	     <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">
		回复</font></A>
	  </b>
	</td>
        <td align="center" bgcolor="<% =strHeadCellColor %>">
	  <b>
	     <% if sortorder = "4d" then %>
	        <a href="javascript:setDays('4a')">
	     <% else %>
	        <a href="javascript:setDays('4d')">
	     <% end if %>
	     <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">
		人气</font></A>
	  </b>
	</td>
        <td align="center" bgcolor="<% =strHeadCellColor %>">
	  <b>
	     <% if sortorder = "5d" then %>
	        <a href="javascript:setDays('5a')">
	     <% else %>
	        <a href="javascript:setDays('5d')">
	     <% end if %>
	     <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">
		最新文章</font></A>
	  </b>
	</td>
      </tr>
<% if rs.EOF or rs.BOF then %>
      <tr>
        <td colspan="7" bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>没有找到任何主题</b></font></td>
      </tr>
<% else
	rec = 1
	do until rs.EOF or (rec = strPageSize + 1) %>
      <tr>
        <td bgcolor="<% =strForumCellColor %>" align=center valign="center"><a href="topic.asp?TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><%
		if rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 and rs("T_STATUS") <> 0 then %><% =ChkIsNew(rs("T_LAST_POST")) %><%
		else
			if rs("T_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=""主题已锁定"">"
			else
				Response.Write "<img src=""" & strImageURL & "icon_folder_locked.gif"" height=15 width=15 border=0 hspace=0 alt=""主题已锁定"">"
			end if
		end if %></a></td>
        <td bgcolor="<% =strForumCellColor %>" valign="center" align="left" ><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="topic.asp?TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><% =ChkString(left(rs("T_SUBJECT"), 30),"display") %></a>...</font><% if strShowPaging = "1" then TopicPaging() end if%><br><% 		if AdminAllowed = 1 or strNoCookies = "1" then %>
<img src="space.gif" height=0 border="0" width=255>
<%			if rsCStatus("CAT_STATUS") = 0 then %>
          <a href="JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=<% =Request.QueryString("CAT_ID") %>')">解锁</a>
<%			else
				if rsFStatus("F_STATUS") = 0 then %>
          <a href="JavaScript:openWindow('pop_open.asp?mode=Forum&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"JSurlpath") %>')">解锁</a>
<%				else 
					if rs("T_STATUS") <> 0 then %>
          <a href="JavaScript:openWindow('pop_lock.asp?mode=Topic&TOPIC_ID=<% =rs("TOPIC_ID")%>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"JSurlpath") %>')">锁定</a>
<%					else %>
          <a href="JavaScript:openWindow('pop_open.asp?mode=Topic&TOPIC_ID=<% =rs("TOPIC_ID")%>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"JSurlpath") %>')">解锁</a>
<%					end if 
				end if
			end if 
			if (AdminAllowed = 1) or (rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 and rs("T_STATUS") <> 0) then %>
          <a href="post.asp?method=EditTopic&TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&auth=<% =ChkString(rs("T_AUTHOR"),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(rs("T_SUBJECT"),"urlpath") %>">编辑</a>

⌨️ 快捷键说明

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