****************************************************************************************
VFORM is a script to check forms

Version 0.9

Copyright (C) 2006-2008  Sylvain FATOME

This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; 
either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; 
if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
Boston, MA  02110-1301, USA.

Contact : galawa@free.fr

Web : http://smitst.homelinux.com
****************************************************************************************

						-- Using VFORM script--
						           version 0.9
	

You mus define an array (with each parameter separated by a ";") to detail each field
	
IMPORTANT : Please, no spaces around the ':'
	
>>> Parameters :
	
	nom:name_of_fiel					Name of the field in the form
	
	format:input_format					Format of the input
	
		alpha			: Alphabetical
		alphamin		: Alphabetical (lowercase only)
		alphamaj		: Alphabtique (uppercase only)
		alphanum		: Alphanumeric
		alphanummin		: Alphanumeric (lowercase only)
		alphanummaj		: Alphanumeric (uppercase only)
		chemin			: chemin (alphanumeic + '_'), like "/xxxx/xxxx"
		cp				: Zip code (general country code sets the zip code)
		cp_countrycode	: Zip code for a given country
		date			: Date
						masks recognized :
							mmddyy		mmddyyyy	mm/dd/yy	mm/dd/yyyy
							jjmmaa		jjmmaaaa	jj/mm/aa	jj/mm/aaaa
							mm-dd-yy	mm-dd-yyyy	jj-mm-aa	jj-mm-aaaa

		duree			: Time length (format hh:mm:ss), with no control on the hours
		dureehhmm		: Time length (format hh:mm), with no control on the hours
		ean8			: EAN-8 code
		ean13			: EAN-13 code
		entier			: Signed integer
		extens			: File extension (type ".xxx")
		gtin8			: GTIN-8 code (international format only)
		gtin12			: GTIN-12 code
		gtin13			: GTIN-13 code (or GLN)
		gtin14			: GTIN-14 code
		heure			: Hour (format hh:mm:ss)
		heurehhmm		: Hour (format hh:mm)
		hexa			: Hexadecimal
		iban			: IBAN (general country code give the format)
		iban_countrycode: IBAN for a given country
		iban			: checks an IBAN code
		imt				: Vhicule registration number (general country code gives the format)
		imt_countrycode	: Vhicule registration number for a given country
		ip				: IP number V4
		ip6				: IP number V6
		isbn10			: ISBN-10 code
		isbn13			: ISBN-13 code
		issn			: ISSN code
		mac				: MAC Adress (xx:xx:xx:xx:xx:xx ou xx-xx-xx-xx-xx-xx)
		mail			: Email
		nf				: Fiscal number (general country code gives the fiscal number)
		nf_countrycode	: Fiscal number for a given country
		pw				: Password
						Your must also give the "minimum strength" with the pwq variable
		reel			: Signed real
		reel_ns			: Unsigned real
		rib				: Raised banking identity (general country code give the format)
		rib_countrycode	: Raised banking identity for a given country
		secu			: Number national health (general country code give the format)
		secu_countrycode: Number national health for a given country
		siren			: Company registration number (general country code give the format)
		siren_countrycode: Company registration number for a given country
		siret			: Company full registration number (general country code give the format)
		siret_countrycode: Company full registration number for a given country
		sscc			: SSCC code
		naf				: Company full type of activity registration number (general country code give the format)
		naf_countrycode	: Company full type of activity registration number for a given country
		tva				: VAT number (general country code gives the format)
		tva_countrycode	: VAT number for a given country code
		tel				: Phone number (general country code gives the format)
						If no country, international phone number format
		tel_countrycode	: Phone number for an given country code
						If country code unknown, international phone number format
		tel_int			: International phone number
		telp			: Mobile phone numebr (general country code gives the format)
						If no country, international phone number
		telp_countrycode: Mobile phone number
						If unknown phone number, international phone number format
		txt				: Every text
		unsigned		: Unsigned integer
		url_pref		: url (with prefix http, https, ftp, sftp, ftps, gopher, telnet)
						The following format is ok : xxxx://log:mdp@xxx.xxxxxx.xxx:1234/xxxx?xxx=123&xxx=123
						IP addresses (instead of domains names) are also accepted
		url_npref		: url (no prefix)
						The following format is ok : log:mdp@xxx.xxxxxx.xxx:1234/xxxx?xxx=123&xxx=123
						IP addresses (instead of domains names) are also accepted


	req:Y ou y ou O ou o								Field required ?
		(if nothing, not required)

	lmn										Minimum length
		(Unsigned integer. if nothing : 0)
		For select multiples : Minimum selections to be done

	lmx										Maximum length
		(Usigned integer)
		For select multiples : Maximum selections to be done

	vmn										Minimum value
		(Unsigned integer)

		For select	  : Minimum number of the line to be selected
		For checkboxes	  : Minimum number of the first boxe to be checked
		For dates	  : Minimum date
		For values	  : Minimum value
		
		If no maximum value, the test is only done with the minimum value

	vmx										Maximum value
		(Unsigned integer)

		For select	  : Maximum number of the line to be selected
		For checkboxes	  : Maximum number of the first boxe to be checked
		For dates	  : Maximum date
		For values	  : Maximum value

		If no minimum value, the test is only done with the maximum value
				
	masque								definition of the input mask
		(For the dates. REQUIRED in this case)

	stok								CSS style name for field ok
		(If nothing, nothing's done)

	stbad								CSS style name for field not ok
		(If nothing, nothing's done)

	txt								Field description for the error popup
		(If nothing, a string is created with the name of the field)

	comp								Field to compare with (for identical fields)
		You must input the name of the field to be compared with
		
		For texts : compatison of the two inputs
		For checkboxes : comparison of the two fields structures and of the checked boxes
		For selects : comparison of the two fields structures and of the selected line number
		For multiple selects : comparison of the two fields structures and
				of the selected lines numbers
			
	carenum								Enumerated chars
		For a defined fiels, you can ask for an enumeration, with a speration chars.
		Each input si analyzed on the format of the field to check if it's ok.

		For example, if you define a file extension, with a minimal length of 3 chars, maximum length
		of 4 chars, and a separation chars ',', VForm will analyze each chars sequences between the ',' to check if
		it's really an extension file, with minimum length of 3, and maximum length of 4 chars.

		For the separation chars, you can't enter ";"


	Function is called by  :
	
				VForm(form_name,definition_array,country_code,language)
				
	Nota :
		If no conutry defined, France ('fr') by defult
		If no language defined, French('fr') by default
