Home « Server software «
Documentation: overlays/contact.php
class Contact extends Overlay - Contact information
This overlay is aiming to capture contact information related to individuals. It also shows how to put the information in a separate table of the database.It can be derived and transformed to accomodate any variation.
This script is a reference file of this system.
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com
- Agnès Rambaud
- GnapZ
- Geasm
get() - Get one record from the dedicated table
function &get($id)
- $id - int record id
- returns the resulting $row array
get_fields() - Build the list of fields for one overlay
function get_fields($host, $capability='?')
- $host - the hosting attributes
- $capability='?' - string surfer capability ('?', 'M', or 'A')
- returns a list of ($label, $input, $hint)
Voir aussi:
get_id() - Identify one instance
function get_id()
This function returns a string that identify uniquely one overlay instance. When this information is saved, it can be used later on to retrieve one page and its content.@returns a unique string, or NULL
Voir aussi:
get_label() - Get an overlaid label
function get_label($name, $action='view')
- $name - string the target label
- $action='view' - string the on-going action
- returns the label to use
- 'edit' the modification of an existing object
- 'delete' the deleting form
- 'new' the creation of a new object
- 'view' a displayed object
Voir aussi:
get_text() - Display the content of one classic car
function get_text($variant='view', $host=NULL)
- $variant='view' - string the on-going action
- $host=NULL - array the hosting record
- returns some HTML to be inserted into the resulting page
- 'box' - displayed in a box
- 'list' - part of a list
- 'view' - in the main viewing panel
Voir aussi:
parse_fields() - Retrieve the content of one modified overlay
function parse_fields($fields)
- $fields - the fields as filled by the end user
- returns the updated fields
Voir aussi:
remember() - Remember an action once it's done
function remember($variant, $host, $capability='?')
- $variant - string the action 'insert', 'update' or 'delete'
- $host - array the hosting record
- $capability='?' - string surfer capability ('?', 'M', or 'A')
- returns FALSE on error, TRUE otherwise
- 'insert' - insert a new record in the side table
- 'update' - update an existing record
- 'delete' - suppress a record in the database
To enforce database consistency, and in case of 'update' the function deletes the record and create it again.
setup() - Create tables for classic_cars
function setup()