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

📄 search_results_posts.asp

📁 简单的asp论坛源码系统,很适用于初学者!界面简洁,功能齐全
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	If strSearchKeywords <> "" Then 
		Response.Write(strTxtFor & " '" & Server.HTMLEncode(strSearchKeywords) & "' ")
	End If
	
	Response.Write(strTxtHasFound & " " & intTotalRecords & " " & strTxtResultsIn & " " & dblSearchProcessTime & " " & strTxtSecounds & ".")
	
	Response.Write("<br /><span class=""smText"">" & strTxtThisSearchWasProcessed & " " & DateFormat(dtmSearchDateCreated) & " " & strTxtAt & " " & TimeFormat(dtmSearchDateCreated) & ".</span>")
End If
%></td>
   <td align="right" valign="bottom" nowrap><!-- #include file="includes/page_link_inc.asp" --></td>
 </tr>
</table>
<table cellspacing="1" cellpadding="3" class="tableBorder" align="center" style="table-layout: fixed;">
 <tr class="tableLedger">
  <td style="width:140px;" align="center"><% = strTxtAuthor %></td>
  <td align="center"><% = strTxtMessage %></td>
 </tr><%




'If there are no search results display an error msg
If intTotalRecords <= 0 Then
	
	'If there are no search results to display then display the appropriate error message
	Response.Write vbCrLf & " <tr class=""tableRow""><td colspan=""2"" align=""center""><br />" & strTxtSearhExpiredOrNoPermission & " <a href=""search_form.asp?KW=" & Server.URLEncode(strSearchKeywords) & strQsSID2 & """>" & strTxtCreateNewSearch & "</a><br /><br /></td></tr>"




'Disply any search results in the forum
Else


	'Do....While Loop to loop through the recorset to display the forum topics
	Do While intCurrentRecord < intEndPosition

		'If there are no topic records left to display then exit loop
		If intCurrentRecord >= intTotalRecords Then Exit Do
			
			
		'SQL Query Array Look Up table
		'0 = tblForum.Forum_ID
		'1 = tblForum.Forum_name
		'2 = tblForum.Password
		'3 = tblForum.Forum_code
		'4 = tblTopic.Topic_ID
		'5 = tblTopic.Poll_ID
		'6 = tblTopic.Moved_ID
		'7 = tblTopic.Subject
		'8 = tblTopic.Icon
		'9 = tblTopic.No_of_replies
		'10 = tblTopic.No_of_views
		'11 = tblTopic.Locked
		'12 = tblTopic.Priority
		'13 = tblTopic.Hide
		'14 = tblThread.Thread_ID
		'15 = tblThread.Message_date
		'16 = tblThread.Message
		'17 = tblThread.Author_ID
		'18 = tblAuthor.Username
		'19 = tblTopic.Event_date
		'20 = tblTopic.Event_date_end



		'Read in Topic details from the database
		intForumID = CInt(sarryTopics(0,intCurrentRecord))
		strForumName = sarryTopics(1,intCurrentRecord)
		strForumPassword = sarryTopics(2,intCurrentRecord)
		strForumPaswordCode = sarryTopics(3,intCurrentRecord)
		
		
		
		'Read in Topic details from the database
		lngTopicID = CLng(sarryTopics(4,intCurrentRecord))
		lngPollID = CLng(sarryTopics(5,intCurrentRecord))
		strSubject = sarryTopics(7,intCurrentRecord)
		strTopicIcon = sarryTopics(8,intCurrentRecord)
		lngNumberOfReplies = CLng(sarryTopics(9,intCurrentRecord))
		lngNumberOfViews = CLng(sarryTopics(10,intCurrentRecord))
		blnTopicLocked = CBool(sarryTopics(11,intCurrentRecord))
		intPriority = CInt(sarryTopics(12,intCurrentRecord))
		blnHideTopic = CBool(sarryTopics(13,intCurrentRecord))
		dtmEventDate = sarryTopics(19,intCurrentRecord)
		dtmEventDateEnd = sarryTopics(20,intCurrentRecord)
		
		'Read in the post details
		lngPostID = CLng(sarryTopics(14,intCurrentRecord))
		dtmPostDate = CDate(sarryTopics(15,intCurrentRecord))
		strMessage = sarryTopics(16,intCurrentRecord)
		lngPostAuthorID = CLng(sarryTopics(17,intCurrentRecord))
		strPostAuthor = sarryTopics(18,intCurrentRecord)
		
		'Clean up input to prevent XXS hack
		strSubject = formatInput(strSubject)
		
		'Remove HTML from message for subject link title
		strMessage = removeHTML(strMessage, 500, false)

		
		'Calculate the topic icon
		If strTopicIcon = "" OR isNull(strTopicIcon) Then strTopicIcon = strImagePath & "topic_icon.gif"
		
		'Highlight the search words
		strSubject = searchHighlighter(strSubject, sarySearchWord)
		strMessage = searchHighlighter(strMessage, sarySearchWord)
		
		'If forum is passworded and not logged into forum display that password is required
		If strForumPassword <> "" AND getCookie("fID", "Forum" & intForumID) <> strForumPaswordCode Then 
			strSubject = strTxtPasswordRequiredViewPost
			strMessage = strTxtPasswordRequiredViewPost
			strSubject = strTxtPasswordRequiredViewPost
			strPostAuthor = strTxtNotGiven
			lngPostAuthorID = 2
		End If

		'Unread Posts *********
		intUnReadPostCount = 0
					
		'If there is a newer post than the last time the unread posts array was initilised run it again
		If dtmPostDate > CDate(Session("dtmUnReadPostCheck")) Then Call UnreadPosts()
						
		'Count the number of unread posts in this forum
		If isArray(sarryUnReadPosts) AND dtmPostDate > dtmLastVisitDate Then
			For intUnReadForumPostsLoop = 0 to UBound(sarryUnReadPosts,2)
				'Increament unread post count
				If CLng(sarryUnReadPosts(1,intUnReadForumPostsLoop)) = lngTopicID AND sarryUnReadPosts(3,intUnReadForumPostsLoop) = "1" Then intUnReadPostCount = intUnReadPostCount + 1
			Next	
		End If
		
	
		'Calculate the row colour
		If intCurrentRecord MOD 2=0 Then
			strPostTableRowClass = "msgEvenTableRow"
			strPostTableSideClass = "msgEvenTableSide"
		Else
			strPostTableRowClass = "msgOddTableRow"
			strPostTableSideClass = "msgOddTableSide"
		End If
	
		'If this is a hidden post then change the row colour to highlight it
		If blnHideTopic Then strPostTableRowClass = "hiddenTableRow"


%>
  <tr class="tableSearchLedger">
    <td colspan="2">
     <div style="float:left; padding:0px 7px;"><!-- #include file="includes/topic_status_icons_inc.asp" --></div><% 


    
    		
		 'If the user is a forum admin or a moderator then give let them delete the topic
		 If blnAdmin  OR blnModerator Then 
		 	
		 	Response.Write("<span style=""float:right;"" id=""modTools" & lngTopicID & """ onclick=""showDropDown('modTools" & lngTopicID & "', 'modToolsMenu" & lngTopicID & "', 120, 105);"" class=""dropDownPointer""><img src=""" & strImagePath & "moderator_tools." & strForumImageType & """ alt=""" & strTxtModeratorTools & """ title=""" & strTxtModeratorTools & """ /></span> " & _
			"<div id=""modToolsMenu" & lngTopicID & """ class=""dropDownMenu"">" & _
			"<a href=""javascript:winOpener('pop_up_topic_admin.asp?TID=" & lngTopicID & strQsSID2 & "','admin',1,1,600,285)""><div>" & strTxtTopicAdmin & "</div></a>")
			
			'Lock or un-lock forum if admin
			If blnTopicLocked Then
				Response.Write("<a href=""lock_topic.asp?mode=UnLock&TID=" & lngTopicID & strQsSID2 & """><div>" & strTxtUnLockTopic & "</div></a>")
			Else
				Response.Write("<a href=""lock_topic.asp?mode=Lock&TID=" & lngTopicID & strQsSID2 & """><div>" & strTxtLockTopic & "</div></a>")
			End If

			'Hide or show topic
			If blnHideTopic = false Then
				Response.Write("<a href=""lock_topic.asp?mode=Hide&TID=" & lngTopicID & strQsSID2 & """><div>" & strTxtHideTopic & "</div></a>")
			Else
				Response.Write("<a href=""lock_topic.asp?mode=Show&TID=" & lngTopicID & strQsSID2 & """><div>" & strTxtShowTopic & "</div></a>")
			End If
			
			Response.Write("<a href=""delete_topic.asp?TID=" & lngTopicID & "&PN=" & intRecordPositionPageNum & strQsSID2 & """ onclick=""return confirm('" & strTxtDeleteTopicAlert & "')""><div>" & strTxtDeleteTopic & "</div></a>")
			Response.Write("</div>")
		 	
		End If

		
		'If calendar event display so
		If isDate(dtmEventDate) Then
			Response.Write(strTxtEvent & ": ")
		'Display if the post is hidden
		ElseIf blnHideTopic Then 
			Response.Write(strTxtHidden & ": ")
		'If there is a poll display a poll text
		ElseIf lngPollID > 0 Then 
			Response.Write(strTxtPoll)
		'Else this is a topic
		Else
			Response.Write(strTxtTopic & ": ")
		End If
		
		
		'Display the subject of the topic
		Response.Write(" <a href=""forum_posts.asp?TID=" & lngTopicID & "&KW=" & Server.URLEncode(strSearchKeywords))
		If intPriority = 3 Then Response.Write("&FID=" & intForumID & "&PR=3")
		Response.Write("" & strQsSID2 & """>" & strSubject & "</a>")
		
		'If calendar event display the event date
		If isDate(dtmEventDate) Then Response.Write(" - " & strTxtEventDate & ": " & DateFormat(dtmEventDate))
		If isDate(dtmEventDateEnd) Then Response.Write(" - " & DateFormat(dtmEventDateEnd))
   
    %>
    <br /><% = strTxtForum & ": <a href=""forum_topics.asp?FID=" & intForumID & strQsSID2 & """>" & strForumName & "</a>" %>
   </td>
  </tr>
  <tr class="<% = strPostTableSideClass %>">
    <td rowspan="2" valign="top">
     <span id="userProfile<% = lngPostID %>" onclick="showDropDown('userProfile<% = lngPostID %>', 'profileMenu<% = lngPostID %>', 160, 0)" class="msgSideProfile" title="<% = strTxtViewDropDown %>"><% = strPostAuthor %> <img src="<% = strImagePath %>drop_down.<% = strForumImageType %>" alt="<% = strTxtViewDropDown %>" /></span>
     <div id="profileMenu<% = lngPostID %>" class="dropDownMenu">
      <a href="member_profile.asp?PF=<% = lngPostAuthorID %>&FID=<% = intForumID & strQsSID2 %>" rel="nofollow"><div><% = strTxtMembersProfile %></div></a><%

    		'Memeber drop down options
    		If blnPrivateMessages Then Response.Write(vbCrLf & "      <a href=""pm_new_message_form.asp?name=" & Server.URLEncode(Replace(strPostAuthor, "'", "\'",  1, -1, 1)) & strQsSID2 & """><div>" & strTxtSendPrivateMessage & "</div></a>")
    		Response.Write(vbCrLf & "      <a href=""search_form.asp?USR=" & Server.URLEncode(Replace(strPostAuthor, "'", "\'",  1, -1, 1)) & strQsSID2 & """><div>" & strTxtFindMembersPosts & "</div></a>")
    		Response.Write(vbCrLf & "      <a href=""pm_buddy_list.asp?name=" & Server.URLEncode(Replace(strPostAuthor, "'", "\'",  1, -1, 1)) & strQsSID2 & """><div>" & strTxtAddToBuddyList & "</div></a>")
%> 
     </div>
     <br /><br />
     <% = strTxtReplies & ": " & lngNumberOfReplies %>
     <br />
     <% = strTxtViews  & ": " & lngNumberOfViews %>
     <br /><br /><% 
     
     		'Display direct link to post
     		Response.Write(vbCrLf & "     <a href=""forum_posts.asp?TID=" & lngTopicID & "&KW=" & Server.URLEncode(strSearchKeywords))
		If intPriority = 3 Then Response.Write("&FID=" & intForumID & "&PR=3")
		Response.Write("&PID=" & lngPostID & strQsSID2 & "#" & lngPostID & """>" & strTxtViewPost & "</a> <img src=""" & strImagePath & "view_post." & strForumImageType & """ alt=""" & strTxtViewPost & """ title=""" & strTxtViewPost & """ />")
     
      %>
    <td>
     <strong><% = strSubject %></strong>
     <br /><% = strTxtPosted & " " & DateFormat(dtmPostDate) & " " & strTxtAt & " " & TimeFormat(dtmPostDate) %>
    </td>
  </tr>
  <tr class="<% = strPostTableRowClass %>">
    <td height="84" valign="top" class="msgLineDevider" style="border-bottom-width: 0px;">
     <!-- Start Member Post -->
      <div class="msgBody" style="float: left; overflow: auto;">
       <% = strMessage %>
       <% 
     
     		'Display direct link to post
     		Response.Write(vbCrLf & "     <a href=""forum_posts.asp?TID=" & lngTopicID & "&KW=" & Server.URLEncode(strSearchKeywords))
		If intPriority = 3 Then Response.Write("&FID=" & intForumID & "&PR=3")
		Response.Write("&PID=" & lngPostID & strQsSID2 & "#" & lngPostID & """><img src=""" & strImagePath & "view_post." & strForumImageType & """ alt=""" & strTxtViewPost & """ title=""" & strTxtViewPost & """></a>")
     
      %>
      </div>
     <!-- End Member Post -->
    </td>
  </tr><%

		'Move to the next record
		intCurrentRecord = intCurrentRecord + 1
	Loop
End If


        %>
</table>
<table class="basicTable" cellspacing="0" cellpadding="4" align="center">
 <tr>
  <td><br /><!-- #include file="includes/forum_jump_inc.asp" --><%

'Release server objects
Call closeDatabase()



	%></td>
  <td align="right" valign="top" nowrap><!-- #include file="includes/page_link_inc.asp" --></td>
 </tr>
</table>
<br />
<div align="center">
 <%
'***** 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 + -