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"..
The output template file for the "search-plus.cgi" program to substitute data and to display report on the browser is "search-plus-summary.html". (2) "Display Search Summary Report" Layout Definition Template (Output-Control Template) Filename = search-plus-summary.html This template defines which database fields are to be displayed, and in what layouts, for the search report. The CGI program will search for any occurrence of **xxx** ( 'xxx' is a database field name or some other reserve words ) in the template and replace it by its actual field value. (Also see section G below. There are certain rules to follow.) (3) "Display Detail Record Report" Layout Definition Template (Output-Control Template) Filename = search-plus-detail.html (Also see section G below. There are certain rules to follow.) This is another sample template defining which database fields are to be displayed, and in what layouts, for a specific record found on a database search. (C-2) Defining database location, i.e. database filename The "dbname" statement is used to tell the CGI program which database file has to be processed. Specifying the filename is enough. There is no need to tell the directory pathname of the file. The directory pathname is defined within the CGI scripts. The "dbname" statement has the format of: Example: The dbname filename must be made up of the following characters only: a-z, A-Z, 0-9, space (" "), hyphen ("-"), underscore ("_"), dot (".") (C-3) How to instruct CGI program to execute a function or subroutine: If you read the contents of our HTML Templates, you will observe that we are using the following form statements to instruct the CGI program to execute the appropriate subroutine: Sample template - "search-plus-search.html" The "searchdbdisplay" action code is defined in the program "search-plus.cgi". It is used to search the database based on the keywords specified by the user. A search report will then be displayed on the screen according to the layout specified in the "search-plus-summary.html" template. D. Defining Html Template Filenames: The "template" statement is used to tell the CGI program which template file has to be processed. You can find it in almost all templates. The CGI program will read in the content of the template, replace certain tags by the actual values determined by the CGI program, and then output the template to the browser. The "template" statement has the format of: Example: In our "search-plus-search.html" template, we use: to tell the CGI program that the report format will be defined by the template "search-plus-summary.html". You can also use other names such as "summary.htm" or "summary.tmpl": The template filename must be made up of the following characters only: a-z, A-Z, 0-9, space (" "), hyphen ("-"), underscore ("_"), dot (".") E. Database Format and Definition of Database Fields: All database record fields have a naming convention of "f??" where "f??" can range from "f1" to "f99" or more. The maximum number of database fields accepted by the system is defined by the system configuration parameter $maxfields. Field #1 is reserved for the unique record ID (alphanumeric only). It is recognized by the "search-plus.cgi" program as record key. User fields will start from field #2 (i.e. f2) onwards. You may use these generic field names (f??) to link to any database fields and their contents. For example, you may use f2 to represent Company Name, and f3 for Company Address, etc.. It is important to make sure that you do not use the same name fxx to name other database fields. Our software will use this name to point to a unique field in your database. For real examples, please refer to our sample Html templates that come with this System. < < < DATA CONVERSION > > > All ASCII files exported from the MS Excel and MS Access software are in csv (ASCII comma separated values) format. Under this format, if a field contains tab, pipe (|) or comma characters, the text content of the whole field will be bracketed by a pair of " character as shown below: Example: ID0001,ABC Trading Ltd,Trading,"We import and export computers, stationery, furnitures, electronics, etc..",info@abc.com,abc-banner.jpg If you use our "Search Engine" software to read this file without any data conversion, it will turn up to contain 10 fields ("f1" to "f10") with "f10" containing the image filename "abc-banner.jpg". This is incorrect as the original record is supposed to contain only 6 fields. To overcome this problem, we have developed a free data conversion utility for you. You can download it from: http://www.cnctek.com/bizdb-addons/free-utilities/unquote-fields.zip using "guest" as both the login userid and password. The "unquote-fields.cgi" program in this utility will convert each of the comma characters found in the field text into the text string " _COMMA_ ". The same applies for the tab character which will be converted into " _TAB_ ", and the pipe (|) character which will be converted into " _PIPE_ ". After this conversion, the " characters which bracket the field string will also be removed. Example of the converted record: ID0001,ABC Trading Ltd,Trading,We import and export computers _COMMA_ stationery, furnitures _COMMA_ electronics _COMMA_ etc..,info@abc.com,abc-banner.jpg When this record is processed by our "Search Engine" software, it will be treated correctly as containing only 6 fields ("f1" to "f6"). On the search reports, the " _COMMA_ ", the " _PIPE_ ", and the " _TAB_ " strings will be displayed as comma, pipe (|) and tab characters. < < < DATABASE FIELD DEFINITIONS > > > Our "Search Engine" will detect the following tags in the "Search Report" template and replace them by the corresponding value of the database fields during report generation. Total fields = 6 **key** = ID0001 --> unique record key (must be the 1st field) **f2** = ABC Trading Ltd --> Company Name **f3** = Trading --> Industry Category **f4** = We import and export .... --> Short Description **f5** = info@abc.com --> e-mail address **f6** = abc-banner.jpg --> user image file to be uploaded manually to your "upload-img" directory by yourself (if specified). F. Other Parameters used by Input-Control Templates Parameters used by the Search Criteria Template: In the following paragraphs, "f??" could be the name of any database field ranging from f1 to f50 if $maxfields is equal to 50. Use the following form statements if you allow your user to specify keywords for searching the database field "f3": or If "Internet" is entered or selected, the software will extract all those records which contain the word "Internet" in field "f3". *************************************************************** Use the following form statement if you allow your user to specify keywords to search all fields in the entire database record: The whole database is searched for the specified keywords. The default keyword separator is a space character. If you want to search a number of keyphrases, you may use either "++" (the OR operator) or "&&" (the AND operator) as your boolean operator. Enter 2001/06 to display all entries entered in June 2001. Possible inputs: 1. enter nothing 2. art business computers 3. cnc technology++ (this is a keyphrase search) 4. internet++virtual servers++web hosting 5. internet&&Web database This statement is most commonly used for a "Quick Search" which requires less CPU resources. **** Using "Comma" as the keyword separator - a better method **** You can change the keyword separator to "comma" (,) by adding the following form statement in front or after the "keywords" form statement: The possible inputs now become: 1. enter nothing 2. art,business,computers 3. cnc technology (this is a keyphrase search) 4. internet++virtual servers++web hosting 5. internet&&Web database *************************************************************** You can also use the "keywords" statement along with the "f??" statements. Example: The software will arrange to match the field "f3" first. If the record is found, and the "keywords" search box is non-empty, the software will match for the input "keywords". If one or more "keywords" exist in the record, the record is said to be matched. If the "keywords" search box is empty, the software will only match field "f3". *************************************************************** These are optional parameters. If used, must exist as hidden input form names. **** These parameters (1, 2, 3, 4, 5) are for the "f??" search **** **** statements only. **** **** Example: **** **** **** **** **** 1. exactmatch-f?? - Set to "yes" if an exact match is to be performed for the whole field "f??". Example: 2. wordmatch-f?? - Set to "yes" if we are only interested in matching full words for field "f??". Example: 3. multikeys-f?? - Set to "yes" if we want to allow users to search multiple search terms (keywords or keyphrases) for field "f??". The field is said to be matched if any one of the search terms specified by the user is found in the given field of the database record. Example 1: Example 2: **Note 1** "multikeys-f??" can be used for all text fields. **Note 2** Only one "keywords_separator_is_comma" form statement is sufficient per search form or search URL link.. 4. case - Set to "yes" if all matches are case sensitive. Applicable to both "f??" and "keywords" search. Example: 5. exclude-f?? - Set to "yes" if during searching you do not want to display certain records which contain any one of the input search terms (keywords or keyphrases specified by the user) in field "f??". Example 1: If "Australia" is entered, all records containing the word "australia" in field "f3" will be excluded from the search result. Note: If "australia new zealand" is entered, all records containing one of these words in field "f3" will be excluded from the search result. Example 2: If "New Zealand,Australia" is entered, all records containing either the phrase "new zealand" or the word "australia" in field "f3" will be excluded from the search result. **Note 1** "exclude-f??" can be used for all text fields. **Note 2** Only one "keywords_separator_is_comma" form statement is sufficient per search form or search URL link. *************************************************************** **** The following parameters (6, 7) are for the "keywords" **** **** search statement only. **** **** Example: **** **** **** **** * 6. wordmatch-keywords - Set to "yes" if we are only interested in matching full words within the entire record. Example: 7. case - Set to "yes" if all matches are case sensitive. Applicable to both "f??" and "keywords" search. Example: *************************************************************** 8. keywords_separator_is_comma - Set to "yes" if you want to use comma to separate multiple search terms input by the user. This parameter can be used with anyone of the following form statements: - "keywords" - "multikeys-f??" - "exclude-f??" G. How to Display Database Field Values on the Search Report: For the "Search Report" template, such as "search-plus-summary.html" or "search-plus-detail.html", the software uses the following method to display the value of a database field name: The CGI program will search for any occurrence of **xxx** in this template and replace it by its actual value. where **xxx** can be one of the following: **matchcnt** - will be replaced by the number of records found **usdate** - will be displayed as the US date, i.e. month/day/year, **europedate** - will be displayed as the European date, i.e. day/month/year, **dbname** - will be displayed as the database name used, **key** - will be displayed as a record key, **f2** - will be replaced by the value of the 2nd field of the database record currently handled, **f3** - will be replaced by the value of the 3rd field of the database record currently handled, **f??** - will be replaced by the value of the ??th field of the database record currently handled. **bgcolor** - See Note 2 below. Any HTML commands between and will be evaluated and repeated for each record found. In other words, if you want to display the value of a number of database fields repeatedly on the same report, you must bracket the name of those fields ( in the form of **f??** ) by a pair of "repeat" and "endrepeat" comment lines as indicated in the example below: We have found **matchcnt** records

