Public Methods | |
Pgtable ($db_conn,$configFile,$user='',$group='',$configSchema='') | |
initialize pgtable object | |
sort_field () | |
reorder the table, how $indexPriority specify | |
set_priority ($priority=0,$schema=false,$table=false,$field=false) | |
set the priority of a column and reorder columns | |
set_perms_priority ($tbSchema,$tbName) | |
set default perms and priority number of a table | |
set_defaults ($tbSchema,$tbName) | |
set defaults variable when a new table is initialized | |
add_table ($tbSchema,$tbName,$pkey=false) | |
initialize a new table | |
join_child ($schemaParent='public',$parent,$parentcol,$chemaChild='public',$child,$childcol) | |
join an existent parent table with its childs, adding links down view/edit pages | |
join_parent ($schemaChild='public',$child,$childcol,$schemaParent='public',$parent,$parentcol,$schema='public',$query="",$type="popup",$when=array('search', 'view', 'preSearch', 'new', 'edit')) | |
join an existent child table with its parent, | |
alter_parent ($schemaChild,$child,$childcol,$arr=array()) | |
change parent references attributes. Used to alter default values of prelinked tables(for examples type or to specify a query) | |
auto_join ($tbSchema,$tbName,$field,$when) | |
called when neccesary from internal functions to set form defaults or similar | |
auto_join_query ($tbSchema,$tbName,$when) | |
called when neccesary from internal functions to set query with joins | |
operator ($name,$type='',$defVal=false) | |
return appropriate html code for an operator | |
delete ($tbSchema,$tbName) | |
called when the html button 'Delete' is clicked | |
update ($tbSchema,$tbName) | |
called when the html button 'Save' is clicked (only save modified data) | |
copy ($tbSchema,$tbName) | |
called when the html button 'Copy' is clicked | |
insert ($tbSchema,$tbName) | |
called when the html button 'Insert' is clicked (only insert new data) | |
pre_search_new ($tbSchema,$tbName) | |
called when the html button 'new search' is clicked | |
pre_search_modify ($tbSchema,$tbName) | |
called when the html button 'modify search' is clicked | |
pre_search ($tbSchema,$tbName,$new=true) | |
called when frrom pre_search_modify and pre_search_new functions | |
view ($tbSchema,$tbName) | |
called when the html button 'View' is clicked | |
edit ($tbSchema,$tbName) | |
called when the html button 'edit' or 'insert' is clicked | |
pre_insert ($tbSchema,$tbName) | |
called when the html button 'new insert' is clicked | |
view_edit ($tbSchema,$tbName,$when,&$datain) | |
called from others functions | |
order ($tbSchema,$tbName,$field) | |
for order links in search table | |
actions ($tbSchema,$tbName,$field,$num,$pkey,$refLink=array(),$type="checkbox") | |
add links for each records to modify, delete, view and child subtables if exists | |
export ($tbSchema,$tbName) | |
called when the html button 'export' is clicked, export current selected records in dbf | |
search ($tbSchema,$tbName,$export=false) | |
called when the html button 'search' is clicked | |
parse_data_in (&$arr,$when='') | |
parse submitted data | |
parse_data_out ($when,$tbSchema,$tbName) | |
parse output data hash, from a bidimensional array of values(corespond to a part of postgres table), create a html table structured in a bidimensinal hash | |
form_sub ($tbSchema,$tbName,$field,$num,$when,$def) | |
called for each field, to make an appropriate input form | |
view_sub ($tbSchema,$tbName,$field,$num,$when,$def) | |
called for each field, to view its value in an appropriate parsed mode | |
alter_display ($schema,$table,$fields=false,$value=true,$when=array("new","edit","search","view","preSearch","export")) | |
set when a column is displayed or not | |
alter_type ($tbSchema="public",$tbName,$tbField,$type,$proprieties=false,$change_propriety=true,$where=false) | |
change type of a field | |
file_url ($file,$lobject=false,$mimeType='') | |
file_view ($linkName,$link,$thumbnail,$mimeType) | |
switch_actions ($tbSchema='public',$tbName) | |
main function | |
switch_edit ($tbSchema,$tbName) | |
get_table () | |
to be called to know how table is requested | |
search_bar ($searchUrl=false,$previousUrl=false,$nextUrl=false,$otherUrl=false,$total=false,$offset=false,$limit=false,$numPages=false,$nameOffset) | |
submit ($tbSchema,$tbName,$arr) | |
Public Attributes | |
db | |
pkey | |
ref | |
inh | |
perms | |
priority | |
form | |
data | |
links | |
actions | |
user | |
group | |
configSchema | |
operator | |
indexPriority | |
errors | |
messages | |
STRINGS |
db | Pgdb object, to interface with postgresql db |
pkey | name of column to use as a pkey ($pkey[schema][table]=column) |
ref | hash of references to other tables |
inh | if a table inherits other tables |
perms | not used, to manage perms in the future |
priority | table priority, not used |
form | html form informations |
actions | array of action allowed (edit, insert....) |
operator | array of operator for each pseudotype |
user | not used |
group | not used |
configSchema | not used |
indexPriotity | priority priority of column, if must be reorder from postgres column order ($priority[schema][table][column]=number) |
erros | Pgmessage object |
messages | Pgmessage object |
STRINGS | array of strings, form multilanguage support |
Definition at line 45 of file pgtable.php.
|
initialize pgtable object
Definition at line 83 of file pgtable.php. References configSchema, data, db, errors, form, group, messages, perms, priority, STRINGS, and user. |
|
add links for each records to modify, delete, view and child subtables if exists
Definition at line 801 of file pgtable.php. References title. |
|
initialize a new table
Definition at line 254 of file pgtable.php. References db, inh, pkey, ref, set_defaults(), and set_perms_priority(). |
|
set when a column is displayed or not
Definition at line 1383 of file pgtable.php. References table. |
|
change parent references attributes. Used to alter default values of prelinked tables(for examples type or to specify a query)
Definition at line 323 of file pgtable.php. References ref. |
|
change type of a field
Definition at line 1423 of file pgtable.php. |
|
called when neccesary from internal functions to set form defaults or similar
Definition at line 334 of file pgtable.php. |
|
called when neccesary from internal functions to set query with joins
Definition at line 367 of file pgtable.php. References db, form, pg_escape_string(), pkey, ref, search(), table, and view(). |
|
called when the html button 'Copy' is clicked
Definition at line 519 of file pgtable.php. Referenced by set_defaults(). |
|
called when the html button 'Delete' is clicked
Definition at line 454 of file pgtable.php. References array_unset(). |
|
called when the html button 'edit' or 'insert' is clicked
Definition at line 624 of file pgtable.php. Referenced by join_parent(), and set_defaults(). |
|
called when the html button 'export' is clicked, export current selected records in dbf
Definition at line 862 of file pgtable.php. |
|
Definition at line 1479 of file pgtable.php. |
|
Definition at line 1492 of file pgtable.php. |
|
called for each field, to make an appropriate input form
Definition at line 1209 of file pgtable.php. |
|
to be called to know how table is requested
Definition at line 1702 of file pgtable.php. |
|
called when the html button 'Insert' is clicked (only insert new data)
Definition at line 530 of file pgtable.php. Referenced by set_defaults(). |
|
join an existent parent table with its childs, adding links down view/edit pages
Definition at line 285 of file pgtable.php. |
|
join an existent child table with its parent,
Definition at line 307 of file pgtable.php. |
|
return appropriate html code for an operator
Definition at line 423 of file pgtable.php. References html_select(). |
|
for order links in search table
Definition at line 771 of file pgtable.php. References arr_to_url(), and title. |
|
parse submitted data
Definition at line 1072 of file pgtable.php. References table. |
|
parse output data hash, from a bidimensional array of values(corespond to a part of postgres table), create a html table structured in a bidimensinal hash
Definition at line 1142 of file pgtable.php. |
|
called when the html button 'new insert' is clicked
Definition at line 637 of file pgtable.php. |
|
called when frrom pre_search_modify and pre_search_new functions
Definition at line 585 of file pgtable.php. |
|
called when the html button 'modify search' is clicked
Definition at line 572 of file pgtable.php. |
|
called when the html button 'new search' is clicked
Definition at line 560 of file pgtable.php. |
|
called when the html button 'search' is clicked
Definition at line 884 of file pgtable.php. References array_unset(), getmicrotime(), transpose(), and where_sql(). Referenced by auto_join_query(), join_parent(), and set_defaults(). |
|
Definition at line 1717 of file pgtable.php. |
|
set defaults variable when a new table is initialized
Definition at line 214 of file pgtable.php. References actions, copy(), db, edit(), form, insert(), perms, search(), and view(). Referenced by add_table(). |
|
set default perms and priority number of a table
Definition at line 168 of file pgtable.php. References db, indexPriority, and sort_field(). Referenced by add_table(). |
|
set the priority of a column and reorder columns
Definition at line 152 of file pgtable.php. References indexPriority, priority, and table. Referenced by sort_field(). |
|
reorder the table, how $indexPriority specify
Definition at line 139 of file pgtable.php. References set_priority(). Referenced by set_perms_priority(). |
|
Definition at line 1728 of file pgtable.php. |
|
main function
Definition at line 1519 of file pgtable.php. References arr_to_hidden(), html_table(), and search_bar(). |
|
Definition at line 1676 of file pgtable.php. |
|
called when the html button 'Save' is clicked (only save modified data)
Definition at line 487 of file pgtable.php. |
|
called when the html button 'View' is clicked
Definition at line 612 of file pgtable.php. Referenced by auto_join_query(), join_parent(), and set_defaults(). |
|
called from others functions
Definition at line 669 of file pgtable.php. References arr_to_hidden(), and table. |
|
called for each field, to view its value in an appropriate parsed mode
Definition at line 1311 of file pgtable.php. |
|
Definition at line 58 of file pgtable.php. Referenced by set_defaults(). |
|
Definition at line 62 of file pgtable.php. Referenced by Pgtable(). |
|
Definition at line 55 of file pgtable.php. Referenced by Pgtable(). |
|
Definition at line 46 of file pgtable.php. Referenced by add_table(), auto_join(), auto_join_query(), Pgtable(), set_defaults(), and set_perms_priority(). |
|
Definition at line 68 of file pgtable.php. Referenced by Pgtable(). |
|
Definition at line 54 of file pgtable.php. Referenced by auto_join(), auto_join_query(), Pgtable(), and set_defaults(). |
|
Definition at line 61 of file pgtable.php. Referenced by Pgtable(). |
|
Definition at line 66 of file pgtable.php. Referenced by set_perms_priority(), and set_priority(). |
|
Definition at line 50 of file pgtable.php. Referenced by add_table(). |
|
Definition at line 56 of file pgtable.php. |
|
Definition at line 69 of file pgtable.php. Referenced by Pgtable(). |
|
Definition at line 64 of file pgtable.php. |
|
Definition at line 51 of file pgtable.php. Referenced by Pgtable(), and set_defaults(). |
|
Definition at line 48 of file pgtable.php. Referenced by add_table(), auto_join(), and auto_join_query(). |
|
Definition at line 52 of file pgtable.php. Referenced by Pgtable(), and set_priority(). |
|
Definition at line 49 of file pgtable.php. Referenced by add_table(), alter_parent(), auto_join(), auto_join_query(), join_child(), and join_parent(). |
|
Definition at line 70 of file pgtable.php. Referenced by auto_join(), and Pgtable(). |
|
Definition at line 60 of file pgtable.php. Referenced by Pgtable(). |