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

📄 default.asp

📁 简单的asp论坛源码系统,很适用于初学者!界面简洁,功能齐全
💻 ASP
📖 第 1 页 / 共 3 页
字号:
								
								'Add all the posts and topics together to get the total number for the stats at the bottom of the page
								lngTotalNumberOfPosts = lngTotalNumberOfPosts + lngSubForumNumberOfPosts
								lngTotalNumberOfTopics = lngTotalNumberOfTopics + lngSubForumNumberOfTopics
								
								'Add the number of posts and topics of sub-forums to the number of posts in the main forum
								lngNumberOfPosts = lngNumberOfPosts + lngSubForumNumberOfPosts
								lngNumberOfTopics = lngNumberOfTopics + lngSubForumNumberOfTopics
								
								
								'Calculate the last forum entry across all forums for the statistics at the bottom of the forum
								If dtmLastEntryDateAllForums < dtmLastSubEntryDate Then
									strLastEntryUserAllForums = strLastSubEntryUser
									lngLastEntryUserIDAllForums = lngLastSubEntryUserID
									dtmLastEntryDateAllForums = dtmLastSubEntryDate
								End If
								
								'If the subforums last entry is newer than that of the main forum, then display that as the last post in the forum
								If (dtmLastEntryDate < dtmLastSubEntryDate) AND blnSubRead AND strSubForumPassword = "" Then
									intLastForumEntryID = intSubForumID
									strLastEntryUser = strLastSubEntryUser
									lngLastEntryUserID = lngLastSubEntryUserID
									dtmLastEntryDate = dtmLastSubEntryDate
									lngTopicID = lngSubTopicID
									strSubject = strSubSubject
								End If
								
								'Unread Posts *********
								
								'If there is a newer post than the last time the unread posts array was initilised run it again
								If dtmLastSubEntryDate > CDate(Session("dtmUnReadPostCheck")) Then Call UnreadPosts()
									
								'Count the number of unread posts in this forum
								If isArray(sarryUnReadPosts) AND dtmLastSubEntryDate > dtmLastVisitDate AND blnSubRead Then
									For intUnReadForumPostsLoop = 0 to UBound(sarryUnReadPosts,2)
										'Increament unread post count
										If CInt(sarryUnReadPosts(2,intUnReadForumPostsLoop)) = intSubForumID AND sarryUnReadPosts(3,intUnReadForumPostsLoop) = "1" Then intUnReadPostCount = intUnReadPostCount + 1
									Next	
								End If
								
								'Calculate the number of people viewing the forum
								If blnForumViewing AND blnActiveUsers Then 
									intTotalViewingForum = intTotalViewingForum + viewingForum(intSubForumID)
								End If
								
								'If there are other sub forums place a comma inbetween
								If strSubForums <> "" Then strSubForums = strSubForums & ", "
								
								'Display the sub forum
								strSubForums = strSubForums & "<a href=""forum_topics.asp?FID=" & intSubForumID & strQsSID2 & """ class=""smLink"">" & strSubForumName & "</a>"
							End If
						End If
						
						'Move to next record 
						intTempRecord = intTempRecord + 1
					Loop

					'If there are sub forums 
					If strSubForums <> "" Then strSubForums = "<br /><span class=""smText"">" & strTxtSub & " " & strTxtForums & ": </span>" & strSubForums


					'Write the HTML of the forum descriptions and hyperlinks to the forums
					
					'Calculate row colour
					Response.Write(vbCrLf & " <tr ")
					If (intForumColourNumber MOD 2 = 0 ) Then Response.Write("class=""evenTableRow"">") Else Response.Write("class=""oddTableRow"">") 
					
					
					'Display the status forum icons
					Response.Write(vbCrLf & "   <td align=""center"">")
					%><!-- #include file="includes/forum_status_icons_inc.asp" --><%
     					Response.Write("</td>" & _
					vbCrLf & "  <td>")


					
					'Display forum
					Response.Write("<a href=""forum_topics.asp?FID=" & intForumID & strQsSID2 & """>" & strForumName & "</a>")
			
					'Display the number of people viewing in that forum
					If blnForumViewing AND blnActiveUsers Then 
						If intTotalViewingForum > 0 Then Response.Write(" <span class=""smText"">(" & intTotalViewingForum & " " & strTxtViewing & ")</span>")
					End If
					
					'Display forum details
					Response.Write("<br />" & strForumDiscription & strSubForums & "</td>" & _
					vbCrLf & "  <td align=""center"">" & lngNumberOfTopics & "</td>" & _
					vbCrLf & "  <td align=""center"">" & lngNumberOfPosts & "</td>" & _
					vbCrLf & "  <td class=""smText"" nowrap=""nowrap"">")
					If lngNumberOfPosts <> 0 Then 'Don't disply last post details if there are none	
						'Don't dispaly details if the user has no read access on the forum
						If blnRead AND strForumPassword = "" Then
							Response.Write(strTxtBy & "&nbsp;<a href=""member_profile.asp?PF=" & lngLastEntryUserID & strQsSID2 & """ class=""smLink"" rel=""nofollow"">" & strLastEntryUser & "</a> ")
							'If there are unread posts in the forum display differnt icon
							If intUnReadPostCount > 0 Then
								Response.Write("<a href=""get_last_post.asp?TID=" & lngTopicID & strQsSID2 & """><img src=""" & strImagePath & "view_unread_post." & strForumImageType & """ alt=""" & strTxtViewUnreadPost & " [" & intUnReadPostCount & " " & strTxtNewPosts & "]"" title=""" & strTxtViewUnreadPost & " [" & intUnReadPostCount & " " & strTxtNewPosts & "]"" /></a>")
							
							'Else there are no unread posts so display a normal last post link
							Else
								Response.Write("<a href=""get_last_post.asp?TID=" & lngTopicID & strQsSID2 & """><img src=""" & strImagePath & "view_last_post." & strForumImageType & """ alt=""" & strTxtViewLastPost & """ title=""" & strTxtViewLastPost & """ /></a>")
							End If
							Response.Write("<br />" & strTxtIn & "&nbsp;<a href=""forum_posts.asp?TID=" & lngTopicID & strQsSID2 & """ title=""" & strSubject & """ class=""smLink"">" & TrimString(strSubject, 25) & "</a><br />")
						End If
						Response.Write(DateFormat(dtmLastEntryDate) & "&nbsp;" &  strTxtAt & "&nbsp;" & TimeFormat(dtmLastEntryDate))
					End If	
					Response.Write("</td>"  & _
					vbCrLf & " </tr>")
					


				End If

				

				'Move to the next database record
				intCurrentRecord = intCurrentRecord + 1
				
				
				'If there are more records in the array to display then run some test to see what record to display next and where				
				If intCurrentRecord <= Ubound(sarryForums,2) Then

					'Becuase the member may have an individual permission entry in the permissions table for this forum, 
					'it maybe listed twice in the array, so we need to make sure we don't display the same forum twice
					If intForumID = CInt(sarryForums(2,intCurrentRecord)) Then intCurrentRecord = intCurrentRecord + 1
					
					'If there are no records left exit loop
					If intCurrentRecord > Ubound(sarryForums,2) Then Exit Do
					
					'If this is a subforum jump to the next record, unless we have run out of forums
					Do While CInt(sarryForums(3,intCurrentRecord)) > 0 
						
						'Go to next record
						intCurrentRecord = intCurrentRecord + 1
						
						'If we have run out of records jump out of loop
						If intCurrentRecord > Ubound(sarryForums,2) Then Exit Do
					Loop
					
					'If there are no records left exit loop
					If intCurrentRecord > Ubound(sarryForums,2) Then Exit Do
					
					'See if the next forum is in a new category, if so jump out of this loop to display the next category
					If intCatID <> CInt(sarryForums(0,intCurrentRecord)) Then Exit Do
				End If
			
			'Loop back round to display next forum
			Loop
		
		
		'Else we are not displaying forums in this category so we need to move to the next category in the array
		Else
		
			'Loop through the forums array till we get to the next category
			Do While CInt(sarryForums(0,intCurrentRecord)) = intCatID 
					
				'Go to next record
				intCurrentRecord = intCurrentRecord + 1
					
				'If we have run out of records jump out of forums loop into the category loop
				If intCurrentRecord > Ubound(sarryForums,2) Then Exit Do
			Loop	
		End If

		
	
	%>
</table>
<br /><%
     
	'Loop back round for next category
	Loop
End If

'Clean up
Call closeDatabase()


'If NewsPad is enabled and we have a URL to it display the Web Wiz NewsPad new bulletins
If blnWebWizNewsPad AND strWebWizNewsPadURL <> "" Then
%>

<span id="WebWizNewsPad"></span>
<script language="javascript" type="text/javascript">getAjaxData('ajax_newspad_feed.asp', 'WebWizNewsPad');</script>
<br /><%

End If

%>
<br />
<table cellspacing="1" cellpadding="3" class="tableBorder" align="center">
 <tr class="tableLedger">
  <td colspan="2"><% = strTxtWhatsGoingOn %></td>
 </tr>
 <tr class="tableSubLedger">
  <td colspan="2"><% = strTxtForumStatistics %></td>
 </tr>
 <tr class="tableRow">
  <td width="5%" align="center"><img src="<% = strImagePath %>forum_statistics.<% = strForumImageType %>" alt="<% = strTxtForumStatistics %>" title="<% = strTxtForumStatistics %>" /></td>
  <td width="95%" nowrap="nowrap"><%

Response.Write(strTxtOurUserHavePosted & " " & FormatNumber(lngTotalNumberOfPosts, 0) & " " & strTxtPostsIn & " " & FormatNumber(lngTotalNumberOfTopics, 0) & " " & strTxtTopicsIn & " " & intNumberofForums & " " & strTxtForums & _
"<br />" & strTxtLastPost & "; " & DateFormat(dtmLastEntryDateAllForums) & " " & strTxtAt & " " & TimeFormat(dtmLastEntryDateAllForums) & " " & strTxtBy & " <a href=""member_profile.asp?PF=" & lngLastEntryUserIDAllForums & strQsSID2 & """ rel=""nofollow"">" & strLastEntryUserAllForums & "</a>")

'Display some statistics for the members
If lngNoOfMembers > 0 Then

Response.Write("<br />" & strTxtWeHave & " " & FormatNumber(lngNoOfMembers, 0) & " " & strTxtForumMembers & _
"<br />" & strTxtTheNewestForumMember & " <a href=""member_profile.asp?PF=" & saryMemebrStats(1,0) & strQsSID2 & """ rel=""nofollow"">" & saryMemebrStats(0, 0) & "</a>")

End If

%></td>
 </tr><%


'Get the number of active users if enabled
If blnActiveUsers Then
	
	%>
 <tr class="tableSubLedger">
  <td colspan="2"><a href="active_users.asp<% = strQsSID1 %>"><% = strTxtActiveUsers %></a></td>
 </tr>
 <tr class="tableRow">
  <td width="5%" align="center"><a href="active_users.asp<% = strQsSID1 %>"><img src="<% = strImagePath %>active_users.<% = strForumImageType %>" alt="<% = strTxtActiveUsers %>" title="<% = strTxtView & " " & strTxtActiveUsers %>" border="0" /></a></td>
  <td width="95%"><%
	
	'Get the active users online
	For intArrayPass = 1 To UBound(saryActiveUsers, 2)
	
		'If this is a guest user then increment the number of active guests veriable
		If saryActiveUsers(1, intArrayPass) = 2 Then 
			
			intActiveGuests = intActiveGuests + 1
		
		'Else if the user is Anonymous increment the Anonymous count
		ElseIf CBool(saryActiveUsers(8, intArrayPass)) Then	
			
			intAnonymousMembers = intAnonymousMembers + 1
		
		'Else add the name of the members name of the active users to the members online string
		ElseIf CBool(saryActiveUsers(8, intArrayPass)) = false Then	
			If strMembersOnline <> "" Then strMembersOnline = strMembersOnline & ", "
			strMembersOnline = strMembersOnline & "<a href=""member_profile.asp?PF=" & saryActiveUsers(1, intArrayPass) & strQsSID2 & """ rel=""nofollow"">" & saryActiveUsers(2, intArrayPass) & "</a>"
		End If
		
	Next 

	'Calculate the number of members online and total people online
	intActiveUsers = UBound(saryActiveUsers, 2)
	
	'Calculate the members online by using the total - Guests - Annoymouse Members
	intActiveMembers = intActiveUsers - intActiveGuests - intAnonymousMembers

	
	Response.Write(strTxtInTotalThereAre & " " & intActiveUsers & " <a href=""active_users.asp" & strQsSID1 & """>" & strTxtActiveUsers & "</a> " & strTxtOnLine & ", " & intActiveGuests & " " & strTxtGuests & ", " & intActiveMembers & " " & strTxtMembers & ", " & intAnonymousMembers & " " & strTxtAnonymousMembers)
	If strMembersOnline <> "" Then Response.Write(vbCrLf & "   <br />" & strTxtMembers & " " & strTxtOnLine & ": " & strMembersOnline)
End If

%>
  </td>
 </tr><%
 

'If birthdays is enabled show who has a birthday today
If strBirthdays <> "" Then
 
 %>
 <tr class="tableSubLedger">
  <td colspan="2"><% = strTxtTodaysBirthdays %></td>
 </tr>
 <tr class="tableRow">
  <td width="5%" align="center"><img src="<% = strImagePath %>todays_birthdays.<% = strForumImageType %>" alt="<% = strTxtTodaysBirthdays %>" title="<% = strTxtTodaysBirthdays %>" /></td>
  <td width="95%"><% = strBirthdays %></td>
 </tr><%
 
End If
 
 %>
</table>
<br />
<div align="center">
<span class="smText"><a href="mark_posts_as_read.asp<% = strQsSID1 %>" class="smLink"><% = strTxtMarkAllPostsAsRead %></a> :: <a href="remove_cookies.asp<% = strQsSID1 %>" class="smLink"><% = strTxtDeleteCookiesSetByThisForum %></a><br /><br /><% = strTxtCookies %></span><br />
<br /><%
    
'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
If blnLCode = True Then
	If blnTextLinks = True Then
		Response.Write("<span class=""text"" style=""font-size:10px"">Bulletin Board Software by <a href=""http://www.webwizforums.com"" target=""_blank"" style=""font-size:10px"">Web Wiz Forums&reg;</a> version " & strVersion & "</span>")
	Else
  		Response.Write("<a href=""http://www.webwizforums.com"" target=""_blank""><img src=""webwizforums_image.asp"" border=""0"" title=""Bulletin Board Software by Web Wiz Forums&reg; version " & strVersion & """ alt=""Bulletin Board Software by Web Wiz Forums&reg; version " & strVersion& """ /></a>")
	End If

	Response.Write("<br /><span class=""text"" style=""font-size:10px"">Copyright &copy;2001-2008 <a href=""http://www.webwizguide.com"" target=""_blank"" style=""font-size:10px"">Web Wiz</a></span>")
End If
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******

'Display the process time
If blnShowProcessTime Then Response.Write "<span class=""smText""><br /><br />" & strTxtThisPageWasGeneratedIn & " " & FormatNumber(Timer() - dblStartTime, 3) & " " & strTxtSeconds & "</span>"

%>
</div>
   <!-- #include file="includes/footer.asp" -->

⌨️ 快捷键说明

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