manual-index.cgi revision a08e19541c3875157b8b03a66e8d4e4673652485
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# ====================================================================
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# The Apache Software License, Version 1.1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# Copyright (c) 2000 The Apache Software Foundation. All rights
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# reserved.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# Redistribution and use in source and binary forms, with or without
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# modification, are permitted provided that the following conditions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# 1. Redistributions of source code must retain the above copyright
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# notice, this list of conditions and the following disclaimer.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# 2. Redistributions in binary form must reproduce the above copyright
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# notice, this list of conditions and the following disclaimer in
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# the documentation and/or other materials provided with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# distribution.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# 3. The end-user documentation included with the redistribution,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# if any, must include the following acknowledgment:
f96bd5c800e73e351b0b6e4bd7f00b578dad29bbAlan Wright# "This product includes software developed by the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# Apache Software Foundation (http://www.apache.org/)."
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross# Alternately, this acknowledgment may appear in the software itself,
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross# if and wherever such third-party acknowledgments normally appear.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# 4. The names "Apache" and "Apache Software Foundation" must
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# not be used to endorse or promote products derived from this
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# software without prior written permission. For written
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# permission, please contact apache@apache.org.
55bf511df53aad0fdb7eb3fa349f0308cc05234cas# 5. Products derived from this software may not be called "Apache",
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# nor may "Apache" appear in their name, without prior written
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# permission of the Apache Software Foundation.
55bf511df53aad0fdb7eb3fa349f0308cc05234cas# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
55bf511df53aad0fdb7eb3fa349f0308cc05234cas# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
55bf511df53aad0fdb7eb3fa349f0308cc05234cas# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
55bf511df53aad0fdb7eb3fa349f0308cc05234cas# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# SUCH DAMAGE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# ====================================================================
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# This software consists of voluntary contributions made by many
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# individuals on behalf of the Apache Software Foundation. For more
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# information on the Apache Software Foundation, please see
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# originally written by Ken Coar <Coar@DECUS.Org> in May 1997
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# This script either displays a form in order to find documents in which
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas# a word appears, or displays the results of such a search. It is
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas# called as a CGI script.
55bf511df53aad0fdb7eb3fa349f0308cc05234cas# [FILE]PATH_INFO is the prefix to add to to the files names found in
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# the index (URL prefix, not filesystem prefix), and QUERY_STRING is the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# word to be found.
55bf511df53aad0fdb7eb3fa349f0308cc05234cas# You may need to tweak the following line to point to the correct
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# location of the index file on your system (it's in the
55bf511df53aad0fdb7eb3fa349f0308cc05234cas# apache/htdocs/manual directory of the Apache distribution tree).
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# You shouldn't have to modify anything else.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# If we have a FILEPATH_INFO or PATH_INFO, it's there to remap the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# documents to the manual root directory. If this script is already in
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# that directory, this isn't needed.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# QUERY_STRING, if present, contains the word for which we are to
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# search. We also use its [non]presence to determine wha we display.
55bf511df53aad0fdb7eb3fa349f0308cc05234cas# Make sure our HTTP header makes it to the server by causing Perl to do
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# a fflush() after every write to STDOUT.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# Fine, now buffering can go back to normal.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# Set up the HTML page title
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# We'll re-use the HTML scalar several times; we use it with here
55bf511df53aad0fdb7eb3fa349f0308cc05234cas# documents for multi-line static HTML code. Lets' do the standard page
55bf511df53aad0fdb7eb3fa349f0308cc05234cas<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
55bf511df53aad0fdb7eb3fa349f0308cc05234cas <TITLE>$title
55bf511df53aad0fdb7eb3fa349f0308cc05234cas<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
55bf511df53aad0fdb7eb3fa349f0308cc05234cas BGCOLOR="#FFFFFF"
55bf511df53aad0fdb7eb3fa349f0308cc05234cas TEXT="#000000"
55bf511df53aad0fdb7eb3fa349f0308cc05234cas LINK="#0000FF"
55bf511df53aad0fdb7eb3fa349f0308cc05234cas VLINK="#000080"
55bf511df53aad0fdb7eb3fa349f0308cc05234cas ALINK="#FF0000"
55bf511df53aad0fdb7eb3fa349f0308cc05234cas <DIV ALIGN="CENTER">
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States <IMG
55bf511df53aad0fdb7eb3fa349f0308cc05234cas SRC="${prefix}images/sub.gif"
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross <H1 ALIGN="CENTER">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw Apache Documentation Search
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw This script performs a very simple search across the Apache
55bf511df53aad0fdb7eb3fa349f0308cc05234cas documentation for any single case-insensitive word. No combinations,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw wildcards, regular expressions, word-stubbing, or other fancy options
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw are supported; this is just to help you find topics quickly. Only
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw those pages which include the <EM>exact</EM> word you type will be
55bf511df53aad0fdb7eb3fa349f0308cc05234cas Documents containing the search word are <EM>not</EM> listed in any
55bf511df53aad0fdb7eb3fa349f0308cc05234cas sort of priority order.
55bf511df53aad0fdb7eb3fa349f0308cc05234cas <ISINDEX PROMPT="Enter word to find and press ENTER: ">
55bf511df53aad0fdb7eb3fa349f0308cc05234cas# Now set up the next section, which is only displayed if we've been
55bf511df53aad0fdb7eb3fa349f0308cc05234cas# given a word to find.
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United States <HR>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw Results of Search for <SAMP>$word</SAMP>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# We enblock the next section so problems can drop out to the common
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# closure code.
2c1b14e51525da2c09064641416fc4aed457c72fjose borrego # Try and open the index file; complain bitterly if we can't.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw # Read the entire index in and turn it into an hash for the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw # The dictionary is all lowercase words. Smash our query value
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw printf (" <P>\n <EM>Sorry, no matches found.</EM>\n </P>\n");
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw # Found an entry, so turn the hash value (a comma-separated list
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# Back to common code - the exit path. Display the page trailer.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SRC="/images/apache_home.gif"
55bf511df53aad0fdb7eb3fa349f0308cc05234cas ALT="Home"