Constructor
formAt
__construct
([ $doConnect = true], [ $host = ""], [ $login = ""], [ $password = ""], [ $database = ""])
-
$doConnect
-
$host
-
$login
-
$password
-
$database
Generate a CHECKBOX-SET
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
Generate a RADIO-SET
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
Generate a SELECT object
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
Generate a TEXTAREA object
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
Generate a TEXT | HIDDEN | PASSWORD object
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
Generate a FILE INPUT object
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
Close database connection, only if i get connected by this class
void
closeDBConnection
()
Set the object value to column default value or system variable in case the object value is not setted
void
defaults
(boolean $boolean)
-
boolean
$boolean: true | false
Generate a SELECT,CHECKBOX-SET or RADIO-SET basen on table
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
Generate a SELECT,CHECKBOX-SET or RADIO-SET 'enum' or 'set' based on a table column
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
Generate a TEXT or TEXTAREA field based on a table colum
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
Set the first option label for the select size 1, the value will remain empty
void
setSelectIniLabel
(string $str)
Change Debug status
void
startDebug
([boolean $status = true])
-
boolean
$status: status boolean value
Get the default value of a colum or the variable value in server variables
string
_defaultValue
(string $table, string $field)
-
string
$table: Table
-
string
$field: Column
query MYSQL
void
_exeQuery
(string $query)
-
string
$query: Query string
Fetch one row
string
_fetchField
(integer $numRow, string $fieldName)
-
integer
$numRow: Row number
-
string
$fieldName: Colum name
Fetch
array
_fetchRow
(integer $id)
Get the options and default value in a given "enum / set" column
array
_getEnumSet
(string $table, string $field)
-
string
$table: Table
-
string
$field: Column
Get the field length
integer
_getFieldLength
(integer $fieldNumber)
-
integer
$fieldNumber: Colum Index
Get field name in query
string
_getFieldName
(integer $fieldNumber)
-
integer
$fieldNumber: Colum Index
Get the column's type
string
_getFieldType
(integer $fieldNumber)
-
integer
$fieldNumber: Colum Index
Get the number of fields in the query
integer
_getNumFields
()
Num Rows in query
integer
_getNumRows
()
Prints debugging
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
Get a variable value in server
string
_variableValue
(string $Variable_name)
-
string
$Variable_name: Name of the variable