ReadMe File for the "Search Engine Plus" Software ################################################################## # # Web Based "Search Engine Plus" Software # # This is an easy-to-install Web based search engine software # designed to search any tab or comma delimited (csv format) flat # ASCII database files which can be generated by most popular PC # database and spreadsheet software such as MS Access and MS Excel. # Definition of the database fields and Web page layouts are # controlled by Html templates. No CGI programming knowledge required # other than some basic Html knowledge to develop the necessary # search and report templates. # # If you need a more powerful database solution, please consider # to order one of our BizDB database packages. # BizDB Demo Web Site - http://www.cnctek.com/bizdb-html/ # ################################################################## # # Web Based "Search Engine Plus" Software # URL: http://www.cnctek.com/search-engine-plus # E-mail: cnctek@cnctek.com # # MINIMUM SERVER REQUIREMENTS: # # Runs on any Unix, Linux or Windows NT Operating System; # Provides full FTP access (or access via a Control Panel); # Supports Perl and cgi-bin. # # COPYRIGHT NOTICE # # This Software is a product of CNC Technology. All rights reserved. # Only the user with our permission can use and modify this software. # Without CNC Technology's permission, no part of this software can be # reproduced ( other than the backup copy ), resold or redistributed to # any other individuals, companies and organizations. # # DISCLAIMER: # # This software is provided on a "As Is" basis. CNC Technology # will not be liable ( nor responsible ) whatsoever for any direct # or indirect damages caused by the use of this Software # ( or Scripts ). # ################################################################## Please read the following paragraphs carefully. This is essential if you want to have a smooth and successful installation. When you read this file, we know that you have successfully decompressed our ZIP file using a 32 bits WinZip (or equivalent) program. ################################################################## TABLE OF CONTENTS: A. Contents in our ZIP file B. System Configuration Parameters C. Webpage / Database Interface Templates D. Defining Html Template Filenames E. Database Format and Definition of Database Fields F. Other Parameters used by Input-Control Templates G. How to Display Database Field Values on the Search Report H. Installation Procedures I. Calling the CGI programs by "GET Method" J. More on producing search reports via a URL link K. Important notes for Windows NT Server Users L. Notes on Supporting Non-English Character Set M. Notes on Supporting Large Number of Database Records N. More Support Notes If You Have Problems During Installation O. Check this section before contacting us - New Features, FAQ, etc. ################################################################## A. Contents in our ZIP file You should have at least the following files for our software: (1) search-plus.cgi - CGI script used to Search and Display multiple database records at one time. (2) search-plus-search.html - The sample Search DB records Html template. You will use this template to specify search criteria ( keywords ) for the search-plus.cgi program. (3) search-plus-summary.html - The sample Display DB Records Html template. You will use this template to define which and how DB fields are to be displayed in the search report. Fields belonging to the same record will be displayed in a group. This will be repeated for each record until all records or a group of x records are displayed. (4) search-plus-detail.html - This sample Html template is used to display details of a given record. This, in conjunction with the "search-plus-summary.html" template, can be used to construct a simple search engine. (5) ReadMe.txt - It's this document. (6) sampledb.txt - Sample flat ASCII database file. (7) testing.cgi - Execute this test script to see if your cgi-bin directory is working properly. This script will also help you to find out the absolute pathname of your Website's home directory. (see Section N for more details) B. System Configuration Parameters: You will have to modify a number of System Configurations Parameters in the Scripts before you can upload them to your CGI-BIN directory. These parameters are CGI script specific, therefore you should read our following sections or the notes on our scripts very carefully. Parameter Name Where Description (1) $charset search-plus.cgi Define the character set to be used by your database software and Html templates. This is required for some foreign languages. Also see section L. (2) $delimitor search-plus.cgi Field delimitor of the database File. Only the following characters are accepted: - "\t" (for tab character) - "\|" (for pipe character) - "," (for comma character) Please make sure no tab (if $delimitor="\t";) or pipe (|) (if $delimitor="\|";) or comma (if $delimitor=",";) characters exist in your database fields. (We have a free software for you to convert your database to make sure this won't happen. See Section E - Data Conversion) (3) $maxfields search-plus.cgi Maximum number of DB Fields. (4) $maxdisplay search-plus.cgi Maximum number of records to be extracted in each search. (5) $maxdispscreen search-plus.cgi Max Records to be displayed per screen. (6) $database_dir search-plus.cgi Full pathname of the directory in which your database is stored. If possible, location of your database file should be stored outside the Html directories. (7) $template_dir search-plus.cgi Full pathname of directory in which your Html templates are stored. (8) $upload_dir search-plus.cgi Full pathname of directory where the image files associated with each database record are stored. (9) $this_cgi_url search-plus.cgi Url of the CGI script you are working on (10)$sorttype_default search-plus.cgi Define the sequence of sorting if "sortfield" exists. Default setting is "alpha-ascend", i.e. sort alphabets in ascending sequence. (11)$return_url search-plus.cgi Return URL link used by OK and error messages. (12)@valid search-plus.cgi These are the urls (separated by comma) that are allowed to execute this database system. This prevents any of our programs to be accessed by unauthorized Websites. C. Webpage / Database Interface Templates: You will need to set up a number of Html templates to take search requests and control search repeat layouts. These templates will be the key interface between users and the search engine software. You can use the same CGI script to handle different databases with different field definitions simply through the use of different sets of interface templates. Eplanation could be difficult without referring to the real examples. We have therefore developed a set of sample templates which we suggest that you should display them on a second window on your screen. As you read this document, we recommend that you switch to your template screen and try to understand its concepts and logics. When you develop your Html templates, we strongly recommend that you start from our sample templates, add and modify the database fields as well as comments to meet your own needs. It is important to backup a copy of the original sample templates before you make your modifications. Please use the following statements to display the "Search Selection" template on the screen: http://www.yourdomain.com/your_cgibin/search-plus.cgi?search-plus-search.html OR http://www.yourdomain.com/your_directory/search-plus-search.html only if your record search page has an .htm or .html ending. where search-plus-search.html is the Html template filenames. Please also see Section D. *** NOTE *** Your only job is to construct a set of workable and beautifully formatted Web based Html templates to search your flat database file. We strongly recommend that you use a standard text editor ( such as wordpad ) or a text-based html editor ( such as cmed ) to do this job. Object based Webpage generator/editor will sometimes create unexpected errors. When you prepare your templates, please make sure that your top priority is to make the system work. Do not spend too much time on producing beautiful-look pages which you can do it later. Our CGI program is a text editor. Everytime when it is called, it will read your Html template, line by line, and replace the **f??** by its actual value in the database. IMPORTANT NOTE: Wherever possible, try to store only alphanumeric characters into the "Checkbox", "Radio", and "Selection List" fields. This would make the searching faster. If you still want to include special characters into these fields, make sure you only use & or $ or % or ( or ) or # or ' or + or any combination of them. ******************* Handle your typing with care ********************* ****** UNIX is a case sensitive operating system, so does Perl. ****** **** Applies to all database field names and special control tags **** ******************* Handle your typing with care ********************* If, due to whatever reasons, you have problems in building templates, we are here to provide technical assistance ( at cost ). Just e-mail cnctek@cnctek.com. ************ (C-1) How to use Html Templates to call CGI programs: In our sample, we use the following form control statements: (1) "Search Database Records" HTML Template (Input-Control Template) Filename = search-plus-search.html This template defines the various searchable fields and provides an interface for inputting keywords/keyphrases to the CGI program for searching those fields ( see Complex Search ). It will call the "search-plus.cgi" program when the user hits the "submit" button. You may also use the "keywords" input field name alone ( see Quick Search ). When this search method is used, if any one of the keywords ( full words or partial-words accepted ) is found on the database record, the record is retrieved. Sometimes you may want to display the search report in ascending or decending sequence based on a particular database field, eg. company name "f2" in our example. This can be achieved through a "sortfield" INPUT form statement as follows: To define the sort sequence, you have to use the "sorttype" INPUT form statement: "sorttype" - If present, defines how sorting is to be done: Its value can be one of the following: 1. "alpha-ascend" - sort alphabetically in ascending order 2. "alpha-decend" - sort alphabetically in decending order 3. "number-ascend" - sort numerically in ascending order 4. "number-decend" - sort numerically in decending order Default is "alpha-ascend"..