<% @ LANGUAGE = VBScript %> <% Response.Expires = 0 %> Lietuva – Latvija
 
    R E G I O N Ų    K U L T Ū R I N I Ų    I N I C I A T Y V Ų     C E N T R A S English      
  Adresas: Vilniaus g. 22, LT-01119 Vilnius.
Tel./faksas (8~5) 261 9670, mob. tel. 8 687 47550. El. paštas
zemaiciu@gmail.com
          
 
Į pradžią Laiškams Laiškai                 Atsakymai į klausimus                      Paieška                 

<% Dim strQuer ' The text of our query Dim strQuery ' The text of our query + info Dim strQuert Dim objQuery ' The index server query object Dim rstResults ' A recordset of results returned from I.S. Dim objField ' Field object for loop ' Retreive the query from the querystring strQuer ="" strQuer = Request.QueryString("query") ' Response.Write("Form "+ Request.Form("query")) ' Response.Write("String "+ Request.QueryString("query")) strQuery = SuAnd(strQuer) ' If the query isn't blank them proceed If strQuery <> "" Then ' Create our index server object Set objQuery = Server.CreateObject("IXSSO.Query") ' Set it's properties With objQuery .Catalog = "IS-Baltu" ' Catalog to query .MaxRecords = 256 ' Max # of records to return .SortBy = "rank [d]" .Columns = "filename, path, vpath, size, write, " _ & "characterization, DocTitle, DocAuthor, " _ & "DocKeywords, rank, hitcount" ' Build our Query: Hide admin page and FPSE pages strQuery = "(" & strQuery & ")" _ & " AND NOT #filename = *admin*" _ & " AND NOT #path *\_vti_*" ' Uncomment to only look for files modified last 5 days 'strQuery = strQuery & " AND @write > -5d" .Query = strQuery ' Query text End With ' To set more complex scopes we use the utility object. ' You can call AddScopeToQuery as many times as you need to. ' Shallow includes just files in that folder. Deep includes ' subfolders as well. ' 'Dim objUtility 'Set objUtility = Server.CreateObject("IXSSO.Util") 'objUtility.AddScopeToQuery objQuery, "c:\inetpub\wwwroot\indexserver", "shallow" 'objUtility.AddScopeToQuery objQuery, "c:\inetpub\wwwroot\indexserver\content", "shallow" 'Set objUtility = Nothing ' Get a recordset of our results back from Index Server Set rstResults = objQuery.CreateRecordset("nonsequential") ' Get rid of our Query object Set objQuery = Nothing Response.Write "

" Response.Write "Ieškota: " Response.Write strQuer ' Check for no records If rstResults.EOF Then Response.Write "   Deja, rezultatų nėra..." Else ' Print out # of results Response.Write ";    Rasta (" Response.Write rstResults.RecordCount Response.Write "):

" ' Loop through results %>

<% Do While Not rstResults.EOF ' Loop through Fields ' Pretty is as pretty does... good enough: %> <% If rstResults.Fields("doctitle") = "" Then %> "><%= PathToVpath(rstResults.Fields("path")) %>
<% Else %> "><%= rstResults.Fields("doctitle") %>
<% End If %>   <%= rstResults.Fields("characterization") %>


<% ' Move to next result rstResults.MoveNext Loop rstResults.MoveFirst Response.Write "
"
		'Response.Write rstResults.GetString()
		Response.Write "
" End If ' Kill our recordset object Set rstResults = Nothing End If %> <% Function PathToVpath(strPath) Const strCompRoot = "e:\intepub\wwwroot\draugai\muziejai\baltu\" Const strWebRoot = "http:\\www.baltu.lt\" Dim strTemp, strTempm, strTempn strTemp = strPath strTempm = Replace(strTemp, strCompRoot,strWebRoot) strTempn = Replace(strTempm, "\", "/") PathToVpath = strTempm End Function %>
[Į pradžią] [Laiškai] [Atsakymai į klausimus] [Paieška] [Kalendorius]
[
Naujienos] Konkursai] [Leidiniai] [Naudingos nuorodos]
 

© Regioninių kultūros iniciatyvų centras

Svetainės priežiūra: Multimedijos centras humanitarams Matematikos ir informatikos institute

Tinklalapis atnaujintas 2008.11.05