| 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(
  | 
        
        
           | 50 | 
           rodolico | 
           58 | 
                    array('Menu', 'menu_home', 'Home Menu', 1),
  | 
        
        
            | 
            | 
           59 | 
                    array('Menu', 'menu_owner', 'Owner Menu', 1),
  | 
        
        
            | 
            | 
           60 | 
                    array('Menu', 'menu_location', 'Location Menu', 1),
  | 
        
        
            | 
            | 
           61 | 
                    array('Menu', 'menu_device', 'Device Menu', 1),
  | 
        
        
            | 
            | 
           62 | 
                    array('Menu', 'menu_report', 'Report Menu', 1),
  | 
        
        
           | 47 | 
           rodolico | 
           63 | 
                    array('Main', 'owner_edit', 'Edit Owner', 1),
  | 
        
        
            | 
            | 
           64 | 
                    array('Main', 'owner_add', 'Add Owner', 1),
  | 
        
        
            | 
            | 
           65 | 
                    array('Main', 'owner_del', 'Delete Owner', 0),
  | 
        
        
            | 
            | 
           66 | 
                    array('Main', 'location_edit', 'Edit Location', 1),
  | 
        
        
            | 
            | 
           67 | 
                    array('Main', 'location_add', 'Add Location', 1),
  | 
        
        
            | 
            | 
           68 | 
                    array('Main', 'location_del', 'Delete Location', 0),
  | 
        
        
            | 
            | 
           69 | 
                    array('Main', 'device_edit', 'Edit Device', 1),
  | 
        
        
            | 
            | 
           70 | 
                    array('Main', 'device_add', 'Add Device', 1),
  | 
        
        
            | 
            | 
           71 | 
                    array('Main', 'device_del', 'Delete Device', 0),
  | 
        
        
           | 46 | 
           rodolico | 
           72 | 
                 );
  | 
        
        
            | 
            | 
           73 | 
              | 
        
        
            | 
            | 
           74 | 
           ?>
  | 
        
        
            | 
            | 
           75 | 
              |