Description

Web-form solution for PHP Developers

Located in /formAt.class.php (line 11)


	
			
Variable Summary
integer $dbLink
boolean $debug
boolean $defaults
string $errorMsg
integer $varcharMaxSize
Method Summary
formAt __construct ([ $doConnect = true], [ $host = ""], [ $login = ""], [ $password = ""], [ $database = ""])
string addCheckBox (string $idField, array $ar, string $class, [array $checked = array()], [string $extraParams = ""])
string addRadio (string $idField, array $ar, [string $class = ""], [string $checked = ""], [string $extraParams = ""])
string addSelectList (string $idField, array $ar, [string $class = ""], [array $selected = array()], [string $extraParams = ""], [integer $size = 1], [boolean $multiple = false])
string addTextArea (string $idField, [string $value = ""], [string $class = ""], [string $extraParams = ""])
string addTHPInput (string $idField, [string $value = ''], [string $type = "text"], [string $class = ""], [integer $maxlength = 100], [string $extraParams = ""])
string addUploadField (string $idField, string $class, [string $extraParams = ""])
void defaults (boolean $boolean)
string genCatalogueField (string $tb, string $fValue, string $fLabel, [string $class = ""], [string $type = "select"], [string $extQuery = ""], [array $selected = array()], [string $extraParams = ""], [integer $size = 1], [boolean $multiple = false], [string $forcedName = ""])
string genEnumSetField (string $tb, string $field, [string $class = ""], [string $type = "select"], [array $selected = array()], [string $extraParams = ""], [integer $size = 1], [boolean $multiple = false], [string $forcedName = ""])
string genStrField (string $tb, string $field, [string $value = ""], [string $class = ""], [string $type = "text"], [string $extraParams = ""], [string $forcedName = ""])
void setSelectIniLabel (string $str)
void startDebug ([boolean $status = true])
string _defaultValue (string $table, string $field)
void _exeQuery (string $query)
string _fetchField (integer $numRow, string $fieldName)
array _fetchRow (integer $id)
array _getEnumSet (string $table, string $field)
integer _getFieldLength (integer $fieldNumber)
string _getFieldName (integer $fieldNumber)
string _getFieldType (integer $fieldNumber)
integer _getNumFields ()
integer _getNumRows ()
string _setDebug (string $fieldName, string $values, integer $fieldLength, string $class, string $extraParams)
string _variableValue (string $Variable_name)
Variables
integer $dbLink = 0 (line 53)

DB Link Identifier

  • access: private
boolean $debug = false (line 39)

Don't start debug

  • access: private
boolean $defaults = true (line 46)

Enable default values for db-based fields

  • access: private
string $errorMsg = "ERROR AT: " (line 18)

Error string prefix

  • access: private
string $selectIniLabel = "" (line 32)

Initial option for <select>

  • access: private
integer $varcharMaxSize = 255 (line 25)

Varchar max length in MYSQL

  • access: private
Methods
Constructor __construct (line 62)

Constructor

formAt __construct ([ $doConnect = true], [ $host = ""], [ $login = ""], [ $password = ""], [ $database = ""])
  • $doConnect
  • $host
  • $login
  • $password
  • $database
addCheckBox (line 429)

Generate a CHECKBOX-SET

  • access: public
string addCheckBox (string $idField, array $ar, string $class, [array $checked = array()], [string $extraParams = ""])
  • string $idField: HTML object's name
  • array $ar: Labels and Values for the set according this format : $ar[0]['label'] = 'valor1'; $ar[0]['value'] = '1' ...
  • string $class: CSS Style for the label
  • array $checked: Array that contains the checked(s) value(s) example array(1,"str"...)
  • string $extraParams: Extra code for the object, for example Javascripts or style
addRadio (line 468)

Generate a RADIO-SET

  • access: public
string addRadio (string $idField, array $ar, [string $class = ""], [string $checked = ""], [string $extraParams = ""])
  • string $idField: HTML object's name
  • array $ar: Labels and Values for the set according this format : $ar[0]['label'] = 'valor1'; $ar[0]['value'] = '1' ...
  • string $class: CSS Style for the label
  • string $checked: Checked Value
  • string $extraParams: Extra code for the object, for example Javascripts or style
addSelectList (line 365)

Generate a SELECT object

  • access: public
string addSelectList (string $idField, array $ar, [string $class = ""], [array $selected = array()], [string $extraParams = ""], [integer $size = 1], [boolean $multiple = false])
  • string $idField: HTML object's name
  • array $ar: Labels and Values for the list according this format : $ar[0]['label'] = 'value1'; $ar[0]['value'] = '1' ...
  • string $class: CSS Style
  • array $selected: Array that contains the selected(s) value(s) example array(1,"apple"...)
  • string $extraParams: Extra code for the object, for example Javascripts or style
  • integer $size: Size of the select
  • boolean $multiple: Just in case the $type is 'select', to define if multiple selection is allowed
addTextArea (line 504)

Generate a TEXTAREA object

  • access: public
string addTextArea (string $idField, [string $value = ""], [string $class = ""], [string $extraParams = ""])
  • string $idField: HTML object's name
  • string $value: Value
  • string $class: CSS Style
  • string $extraParams: Extra code for the object, for example Javascripts or style
addTHPInput (line 323)

Generate a TEXT | HIDDEN | PASSWORD object

  • access: public
string addTHPInput (string $idField, [string $value = ''], [string $type = "text"], [string $class = ""], [integer $maxlength = 100], [string $extraParams = ""])
  • string $idField: HTML object's name
  • string $value: Object's value
  • string $type: HTML object's type 'text' | 'hidden' | 'password', default 'text'
  • string $class: CSS Style
  • integer $maxlength: In case of 'text' | 'password', maxlength of the object, default 100
  • string $extraParams: Extra code for the object, for example Javascripts or style
