#!/usr/bin/perl ############################################################################# # Simple Search Script # # Written By Matt Wright http://www.worldwidemart.com/scripts/ # # Created on: 12/16/95 # # Version 2.0 # # Last Modified on: 02/18/97 # # Modified by Ranson scripts@rlaj.com # # Scripts found at: http://www.artsearch.net/artsearch/zip # ############################################################################# # Define Variables # What is the base url of your files? - If this script is in say, cgi-bin, # then you need to tell the script to go back to your HOME Dir. to start the # search - to do this use ../ that means go up (back) one directory. # Use ../../ if you need to go up (back) two directories # You may need to use an absolute path here, example: # /www/users/public_html/ranson/ (ask your server administrator) $basedir = '../'; # What is the url of your home directory? $baseurl = 'http://www.abisource.com.au; # The name of this program $search_url = '/usr/lib/cgi-bin/search.cgi'; # If you want the user to be able to search individual directories, then # put a '1' in the $seperate_dir = '1'; variable - or '0' for no. $seperate_dir = '1'; # If you want users to be able to search individual directories, list the # directories below in the OPTION VALUE tags. # NOTE: before each quote (") you MUST have a backslash (\"), you will get # an error if you forget. sub seperate { # DO NOT CHANGE THE NEXT TWO LINES print " Area to Search \n"; } # DO NOT CHANGE THIS LINE # Where are your files you want to search? The default below will search # down 2 levels or subdirectories (* = base_dir. */ = base/sub etc.) @files = ('*.htm','*/*.htm','*/*/*.htm','*.html','*/*.html','*/*/*.html'); # If you use the sample text option enter the maxium number of charactors # to be returned to the user ( 100 equals about 20 words ) $sample_text = '200'; # Set to '0' if you do not want to use the sample text option $show_sample_text = '1'; # You have an option here to show specific text with the search results, # or the search engine will pick up the first # of charactors specified # in the '$show_sample_text' option above. ## If you want to show specific sample text with the search results ## set the next variable to '1' $specific_text = '0'; ## In your HTML file use this code for the sample text: ## Put sample text here ## The tags can be anywhere in your file, I suggest in the HEAD. #>>>>>>>>>>>>>>>>>>> BLANK FORM PAGE VARIABLES <<<<<<<<<<<<<<<<<<<<<# # Name of your homepage, for the blank form. # Also appears on the bottom of the search results page with a link (below). $homepage = "Abiword"; # What is the title of your blank form page? $title = "Abiword Search Engine"; # Page header $header = "Abiword"; # Body and background color $b_body = '
'; #>>>>>>>>>>>>>>>>> SEARCH RESULTS PAGE VARIABLES <<<<<<<<<<<<<<<<<<<# # The Title for the search results page $SEARCH_RESULTS_TITLE = 'Search Results for Abiword'; # The Header for the search results page $SEARCH_RESULTS_HEADER = 'Search Results for Abiword'; # Body and background color $BODY = ''; # Logo and link that appears at the top of the page, text or image. $LOGO_LINK ='http://www.abisource.com'; $LOGO = '\n"; print "
\n"; print "
\n"; print "\n"; } print "
\n
\n"; print "
Text to Search For:
|
|
---|---|
Boolean: | Case
END_OF_HTML
if ($seperate_dir eq '1') {
&seperate;
}
print " |
\n"; print "Show sample text | \n"; print " * \n";
print " |
\n"; }else{ print "