Company Name: **f2**
Tel: **f3**
See more detail

Note 1: Your Summary Page and Detail Page templates must not be framed. All Html codes must be totally contained in a single page and must not contain SSI (server side included) codes. Note 2: Under the current design, it is essential to insert the statement between and , and the statement between and , otherwise the "Previous Page" and "Next Page" buttons would not be generated properly. Note 3: The bgcolor="**bgcolor**" clause included in the statement above is an optional feature which is very useful to control the background colors of the database items displayed on the search report. If you use it, you must make sure that you have assigned a proper value to the $bgcolor0 and $bgcolor1, both of which are located in the "search-plus.cgi" cgi script. (You can also use your own bgcolor clause eg. .) Note 4: Use **usdate**, **europedate**, **key**, **f??** and **dbname** only within Html statements bracketed by and . Do not use **matchcnt** within Html statements bracketed by and . * * * * * * * * * * * * * * * * * * * * * * * * AVOID BROKEN LINKS FOR IMAGE AND URL FIELDS <<< If you do not want broken links for URL, E-mail address or Image, you could use the command line pair to bracket the line(s) containing the URL ( or E-mail or Image ) fieldname "f??". If f?? is empty, the html statements bracketed by the "check-display" command lines will be treated as comments, otherwise the "check-display" command lines will be removed. H. Installation Procedures: (H-1) Decompress the 32 bit "searchplus" ZIP file using 32 bit WinZip ( available from http://www.shareware.com/ ). (H-2) Read this ReadMe.txt carefully. Do not change the contents of the cgi codes unless you have backed it up. (H-3) In order to explain the installation clearly, we have assumed the following directory structures: /base_dir/ --> Full directory pathname, relative to the ROOT directory of your server /base_dir/bizdb/ --> chmod 0777 sampledb.txt --> stores database data file --> Note: If your site does not support this directory, copy your database to your Html directory /base_dir/cgi-bin/ --> cgi scripts, chmod 0755 search-plus.cgi /base_dir/html/ --> Base Html directory storing Web Pages of your site --> Copy any image files that come with our software to this directory /base_dir/html/bizdb/ --> Stores Database Html Templates /base_dir/html/bizdb/upload-img/ --> Stores any user record images used by the database. The filenames must be unique for each image in the database. You could use imagenr-recordkey.gif or imagenr-recordkey.jpg where imagenr is the image number within the record and recordkey is the record key of the record. Your site configurations could be different from the above. If you have problems in installing the Software on your site, you can contact us to obtain technical assistance at US$60/hour, payable in advance. (H-4) Create on your server any necessary directories/subdirectories for storing database files and HTML templates. This can be done via Telnet or FTP. For Example: (H-4.1) You can store your HTML templates ( or all sample HTML templates that come with this package ) on a directory called "bizdb" created under your main Html directory. (H-4.2) We suggest that you store your database file ( or the sample database file ) on a directory also called "bizdb" created outside your Html directory. This is desirable for security purpose so that no one can access your database file directly through Web browsers. If your server doesn't allow you to do this, you can install your database files on a password-protected Html directory. In this case no one would be able to access the contents of your directory without knowing the directory userid and password. (H-5) Copy the sample database file to the database directory (H-4.2). This can be done via FTP. (H-6) Adjust all URL references, pathnames and input output control parameters used by the Html files and sample templates so that they will work in your environment. Copy the sample templates to the HTML Directory (H-4.1). This can be done via FTP. (When uploading files to your server, use ASCII transfer for text files, and binary transfer for image and sound files.) (H-7) If your database file stores image filenames, then all the associated images must be uploaded manually by yourself and have to be stored in a Html dirctory (eg "upload-img") on your server (H-4.1). Use chmod Unix command to change the access mode of this directory to 0777, i.e. rwxrwxrwx . This can be done via Telnet or FTP. (Do not create this "upload-img" directory under any password-protected directory, such as your database directory.) (H-8) Adjust system configuration parameters on the "search-plus.cgi" cgi script to match your server and database environments. ( This must be done carefully. ) (H-9) Copy the "search-plus.cgi" file to the cgi-bin directory of your server. Use chmod Unix command to change their access modes to 0755, i.e. rwxr_xr_x . This can be done via Telnet or FTP. Example: cd /cgi-bin ( some servers use a different name ) chmod 0755 search-plus.cgi (H-10) Use chmod Unix command to change the access mode of the database directory ( i.e. the directory containing your database file ) to 0777. Then change the access mode of the database file to 0777. Example: cd /bizdb ( some servers use a different name ) chmod 0777 sampledb.txt (H-11) Connect to the Internet and open a Web browser to execute the sample index.html. I. Calling the CGI programs by "GET Method": If you have experience in CGI programming, you may appreciate that there is another method of calling a cgi program other than the use of the POST Form method. This is known as the GET method. With the "GET" method, you have the advantage of calling a cgi program via the hyperlink. The format of the calling statement is as follows: Call Programname Now where the character & is the parameter separater. A good example is: List Profile However when you use this method with our software, you must not include any non-alphanumeric characters ( including space ) in the parameter values. The presence of a space character in the parameter value will cause the CGI program to stop processing any characters including and after the space character of the Query string. J. More on producing search reports via a URL link Our software provides a very convenient method to generate report via an URL link. The following are some examples: EXAMPLE 1: Extract all companies ( company name stored in "f2" ) that starts with letter "b" or "B". Company Report EXAMPLE 2: Extract all companies ( company name stored in "f2" ) that starts with letter "f" or "F". The report is then sorted by company name in ascending order. Company Report EXAMPLE 3: Extract all entries that belong to category "Graphic Design" ( category name stored in "f3" ). The report is then sorted by company name ( "f2" ) in ascending order. Company Report Since no " " and "&" ( note: & is used as field separator in the URL link above ) are allowed in the data string of this type of URL link. We have to replace each occurrence of " " ( space character ) by %20 and each occurrence of "&" by %26. In fact if you have any special characters to be included in the data string, please use the following hexidecimal representation ( preceded by a % character ) to replace your special character. See below: Special Character -- to be replaced by -- Hexidecimal Representation " " %20 "$" %24 "%" %25 "&" %26 "+" %2b "," %2c "." %2e "|" %7c "(" %28 ")" %29 "<" %3c ">" %3e K. Important notes for Windows NT Server Users While our software was originally developed for Unix and Linux platform servers, a number of our clients have successfully installed it on their Windows NT servers. If you wish to install this server into your NT Web server, please follow the rules below: For Unix/Linux Servers: The directory pathnames are in the form of: $database_dir = "/opt2/cnctek/bizdb-db/"; $template_dir = "/opt2/cnctek/httpd/htdocs/search-engine-plus/"; All relative to your server's ROOT directory. For Windows NT Web Servers: The directory pathnames will have to be changed to: $database_dir = "c:\\opt2\\cnctek\\bizdb-db\\"; $template_dir = "c:\\opt2\\cnctek\\httpd\\htdocs\\search-engine-plus\\"; The drive number must be specified followed by a ":", and the "/" used for separating the directories must be replaced by "\\". L. Notes on Supporting Non-English Character Set The procedures mentioned in this section is optional. It is required only if you want to accept, store and search non English language characters, such as Chinese, Korean, Japanese, German, French, etc.., for your BizDB database. Under this situation, please perform the following steps: (1) set the $charset variable in all CGI scripts to a correct Language Set ID. Example: $charset = "us-ascii"; Here are the charset codes for some languages: Chinese Simplified (China): gb2312 Chinese Traditional (HK & Taiwan) : Big5 US ASCII : us-ascii For other languages, please check with your local ISP. (2) add to each of your static Web pages used by this software (eg the page containing your Search Form or "Get Method" Search URLs) a Meta Html statement with the "charset" variable set to the same value defined in the cgi scripts. Example: ............. ............. ............. ** NOTE: Do not include into your Html templates, i.e. those template files stored in the templates directory. (3) set the $match_special_chars variable in "search-plus.cgi" script to "yes" if the language you are using is not English. M. Notes on Supporting Large Number of Database Records Under normal situation, the maximum size of a flat database file should be kept under 3MB (this could be much smaller if your server is a shared one and has very limited capacity) for optimal performance. Assuming that the average size of a record is 500 bytes, your database file should be able to support a maximum of 6,000 records. What happen if you want to support 20,000 or more records? You can do this by splitting your database records into categories and then store each category of your records into a given database file through the use of a "dbname" drop-down selection list. Example: (Note: You must include this "dbname" drop-down list into each of your "SEARCH" Html templates. Each time when a user issues a "SEARCH" request, a valid "category/database" filename must be selected. Please use alphanumeric characters only for the category/database filenames.) N. More Support Notes If You Have Problems During Installation If you encounter problems during installation, please check the followings: (1) If you have Server Error Message displayed on the screen during execution of your CGI scripts: - check if you have uploaded the scripts to your server using ASCII transfer mode, - check if the Perl location defined on the 1st line of your script is correct, - check if you have modified the script incorrectly. Modification can only be carried out and saved via a ASCII text editor. (2) If your cgi script have problems to display the Html templates on the screen, check the settings of parameters requiring the absolute pathnames, eg. $database_dir, $template_dir and $upload_dir. You can install the "testing.cgi" script that comes with this software on your "cgi-bin" directory and execute this script through your browser to display the absolute pathname of your Home Directory. "testing.cgi" script installation procedure: - change the 1st line of the script to reflect correct location of Perl - upload the script to your cgi-bin directory using ASCII transfer mode - apply chmod 0755 testing.cgi to allow for script execution If the URL of your templates directory is http://yourdomain.com/templates/ and the output of "testing.cgi" is /home/xyz/public_html/, the setting of your $template_dir should be "/home/xyz/public_html/templates/" . (3) If your server supports password-protected directory and you want to password-protect your database directory (i.e. the directory containing all your flat database files), make sure your "upload-img" directory (i.e. the directory containing all the user record images) is not located inside this directory. (4) If you still can't solve the problems, contact us for upto 1/2 hour free e-mail consultation. In most cases, this is enough as most problems are configurations related. If you can explain your problems to us clearly, we normally can give you answers within 24 hours. O. Check this section before contacting us - New Features, FAQ, etc. (O-1) Simple Search For A Selected Database Field You can setup a simple search form to let your user to search any search term specified for a field selected from a drop-down list. Example 1 (See our sample template "search-plus-search.html"): ...... Search: for: ...... Example 2 (See our sample template "search-plus-search.html"):

...... Search: for: ......
Parameters Used: - searchfield - set this parameter to "all" if to search all fields or "fxx" ("fxx" is the name of the database field to be searched, such as "f7" or "f12") if to search a specific database field. - searchterm - the search term input by the user for searching the selected field. Note: If "All Fields" is selected, the search method will become a "Quick Keywords Search". - wordmatch-searchterm - if set to "yes", the program will only match for full words, otherwise the matching will be based on partial words. (O-2) Setting Up A Search Form For Complex Search You can setup a complex search form to let your user to search any fields based on the input entered or selected by the user on the form. Example 1 (Search form using the POST method):
Select Category: Enter Company Name: Enter Products Preferred:
NOTE 1: The above form uses "f2", "f6" and "f7" as searchable fields. NOTE 2: Always use "" in the drop-down list option statements for searching any values. NOTE 3: Our search engine does not recognize wild characters. NOTE 4: Do not use the reserve words "searchfield", "searchterm" and "wordmatch-searchterm" in your complex search form. Note 5: If you want to search only full words (not partial words), you should add the following form statements: Note 5: If you only want to match the entire content of the database fields, you should add the following form statements instead: Example 2 (Search URL using the GET method): For a "GET" method URL, you can use the following example: Search (O-3) Automatic Correction of URL Reference for External Web Site URL Fields If your database has a field allowing your user to enter an external Web site or banner URL, then the correct URL to be entered must be prefexed by a "http://" string. If the user forgot to type in "http://" before the Web site domain name, then when this URL is clicked on the search result report, a reference error would occur. This error can be easily fixed by inserting a "url_flds" parameter to your database search form or Urls. Examples For Search Forms Using the "POST" Method: Insert if "f17" is the external Web site URL field. Insert if "f17" is the external Web site URL field, and "f18" is the external banner URL field. Examples For Search URLs Using the "Get" Method: Insert "url_flds=f17" if "f17" is the external Web site URL field. Insert "url_flds=f17,f18" if "f17" is the external Web site URL field, and "f18" is the external banner URL field. Example: List Records under Internet Category (O-4) Switch-off / Switch-on the Display of Html Codes Associated With a Blank Field You may use the "" pair to suppress the display of Html codes associated with a blank field in any search report. Example 1 - For any non image or URL fields: (must be on a new line) where "fxx" is "f2", "f3", "f4", etc. Example 2 - For an image field: (must be on a new line) Example 3 - For an URL field: (must be on a new line) Example 4 - For an E-mail field: (must be on a new line) Example 5 - Turn on certain Html codes for an empty fxx field: This example illustrates the opposite operation of the "check-display" command for an empty field. With the use of "" pair, you could display certain html codes if fxx is an empty field. (must be on a new line) -------------------------------------------------------------------------- Now you are on your online Web database business. Good Luck! Best regards, Webmaster CNC Technology Web Site Design, Hosting and Marketing Services -------------------------------------------------------------------------- Perl CGI Scripts Developer, Quality & affordable Web Servers Web Database, Shopping Cart and Website Generation Solutions BizDB and its add-ons - http://www.cnctek.com/bizdb-html Order Page: https://www.multicards.com/800140/order.htm Download our free Simple Search Engine and File Uploader today http://www.cnctek.com/bizdb-free-search-engine Your guide on e-commerce, online shopping and Web resources Affordable Web hosting, software and templates. Free Web Tools! Make quick money from our Internet and e-commerce partners It's FREE! Don't forget to bookmark our site! http://www.cnctek.com/