home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / frmck112.zip / formcheck.doc < prev    next >
Text File  |  1998-06-05  |  11KB  |  327 lines

  1.  
  2.  
  3.                   
  4.                       ■ 
  5.                       │ FormCheck/2 v1.12beta
  6.                       │ Copyright (C) 1998 Arne Blankerts
  7.                       │ Freeware 
  8.                       │ Date: 1-JUN-1998
  9.             ────────────────────────────────────────────────────────
  10.                          F O R M C H E C K . D O C 
  11.             ────────────────────────────────────────────────────────
  12.  
  13.             ∙ 0 ∙   Introduction
  14.             ∙ 1 ∙   Legal stuff
  15.             ∙ 2 ∙   The Package
  16.             ∙ 3 ∙   Install & Configuration
  17.             ∙ 4 ∙   Short Example
  18.             ∙ 5 ∙   How to Contact
  19.             ∙ 6 ∙   Trademarks and other stuff
  20.         ∙ 7 ∙   History
  21.         ∙ 8 ∙   Future
  22.  
  23.             ────────────────────────────────────────────────────────
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.             ────────────────────────────────────────────────────────
  31.                         - 0 -    Introduction
  32.             ────────────────────────────────────────────────────────
  33.         
  34.  
  35. FormCheck/2 is desigend to be a CGI-Program executed on a "submit"-button
  36. of a from. It works with either the POST or GET. FormCheck controls the
  37. data passed for being complete and then passes to a mail or fax-process.
  38. It can handle "dependings" (e.g. different mail-adresses on different entrys
  39. at an element in the form).
  40.  
  41. The programm was tested with Apache/1.2.4 running on OS/2 WARP 4.0 and
  42. OS/2 WARP Server 4.0. 
  43.  
  44.  
  45.             ────────────────────────────────────────────────────────
  46.                         - 1 -    Legal stuff
  47.             ────────────────────────────────────────────────────────
  48.  
  49. FormCheck/2 is freeware. That means you can use, copy and distribute it
  50. for free but you are *NOT* allowed to modify or sell it. As being an ISP
  51. or content-provider you are allowed to sell the USE of the programm but
  52. not the program itself.
  53.  
  54. Since FormCheck/2 is free there is no warrenty for the program working. 
  55. It may contain bugs and I give nothing else for garantie then that the
  56. programm will need some space on your harddisk. 
  57.  
  58. *** Use FormCheck/2 on own risk *** 
  59.  
  60. If you use it, please give me an email just to know there's someone
  61. giving it a try.
  62.  
  63.             ────────────────────────────────────────────────────────
  64.                         - 2 -    The Package
  65.             ────────────────────────────────────────────────────────
  66.  
  67. Formcheck is provided by default now as ZIP-Archive.
  68. (Some uses had problems with the RAR-Archive.. don't know why .-( )
  69. It includes the following:
  70.       
  71.               FormCheck.doc - This file :)
  72.               FormCheck.ini - The configfile
  73.               FormCheck.exe - what may this be..? ,)
  74.               File_id.diz   - Describtionfile for BBS
  75.               Tips.txt        - Some information
  76.               Bugreport.txt - hopefully not needed. A form to help me
  77.                               to find bugs ;)
  78.           \DEMO
  79.                FormCheck.ini - The configfile for the demo
  80.            Index.html    - The html-code for the demo
  81.            test.conf     - The conf-file for the demo
  82.                       
  83.             ────────────────────────────────────────────────────────
  84.                         - 3 -    Install & Configuration
  85.             ────────────────────────────────────────────────────────
  86.  
  87.  
  88.  FormCheck/2 is to be installed very easy :)
  89.  
  90.  Since FormCheck.ini is more the 8.3 the filesystem has to be HPFS :)
  91.  
  92.  Being able to read this file you have already started the sfx-archive :)
  93.  If not, please do so in an empty directory.
  94.  
  95.  Copy the files FORMCHECK.EXE and FORMCHECK.INI to your /CGI-BIN (or
  96.  any other directory where the webserver is allowed to execute CGIs)
  97.  
  98.  Modify the FORMCHECK.INI as needed (documentation inside)
  99.  
  100.  Create your HTML-File including the form. The "action"-parameter
  101.  has to be like /cgi-bin/formcheck.exe/TEST. the "/TEST" is the
  102.  information, that the Name of this From is "Test". An entry has to be located 
  103.  in the Ini-file under the Topic "forms".
  104.  
  105.  Create a directory somewhere for a form. Add this directory and the 
  106.  config-file-name to the TEST-Entry in the INI-File.
  107.  
  108.  Copy the example.conf to this directory. rename it to match the INI-Entry.
  109.  
  110.  Modify the renamed example.conf as needed. (documentation inside)
  111.  
  112.  That's it :)
  113.  
  114.             ────────────────────────────────────────────────────────
  115.                         - 4 -    short example
  116.             ────────────────────────────────────────────────────────
  117.  
  118.  Let's assume the form is acually displayed. 
  119.  It has the following html-syntax (part only :) :
  120.  
  121. ...
  122. <FORM action="/cgi-bin/formcheck.exe/demo" method="post">
  123. <TABLE>
  124. <TR>
  125.  <TD>ID:</TD>
  126.  <TD><INPUT TYPE=TEXT SIZE=40 NAME="ID"></TD>
  127. </TR>
  128. <TR>
  129.  <TD>Name:</TD>
  130.  <TD><INPUT TYPE=TEXT SIZE=40 NAME="Name"></TD>
  131. </TR>
  132. <TR>
  133.  <TD>Steet:</TD>
  134.  <TD><INPUT TYPE=TEXT SIZE=40 NAME="Street"></TD>
  135. </TR>
  136. <TR>
  137.  <TD>city:</TD>
  138.  <TD><INPUT TYPE=TEXT SIZE=40 NAME="city"></TD>
  139. </TR>
  140. </TABLE>
  141. ...
  142.  
  143.  This form includes the fields:  ID,Name,Street,city
  144.  to make FormCheck work an entry in the FORMCHECK.INI has to be like that:
  145.  
  146.  [FORMS]
  147.  DEMO=C:\DEMO\DEMO.CONF
  148.  
  149.  This file "C:\demo\demo.conf" will look like that:
  150.  First the FORM is declared.
  151.  All elements to be processed have to be listed.
  152.  
  153.  [FORM]
  154.  ELEMENTS=ID,Name,Street,city
  155.  
  156.  Assume we don't want any field to be empty.We also want the
  157.  ID, since this is a fixed format, to be at least 5 chars.
  158.  
  159.  FORCE=ID:5,Name:0,Street:0,city:0
  160.  
  161.  If anything entered is not correct, a fail is produced so:
  162.  
  163.  [FAIL] 
  164.  HEADER=C:\DEMO\FAIL.HTML
  165.  TEXT=The Fields %1 are not entered correctly
  166.  SPLIT=,
  167.  FOOTER=E:\TEST\FFOOTER.HTML
  168.  
  169.  This results in fail.html being send to the user, then the text is
  170.  send (the %1 is replaced by the name of the Fields divided by SPLIT)
  171.  After this the ffooter.html will be displayed.
  172.  
  173.  TEXT and SPLIT may contain HTML-Code if you want to...
  174.  
  175.  You can leave the HEADER= and FOOTER= blank. Then only TEXT is produced.
  176.  The Same goes for the SUCCESS
  177.  
  178.  Ok.. we've the form checked, everything is fine.. what will happen now ?
  179.  If in Section
  180.  
  181.  [SEND]
  182.  
  183.  FormCheck finds an DEPENDS= this will be used (explained later). If Not
  184.  an entry has to be "MAIL" or "FAX". (not both !!)
  185.  if its
  186.  
  187.  MAIL=ABLANKERTS@freepoint.DE
  188.  
  189.  the form, or better the translated file by FormCheck, will be send as Mail to
  190.  the email ABlankerts@freepoint.de (which is my acc :) so please do alter
  191.  this...)
  192.  The Same goes for FAX:
  193.  
  194.  FAX=0049-40-12 34 56 78
  195.  
  196.  Let's see now for the 
  197.  
  198.  DEPENDS=CITY
  199.  
  200.  If this is found, a "simple" MAIL and FAX were ignored. 
  201.  The lines behind DEPENDS have to fit all possible values for that field.
  202.  e.g. if CITY could be HAMBURG the following entry has to be in the 
  203.  SEND-Section:
  204.  
  205.  HAMBURG=MAIL,ABlankerts@freepoint.de
  206.  
  207.  if CITY is HAMBURG, the translated form will be emailed to my acc.
  208.  if the value for CITY is NOT defined, then nothing happens :)
  209.  
  210.  To make the translated File more readable two texfiles can be linked to
  211.  the mail or fax:
  212.  
  213.  [RESULT]
  214.  HEADER=C:\DEMO\START.TXT
  215.  FOOTER=C:\DEMO\END.TXT
  216.  
  217.  This creates a file starting with the text from START.TXT followed by
  218.  the entrys of the form. After that, the text from END.TXT will be added.
  219.  
  220.  If you use %IP% instead of END.TXT or START.TXT a file with the User-IP
  221.  is read. e.g. if you come from 127.0.0.1 this will be the filename:
  222.  
  223.  C:\DEMO\127.0.0.1    ( assuming you defined "C:\DEMO\%IP%" )
  224.  
  225.  
  226.             ────────────────────────────────────────────────────────
  227.                         - 5 -    Contact
  228.             ────────────────────────────────────────────────────────
  229.  
  230. If you like or hate this program let me know ;)
  231.  
  232.     Arne Blankerts
  233.     Mörkenstraße 9
  234.     D-22767 Hamburg
  235.     Germany
  236.  
  237.     eMail: ABlankerts@Freepoint.de
  238.     
  239.     IRC (most time IRCNet and WEBBNet)
  240.     Nick: TheSeer
  241.     Channels: #OS/2 
  242.                   #SDG      (only Webbnet)
  243.                   #OS/2ger  (only IRCNet)
  244.           #Hamburg  (only IRCNet)
  245.  
  246.  
  247.             ────────────────────────────────────────────────────────
  248.                      - 6 -    Trademarks and other stuff
  249.             ────────────────────────────────────────────────────────
  250.  
  251.  OS/2 is a trademark by IBM Internation Business Maschines
  252.  
  253.  Apache/1.1.3 is freeware. 
  254.  The OS/2-Port is by Garey Smiley <Garey@slink.com>
  255.  or by Kerry Webb <trixer@suntrix.com> (his is 1.1.3a)
  256.  
  257.  Any other trademark is a trademark of the respective holder.
  258.  
  259.  Thanx to IBM for creating OS/2, Netscape for a great Browser
  260.  
  261.  Fuck to Micro$oft(R) for all the shit they call software...
  262.  
  263.  
  264.             ────────────────────────────────────────────────────────
  265.                              - 7 -    History
  266.             ────────────────────────────────────────────────────────
  267.  
  268. [Version 1.12beta]
  269.  ∙ Recompiled without debugcode. smaller filesize.
  270.  ∙ Minor Changes to enhance speed..
  271.  ∙ Copied CMD-Option from standart ini to local checkfiles
  272.    (If no local CMD is found, the default from the standart ini is used)
  273.  
  274. [Version 1.11a ( Bugfix for a user ) ]
  275.  ∙ Fixed a bug on handling TEXTAREA-Elements
  276.  
  277. [Version 1.11]
  278.  ∙ Added an updated inetmail.cmd (should work now.. Thanx to SPOC (IRC)
  279.  ∙ Added a small DEMO
  280.  
  281. [Version 1.1]
  282.  ∙ Added the %IP%-Option for dynamic use of text
  283.  ∙ Fixed a small cosmetic bug
  284.  
  285. [Version 1.02]
  286.  ∙ Added the DEL-Option to formcheck.ini
  287.  ∙ Now outputs all fails at once 
  288.  ∙ Added the SPLIT-Option in the xxxx.conf
  289.  ∙ Added senderinformation to output-file (see next point!)
  290.  ∙ Added the flag DETAILS to place senderinformation into output-file
  291.  ∙ Added linebreak for inputs >60 chars
  292.  ∙ Removed some old german outputs for internationl style
  293.  
  294.  ∙ Fixed a small bug in init-routine
  295.  
  296. [Version 1.01]
  297.  ∙ Added rexx-script inetmail.cmd for use without sendmail
  298.  ∙ Added some more debugdetails in DEBUGMODE=1
  299.  
  300.  ∙ Fixed a stupid bug in the config-reader
  301.  ∙ Changed config-entries to non-casesensitiv search 
  302.  
  303. [Version 1.00beta]
  304.  
  305.  first public release. 
  306.  
  307. [Version 1.00aplha]
  308.  
  309.  Used on our system only.
  310.  
  311. [Version till 0.9]
  312.  
  313.  not released. Only local testing.    
  314.  
  315.  
  316.             ────────────────────────────────────────────────────────
  317.                              - 8 -    Future
  318.             ────────────────────────────────────────────────────────
  319.  
  320.  ∙ Format-checks (e.g. xx-xx-xx)
  321.  ∙ logical checks (e.g. birthday in future)
  322.  ∙ better setup ?
  323.  
  324.  There is nothing more planned for future releases.
  325.  But if you desire something let me know !!
  326.  
  327. [EOF]