<% @ Language=VBScript %> <% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Forums(TM) '** https://www.webwizforums.com '** '** Copyright (C)2001-2024 Web Wiz Ltd. All Rights Reserved. '** '** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS UNDER LICENSE FROM WEB WIZ LTD. '** '** IF YOU DO NOT AGREE TO THE LICENSE AGREEMENT THEN WEB WIZ LTD. IS UNWILLING TO LICENSE '** THE SOFTWARE TO YOU, AND YOU SHOULD DESTROY ALL COPIES YOU HOLD OF 'WEB WIZ' SOFTWARE '** AND DERIVATIVE WORKS IMMEDIATELY. '** '** If you have not received a copy of the license with this work then a copy of the latest '** license contract can be found at:- '** '** https://www.webwiz.net/license '** '** For more information about this software and for licensing information please contact '** 'Web Wiz' at the address and website below:- '** '** Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, England '** https://www.webwiz.net '** '** Removal or modification of this copyright notice will violate the license contract. '** '**************************************************************************************** 'Set the response buffer to true as we maybe redirecting Response.Buffer = True 'Dimension variables Dim strReturnPage 'Holds the page to return to Dim strForumName 'Holds the forum name Dim intReadPermission 'holds the forums read permisisons Dim strSearchKeywords 'Holds the keywords to search for Dim strSearchMode 'Holds the search mode Dim strSearchUser 'Holds the user to search for Dim intCurrentRecord 'Holds the recordset array position Dim sarrySubscribedForums 'Holds the subscribed forums Dim sarrySubscribedTopics 'Holds the subscribed topics Dim sarryForumSelect 'Holds the array with all the forums Dim intSubForumID 'Holds if the forum is a sub forum Dim intTempRecord 'Temporay record store Dim blnHideForum 'Holds if the jump forum is hidden or not Dim strCatName 'Holds the category name Dim intCatID 'Holds the cat ID Dim intForumID2 'Holds the read in forum id Dim lngTopicID 'Holds post id for searching posts Dim strForumURL 'Holds the forum URL if a link intCurrentRecord = 0 'Read in values passed to this form blnSslEnabledPage = True intForumID2 = IntC(Request("FID")) strSearchKeywords = Trim(Mid(Request("KW"), 1, 35)) strSearchUser = Trim(Mid(Request.QueryString("USR"), 1, 25)) strSearchMode = Trim(Mid(Request.QueryString("SM"), 1, 3)) lngTopicID = LngC(Request("TID")) 'First see if the user is a in a moderator group for any forum 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Permissions.Moderate " & _ "FROM " & strDbTable & "Permissions " & _ "WHERE (" & strDbTable & "Permissions.Group_ID = " & intGroupID & " OR " & strDbTable & "Permissions.Author_ID = " & lngLoggedInUserID & ") AND " & strDbTable & "Permissions.Moderate=" & strDBTrue & ";" 'Query the database rsCommon.Open strSQL, adoCon 'If a record is returned then the user is a moderator in one of the forums If NOT rsCommon.EOF Then blnModerator = True 'Clean up rsCommon.Close 'DB hit to get forums with cats and permissions, for the forum select drop down If lngTopicID = 0 Then 'Initlise the sql statement strSQL = "" & _ "SELECT " & strDbTable & "Category.Cat_ID, " & strDbTable & "Category.Cat_name, " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Sub_ID, " & strDbTable & "Forum.Forum_name, " & strDbTable & "Forum.Hide, " & strDbTable & "Permissions.View_Forum, " & strDbTable & "Forum.Forum_URL " & _ "FROM " & strDbTable & "Category" & strDBNoLock & ", " & strDbTable & "Forum" & strDBNoLock & ", " & strDbTable & "Permissions" & strDBNoLock & " " & _ "WHERE " & strDbTable & "Category.Cat_ID = " & strDbTable & "Forum.Cat_ID " & _ "AND " & strDbTable & "Forum.Forum_ID = " & strDbTable & "Permissions.Forum_ID " & _ "AND (" & strDbTable & "Permissions.Author_ID = " & lngLoggedInUserID & " OR " & strDbTable & "Permissions.Group_ID = " & intGroupID & ") " & _ "ORDER BY " & strDbTable & "Category.Cat_order, " & strDbTable & "Forum.Forum_Order, " & strDbTable & "Permissions.Author_ID DESC;" 'Query the database rsCommon.Open strSQL, adoCon 'Place the subscribed topics into an array If NOT rsCommon.EOF Then 'Read in the row from the db using getrows for better performance sarryForumSelect = rsCommon.GetRows() End If 'Clean up rsCommon.Close End If 'If active users is enabled update the active users application array If blnActiveUsers Then 'Call active users function saryActiveUsers = activeUsers("", strTxtSearchingForums, "search_form.asp", 0) End If 'Set bread crumb trail If lngTopicID <> 0 Then strBreadCrumbTrail = strBreadCrumbTrail & strNavSpacer & strTxtTopic & " " & strTxtSearch Else strBreadCrumbTrail = strBreadCrumbTrail & strNavSpacer & strTxtSearchTheForum End If Call closeDatabase() %> <% If lngTopicID <> 0 Then Response.Write(strTxtTopic & " " & strTxtSearch) Else Response.Write(strTxtSearchTheForum) %> <% '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** Response.Write("" & vbCrLf & vbCrLf) '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** %>

<% If lngTopicID <> 0 Then Response.Write(strTxtTopic & " " & strTxtSearch) Else Response.Write(strTxtSearchTheForum) %>


<% 'If seraching a topic don't include the other options If lngTopicID = 0 Then %> <% End If %>
<% = strTxtSearchKeywords %>
<% = strTxtSearchbyKeyWord %>
<% 'Include the follwoing if doing a topic search If lngTopicID <> 0 Then %> <% End If %>
<% = strTxtSearchbyUserName %>
<% = strTxtFindMember %>
<% = strTxtMemberName2 & " " & strTxtExactMatch %><% 'If seraching a topic don't include the other options If lngTopicID = 0 Then %>
<% = strTxtSearchForTopicsThisMemberStarted %><% End If %>
<% = strTxtSearchOptions %>
<% = strTxtSearchForum %>
<% = strTxtCtrlApple %>
<% = strTxtSearchIn %>
<% = strTxtFindPosts %>
<% = strTxtSortResultsBy %>
<% = strTxtDisplayResultsAs %>

<% '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** If blnLCode = True Then If blnTextLinks = True Then Response.Write("Forum Software by Web Wiz Forums® version " & strVersion & "") Else Response.Write("") End If Response.Write("
Copyright ©2001-2024 Web Wiz Ltd.") End If '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** 'Display the process time If blnShowProcessTime Then Response.Write "

" & strTxtThisPageWasGeneratedIn & " " & FormatNumber(Timer() - dblStartTime, 3) & " " & strTxtSeconds & "
" %>