46 |
rodolico |
1 |
<?php
|
|
|
2 |
/*
|
|
|
3 |
* This contains the structure to be added to the user class
|
|
|
4 |
*/
|
|
|
5 |
$customFields = array(
|
|
|
6 |
'tables' => array(
|
|
|
7 |
'users' => array(
|
|
|
8 |
'fields' => array(
|
|
|
9 |
'restrictions' => array(
|
|
|
10 |
// For Users class
|
|
|
11 |
// this will be the display label on the form
|
|
|
12 |
'label' => 'Limit via SQL where clause',
|
|
|
13 |
// the input type to use for data entry
|
|
|
14 |
'html type' => 'textarea',
|
|
|
15 |
// you can only edit this if an admin and changing someone
|
|
|
16 |
// else' record
|
|
|
17 |
'restrict' => true,
|
|
|
18 |
// will be displayed on a hover in HTML5 (ie, title=)
|
|
|
19 |
'instructions' => 'This will be added to every SQL query to limit access, or 1=1 for everything',
|
|
|
20 |
// this is entered in an empty box, ie placeholder=
|
|
|
21 |
'hint' => 'Enter an SQL where clause',
|
|
|
22 |
// for Data Source
|
|
|
23 |
'dbColumn' => 'where_clause',
|
|
|
24 |
// actual mySQL column type
|
|
|
25 |
'type' => 'text',
|
|
|
26 |
// set it to not null if we build the table ourselves
|
|
|
27 |
'required' => false,
|
|
|
28 |
// set a default value
|
|
|
29 |
'default' => '1=1'
|
|
|
30 |
),
|
|
|
31 |
'email' => array(
|
|
|
32 |
// For Users class
|
|
|
33 |
// this will be the display label on the form
|
|
|
34 |
'label' => 'email address',
|
|
|
35 |
// the input type to use for data entry
|
|
|
36 |
'html type' => 'text',
|
|
|
37 |
// you can only edit this if an admin and changing someone
|
|
|
38 |
// else' record
|
|
|
39 |
'restrict' => true,
|
|
|
40 |
// will be displayed on a hover in HTML5 (ie, title=)
|
|
|
41 |
'instructions' => 'Used to communicate with user',
|
|
|
42 |
// this is entered in an empty box, ie placeholder=
|
|
|
43 |
'hint' => 'Enter Valid e-mail address',
|
|
|
44 |
// for Data Source
|
|
|
45 |
'dbColumn' => 'email',
|
|
|
46 |
// actual mySQL column type, varchar(64)
|
|
|
47 |
'type' => 'varchar',
|
|
|
48 |
'size' => 64,
|
|
|
49 |
// set it to not null if we build the table ourselves
|
|
|
50 |
'required' => false,
|
|
|
51 |
),
|
|
|
52 |
)
|
|
|
53 |
)
|
|
|
54 |
)
|
|
|
55 |
);
|
|
|
56 |
|
|
|
57 |
$permissions = array(
|
|
|
58 |
array('Main', 'menu_home', 'Home Menu', 1),
|
|
|
59 |
array('Main', 'menu_owner', 'Owner Menu', 1),
|
|
|
60 |
array('Main', 'menu_location', 'Location Menu', 1),
|
|
|
61 |
array('Main', 'menu_device', 'Device Menu', 1),
|
|
|
62 |
array('Main', 'menu_report', 'Report Menu', 1),
|
|
|
63 |
);
|
|
|
64 |
|
|
|
65 |
?>
|
|
|
66 |
|