====================================
search.php3 v3.0 for UdmSearch v.3.0
====================================

Main features are:
-----------------
* MySQL, Oracle backend support
* Multi-dict table mode with Oracle backend support 
          (MySQL in single "dict" only)
* boolean query language support
* best documents are found first
* HTML templates to easily customize search results


Reqirements:
------------
search.php3 requires PHP 3.0.9 or later built with perl-compatible
regular expressions and MySQL and/or Oracle support.


Files:
------
search.php3            - main PHP script
db_func.inc            - include file for search.php3 with databases interface
search.htm.mysql       - template for MySQL in single mode
search.htm.ora.single  - template for Oracle in single mode
search.htm.ora.multi   - template for Oracle in "multi-dict" mode


How do I use it?
----------------

1. Copy both search.php3 and db_func.inc into one directory.
2. Edit search.php3 settings at the beginning of the script:

     $template_file='/path/to/search.htm';  // path to template file
   
     $DEBUG=0;				    // set to 1 if you want to see all sql-queries sent to backent
     $MAX_NP=1000;                          // maximum allowed results page number
     $MAX_PS=100;                           // maximum allowed results per page

3. Edit search.htm. Php frontend adds two additional variables to standart
   template file: DBType and DBMode. DBType describes your sql-frontend. 
   Currently supported "oracle" and "mysql" types. DBMode used to set your
   dict table structure. For multi-dict mode you should use DBMode "multi",
   otherwise you should set it to "single".

   Examples of variable section of template:
   a) mysql/single mode:
      <!--variables
      #DBPort	3306
      DBHost	localhost
      DBUser	udm
      DBPass	udm
      DBName	udmsearch
      DBType    mysql
      DBMode    single
      -->
   b) oracle/single mode:
      <!--variables
      DBUser	udm
      DBPass	udm
      DBName	nova
      DBType    oracle
      DBMode    single
      -->
   c) oracle/multidict mode:
      <!--variables
      DBUser	udm
      DBPass	udm
      DBName	nova
      DBType    oracle
      DBMode    multi
      -->

   
NOTE FOR ORACLE USERS:
-----------------------
OCIPLogon function uses only DBName, DBUser and DBPass variable to
connect to the backend.

PHP says:
The DBName parameter can either contain the name of the local Oracle
instance or the name of the entry in tnsnames.ora to which you want
to connect. If the DBName is not specified, PHP uses the environment
variables ORACLE_SID (Oracle instance) or TWO_TASK (tnsnames.ora) to
determine which database to connect to. 