addUploadField (line 535)

Generate a FILE INPUT object

  • access: public
string addUploadField (string $idField, string $class, [string $extraParams = ""])
  • string $idField: HTML object's name
  • string $class: CSS Style
  • string $extraParams: Extra code for the object, for example Javascripts or style
closeDBConnection (line 76)

Close database connection, only if i get connected by this class

  • access: public
void closeDBConnection ()
defaults (line 306)

Set the object value to column default value or system variable in case the object value is not setted

  • access: public
void defaults (boolean $boolean)
  • boolean $boolean: true | false
genCatalogueField (line 160)

Generate a SELECT,CHECKBOX-SET or RADIO-SET basen on table

  • access: public
string genCatalogueField (string $tb, string $fValue, string $fLabel, [string $class = ""], [string $type = "select"], [string $extQuery = ""], [array $selected = array()], [string $extraParams = ""], [integer $size = 1], [boolean $multiple = false], [string $forcedName = ""])
  • string $tb: Databased Table
  • string $fValue: Database Column to use as value
  • string $fLabel: Database Column to use as label
  • string $class: CSS Style(s)
  • string $type: HTML object's type 'select' | 'checkbox' | 'radio', default 'select'
  • string $extQuery: Extra query string for filtering example: 'WHERE my_field LIKE "%web%"'
  • array $selected: Array that contains the selected(s) value(s) example array(1,"str"...)
  • string $extraParams: Extra code for the object, for example Javascripts or style
  • integer $size: Just in case the $type is 'select', to define the size of the select
  • boolean $multiple: Just in case the $type is 'select', to define if multiple selection is allowed
  • string $forcedName: Force the HTML object's name
genEnumSetField (line 222)

Generate a SELECT,CHECKBOX-SET or RADIO-SET 'enum' or 'set' based on a table column

  • access: public
string genEnumSetField (string $tb, string $field, [string $class = ""], [string $type = "select"], [array $selected = array()], [string $extraParams = ""], [integer $size = 1], [boolean $multiple = false], [string $forcedName = ""])
  • string $tb: Database Table
  • string $field: Database Column
  • string $class: CSS Style
  • string $type: HTML object's type 'select' | 'checkbox' | 'radio', default 'select'
  • array $selected: Array that contains the selected(s) value(s) example array(1,"str"...)
  • string $extraParams: Extra code for the object, for example Javascripts or style
  • integer $size: Just in case the $type is 'select', to define the size of the select
  • boolean $multiple: Just in case the $type is 'select', to define if multiple selection is allowed
  • string $forcedName: Force the HTML object's name
genStrField (line 108)

Generate a TEXT or TEXTAREA field based on a table colum

  • access: public
string genStrField (string $tb, string $field, [string $value = ""], [string $class = ""], [string $type = "text"], [string $extraParams = ""], [string $forcedName = ""])
  • string $tb: Database Table
  • string $field: Database Column
  • string $value: Field Value
  • string $class: CSS Style(s)
  • string $type: HTML object's type, 'text' | 'password', default 'text'
  • string $extraParams: Extra code for the object, for example Javascripts or style
  • string $forcedName: Force the HTML object's name
setSelectIniLabel (line 295)

Set the first option label for the select size 1, the value will remain empty

  • access: public
void setSelectIniLabel (string $str)
  • string $str: String
startDebug (line 89)

Change Debug status

  • access: public
void startDebug ([boolean $status = true])
  • boolean $status: status boolean value
_defaultValue (line 714)

Get the default value of a colum or the variable value in server variables

  • access: private
string _defaultValue (string $table, string $field)
  • string $table: Table
  • string $field: Column
_exeQuery (line 555)

query MYSQL

  • access: private
void _exeQuery (string $query)
  • string $query: Query string
_fetchField (line 646)

Fetch one row

  • access: private
string _fetchField (integer $numRow, string $fieldName)
  • integer $numRow: Row number
  • string $fieldName: Colum name
_fetchRow (line 629)

Fetch

  • access: private
array _fetchRow (integer $id)
  • integer $id: Colum Index
_getEnumSet (line 677)

Get the options and default value in a given "enum / set" column

  • access: private
array _getEnumSet (string $table, string $field)
  • string $table: Table
  • string $field: Column
_getFieldLength (line 599)

Get the field length

  • access: private
integer _getFieldLength (integer $fieldNumber)
  • integer $fieldNumber: Colum Index
_getFieldName (line 584)

Get field name in query

  • access: private
string _getFieldName (integer $fieldNumber)
  • integer $fieldNumber: Colum Index
_getFieldType (line 614)

Get the column's type

  • access: private
string _getFieldType (integer $fieldNumber)
  • integer $fieldNumber: Colum Index
_getNumFields (line 569)

Get the number of fields in the query

  • access: private
integer _getNumFields ()
_getNumRows (line 661)

Num Rows in query

  • access: private
integer _getNumRows ()
_setDebug (line 789)

Prints debugging

  • access: private
string _setDebug (string $fieldName, string $values, integer $fieldLength, string $class, string $extraParams)
  • string $fieldName: Element Name
  • string $values: Values
  • integer $fieldLength: Length
  • string $class: CSS Style
  • string $extraParams: Extra Parameters
_variableValue (line 769)

Get a variable value in server

  • access: private
string _variableValue (string $Variable_name)
  • string $Variable_name: Name of the variable

Documentation generated on Sun, 10 Feb 2008 02:34:43 -0600 by phpDocumentor 1.4.0