Public Method Details |
admin_panel |
public void admin_panel( object application &$app, [ integer $widgets ] )
|
|
Initialise everything.
|
Parameter |
|
|
|
|
Returns |
void |
|
close |
public void close( )
|
|
Finish HTML document and exit.
|
Returns |
void |
|
&instance |
public object admin_panel &instance( )
|
|
Get reference to the one and only instance of this class.
Warning: documentation is missing.
|
Returns |
object admin_panel |
|
open_context |
public void open_context( object cursor &$cursor )
|
|
Open a new context.
|
Parameter |
|
|
Returns |
void |
|
close_context |
public void close_context( )
|
|
Return to former context.
|
Returns |
void |
|
use_filter |
public void use_filter( string $filtername )
|
|
Set form filter function.
Filters are used indepently from the context.
|
Parameter |
|
string |
$filtername |
|
|
Name of the filter function. |
|
Returns |
void |
|
&get_cursor |
public object cursor &get_cursor( )
|
|
Get the cursor used in the current context.
|
Returns |
object cursor |
|
clear_record_cache |
public void clear_record_cache( )
|
|
Clear the record cache.
|
Returns |
void |
|
value |
public void value( string $field_name )
|
|
Get a field from a record the current context points to.
If there's a value stored in the record cache it is returned instead.
|
Parameter |
|
|
Returns |
void |
|
set_value |
public void set_value( string $field, mixed $val )
|
|
Set a field in the record cache.
|
Parameter |
|
string |
$field |
|
|
Field name. |
|
|
mixed |
$val |
|
|
New value to set. |
|
Returns |
void |
|
header |
public void header( string $header, [ string $comp ] )
|
|
Print document header.
|
Parameter |
|
|
|
string |
$comp |
= >>''<< |
|
Copyright and/or version info. |
|
Returns |
void |
|
headline |
public void headline( string $text )
|
|
Print a headline.
|
Parameter |
|
|
Returns |
void |
|
msgbox |
public void msgbox( string $message, [ integer $color ] )
|
|
Print an informal message box.
|
Parameter |
|
|
|
integer |
$color |
= >>0<< |
|
Color in HTML attribute format. |
|
Returns |
void |
|
panic |
public void panic( string $message )
|
|
Print error message and die.
|
Parameter |
|
|
Returns |
void |
|
confirm |
public void confirm( string $msg, string $option_yes, object event $event_yes, string $option_no, object event $event_no, [ integer $color ] )
|
|
Print confirmation box.
|
Parameter |
|
string |
$msg |
|
|
Question to the user. |
|
|
string |
$option_yes |
|
|
Label for confirming option. |
|
|
object event |
$event_yes |
|
|
Event to trigger for confirming option. |
|
|
string |
$option_no |
|
|
Label for non-confirming option. |
|
|
object event |
$event_no |
|
|
Event to trigger for non-confirming option. |
|
|
integer |
$color |
= >>0<< |
|
Color for question in HTML attribute format. |
|
Returns |
void |
|
set_default_formevent |
public void set_default_formevent( object event $event )
|
|
Set default form event for current context.
|
Parameter |
|
|
Returns |
void |
|
open_form |
public void open_form( [ integer $default_event ] )
|
|
Open form that is posted to form parser form_parser().
|
Parameter |
|
integer |
$default_event |
= >>0<< |
|
Default form event used when form is posted without submit
button. |
|
Returns |
void |
|
close_form |
public void close_form( )
|
|
Close an opened form.
This function dies if there's no opened form.
|
Returns |
void |
|
open_table |
public void open_table( integer $attrs )
|
|
Open a table.
|
Parameter |
|
integer |
$attrs |
|
|
Warning: documentation is missing. |
|
Returns |
void |
|
close_table |
public void close_table( )
|
|
Close an opened table.
This function dies if there's no opened table.
|
Returns |
void |
|
open_row |
public void open_row( integer $attrs )
|
|
Open a row.
|
Parameter |
|
integer |
$attrs |
|
|
Warning: documentation is missing. |
|
Returns |
void |
|
close_row |
public void close_row( )
|
|
Close an opened row.
This function dies if there's no opened row.
|
Returns |
void |
|
open_cell |
public void open_cell( integer $attrs )
|
|
Open a cell.
|
Parameter |
|
integer |
$attrs |
|
|
Warning: documentation is missing. |
|
Returns |
void |
|
close_cell |
public void close_cell( )
|
|
Close an opened cell.
This function dies if there's no opened cell.
|
Returns |
void |
|
table_headers |
public void table_headers( array $titles, integer $attrs )
|
|
Create table header from array of strings.
|
Parameter |
|
array |
$titles |
|
|
Column titles. |
|
|
integer |
$attrs |
|
|
Warning: documentation is missing. |
|
Returns |
void |
|
show |
public void show( string $field )
|
|
Print contents of a record's field.
|
Parameter |
|
string |
$field |
|
|
Field name. |
|
Returns |
void |
|
show_ref |
public void show_ref( string $field, string $source, string $column )
|
|
Create cell with contents of row in a referenced table.
|
Parameter |
|
string |
$field |
|
|
Name of field that references the source. |
|
|
string |
$source |
|
|
Name of table that is references. |
|
|
string |
$column |
|
|
Name of the column in referenced table that is printed. |
|
Returns |
void |
|
paragraph |
public void paragraph( string $html )
|
|
Print a paragraph.
A paragraph reopens a table so one can start with a new number ofcolumns. Outside tables a paragraph is printed.
|
Parameter |
|
string |
$html |
|
|
Warning: documentation is missing. |
|
Returns |
void |
|
open_widget |
public void open_widget( [ string $field, integer $attr ] )
|
|
Open a row and cell for a widget and set the current field.
The field name is used for highlighting.
|
Parameter |
|
string |
$field |
= >>''<< |
|
Currently accessed field. |
|
|
integer |
$attr |
= >>0<< |
|
HTML attributes for the opened cell, keyed by attribute name. |
|
Returns |
void |
|
close_widget |
public void close_widget( )
|
|
Close opened call and row.
The field name for highlighting is reset.
|
Returns |
void |
|
print_text |
public void print_text( string $text )
|
|
Print text.
Instead of php's echo function print_text() should be used so thewidget set can control the layout.
|
Parameter |
|
|
Returns |
void |
|
label |
public void label( string $text )
|
|
Print label.
This function prints a text which looks different to thatgenerated by print_text() amd should have a descriptive character.
|
Parameter |
|
|
Returns |
void |
|
show_mime_image |
public void show_mime_image( string $field, string $type )
|
|
Print image.
|
Parameter |
|
string |
$field |
|
|
Current record's field that contains the image. |
|
|
string |
$type |
|
|
MIME type of the image. |
|
Returns |
void |
|
inputline |
public void inputline( string $field, integer $maxlen )
|
|
Print an input line.
|
Parameter |
|
|
|
integer |
$maxlen |
|
|
Width of line in number of characters. |
|
Returns |
void |
|
password |
public void password( string $field, integer $maxlen, string $label )
|
|
Print a password line.
The content of the line is never shown.
|
Parameter |
|
|
|
integer |
$maxlen |
|
|
Width of line in number of characters. |
|
|
string |
$label |
|
|
Warning: documentation is missing. |
|
Returns |
void |
|
radiobox |
public void radiobox( string $field, string $label_true, string $label_false, [ mixed $value_true, mixed $value_false ] )
|
|
Print boolean radio box.
|
Parameter |
|
|
|
string |
$label_true |
|
|
Label text for 'true' option. |
|
|
string |
$label_false |
|
|
Label text for 'false' option. |
|
|
mixed |
$value_true |
= >>1<< |
|
Data for 'true' option. |
|
|
mixed |
$value_false |
= >>0<< |
|
Data for 'false' option. |
|
Returns |
void |
|
select_id |
public void select_id( string $field, string $source, string $column, string $id, [ string $where ] )
|
|
Select an entry in a foureign table and store its primary key.
|
Parameter |
|
|
|
string |
$source |
|
|
Name of foureign table. |
|
|
string |
$column |
|
|
Name of column in foureign table that is printed. |
|
|
string |
$id |
|
|
Name of the primary key column. |
|
|
string |
$where |
= >>''<< |
|
WHERE clause to use to select the records from the foureign
table (without WHERE keyword). |
|
Returns |
void |
|
textarea |
public void textarea( string $field, integer $width, integer $height )
|
|
Print textarea.
|
Parameter |
|
|
|
integer |
$width |
|
|
Number of columns. |
|
|
integer |
$height |
|
|
Number of rows. |
|
Returns |
void |
|
fileform |
public void fileform( string $field, [ string $typefield, string $filenamefield ] )
|
|
Print file upload widget.
|
Parameter |
|
|
|
string |
$typefield |
= >>''<< |
|
Name of field that will contain the uploaded file's MIME type. |
|
|
string |
$filenamefield |
= >>''<< |
|
Name of field that will contain the uploaded file's original
file name. |
|
Returns |
void |
|
checkbox |
public void checkbox( string $field, [ integer $event ] )
|
|
Print a checkbox.
Posting a checkbox will result in value 0 or 1 for the field.
|
Parameter |
|
|
|
integer |
$event |
= >>0<< |
|
This is probably unused... |
|
Returns |
void |
|
reset_button |
public void reset_button( [ string $label ] )
|
|
Print a reset button.
|
Parameter |
|
string |
$label |
= >>'reset'<< |
|
Label for the button. |
|
Returns |
void |
|
submit_name |
public string submit_name( [ integer $event ] )
|
|
Get name for a submit button.
|
Parameter |
|
integer |
$event |
= >>0<< |
|
Event to use for the submit button. |
|
Returns |
string Form element name. |
|
submit_button |
public void submit_button( string $label, [ integer $view ] )
|
|
Print a submit button.
|
Parameter |
|
string |
$label |
|
|
Label for the button. |
|
|
integer |
$view |
= >>0<< |
|
Event to use for the submit button. |
|
Returns |
void |
|
submit_image |
public void submit_image( string $label, string $image, [ integer $view ] )
|
|
Print a submit image.
|
Parameter |
|
string |
$label |
|
|
Label for the button. |
|
|
string |
$image |
|
|
URL to image. |
|
|
integer |
$view |
= >>0<< |
|
Event to use for the submit button. |
|
Returns |
void |
|
use_anchor |
public void use_anchor( )
|
|
Switch on use of anchors.
If a link points to the current event handler, an anchor is usedto scroll to the position of the triggered link.
|
Returns |
void |
|
no_anchor |
public void no_anchor( )
|
|
Switch off use of anchors.
|
Returns |
void |
|
link |
public void link( string $label, object event $event, [ string $fakename ] )
|
|
Print a link.
|
Parameter |
|
string |
$label |
|
|
A text for the link. |
|
|
object event |
$event |
|
|
The event that is triggered when the link is invoked. |
|
|
string |
$fakename |
= >>''<< |
|
A fake filename for file downloads. |
|
Returns |
void |
|
fileurl |
public void fileurl( string $source, string $field, string $key, string $mime_type, integer $data )
|
|
# Create a url of a file.
|
Parameter |
|
string |
$source |
|
|
Source/table name of the file. |
|
|
string |
$field |
|
|
Field where the file is stored. |
|
|
string |
$key |
|
|
MIME type of the file. |
|
|
string |
$mime_type |
|
|
Primary key of the record. |
|
|
integer |
$data |
|
|
Warning: documentation is missing. |
|
Returns |
void |
|
url |
public void url( object event &$event )
|
|
Create URL from event object.
This function must be used instead of the application class functions.
|
Parameter |
|
object event |
&$event |
|
|
Event to trigger if URL is invoked. |
|
Returns |
void |
|
new_formfield |
public void new_formfield( string $field, [ integer $event, integer $f ] )
|
|
Create form name for a field in a particular record.
|
Parameter |
|
|
|
integer |
$event |
= >>0<< |
|
Event to trigger if widget is a submit button. |
|
|
integer |
$f |
= >>0<< |
|
For internal use. |
|
Returns |
void |
|