#!/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 = '../'; $basedir = '../'; # What is the url of your home directory? #$baseurl = 'http://www.rlaj.com/scripts/'; $baseurl = 'http://fronteraowners.co.uk/'; # The name of this program $search_url = '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'; $seperate_dir = '0'; # 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 = '0'; # 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 = "fronteraowners.co.uk"; # What is the title of your blank form page? $title = ""; # Page header $header = "fronteraowners.co.uk"; # Body and background color $b_body = '
'; #>>>>>>>>>>>>>>>>> SEARCH RESULTS PAGE VARIABLES <<<<<<<<<<<<<<<<<<<# # The Title for the search results page $SEARCH_RESULTS_TITLE = 'Search Results'; # The Header for the search results page $SEARCH_RESULTS_HEADER = 'Search Results'; # Body and background color $BODY = ''; # Logo and link that appears at the top of the page, text or image. $LOGO_LINK ='http://fronteraowners.co.uk/'; $LOGO = '
';
# Your homepage url
$home_url = 'http://fronteraowners.co.uk/';
# Text for bottom of page
$COPY_RITE = 'Copyright 1996 by ArtSearch\n"; #if ($show_sample_text eq '1') { # # print " \n"; # print "Check this box to show a sample of text for each file * \n"; # print "\n"; # print "
\n"; # #} print qq{
| Search Results | |
| There are no matching files for: }; $i = 0; foreach $term (@terms) { print "$term"; $i++; if (!($i == @terms)) { print ", "; } } print qq{ | |
| 1. |
Check Spelling |
| 2. |
Use single spaces between words, no commas |
| 3. |
Use a broader search criteria |
| 4. |
Try a variation of words. Try using 'website' instead instead of 'web site' |
| 5. |
Check for upper and lower case |
| search page | $homepage | |
$COPY_RITE
}; exit; } ######################################################### sub return_blank_form { print "Content-type: text/html\n\n"; print "\n"; print "\n"; # }else{ # print "