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

📄 search_form.asp

📁 简单的asp论坛源码系统,很适用于初学者!界面简洁,功能齐全
💻 ASP
📖 第 1 页 / 共 2 页
字号:
   <br />
   <select name="forumID" id="forumID" size="13" multiple="multiple" tabindex="5">
    <option value="0"<% If intForumID2 = 0 Then Response.Write(" selected") %>><% = strTxtAllForums %></option><%


	'Show forum select
	If isArray(sarryForumSelect) Then
		
		'Loop round to show all the categories and forums
		Do While intCurrentRecord <= Ubound(sarryForumSelect,2)
			
			'Loop through the array looking for forums that are to be shown
			'if a forum is found to be displayed then show the category and the forum, if not the category is not displayed as there are no forums the user can access
			Do While intCurrentRecord <= Ubound(sarryForumSelect,2)
			
				'Read in details
				blnHideForum = CBool(sarryForumSelect(5,intCurrentRecord))
				blnRead = CBool(sarryForumSelect(6,intCurrentRecord))
						
				'If this forum is to be shown then leave the loop and display the cat and the forums
				If blnHideForum = False OR blnRead = True Then Exit Do
				
				'Move to next record
				intCurrentRecord = intCurrentRecord + 1
			Loop
					
			'If we have run out of records jump out of loop
			If intCurrentRecord > Ubound(sarryForumSelect,2) Then Exit Do
		 
			
			
			'Read in the deatils for the category
			intCatID = CInt(sarryForumSelect(0,intCurrentRecord))
			strCatName = sarryForumSelect(1,intCurrentRecord)		
			
			
			'Display a link in the link list to the forum
			Response.Write(vbCrLf & "    <optgroup label=""&nbsp;&nbsp;" & strCatName & """>")
			
			
			
			'Loop round to display all the forums for this category
			Do While intCurrentRecord <= Ubound(sarryForumSelect,2)
			
				'Read in the forum details from the recordset
				intForumID = CInt(sarryForumSelect(2,intCurrentRecord))
				intSubForumID = CInt(sarryForumSelect(3,intCurrentRecord))
				strForumName = sarryForumSelect(4,intCurrentRecord)
				blnHideForum = CBool(sarryForumSelect(5,intCurrentRecord))
				blnRead = CBool(sarryForumSelect(6,intCurrentRecord))
				
				
				'If this forum is to be hidden but the user is allowed access to it set the hidden boolen back to false
				If blnHideForum = True AND blnRead = True Then blnHideForum = False
	
				'If the forum is not a hidden forum to this user, display it
				If blnHideForum = False AND intSubForumID = 0 Then
					'Display a link in the link list to the forum
					Response.Write (vbCrLf & "     <option value=""" & intForumID & """")
					If intForumID2 = intForumID Then Response.Write(" selected")
					Response.Write(">&nbsp;" & strForumName & "</option>")	
				End If
				
				
				
				'See if this forum has any sub forums
				'Initilise variables
				intTempRecord = 0
						
				'Loop round to read in any sub forums in the stored array recordset
				Do While intTempRecord <= Ubound(sarryForumSelect,2)
				
					'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 intSubForumID = CInt(sarryForumSelect(2,intTempRecord)) Then intTempRecord = intTempRecord + 1
					
					'If there are no records left exit loop
					If intTempRecord > Ubound(sarryForumSelect,2) Then Exit Do
					
					'If this is a subforum of the main forum then get the details
					If CInt(sarryForumSelect(3,intTempRecord)) = intForumID Then
					
						'Read in the forum details from the recordset
						intSubForumID = CInt(sarryForumSelect(2,intTempRecord))
						strForumName = sarryForumSelect(4,intTempRecord)
						blnHideForum = CBool(sarryForumSelect(5,intTempRecord))
						blnRead = CBool(sarryForumSelect(6,intTempRecord))
						
						
						'If this forum is to be hidden but the user is allowed access to it set the hidden boolen back to false
						If blnHideForum = True AND blnRead = True Then blnHideForum = False
			
						'If the forum is not a hidden forum to this user, display it
						If blnHideForum = False Then
							'Display a link in the link list to the forum
							Response.Write (vbCrLf & "     <option value=""" & intSubForumID & """")
							If intForumID2 = intSubForumID Then Response.Write(" selected")
							Response.Write (">&nbsp&nbsp;-&nbsp;" & strForumName & "</option>")	
						End If
					End If
					
					'Move to next record 
					intTempRecord = intTempRecord + 1
					
				Loop
				
				
						
				'Move to the next record in the array
				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(sarryForumSelect,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(sarryForumSelect(2,intCurrentRecord)) Then intCurrentRecord = intCurrentRecord + 1
					
					'If there are no records left exit loop
					If intCurrentRecord > Ubound(sarryForumSelect,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(sarryForumSelect(0,intCurrentRecord)) Then Exit Do
				End If
			Loop
			
			
			Response.Write(vbCrLf & "     </optgroup>")
		Loop
	End If


%>
    </select>
  </td>
  <td width="50%" valign="top">
   <table width="100%" border="0" cellspacing="4" cellpadding="2">
    <tr>
     <td><% = strTxtSearchIn %>
      <br />
      <select name="searchIn" id="searchIn" tabindex="6">
       <option value="body" "selected"><% = strTxtMessageBody %></option>
       <option value="subject"><% = strTxtTopicSubject %></option>
      </select>
     </td>
    </tr>
    <tr>
     <td><% = strTxtFindPosts %>
      <br />
      <select name="AGE" id="AGE" tabindex="7">
       <option value="0"><% = strTxtAnyDate %></option>
       <option value="1"><% = DateFormat(dtmLastVisitDate) & " " & strTxtAt & " " & TimeFormat(dtmLastVisitDate) %></option>
       <option value="2"><% = strTxtYesterday %></option>
       <option value="3"><% = strTxtLastWeek %></option>
       <option value="4"><% = strTxtLastMonth %></option>
       <option value="5"><% = strTxtLastTwoMonths %></option>
       <option value="6" selected><% = strTxtLastSixMonths %></option>
       <option value="7"><% = strTxtLastYear %></select>
      <select name="DIR" id="DIR" tabindex="8">
       <option value="newer"><% = strTxtAndNewer %></option>
       <option value="older"><% = strTxtAndOlder %></option>
      </select>
     </td>
    </tr>
    <tr>
     <td><% = strTxtSortResultsBy %>
      <br />
      <select name="OrderBy" id="OrderBy" tabindex="9">
       <option value="LastPost" "selected"><% = strTxtLastPostTime %></option>
       <option value="StartDate"><% = strTxtTopicStartDate %></option>
       <option value="Subject"><% = strTxtSubjectAlphabetically %></option>
       <option value="Replies"><% = strTxtNumberReplies %></option>
       <option value="Views"><% = strTxtNumberViews %></option>
       <option value="Username"><% = strTxtUsername %></option>
       <option value="ForumName"><% = strTxtForumName %></option>
      </select>
     </td>
    </tr>
    <tr>
     <td><% = strTxtDisplayResultsAs %>
      <br />
      <select name="resultType" id="resultType" tabindex="10">
       <option value="posts" "selected"><% = strTxtPosts %></option>
       <option value="topics"><% = strTxtTopics %></option>
      </select>
     </td>
    </tr>
   </table>
  </td>
 </tr><%

End If

%>
 <tr class="tableBottomRow">
  <td colspan="2" align="center">
   <input type="submit" name="Submit" id="Submit" value="<% = strTxtStartSearch %>" tabindex="11" />
   <input type="reset" name="Reset" id="Reset" value="<% = strTxtResetForm %>" tabindex="12" />
  </td>
 </tr>
 </table>
</form>
</div>
<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 + -