Rev 47 | Rev 51 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
<?php
/*
* This contains the structure to be added to the user class
*/
$customFields = array(
'tables' => array(
'users' => array(
'fields' => array(
'restrictions' => array(
// For Users class
// this will be the display label on the form
'label' => 'Limit via SQL where clause',
// the input type to use for data entry
'html type' => 'textarea',
// you can only edit this if an admin and changing someone
// else' record
'restrict' => true,
// will be displayed on a hover in HTML5 (ie, title=)
'instructions' => 'This will be added to every SQL query to limit access, or 1=1 for everything',
// this is entered in an empty box, ie placeholder=
'hint' => 'Enter an SQL where clause',
// for Data Source
'dbColumn' => 'where_clause',
// actual mySQL column type
'type' => 'text',
// set it to not null if we build the table ourselves
'required' => false,
// set a default value
'default' => '1=1'
),
'email' => array(
// For Users class
// this will be the display label on the form
'label' => 'email address',
// the input type to use for data entry
'html type' => 'text',
// you can only edit this if an admin and changing someone
// else' record
'restrict' => true,
// will be displayed on a hover in HTML5 (ie, title=)
'instructions' => 'Used to communicate with user',
// this is entered in an empty box, ie placeholder=
'hint' => 'Enter Valid e-mail address',
// for Data Source
'dbColumn' => 'email',
// actual mySQL column type, varchar(64)
'type' => 'varchar',
'size' => 64,
// set it to not null if we build the table ourselves
'required' => false,
),
)
)
)
);
$permissions = array(
array('Menu', 'menu_home', 'Home Menu', 1),
array('Menu', 'menu_owner', 'Owner Menu', 1),
array('Menu', 'menu_location', 'Location Menu', 1),
array('Menu', 'menu_device', 'Device Menu', 1),
array('Menu', 'menu_report', 'Report Menu', 1),
array('Main', 'owner_edit', 'Edit Owner', 1),
array('Main', 'owner_add', 'Add Owner', 1),
array('Main', 'owner_del', 'Delete Owner', 0),
array('Main', 'location_edit', 'Edit Location', 1),
array('Main', 'location_add', 'Add Location', 1),
array('Main', 'location_del', 'Delete Location', 0),
array('Main', 'device_edit', 'Edit Device', 1),
array('Main', 'device_add', 'Add Device', 1),
array('Main', 'device_del', 'Delete Device', 0),
);
?>