|
| CYap ($search_field=array(), $show_field=array(), $db_info=array(), $show_info=array(), $modify_info=array()) |
|
| _LoadCfg ($FileName) |
|
| check_showfield ($info) |
|
| check_db ($info) |
|
| LoadSearchCfg ($info) |
|
| check_show_info ($info) |
|
| check_modify_info ($info) |
|
& | GetSearchObject () |
|
| SetSearchObject (&$newObject) |
|
| _ManageFormats () |
|
| ForgetAll () |
|
| _InitializeSessionVar () |
|
| _DoEvent ($ev) |
|
| _SetDefaultHandler () |
|
| RegisterEvent ($EventName, $Handler) |
|
| _OnOrderUp () |
|
| _OnOrderDown () |
|
| _OnDetailClick () |
|
| _OnModifyClick () |
|
| _OnDoModify () |
|
| _OnAbortModify () |
|
| _OnRemoveClick () |
|
| _OnDoRemove () |
|
| _OnAbortRemove () |
|
| _OnCmdExecuted () |
|
| _OnToPage () |
|
| _OnExit () |
|
| _OnTableView () |
|
| _OnNewRow () |
|
| _OnDoSaveRow () |
|
| _OnAbortSaveRow () |
|
| _OnSearch () |
|
| _OnFirstTime () |
|
| _OnDrawCurrent () |
|
| showpage ($ForcedEvent='') |
|
| _SaveToSession () |
|
| _RunDisplayFunc () |
|
| _DisplayData () |
|
| analize_request () |
|
| load_previous_data () |
|
| _JsSearchBoxCheck () |
|
| show_form () |
|
| _ShowSearchBox ($txt) |
|
| check_orderfield () |
|
| perform_query () |
|
| show_table_rows () |
|
| _ShowDetailMode ($Fields, $result) |
|
| _ShowTableMode ($Fields, $result) |
|
| show_header (&$clsTable) |
|
| show_single_row ($RowData, $RowNumber, &$clsTable) |
|
| _DetHrefLink ($RowNumber, $RowData) |
|
| _DeleteHrefLink ($RowData) |
|
| _ModifyHrefLink ($RowData) |
|
| _AddHrefLink (&$clsTable) |
|
| show_detail_row ($DataRow, $Show=true, $Fields, &$clsTable) |
|
| show_selectors () |
|
| select_page () |
|
| InDetailMode () |
|
| _JsOut () |
|
| _ToolTipJs () |
|
| _ToolTipsDiv () |
|
| _ModifyInputForm () |
|
| _ModifyExecute ($Add) |
|
| _ModifySuccessed () |
|
| _BuildControlTable ($tblFields) |
|
| _ShowModifyBox ($Row, $Fields, $Add, $KeyValue, $Controls) |
|
| _FillFromRequest ($row, $Fields) |
|
| _RetrieveRow ($KeyValue, $Fields) |
|
| _RetrieveFieldType ($res=NULL, $ModifyMode=true) |
|
| _CompileFieldType ($meta, $flags, $CfgParam) |
|
| _Apice ($fieldType) |
|
| _DeleteRequestConfirm () |
|
| _DeleteExecute () |
|
| _CheckAuthorization ($Key, $Action) |
|
| _DontAllow () |
|
| _CheckFieldCallBack ($row, $Key) |
|
| _OpenDb () |
|
Definition at line 41 of file CYap.php.
_AddHrefLink |
( |
& |
$clsTable | ) |
|
If allowed, add the link to the add row function private
Definition at line 1507 of file CYap.php.
String quote, for each type of Mysql field the function return the single quote if required
- Parameters
-
string | Mysql field type private |
Definition at line 2199 of file CYap.php.
_BuildControlTable |
( |
|
$tblFields | ) |
|
Build the control object for each field and return it.
- Parameters
-
array | array of all table columns |
- Returns
- array array of all created control to manage each field private
Definition at line 1938 of file CYap.php.
_CheckAuthorization |
( |
|
$Key, |
|
|
|
$Action |
|
) |
| |
Ask to the callback function (if I have one ) if the current user may perform the requested function The allowed action are: RemoveRow, AddRow, ModifyRow If I haven't any callback function return true
- Parameters
-
string | row key to apply the action |
string | action The allowed action are: RemoveRow, AddRow, ModifyRow |
- Returns
- bool true-> perform the job, false user not allowed private
Definition at line 2328 of file CYap.php.
_CheckFieldCallBack |
( |
|
$row, |
|
|
|
$Key |
|
) |
| |
Check if the field name in $Key contains a valid value. If not return false The function perform the check by the provided callback function. If any return true.
- Parameters
-
array | all the row value returned from the form |
string | field name |
- Returns
- bool private
Definition at line 2388 of file CYap.php.
_CompileFieldType |
( |
|
$meta, |
|
|
|
$flags, |
|
|
|
$CfgParam |
|
) |
| |
Build the array that holds all information about the field
- Parameters
-
array | information from mysql |
string | field's flags |
array | information about the field from the configuration paramaters |
- Returns
- array private
Definition at line 2135 of file CYap.php.
Ok, I get the confirm to remove the row, I do it! private
- Returns
- bool successed or not
Definition at line 2285 of file CYap.php.
_DeleteHrefLink |
( |
|
$RowData | ) |
|
If allowed, add the link to the delete function for the currente row
- Parameters
-
- Returns
- string private
Definition at line 1469 of file CYap.php.
_DeleteRequestConfirm |
( |
| ) |
|
Request the confirm to remove the row
private
Definition at line 2234 of file CYap.php.
_DetHrefLink |
( |
|
$RowNumber, |
|
|
|
$RowData |
|
) |
| |
function to show the link to the detail mode for the current record
- Parameters
-
integer | $RowNumber | current row number. First row: 1 |
| array | row values |
- Returns
- string private
Definition at line 1439 of file CYap.php.
Perform the actions required to display the rows (table/detail mode) private
Definition at line 1020 of file CYap.php.
Execute the function related to the given event
- Parameters
-
Definition at line 628 of file CYap.php.
The user is not allowed to perform the operation, show the message private
- Returns
- void
Definition at line 2371 of file CYap.php.
_FillFromRequest |
( |
|
$row, |
|
|
|
$Fields |
|
) |
| |
For each field, check from the request, if I have some value from the previous input field (an insert/modify not approved)
- Parameters
-
array | array holding each field and its values from the database |
- Returns
- array private
Definition at line 2018 of file CYap.php.
_InitializeSessionVar |
( |
| ) |
|
Initialize the session vars
private
Definition at line 598 of file CYap.php.
Send the Javascript code required by Yap to output the tooltip private
Definition at line 1665 of file CYap.php.
Js code to validate the search box form. The base class implementation do nothing (return always true), but it allows extend and customize the checks on value entered into the search box. private
- Returns
- void
- See Also
- show_form()
Definition at line 1127 of file CYap.php.
Load the configuration file
- Parameters
-
Definition at line 243 of file CYap.php.
Parse the output formats from info['outformat'], and converts that information into executable commands. Set the default formats Default formats: NONE: no format applied NUMERIC_IT: numeric number, Italian format x.xxx.xxx NUMERIC_EN: numeric number, English format x,xxx,xxx.xx MONEY_IT : monetary Italian format x.xxx.xxx,xx MONEY_EN : monetary English format x,xxx,xxx.xx DATE_IN : convert timestamps into Italian dormat date day/month/year DATE_US : convert timestamps into US format date month/day/year Initialise the $this->OutFormat array; private
Definition at line 539 of file CYap.php.
Add/Update the record
- Parameters
-
bool | True=add mode (I have not the key value, field id) private |
Definition at line 1852 of file CYap.php.
_ModifyHrefLink |
( |
|
$RowData | ) |
|
If allowed, add the link to the modify function for the currente row
- Parameters
-
- Returns
- string private
Definition at line 1489 of file CYap.php.
Show the form for modify/insert a new row
- Parameters
-
bool | True=add mode (I have not the key value, field id) |
string | record id (used only in Modify Mode) private |
Definition at line 1795 of file CYap.php.
Operation (add/modify) executed with success, draw the messge private
Definition at line 1920 of file CYap.php.
Abort event on modify row function
private
Definition at line 744 of file CYap.php.
Ops, I don't want remove this row private
Definition at line 768 of file CYap.php.
Click on 'abort button' on 'new row' form private
Definition at line 833 of file CYap.php.
Click on 'OK' button on the form 'Command executed' private
Definition at line 776 of file CYap.php.
Click on button show row detail private
Definition at line 710 of file CYap.php.
ok, the modify form is filled, store the new values
private
Definition at line 730 of file CYap.php.
Yes delete this row private
Definition at line 760 of file CYap.php.
Ok, the 'new row' form is filled, store the data private
Definition at line 821 of file CYap.php.
Draw the data from the current status private
Definition at line 871 of file CYap.php.
First time the module is called. Initialize the internal status and don't expect any information from session private
Definition at line 852 of file CYap.php.
Click on 'modify row' link private
Definition at line 720 of file CYap.php.
Click on 'add row' button
private
Definition at line 812 of file CYap.php.
Click on table header to change the order type private
Definition at line 702 of file CYap.php.
Click on table header to change the order type private
Definition at line 694 of file CYap.php.
Click on 'delete row' link private
Definition at line 752 of file CYap.php.
Filled the search form. Parse the new search parameters, and display the new result. private
Definition at line 842 of file CYap.php.
Click on button show rows table private
Definition at line 801 of file CYap.php.
Skip to a new page. This event expects the pag parameter to know which is the new page to show up private
Definition at line 785 of file CYap.php.
Open the connection to the database
Definition at line 2406 of file CYap.php.
_RetrieveFieldType |
( |
|
$res = NULL , |
|
|
|
$ModifyMode = true |
|
) |
| |
Retrieve the field definition from the database
- Parameters
-
resource | return by mysql_query from whom get the field type |
boolean | true if I return the list of the field to be changed (use modify_info) false if I return all field from the table (view mode) |
- Returns
- array private
Definition at line 2069 of file CYap.php.
_RetrieveRow |
( |
|
$KeyValue, |
|
|
|
$Fields |
|
) |
| |
Retrieve the row contents from the database
- Parameters
-
string | key the affected row |
array | fields type |
- Returns
- array private
Definition at line 2041 of file CYap.php.
Run the display function based on mode switch private
Definition at line 976 of file CYap.php.
Store some information into session private
Definition at line 967 of file CYap.php.
Fill the event table with the default handler private
- See Also
- CYap()
Definition at line 653 of file CYap.php.
_ShowDetailMode |
( |
|
$Fields, |
|
|
|
$result |
|
) |
| |
_ShowModifyBox |
( |
|
$Row, |
|
|
|
$Fields, |
|
|
|
$Add, |
|
|
|
$KeyValue, |
|
|
|
$Controls |
|
) |
| |
Build the form for the input/add row
- Parameters
-
array | $Row | array of the value for each field |
array | $Fields | array holding the fields informations from the database |
bool | $Add | I'm adding or modifing the row? |
string | $KeyValue | Value of the index key for the row to modify |
array | $Controls | array carrying the objects required to show the form private |
Definition at line 2005 of file CYap.php.
Call the CYapBox to show th search box. This function is splitted from the previous to allow to override it if you need to cheng the search box layout.
- Parameters
-
string | Html code to show the search form private |
Definition at line 1156 of file CYap.php.
_ShowTableMode |
( |
|
$Fields, |
|
|
|
$result |
|
) |
| |
Javascript code required to draw the tooltips private
Definition at line 1681 of file CYap.php.
Html code require do draw the tool tips This function is expected to run inside the body of the page private
- See Also
- _ToolTipJs()
-
_JsOut()
Definition at line 1774 of file CYap.php.
The function parse the text from the search box and build the information required to perform the query private
Definition at line 1053 of file CYap.php.
Check and load the configuration information about the database connection coming from the caller
- Parameters
-
array | parameters from the caller private |
Definition at line 305 of file CYap.php.
check_modify_info |
( |
|
$info | ) |
|
Check and load the configuration information about the add/modify/delete row from the caller
- Parameters
-
array | parameters from the caller private |
Definition at line 452 of file CYap.php.
Look into the $_REQUEST for the sort parameter.
CGI parameter of -> orderField ot -> Order Type = order direction Session parameter OrderField set OrderDirection set private
Definition at line 1174 of file CYap.php.
Check and load the configuration information coming from the caller
- Parameters
-
array | parameters from the caller private |
Definition at line 359 of file CYap.php.
Check and load the configuration information about the fields to show coming from the caller
- Parameters
-
array | parameters from the caller private |
Definition at line 292 of file CYap.php.
CYap |
( |
|
$search_field = array() , |
|
|
|
$show_field = array() , |
|
|
|
$db_info = array() , |
|
|
|
$show_info = array() , |
|
|
|
$modify_info = array() |
|
) |
| |
Table viev class reference Request (post/get) parameters of: OrderField set when the user click on the header filedname. It change the field to use to order the table. Values: field name. None = use the current order field (session var OrderField) ot: OrderDirection, chenge the order direction on the field specified by of DetailMode: (default false), if true yap shows the full detail row, if false the class shows the table. If it doesn't exist, the class looks for it into the session vars and into the configuration params. Pag: page number, the class shows the request page. If it doesn't exist, the class looks for it into session var (show the same page as the referrer). If the class doesn't find it, the first page will be shown . ev: event occurred to the form. id: row identification value used by update/delete function. If it doesn't set, the class swicth into insert mode (if cmd=m).
public
- Parameters
-
- See Also
- load_previous_data
Definition at line 195 of file CYap.php.
Clean all session parameters. It is usefull to avoid conflict with another execution of this class within the same session
public
Definition at line 581 of file CYap.php.
Return the reference to the object used to manage the firlter form
- Returns
- CYap_clsSearch public
- Since
- 2.1.0
Definition at line 507 of file CYap.php.
InDetailMode - Am I in 'deatil mode'?
- Returns
- boolean private
Definition at line 1652 of file CYap.php.
Class behaviour setup from session or post parameter. The post parameter has the precedence over the session parameter
private
Definition at line 1083 of file CYap.php.
Add to the configuration loaded from config file the parameters passed to constructor function.
- Parameters
-
- Returns
- void private
Definition at line 346 of file CYap.php.
Perform the query on database to retrieve the rows to show
- Returns
- boolean true on success, false on error private
Definition at line 1197 of file CYap.php.
RegisterEvent |
( |
|
$EventName, |
|
|
|
$Handler |
|
) |
| |
Register a new or modify an event, and its handler
- Parameters
-
string | event name |
string | handler public |
- Returns
- boolean
Definition at line 684 of file CYap.php.
select_page from a list of 5 pages before and 5 pages after
private
Definition at line 1622 of file CYap.php.
SetSearchObject |
( |
& |
$newObject | ) |
|
Replace the current search object with the new one. Function usefull to provide a custom made search filter.
- Parameters
-
- Since
- 2.1.0
Definition at line 520 of file CYap.php.
show_detail_row |
( |
|
$DataRow, |
|
|
|
$Show = true , |
|
|
|
$Fields, |
|
|
& |
$clsTable |
|
) |
| |
Show one data row. Detail view
- Parameters
-
array | $DataRow | array associativo con il record restituito dalla query |
boolean | $Show | should I show the table or return it as string? (true->show, false->return as string) |
| object | CYap_DetailView $clsTable reference to the class used to print the table private |
Definition at line 1528 of file CYap.php.
Visualizzazione della maschera per l'input dei campi di ricerca Show the search box. The function make the HTMl code for the form, The box is shown through the module CYapBox (called by the function _ShowSearchBox) private
Definition at line 1139 of file CYap.php.
show_header |
( |
& |
$clsTable | ) |
|
Show the column header Each header is a link to this page with parameters to change the sort direction and field
- Parameters
-
object | CYap_table $clsTable reference to the class used to print the table private |
Definition at line 1330 of file CYap.php.
Page picker (begin,previuos,next,end) private
Definition at line 1569 of file CYap.php.
show_single_row |
( |
|
$RowData, |
|
|
|
$RowNumber, |
|
|
& |
$clsTable |
|
) |
| |
Show one table row
- Parameters
-
array | array associativo con il record restituito dalla query |
integer | number of row's table. First row: 1 |
object | CYap_table $clsTable reference to the class used to print the table private |
Definition at line 1372 of file CYap.php.
Show rows: main function to open the table, and retrieve data from database
private
Definition at line 1230 of file CYap.php.
showpage |
( |
|
$ForcedEvent = '' | ) |
|
function to show the page
- Returns
- void
- Parameters
-
string | forced event public |
Definition at line 886 of file CYap.php.
Istance of the database class abstraction
Definition at line 169 of file CYap.php.
The documentation for this class was generated from the following file:
- D:/programmi/WebDarvin/classistd/yap/CYap.php