
package SystemConfig;


#------------------------------------------------------------------------
#  Filename	:	SystemConfig.pm
#  Author	:	Oyewole, Olanrewaju J.
#  Version	:	1.0
#  Date		:	04/05/2002
#  Description	:
#------------------------------------------------------------------------
# SystemConfiguration file for the Search Engine.  This Config file
# can be merged with another config file, when deploying the Search
# Engine within a project or website.
# A very simple configuration file.  There are many ways to do this,
# but this is a very simple implementation, where the number of
# constants are few.  Java has a far superior implementation, in that
# you can simply declare a public class that contains only constants!

# One great advantage of configuration files is that, it allows one
# to maintain a constant set of libraries and engines that are ported
# from site to site and from project to project.  All changing values
# are stored in the Config package, leaving the libraries untouched.
# The second advantage of the Config package is that it allows one to
# freely use names inside the other programs without fear of clashes,
# because none of the subroutines have been EXPORTOK(ed), they do not
# appear in the namespace of programs that "use" this package.  Rather
# all programs need to explicity refer to these subroutines, using
# their fully qualified reference, such as SystemConfig::base_url
# This means there can be no clash of names, and that the invoker is
# explicity aware of what they are doing by requesting a constant.
#------------------------------------------------------------------------

sub keyword_file_name	{ return 'keywords.txt'; }
sub data_file_name 	{ return 'data.txt'; }
sub index_file_name 	{ return 'index.txt'; }

# Every entry below this point will need to be customised for each
# site on which this search engine is deployed.

sub root_directory	{ return 'f:/temp/nettech'; }
sub base_file_path 	{ return 'f:/download/Online Search Engine'; }

# This works just as effectively as a return statement, since it
# is the LAST and only statement in this subroutine, the value of
# @file_types is automatically returned to the invoker.
sub search_file_types	{ @file_types = qw(.*\.html .*\.txt); }

sub base_url		{ return 'http://www.net-technologies.com'; }
sub system_file_path	{ return 'f:/temp'; }
sub http_address	{ return 'http://2000server.newnigeria.com:84'; }
sub search_url_base	{ return 'http://2000server.newnigeria.com:84/cgi-bin/nettech/online_search_engine/search_engine.pl'; }
sub search_max_records	{ return '50'; }

###########################################################################################
# The search_header/search_footer/search_section will need to be customised for each site.#
# This will involve the Web designer and/or Media Manager, working with the client to     #
# agree on what the search pages will look like.                                          #
###########################################################################################
sub search_admin_headers{ return qq|<HTML><BODY><H1> (netEngine) Search Engine</H1>|}
sub search_headers	{ return qq|
		<HTML><BODY><H1> (netEngine) Search Engine</H1>
		<FORM NAME="search_form" ACTION="/cgi-bin/nettech/online_search_engine/search_engine.pl" METHOD=POST>
		<NOBR>
		    <B><FONT COLOR="#660099" SIZE="4">You searched for &nbsp;<INPUT TYPE="TEXT" NAME="cgi_search_string" SIZE=20 VALUE="<<cgi_search_string>>"></FONT></B>
		    &nbsp;<INPUT TYPE="IMAGE" NAME="GO" SRC="go.jpg">&nbsp;
		    <INPUT TYPE="HIDDEN" NAME="CGI_SEARCH_INCREMENT" VALUE="10">
		    <INPUT TYPE="HIDDEN" NAME="CGI_SEARCH_START" VALUE="1">
		    <SELECT NAME="">
			<OPTION NAME="OR" VALUE="OR" SELECTED>Any of the Words</OPTION>
			<OPTION NAME="AND" VALUE="OR">All of the Words</OPTION>
			<OPTION NAME="EXACT" VALUE="EXACT">Exact Words</OPTION>
		    </SELECT>
		</NOBR>
		</FORM>
	        <FONT FACE="Arial">
	        <BR><<cgi_record_count>>&nbsp; items&nbsp; were&nbsp; found&nbsp; matching&nbsp; "<<cgi_search_string>>"
            	<BR>Displaying&nbsp; items&nbsp; <<cgi_search_start>>&nbsp; to&nbsp; <<cgi_search_stop>>&nbsp; of&nbsp; <<cgi_record_count>>
            	</FONT><P>|;
}
sub search_footers	{ return qq{ <P>netEngine - Copyright © Internet Technologies Ltd (nettech) 2002 }; }
sub search_section	{ return qq|
		<FONT SIZE=3>
		<BR><FONT SIZE=4> <<COUNTER>>). </FONT><A HREF="<<URL>>"><<TITLE>></A>
		<BR> &nbsp; &nbsp; &nbsp; <B>Descripton: </B><<DESCRIPTION>>
		<BR> &nbsp; &nbsp; &nbsp; <B>Date: </B><<DATE>>
		 &nbsp; &nbsp; &nbsp; <B>Size: </B><<SIZE>>
		 &nbsp; &nbsp; &nbsp; <B>Percent Match: </B><<PERCENT_MATCH>>
		</FONT><BR>|;
 }

1;
