Example #1
0
 function __construct()
 {
     $this->conf = array('path' => 'admin/schedules');
     parent::__construct(User_model::LEVEL_MANAGER);
     /* check how many locations do we have */
     $lm = new Location_Model();
     $location_count = $lm->count();
     $this->data['location_count'] = $location_count;
     /* check how many staff do we have */
     $um = new User_Model();
     $staff_count = $um->count_staff();
     $this->data['staff_count'] = $staff_count;
     $um = new User_Model();
     $staffs = $um->get()->all;
     $this->data['staffs'] = array();
     foreach ($staffs as $sta) {
         $this->data['staffs'][$sta->id] = $sta;
     }
     /* also get all shift templates */
     $shift_template_titles = array();
     $stm = new Shift_Template_Model();
     $stm->get();
     foreach ($stm->get() as $st) {
         //			$shift_template_titles[ $st->start . '-' . $st->end ] = $st->name;
     }
     $this->data['shift_template_titles'] = $shift_template_titles;
 }
Example #2
0
 function __construct()
 {
     $this->conf = array('path' => 'conf/admin');
     parent::__construct(User_model::LEVEL_ADMIN);
     $defaults = array();
     $fields = $this->config->items('settings');
     foreach ($fields as $fn => $f) {
         $defaults[$fn] = $this->app_conf->get($fn);
     }
     $this->hc_form->set_defaults($defaults);
 }
 function __construct($user_level = 0, $default_path = '')
 {
     /*
     $this->conf = array(
     	'model'			=> 'Category_model',
     	'path'			=> 'admin/categories',
     	);
     */
     parent::__construct($user_level, $default_path);
     $this->per_page = 0;
     $this->load->model($this->conf['model']);
     $this->model = $this->conf['model'];
 }
Example #4
0
 function __construct()
 {
     $this->conf = array('path' => 'admin/stats');
     parent::__construct(User_model::LEVEL_ADMIN);
 }