Subversion Repositories computer_asset_manager_v2

Rev

Rev 44 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

<?php

   // add php_library_v2 to include path. This assumes it is a subdirectory of the directory the config file is in
   ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . realpath( __DIR__ . '/php_library_v2' ) ); 
   // add php_users to include path. This assumes it is a subdirectory of the directory the config file is in
   ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . realpath( __DIR__ . '/php_users' ) ); 

   global $configuration;
   $configuration = yaml_parse_file( './camp2_config.yaml' );
   
   // fields for the Users class, adds where_clause, a TEXT object
   global $customFields = array( 
      'tables' => array(
         'users' => array(
            'fields' => array(
               'where_clause' => 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'
                     )
                  )
               )
            )
      );
   
   
?>