<%
	Class ACT_Search
		Function ACT_SearchCls(FileContent,ModeID)
			 FileContent = Replace(FileContent, "{$Search}", Search())
			 FileContent = Replace(FileContent, "{$ArticleSearch}", ArticleSearch(ModeID))
			 ACT_SearchCls = FileContent
		End Function 




		'取得总搜索(简便)
		Function Search()
			   Search = "<table width=""98%"" border=""0"" align=""center"">" & vbCrLf
			   Search = Search & "<form id=""SearchForm"" name=""SearchForm"" method=""Get"" action=""" & AcTCMS.ActCMSDM & "plus/Search/Search.asp"">" & vbCrLf
			   Search = Search & "   <tr>" & vbCrLf
			   Search = Search & "     <td align=""center"">" & vbCrLf
			   Search = Search & "         <input name=""KeyWord"" type=""text"" class=""textbox""  value=""关键字"" onfocus=""this.select();""/>" & vbCrLf
			   Search = Search & "         <input type=""submit"" class=""inputButton"" name=""Submit1"" value=""搜 索"" /></td>" & vbCrLf
			   Search = Search & "  </tr>" & vbCrLf
			   Search = Search & " </form>" & vbCrLf
			   Search = Search & "</table>" & vbCrLf
		End Function


		Function ArticleSearch(ModeID)
			  ArticleSearch = "<table width=""98%"" border=""0"" align=""center"">" & vbCrLf
			  ArticleSearch = ArticleSearch & "<form id=""ArticleSearchForm"" name=""ArticleSearchForm"" method=""get"" action=""" & AcTCMS.ActCMSDM & "plus/Search/Search.asp"">" & vbCrLf
			  ArticleSearch = ArticleSearch & "  <tr>" & vbCrLf
			  ArticleSearch = ArticleSearch & "    <td align=""center""><select name=""SearchType"">" & vbCrLf
			  ArticleSearch = ArticleSearch & "        <option value=""1"">标 题</option>" & vbCrLf
			  ArticleSearch = ArticleSearch & "        <option value=""2"">内 容</option>" & vbCrLf
			  ArticleSearch = ArticleSearch & "        <option value=""3"">作 者</option>" & vbCrLf
			  ArticleSearch = ArticleSearch & "        <option value=""4"">录入者</option>" & vbCrLf
			  ArticleSearch = ArticleSearch & "        <option value=""5"">关键字</option>" & vbCrLf
			  ArticleSearch = ArticleSearch & "      </select>" & vbCrLf
			  ArticleSearch = ArticleSearch & "        <select name=""ClassID"" style=""width:150"">" & vbCrLf
			  ArticleSearch = ArticleSearch & "          <option value=""0"" selected=""selected"">所有栏目</option>" & vbCrLf
		   	  If Application(Cstr(AcTCMSN & "ACT_Search"))=""   Then
				 ArticleSearch = ArticleSearch & Classmake(ModeID)
			  Else
				ArticleSearch = ArticleSearch &Application(Cstr(AcTCMSN & "ACT_Search"))
			  End If 
			  ArticleSearch = ArticleSearch & "        </select>" & vbCrLf
			  ArticleSearch = ArticleSearch & "        <input name=""KeyWord"" type=""text"" class=""textbox""  value=""关键字"" onfocus=""this.select();""/>" & vbCrLf
			  ArticleSearch = ArticleSearch & "        <input name=""ModeID"" value="""&ModeID&""" type=""hidden"" />" & vbCrLf
			  ArticleSearch = ArticleSearch & "        <input type=""submit"" class=""inputButton"" name=""Submit"" value=""搜 索"" /></td>" & vbCrLf
			  ArticleSearch = ArticleSearch & "  </tr>" & vbCrLf
			  ArticleSearch = ArticleSearch & "</form>" & vbCrLf
			  ArticleSearch = ArticleSearch & "</table>" & vbCrLf
		End Function




	function Classmake(ModeID)
		 Dim FolderRS
		 If ModeID=0 Then ModeID=1
		 Set FolderRS = Conn.Execute("Select ClassID,Classname from Class_act where ParentID='0' And ModeID="&ModeID&"  and ChangesLinkUrl='' Order by Orderid desc,ID desc")
		 IF FolderRS.Bof And FolderRS.Eof Then
		 End IF
		 do while Not FolderRS.Eof
			 Classmake=Classmake&"<option value="&FolderRS("ClassID")&" ClassID="&FolderRS("ClassID")&">"& FolderRS("ClassName") & "</option>"
			 Classmake=Classmake&(GetChildClassList(FolderRS("ClassID"),""))
		  FolderRS.MoveNext
		  loop
	 end function
	 Function GetChildClassList(ClassID,Str)
	       Dim Sql,RsTempObj,TempImageStr,ImageStr,CheckStr
	        TempImageStr = "&nbsp;└"
	        Sql = "Select ClassID,Classname from Class_act where ParentID='" & ClassID & "'  and ChangesLinkUrl='' "
	        ImageStr = Str & "&nbsp;└"
	        Set RsTempObj = Conn.Execute(Sql)
	            do while Not RsTempObj.Eof
					   GetChildClassList = GetChildClassList  & "<option value="&RsTempObj("ClassID")&" ClassID="&RsTempObj("ClassID")&">"& ImageStr & TempImageStr &" "& RsTempObj("ClassName")& "</option>"
					  GetChildClassList = GetChildClassList & GetChildClassList(RsTempObj("ClassID"),ImageStr)
		         RsTempObj.MoveNext
	           loop
	       Set RsTempObj = Nothing
	 End Function 


	End Class 
%>