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(
|
61 |
rodolico |
10 |
// this will be the display label on the form
|
|
|
11 |
'label' => 'Restrictions',
|
|
|
12 |
// the input type to use for data entry
|
|
|
13 |
'html type' => 'textarea',
|
|
|
14 |
// you can only edit this if an admin and changing someone
|
|
|
15 |
// else' record
|
|
|
16 |
'restrict' => true,
|
|
|
17 |
// will be displayed on a hover in HTML5 (ie, title=)
|
|
|
18 |
'instructions' => 'Enter code to restrict user access. See documentation',
|
|
|
19 |
// this is entered in an empty box, ie placeholder=
|
|
|
20 |
'hint' => '[owner]<br />ownername',
|
|
|
21 |
// for Data Source
|
|
|
22 |
'dbColumn' => 'restrictions',
|
|
|
23 |
// actual mySQL column type
|
|
|
24 |
'type' => 'text',
|
|
|
25 |
// set it to not null if we build the table ourselves
|
|
|
26 |
'required' => false
|
|
|
27 |
),
|
46 |
rodolico |
28 |
'email' => array(
|
61 |
rodolico |
29 |
// this will be the display label on the form
|
|
|
30 |
'label' => 'email address',
|
|
|
31 |
// the input type to use for data entry
|
|
|
32 |
'html type' => 'text',
|
|
|
33 |
// you can only edit this if an admin and changing someone
|
|
|
34 |
// else' record
|
|
|
35 |
'restrict' => false,
|
|
|
36 |
// will be displayed on a hover in HTML5 (ie, title=)
|
|
|
37 |
'instructions' => 'Used to communicate with user',
|
|
|
38 |
// this is entered in an empty box, ie placeholder=
|
|
|
39 |
'hint' => 'Enter Valid e-mail address',
|
|
|
40 |
// for Data Source
|
|
|
41 |
'dbColumn' => 'email',
|
|
|
42 |
// actual mySQL column type, varchar(64)
|
|
|
43 |
'type' => 'varchar',
|
|
|
44 |
'size' => 64,
|
|
|
45 |
// set it to not null if we build the table ourselves
|
|
|
46 |
'required' => false,
|
|
|
47 |
),
|
|
|
48 |
'created' => array(
|
|
|
49 |
'label' => 'Date Created',
|
|
|
50 |
'html type' => 'text',
|
|
|
51 |
'restrict' => true,
|
|
|
52 |
'instructions' => 'Enter date user was added',
|
|
|
53 |
'hint' => '2021-01-01',
|
|
|
54 |
'dbColumn' => 'created',
|
|
|
55 |
'type' => 'date',
|
|
|
56 |
'required' => true
|
|
|
57 |
),
|
|
|
58 |
'removed' => array(
|
|
|
59 |
'label' => 'Date Removed',
|
|
|
60 |
'html type' => 'text',
|
|
|
61 |
'restrict' => true,
|
|
|
62 |
'instructions' => 'Enter date user was removed',
|
|
|
63 |
'hint' => '2021-01-01',
|
|
|
64 |
'dbColumn' => 'removed',
|
|
|
65 |
'type' => 'date',
|
|
|
66 |
'required' => false
|
46 |
rodolico |
67 |
)
|
61 |
rodolico |
68 |
) // fields
|
|
|
69 |
) // users
|
|
|
70 |
) // tables
|
63 |
rodolico |
71 |
); // customFields
|
46 |
rodolico |
72 |
|
|
|
73 |
$permissions = array(
|
50 |
rodolico |
74 |
array('Menu', 'menu_home', 'Home Menu', 1),
|
|
|
75 |
array('Menu', 'menu_owner', 'Owner Menu', 1),
|
|
|
76 |
array('Menu', 'menu_location', 'Location Menu', 1),
|
|
|
77 |
array('Menu', 'menu_device', 'Device Menu', 1),
|
|
|
78 |
array('Menu', 'menu_report', 'Report Menu', 1),
|
47 |
rodolico |
79 |
array('Main', 'owner_edit', 'Edit Owner', 1),
|
|
|
80 |
array('Main', 'owner_add', 'Add Owner', 1),
|
|
|
81 |
array('Main', 'owner_del', 'Delete Owner', 0),
|
|
|
82 |
array('Main', 'location_edit', 'Edit Location', 1),
|
|
|
83 |
array('Main', 'location_add', 'Add Location', 1),
|
|
|
84 |
array('Main', 'location_del', 'Delete Location', 0),
|
|
|
85 |
array('Main', 'device_edit', 'Edit Device', 1),
|
|
|
86 |
array('Main', 'device_add', 'Add Device', 1),
|
|
|
87 |
array('Main', 'device_del', 'Delete Device', 0),
|
46 |
rodolico |
88 |
);
|
|
|
89 |
|
|
|
90 |
?>
|
|
|
91 |
|