Index-Server
Aus PC-WELT-Wiki
Inhaltsverzeichnis |
So konfigurieren Sie den Indexdienst für die Suche in Dateien
Windows 2000 und XP enthalten ein eigenes Tool, über das Sie den Inhalt von Dateien durchsuchen können: den Indexdienst. Er erlaubt eine komplexe Suchsyntax. Außerdem bietet er eine höhere Geschwindigkeit bei der Verarbeitung der Abfragen als die Suchfunktion, die Sie über die <F3>-Taste aufrufen können. Standardmäßig ist der Dienst jedoch weder gestartet noch konfiguriert.
Den Indexdienst gab es als Zubehör schon unter Windows NT 4. Dort war er, noch unter dem Namen Microsoft Index-Server, Bestandteil des Webservers "Internet Information Server". Hier hatte er die Aufgabe, eine Suchabfrage über den Inhalt des Webservers für das Internet oder Intranet zu ermöglichen. Für Windows 2000/XP hat Microsoft den Index-Server um eine Funktion zum Durchsuchen beliebiger Verzeichnisse auf der lokalen Festplatte erweitert. Der Indexdienst nimmt standardmäßig aber nur HTML-, TXT- und Microsoft-Office-Dateien sowie Internet-Mail und -Nachrichten in den Suchindex auf. Der Indexdienst macht allerdings das System beim Indizieren umfangreicher Verzeichnisse langsamer. Deshalb sollten Sie zuerst einen neuen Katalog erzeugen, der auf die Verzeichnisse beschränkt ist, deren Dateien Sie oft durchsuchen müssen.
Und so geht's:
1. Gehen Sie zu "Start, Einstellungen, Systemsteuerung, Verwaltung, Computerverwaltung", und markieren Sie in der Baumstruktur den "Indexdienst". Wählen Sie aus dem Kontextmenü "Neu, Katalog".
2. Tragen Sie im Dialog "Katalog hinzufügen" einen beliebigen Namen für den Katalog ein, beispielsweise "MeinArchiv", und geben Sie einen Pfad für die Katalogdateien an. Wenn das Verzeichnis noch nicht existiert, legt Windows es automatisch an.
3. Wählen Sie aus dem Kontextmenü des eben angelegten Katalogs "Neu, Verzeichnis", und tragen Sie im Dialog "Verzeichnis hinzufügen" den Pfad zu einem Verzeichnis ein, dessen Inhalt Sie in den Suchindex aufnehmen wollen. Wiederholen Sie diesen Schritt für jedes Verzeichnis, das Sie später durchsuchen möchten.
4. Im standardmäßigen Katalog "System" sind schon einige Verzeichnisse für die Indexaufnahme vorkonfiguriert, etwa das Verzeichnis "Dokumente und Einstellungen". Wenn Sie diese vom Index ausschließen möchten, müssen auf den jeweiligen Eintrag doppelklicken und unter "Indexaufnahme" die Option "Nein" markieren.
5. Sie starten den Dienst, indem Sie "Indexdienst" in der Struktur markieren und im Kontextmenü "Starten" anklicken.
6. Wenn Sie möchten, dass der Dienst in Zukunft automatisch startet, müssen Sie in der Struktur auf "Dienste" gehen und in der Liste auf "Indexdienst" doppelklicken. Stellen Sie dann auf der Registerkarte "Allgemein" unter "Starttyp" "Automatisch" ein.
Nach dem Start des Dienstes können Sie in der Struktur wieder "Indexdienst" auswählen. In der Spalte "Status" steht hier zunächst "Untersuchen, Untersuchen (NTFS), Gestartet". Warten Sie, bis hier nur "Gestartet" erscheint - die Indizierung ist dann abgeschlossen. Danach können Sie eine Suche über das Abfrageformular starten.
Tipp: Die Suche lässt auch auf weitere Dateitypen ausdehnen, wenn ein geeigneter Dateifilter zur Verfügung steht. Unter der Adresse http://www.adobe.com/support/downloads/detail.jsp?ftpID=2611 finden Sie beispielsweise einen kostenlosen Filter für PDF-Dateien. Weiter - teilweise kostenlose - Filter gibt's beispielsweise unter http://www.ifiltershop.com/products.html und http://www.ifilter.org.
Suchabfrage durch undokumentierte Funktion erweitern
(Tipp gilt für Windows 2000/XP) Das Abfrageformular des Index-Servers lässt sich nur umständlich über die Computerverwaltung aufrufen. Außerdem enthält das Suchergebnis standardmäßig nur den Dokumentnamen, die Größe, das Erstellungsdatum und den Pfad. Sie suchen nach einer Möglichkeit, das Abfrageformular schneller aufzurufen und das Abfrageergebnis zu erweitern.
Normalerweise ist es vorgesehen, dass der Aufruf des Abfrageformulars in der Computerverwaltung erfolgt, indem Sie in der Struktur den "Indexdienst" und darunter einen Katalog auswählen. Danach müssen Sie auf den Eintrag "Katalog durchsuchen" klicken. Windows ruft dabei die HTML-Dateien CIADMIN.HTM, CIQUERY.HTM und IXQLANG.HTM aus dem Verzeichnis \Winnt\Help auf. Das eigentliche Abfrageformular ist in der Datei CIQUERY.HTM enthalten, die Sie über den Internet Explorer durch
file:///<Laufwerk>:/Winnt/Help/Ciquery.htm#machine=<Rechnername>,catalog=<Katalog>
aufrufen können. Die Angaben in spitzen Klammern sind Platzhalter, die Sie durch die für Ihr System geltenden Werte ersetzen müssen. Ein Beispiel für den Aufruf ist in der Datei Indexabfrage.HTML enthalten Bevor Sie die HTML-Datei nutzen können, müssen Sie sie in einem Editor öffnen und die Pfadangaben für Ihr System anpassen. Wenn Sie eine Verknüpfung zu dieser Datei auf dem Desktop, in den Favoriten oder auf einer Symbolleiste erzeugen, können Sie das Abfrageformular komfortabel aufrufen. In der Datei Indexabfrage.HTML finden Sie auch einen Link auf das alternative Abfrageformular CIQUERY2.HTM. Dieses erweitert das Suchergebnis um die Spalte "Zusammenfassung", die einen Auszug aus dem gefundenen Text enthält. Damit hier auch etwas angezeigt wird, müssen Sie in der Konsolen-Struktur einen Katalog markieren und dann im Menü auf "Vorgang, Eigenschaften" klicken. Rufen Sie im Eigenschaften-Dialog die Registerkarte "Erzeugung" auf, und markieren Sie die Klickbox vor "Zusammenfassung erzeugen". Beenden Sie den Indexdienst, und starten Sie ihn neu, damit diese Änderungen wirksam werden. Bei der Eingabe einer Suchabfrage können Sie nicht nur nach dem Vorkommen eines Suchbegriffs im Text, sondern auch nach speziellen Informationen, etwa dem Autor eines Word-Dokuments oder dem Erstellungsdatum suchen. Die Eingabe von "#DocAuthor=Anton Huber" etwa listet alle Dokumente auf, bei denen der angegebene Name in den Dokumenteigenschaften vorkommt. Eine ausführliche Beschreibung des Abfragesyntax finden Sie in der Online-Hilfe des Indexdienstes.
Datei: Indexabfrage.HTML
<html> <head> <!-- Allgemein: file:///<LW>:/WINNT/Help/ciquery.htm#machine=<Rechnername>,catalog=<Katalog> <meta http-equiv="refresh" content="0; URL=file:///I:/WINNT/Help/ciquery.htm #machine=amd,catalog=pcwArchiv">--> </head> <body> <a href="file:///C:/WINNT/Help/ciquery.htm #machine=zuse,catalog=mp3"> Abfrage-Formular (standard)</a> <br> <a href="ciquery2.htm #machine=zuse,catalog=mp3"> Abfrage-Formular (erweitert)</a> </body> </html>
Datei: CIQUERY2.HTM
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<!--------------------------------------------------------------------------
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright 1998-1999 Microsoft Corporation. All Rights Reserved.
//
// PROGRAM: Ciquery.htm
//
// PURPOSE: Illustrates use of Dynamic HTML to build a client-side
// query page used to access Indexing Service.
//
// PLATFORM: Windows 2000
//
//-------------------------------------------------------------------------->
<HTML>
<HEAD>
<TITLE>Indexdienst-Abfrage (Erweitert)</TITLE>
<META NAME="DESCRIPTION" CONTENT="Indexing Services client-side query form">
<META NAME="AUTHOR" CONTENT="Indexing Service Team">
<META NAME="KEYWORDS" CONTENT="Indexing Services, query, content, hit">
<META NAME="SUBJECT" CONTENT="Sample form">
<META NAME="MS.CATEGORY" CONTENT="Internet">
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
<base target="_blank">
</HEAD>
<BODY OnLoad="Init()" LANGUAGE="VBScript">
<center>
<DIV ID="idTransDiv"
ALIGN=CENTER
STYLE="position:0; top:0; height:0; width:500; filter:revealTrans(duration=3.0, transition=5);">
<H2 id="idHead" STYLE="position:0; visibility:visible; margin-bottom:0;">
<font color=Blue>
Indexdienst-Abfrageformular (erweitert)
</font></H2>
</DIV>
</center>
<br>
<!-- This table contains the user-entry form. -->
<div align=center>
<TABLE bgcolor=ffffcc cellpadding=2 cellspacing=3 Border=3 WIDTH=400>
<TR><td>
<div id="QueryHeader"><b><LABEL FOR=SrchStrCtrl NAME="UserSearchString"> </LABEL></b></div>
<INPUT ID="SrchStrCtrl" TYPE="TEXT" NAME="UserSearchString" SIZE="50" MAXLENGTH="100" TABINDEX=1>
<BUTTON TYPE=SUBMIT ID="CmdGo"> <FONT SIZE=-1>Suchen</FONT> </BUTTON> <br>
<INPUT TYPE="RADIO" ID = StdQryButton NAME="radioQueryType" VALUE="0" checked onclick="StandardSelected()">
<LABEL FOR=StdQryButton ID=StdqryButtonId> </LABEL> <br>
<INPUT TYPE="RADIO" ID = AdvQryButton NAME="radioQueryType" VALUE="1" onclick="AdvancedSelected()">
<LABEL FOR=AdvQryButton ID=AdvQryButtonId> </LABEL> <br>
<div align=right> <A HREF="ixqlang.htm" target=_self ID=TipId> </A></div>
<LABEL FOR=SortCtrl ID=SortCtrlId> <b> </b> </LABEL> <SELECT ID = SortCtrl NAME="selectSort" onchange="SortOrderSelected()">
<OPTION SELECTED VALUE="Rank" ID=RankId> ??????
<OPTION VALUE="DocTitle" ID=Title2Id> ??????
<OPTION VALUE="Path" ID=Path2Id> ??????
<OPTION VALUE="Size" ID=Size2Id> ??????
<OPTION VALUE="Write" ID=Write2Id> ??????
</SELECT>
<LABEL FOR=OrderCtrl ID=OrderCtrlId> <b> </b> </LABEL>
<SELECT ID = OrderCtrl NAME="selectOrder" onchange="SortOrderSelected()">
<OPTION SELECTED VALUE="[d]" ID=DescendingId> ???????????
<OPTION VALUE="[a]" ID=AscendingId> ???????????
</SELECT>
<P><table ID=idUnfiltered cellspacing=0 cellpadding=0><tr><td> <LABEL ID=UnfilteredListId> </LABEL>
</td><td id="UnfilteredRequest" onmouseover="mouseoverUnfiltered()" onmouseout="mouseoutUnfiltered()" onclick="UnfilteredSelected()" bgcolor=ffffcc><FONT color=blue><u> <LABEL ID=UnfilteredDocsId> </LABEL></u></FONT></td></a></tr></table>
</TD></TR>
</TABLE>
<p>
<HR WIDTH=80% ALIGN=center SIZE=3>
<p>
<!-- A couple of navigation buttons, initially disabled. -->
<a id=JumpPoint name="ResultPart"></a>
<table width=775 ID=TopButt>
<tr><td>
<FORM NAME=Navigation ALIGN=RIGHT>
<INPUT TYPE="BUTTON" NAME="CmdPrevious" VALUE=" ???????? ">
<INPUT TYPE="BUTTON" NAME="CmdNext" VALUE=" ??????? ">
</FORM>
<BR>
<P ID=Counter><EM> </EM>
<BR>
<!--
-- This is the output table. Result rows will by dynamically added, but the header will
-- just be hidden until needed.
-->
</td></td>
</table>
<!-- <br><INPUT TYPE="BUTTON" NAME="SortRank" VALUE="Sort by Ascending Rank"> -->
<P>
<TABLE bgcolor=ffffcc ID=Results COLS=3 CELLSPACING=1 CELLPADDING=3>
<TR bgcolor=99cccc>
<TH> <LABEL ID=SerialId> ?? </LABEL> </TH>
<TH> <LABEL ID=TitleId> ??????? </LABEL> </TH>
<TH> <LABEL ID=SizeId> ??????? </LABEL> </TH>
<TH> <LABEL ID=ModifiedId> ????????? </LABEL> </TH>
<TH> <LABEL ID=PathId> ????? </LABEL> </TH>
<!-- Änderung durch PC-WELT-->
<TH> <LABEL ID=SummaryId> ????? </LABEL> </TH>
</TR>
</TABLE>
<table width=775 ID=BottomButt>
<tr><td>
<br><br>
<FORM NAME=Navigation2 ALIGN=RIGHT>
<INPUT TYPE="BUTTON" NAME="CmdPrevious" VALUE=" ????????? ">
<INPUT TYPE="BUTTON" NAME="CmdNext" VALUE=" ???????? ">
</FORM>
</td></tr>
</table>
</BODY>
<SCRIPT LANGUAGE=VBSCRIPT>
Const L_Title_Text = "Titel"
Const L_Size_Text = "Größe"
Const L_Modified_Text = "Datum"
Const L_Path_Text = "Pfad"
' ***** Änderung durch PC_WELT ****
Const L_Summary_Text ="Zusammenfassung"
Const L_Rank_Text = "Rang"
Const L_StdQryButton_Text = "Standardabfrage (Freitext)"
Const L_AdvQryButton_Text = "Erweiterte Abfrage"
Const L_SortBy_Text = "Sortieren nach: "
Const L_OrderBy_Text = "Reihenfolge: "
Const L_SearchTips_Text = "Suchtipps"
Const L_Ascending_Text = "Aufsteigend"
Const L_Descending_Text = "Absteigend"
Const L_Previous_Text = " Zurück "
Const L_Next_Text = "Vorwärts"
Const L_UnfilteredLabel_Text = "Klicken Sie auf den folgenden Link für"
Const L_UnfilteredCmd_Text = "ungefilterte Dokumente"
Const L_SerialNum_Text = "Nr."
Const L_Period_Text = "."
DIM RS ' The ADO Recordset. Initially null.
DIM SortBy ' Current sort order
DIM FirstOnPage, LastOnPage ' Keeps track of records being shown
DIM MaxDisplayed ' Max number of results displayed on-screen
DIM machine,catalog
DIM OrigLocation
DIM fUnfiltered ' Unfiltered query was requested.
DIM fFreetext ' Free text query was requested
'
' SubRoutine: Init
'
' Synopsis: Initializes the page. Sets defaults for page-global variables
' and DHTML elements. Initially, no query is active.
'
Private SUB Init()
' Make the heading roll into view
' idHead.style.visibility = "hidden"
' idTransDiv.filters.item(0).apply()
' idTransDiv.filters.item(0).transition = 3
' idHead.style.visibility = "visible"
' idTransDiv.filters(0).play(1.000)
UserSearchString.focus
Navigation.CmdPrevious.Disabled = TRUE
Navigation.CmdNext.Disabled = TRUE
Navigation2.CmdPrevious.Disabled = TRUE
Navigation2.CmdNext.Disabled = TRUE
FirstOnPage = 0
LastOnPage = 0
MaxDisplayed = 25
fUnfiltered = FALSE
SortBy = "Rank[d]"
'Parse the catalog name out of the URL
'No need to localize "catalog", "machine" because they are hidden
'from the user.
'URL syntax is: file://<syspath>/help/ciquery.htm#machine=<machine>,catalog=<catalog>
catPos = InStr(1, Document.Location.Hash, "catalog=", 1)
catPos = catPos + 8
'catalog name is at the end of the string
catalog = Right(Document.Location.Hash, len(Document.Location.Hash) - catPos + 1)
catalog = DecodeToken(catalog)
'Parse the machine name out of the URL
macPos = InStr(1, Document.Location.Hash, "machine=", 1)
macPos = macPos + 8
'machine name is between "machine=" and ",catalog="
commaPos = InStr(macPos, Document.Location.Hash, ",catalog", 1)
machine = Mid(Document.Location.Hash, macPos, commaPos - macPos)
machine = DecodeToken(machine)
StdQryButtonId.InnerText = CStr(L_StdQryButton_Text)
AdvQryButtonId.InnerText = CStr(L_AdvQryButton_Text)
SortCtrlId.InnerText = CStr(L_SortBy_Text)
OrderCtrlId.InnerText = CStr(L_OrderBy_Text)
TipId.InnerText = CStr(L_SearchTips_Text)
DescendingId.InnerText = CStr(L_Descending_Text)
AscendingId.InnerText = CStr(L_Ascending_Text)
UnfilteredListId.InnerText = CStr(L_UnfilteredLabel_Text)
UnfilteredDocsId.InnerText = CStr(L_UnfilteredCmd_Text)
SerialId.InnerText = CStr(L_SerialNum_Text)
TitleId.InnerText = CStr(L_Title_Text)
ModifiedId.InnerText = CStr(L_Modified_Text)
PathId.InnerText = CStr(L_Path_Text)
SizeId.InnerText = CStr(L_Size_Text)
' ****
SummaryId.InnerText = CStr(L_Summary_Text)
Navigation.CmdPrevious.value = CStr(L_Previous_Text)
Navigation.CmdNext.value = CStr(L_Next_Text)
Navigation2.CmdPrevious.value = CStr(L_Previous_Text)
Navigation2.CmdNext.value = CStr(L_Next_Text)
Document.All.Counter.innerHTML = CStr(L_NoResults_Text)
RankId.InnerText = CStr(L_Rank_Text)
Title2Id.InnerText= CStr(L_Title_Text)
Path2Id.InnerText = CStr(L_Path_Text)
Size2Id.InnerText = CStr(L_Size_Text)
Write2Id.InnerText = CStr(L_Modified_Text)
'Check the state of buttons and init accordingly
IF StdQryButton.Checked THEN
call StandardSelected
ELSE
call AdvancedSelected
end if
HideTable()
HideBottomButt()
END SUB
Const L_Freetext_Text="<LABEL FOR=SrchStrCtrl> <b>Geben Sie eine Freitextabfrage ein:</b> </LABEL>"
Const L_Advanced_Text="<LABEL FOR=SrchStrCtrl> <b>Geben Sie eine erweiterte Abfrage ein:</b> </LABEL>"
'
' SubRoutine: StandardSelected()
'
' Synopsis: Queries will be free-text
'
Private SUB StandardSelected()
Document.All.QueryHeader.innerHTML = CStr(L_Freetext_Text)
fFreetext = TRUE
END SUB
'
' SubRoutine: AdvancedSelected
'
' Synopsis: Allows for advanced queries to be executed
'
Private SUB AdvancedSelected()
Document.All.QueryHeader.innerHTML = CStr(L_Advanced_Text)
fFreetext = FALSE
END SUB
'
' SubRoutine: mouseoverUnfiltered
'
' Synopsis: Hilights the Unfiltered Docs cell
'
Private SUB mouseoverUnfiltered()
UnfilteredRequest.bgcolor = "99cccc"
END SUB
'
' SubRoutine: mouseoutUnfiltered()
'
' Synopsis: Un-hilights the Unfiltered Docs cell back to the original color
'
Private SUB mouseoutUnfiltered()
UnfilteredRequest.bgcolor = "ffffcc"
END SUB
'
' SubRoutine: UnfilteredSelected()
'
' Synopsis: Searches for unfiltered documents
'
Private SUB UnfilteredSelected()
fUnfiltered = TRUE
CmdGo_OnClick()
END SUB
'
' SubRoutine: SortOrderSelected()
'
' Synopsis: Sets the sort order as selected by the user
'
Private SUB SortOrderSelected()
IF StrComp(selectSort.value, "DocTitle") = 0 THEN
SortBy = selectSort.value & selectOrder.value & ",Filename" & selectOrder.value
ELSE
SortBy = selectSort.value & selectOrder.value
END IF
END SUB
'
' SubRoutine: CmdNext_OnClick()
'
' Synposis: Displays next page of query results.
'
Private SUB CmdNext_OnClick()
NextPage()
END SUB
'
' SubRoutine: CmdPrevious_OnClick()
'
' Synposis: Displays previous page of query results.
'
Private SUB CmdPrevious_OnClick()
RS.Move( -MaxDisplayed - LastOnPage + FirstOnPage )
NextPage()
END SUB
Const L_CreationStatus_Text="Abfrageobjekt wird erstellt..."
Const L_IssuingStatus_Text="Die Abfrage wird durchgeführt..."
'
' SubRoutine: CmdGo_OnClick
'
' Synopsis: Executes query
'
Private SUB CmdGo_OnClick()
ON ERROR RESUME NEXT
'
' Setup Query
'
Window.Status = L_CreationStatus_Text
SET Q = CreateObject("ixsso.Query")
Q.DefineColumn "Unfiltered(DBTYPE_BOOL, 1) = 49691c90-7e17-101a-a91c-08002b2ecda9 7"
Q.Catalog = "query://"+ machine + "/" + catalog
Q.SortBy = SortBy
' *****
Q.Columns = "DocTitle, FileName, Path, Write, Size,characterization"
Q.Dialect = 2
'
' The default use of the query form should be completely freetext.
' Advanced users can then use all of the features of the query language
' by having the check boxed checked.
'
IF fUnfiltered THEN
CompSearch = "@Unfiltered=TRUE"
fUnfiltered = FALSE
ELSEIF fFreetext = TRUE THEN
CompSearch = "{freetext}" & UserSearchString.value & "{/freetext}"
ELSE
CompSearch = UserSearchString.value
END IF
'
' The query is now set up. Time to execute.
'
'MsgBox(CompSearch)
IF CompSearch <> "" THEN
Q.Query = CompSearch
' Issue query
Window.Status = L_IssuingStatus_Text
set RS = Q.CreateRecordSet("nonsequential")
Navigation.CmdPrevious.Disabled = TRUE
Navigation.CmdNext.Disabled = TRUE
Navigation2.CmdPrevious.Disabled = TRUE
Navigation2.CmdNext.Disabled = TRUE
HideBottomButt()
IF Err.Number = 0 THEN
NextPage()
ELSE
ReportError Err.Number, Err.Description
Err.Clear()
END IF
END IF
END SUB
'
' SubRoutine: NextPage
'
' Synopsis: Workhorse routine to populate table with results
'
Const L_QueryMatched_Text="Der Abfrage entsprachen "
Const L_Records_Text=" Eintrag/Einträgen"
Const L_NoResults_Text="<EM>Keine Ergebnisse</EM>"
Const L_NoResultsNoEm_Text="Keine Ergebnisse"
Const L_PopulatingList_Text="Ergebnisliste wird erstellt (Zeile "
Const L_Of_Text=" von "
Const L_NowShowing_Text=" Einträge "
Const L_To_Text=" bis "
Const L_Period1_Text="."
Const L_Period2_Text=" werden jetzt angezeigt."
' working with date format: Change DateSeparator if necessary
' reposition mm (month), dd (day), yyyy (year) without changing the
' the individual tokens.
Const L_DateSeparator_Text="."
Const L_DateFormat_Text = "dd-mm-yyyy"
Private SUB NextPage
'
' Populate result list. Once this message is displayed, virtually all the time is being
' spent in DHTML and not in query processing.
'
fFirstPage = TRUE
'
' Did we actually get anything back?
'
IF RS.RecordCount = 0 THEN
IF Err.Number = 0 THEN
Document.All.Counter.innerHTML = CStr(L_NoResults_Text)
Window.Status = CStr(L_NoResultsNoEm_Text)
MsgBox CStr(L_NoResultsNoEm_Text)
ELSE
ReportError Err.Number, Err.Description
END IF
JumpPoint.scrollintoview ( FALSE )
FirstOnPage = 0
Navigation.CmdNext.Disabled = TRUE
Navigation.CmdPrevious.Disabled = TRUE
Navigation2.CmdPrevious.Disabled = TRUE
Navigation2.CmdNext.Disabled = TRUE
HideBottomButt()
HideTable()
ELSE
JumpPoint.scrollintoview ( TRUE )
FirstOnPage = RS.AbsolutePosition
LastOnPage = FirstOnPage
Document.All.Counter.innerText = CStr(L_QueryMatched_Text) + CStr(RS.RecordCount) + CStr(L_Records_Text)
ShowTable()
END IF
'
' Loop through the table. For each row, either store values from Recordset or delete
' the row.
'
FOR i = 1 TO MaxDisplayed
Window.Status = CStr(L_PopulatingList_Text) + CStr(i) + CStr(L_Of_Text) + Cstr(MaxDisplayed) + ")"
IF RS.EOF THEN
'
' We hit the end. Just clear any remaining rows and fall out of loop.
'
FOR j = Results.Rows.length - 1 TO i STEP -1
Results.DeleteRow(j)
NEXT
EXIT FOR
ELSE
'
' We may have to add a row...
'
IF i >= Results.Rows.length THEN
Results.InsertRow()
'Änderung durch PC-WELT
FOR j = 0 TO 5
Results.Rows(i).InsertCell()
NEXT
Results.Rows(i).Cells(0).align = "right"
Results.Rows(i).Cells(2).align = "right"
Results.Rows(i).Cells(3).align = "right"
END IF
' Write record number
Results.Rows(i).Cells(0).innerText = CStr( RS.AbsolutePosition ) + CStr(L_Period_Text)
' Write either title or filename
IF VarType(RS("DocTitle")) = 1 Or RS("DocTitle") = "" THEN
' ******
Results.Rows(i).Cells(1).innerHTML = "<A HREF=""file://" & RS("path") & """>" & RS("FileName") & "</A>"
ELSE
Results.Rows(i).Cells(1).innerHTML = "<A HREF=""file://" & RS("path") & """>" & RS("DocTitle") & "</A>"
END IF
' Size
Results.Rows(i).Cells(2).innerText = RS("Size")
' Last Modify time
WriteTime = CDate( RS("Write") )
Results.Rows(i).Cells(3).innerText = PrintDate(CStr(L_DateFormat_Text), CStr(L_DateSeparator_Text), CStr(Month(WriteTime)), CStr(Day(WriteTime)), CStr(Year(WriteTime) MOD 100))
' Path
Results.Rows(i).Cells(4).innerHTML = "<A HREF=""file://" & RS("path") & """>" & RS("Path") & "</A>"
' Zusammenfassung Änderung durch PC-WELT
Results.Rows(i).Cells(5).innerHTML = RS("characterization")
LastOnPage = LastOnPage + 1
RS.MoveNext
END IF
NEXT
'
' Report result.
'
IF FirstOnPage <> LastOnPage And RS.RecordCount <> 0 THEN
' "Query matched 392 record(s). Now showing 1 to 25."
Document.All.Counter.innerHTML = CStr(L_QueryMatched_Text) + CStr(RS.RecordCount) + CStr(L_Records_Text) + CStr(L_Period1_Text) + CStr(L_NowShowing_Text) + CStr(FirstOnPage) + CStr(L_To_Text) + CStr(LastOnPage-1) + CStr(L_Period2_Text)
END IF
'
' Enable Previous/Next as appropriate
'
IF FirstOnPage <= 1 THEN
Navigation.CmdPrevious.Disabled = TRUE
Navigation2.CmdPrevious.Disabled = TRUE
ELSE
Navigation.CmdPrevious.Disabled = FALSE
Navigation2.CmdPrevious.Disabled = FALSE
END IF
IF RS.EOF THEN
Navigation.CmdNext.Disabled = TRUE
Navigation2.CmdNext.Disabled = TRUE
UserSearchString.focus
ELSE
Navigation.CmdNext.Disabled = FALSE
Navigation.CmdNext.focus
Navigation2.CmdNext.Disabled = FALSE
END IF
IF Navigation2.CmdPrevious.Disabled = FALSE OR Navigation2.CmdNext.Disabled = FALSE THEN
ShowBottomButt()
END IF
'
' Done!
'
Window.Status = Window.DefaultStatus
END SUB
'
' SubRoutine: HideBottomButt
'
' Synopsis: Hides the bottom button table from the user's view.
'
SUB HideBottomButt()
BottomButt.Rows(0).Cells(0).style.visibility = "hidden"
BottomButt.Border = 0
BottomButt.Rules = ""
FOR i = BottomButt.Rows.length - 1 TO 1 STEP -1
BottomButt.DeleteRow(i)
NEXT
END SUB
'
' SubRoutine: ShowBottomButt
'
' Synopsis: Shows the bottom button table from the user's view.
'
SUB ShowBottomButt()
BottomButt.Rows(0).Cells(0).style.visibility = "visible"
BottomButt.Border = 0
BottomButt.Rules = ""
END SUB
'
' SubRoutine: HideTable
'
' Synopsis: Hides the table from the user's view.
'
SUB HideTable()
Results.Rows(0).Cells(0).style.visibility = "hidden"
Results.Rows(0).Cells(1).style.visibility = "hidden"
Results.Rows(0).Cells(2).style.visibility = "hidden"
Results.Rows(0).Cells(3).style.visibility = "hidden"
Results.Rows(0).Cells(4).style.visibility = "hidden"
' ******* Änderung durch PC-WELT ****
Results.Rows(0).Cells(5).style.visibility = "hidden"
Results.Border = 0
Results.Rules = ""
FOR i = Results.Rows.length - 1 TO 1 STEP -1
Results.DeleteRow(i)
NEXT
END SUB
'
' SubRoutine: ShowTable
'
' Synopsis: Makes the result table visible.
'
SUB ShowTable()
Results.Rows(0).Cells(0).style.visibility = "visible"
Results.Rows(0).Cells(1).style.visibility = "visible"
Results.Rows(0).Cells(2).style.visibility = "visible"
Results.Rows(0).Cells(3).style.visibility = "visible"
Results.Rows(0).Cells(4).style.visibility = "visible"
' ******* Änderung durch PC-WELT ****
Results.Rows(0).Cells(5).style.visibility = "visible"
Results.Border = 1
Results.Rules = "cols"
END SUB
FUNCTION DecodeToken( Token )
'Replace all escaped characters with their original characters
'%20 --> ' '
'Characters that must be encoded include any characters that have no
'corresponding graphic character in the US-ASCII coded character set
'(hexadecimal 80-FF, which are not used in the US-ASCII coded character
'set, and hexadecimal 00-1F and 7F, which are control characters), blank
'spaces, "%" (which is used to encode other characters), and unsafe
'characters (<, >, ", #, {, }, |, \, ^, ~, [, ], and ').
'BUGBUG: This doesn't cover all possible cases, just the SPACE, which is
' the most common case.
Token = Replace(Token, "%20", " ")
DecodeToken = Token
END FUNCTION
'
' SubRoutine: ReportError
'
' Synopsis: Clears table and reports error.
'
' Arguments: [ErrNo] -- Error to report
'
Const L_RedError_Text="<FONT color=red><EM><B>Fehler "
SUB ReportError( ErrNo, ErrDesc )
HideTable()
Window.Status = Err.Description
MsgBox Err.Description
UserSearchString.focus
Document.All.Counter.innerHTML = CStr(L_RedError_Text) + Hex(Err.Number) + " - " + Err.Description + "</B></EM></FONT>"
END SUB
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
function PrintDate(DateFormat, DateSeparatorText, Month, Day, Year)
{
var FormattedDate
FormattedDate = DateFormat.replace("mm", Month)
FormattedDate = FormattedDate.replace("dd", Day)
FormattedDate = FormattedDate.replace("yyyy", Year)
FormattedDate = FormattedDate.replace("-", DateSeparatorText)
FormattedDate = FormattedDate.replace("-", DateSeparatorText)
return FormattedDate
}
</SCRIPT>
</HTML>


