==================================================
                    SQL QuickRegister - May 15, 2008
              ==================================================

   
   Download PDF, Zip, Word Files, and any Binary Type File
   -------------------------------------------------------
   You can also protect pdf, zip, and word files. 
   In fact any binary file can be protected and downloaded 
   with this module.
   
   Note a zip file can contain any file type such as images, mp3 etc..
   
   There are 3 steps to prepare a file for download.
   
   Step A
   ------
      a. Create a folder above document root so it cannot be accessed with a browser
          A good location is under /cgi-bin/quickregister/data/download.
         (cgi-bin is usually protected).
   
   
   Step A.
   ---------
      a. Add a record to the file redirect.txt found in
        /cgi-bin/quickregister/data
   
        A record in redirect.txt has the following format:
   
        prefix_code=filename|unix path
   
        The prefix_code is set equal to the filename and
        path where the filename and path are separated by a | character.
   
   
        code
        ----------
        code is some arbitrary text used to identify the file. 
        It must be unique for each file.
   
        prefix
        ------
        The prefix to identify a downloadable file is  app_ 
   
        filename
        ---------
        Filename is the filename of the file.
   
        unix
        ----
        The path where the file is located.  The path is optional. By default
        the program will look for the file in /cgi-bin/quickregister/templates/mypages
   
        Example of 4 records in redirect.txt
   
           app_pdf=mydemo.pdf|/www/yourdomain/private/download
           app_zip=mydemo.zip|/www/yourdomain/private/download
           app_docs=mydemo.docs|/www/yourdomain/private/download
   
   
          For any binary file such as an excel file use the app_ prefix to 
          define the unique code that identifies the file for download.
   
           app_file=file.xls|/www/yourdomain/private/download
   
   
   Step B:
   -------
       To implement the redirect on the menu page (main_menu.htm) for a pdf
       file prefix the code with app_
   
       Example 1: mydemo.pdf
   
       <href="/cgi-bin/quickregister/scripts/redirect.cgi?redirect=app_pdf">  Download Mydemo.pdf </a>
   
       The parameter redirect is set equal to the descriptive code used in
       redirect.txt for the pdf file
   
       Example 2: mydemo.zip
   
       <href="/cgi-bin/quickregister/scripts/redirect.cgi?redirect=app_zip">  Download Mydemo.zip </a>
   
       The parameter redirect is set equal to the descriptive code used in
       redirect.txt for the zip file
   
   
       Example 2: mydemo.doc
   
       <href="/cgi-bin/quickregister/scripts/redirect.cgi?redirect=app_doc">  Download Mydemo.doc </a>
   
       The parameter redirect is set equal to the descriptive code used in
       redirect.txt for the doc file