Exemplo n.º 1
0
 public function index()
 {
     if (!$this->user->is_group('admin')) {
         set_message_note($this->lang->line('error_invalid_access'), MESSAGE_NOTE_FAILURE);
         redirect('admin/home');
     }
     ini_set('memory_limit', '64M');
     /*		
     		$this->set_template('admin');
     
     		$this->load->helper(array('toolbar', 
     						'form_tools', 
     						'user_helper',
     						'format_datetime',
     						'log')
     				);
     		if ( $this->config->item('autoload_language_folder') ) {
     			$this->set_autoload_language_folder( $this->config->item('autoload_language_folder'));
     		}
     		
     		$this->load->library('menu', array('config'=>'admin/menu'));
     		$this->set_output_data('menubar', $this->menu->show());
     		$this->set_output_data('user', $this->user);
     */
     $this->load->library('database_manager');
     $files = $this->database_manager->get_upgrade_file_list();
     toolbar_process_task($this);
     $data = array('rows' => $files, 'version' => $this->database_manager->get_current_version());
     $this->load->view('admin/dbupgrade_list', $data);
 }
Exemplo n.º 2
0
 public function index()
 {
     $this->load->model(array('sysconf_model'));
     if (!$this->sysconf_model->load_by_id(1)) {
         set_message_note($this->lang->line('error_no_record'), MESSAGE_NOTE_FAILURE);
         redirect('admin/sites');
     }
     $this->load->library(array('form_validation'));
     $this->form_validation->set_rules('autocall_confirm', 'Automatic Call Confirmation', '');
     $this->form_validation->set_rules('autocall_time', 'Automatic Call Confirmation Time Before', 'required');
     $this->form_validation->set_rules('check_in_alert', 'Check-in Reminder SMS', '');
     $this->form_validation->set_rules('check_out_alert', 'Check-out Reminder SMS', '');
     $this->form_validation->set_rules('sop_alert', 'SOP Alert By Calls', '');
     $this->form_validation->set_rules('sop_alert_sms', 'SOP Alert By SMS', '');
     $this->form_validation->set_rules('autoleave_plan_call', 'Automatic Leave Planning Calls', '');
     $this->form_validation->set_rules('call_gaurdhouse', 'Calls to Guard House at Sites instead of calling Staff', '');
     $this->form_validation->set_rules('sys_timezone', 'Timezone', 'required');
     $this->form_validation->set_rules('ofc_number', 'Office Number', '');
     $timezones = $this->sysconf_model->get_timezones();
     $this->_row = $this->sysconf_model->get_row();
     $this->_row = $this->form_validation->get_input_row($this->_row);
     toolbar_process_task($this);
     $data = array('row' => $this->_row, 'timezone' => $timezones);
     $this->load->view('admin/system_config', $data);
 }
Exemplo n.º 3
0
 public function index()
 {
     if (!$this->user->is_group('admin')) {
         set_message_note($this->lang->line('error_invalid_access'), MESSAGE_NOTE_FAILURE);
         redirect('admin/home');
     }
     $this->load->library('database_manager');
     $files = $this->database_manager->get_backup_file_list();
     toolbar_process_task($this);
     $data = array('rows' => $files, 'version' => $this->database_manager->get_current_version());
     $this->load->view('admin/dbbackup_list', $data);
 }
Exemplo n.º 4
0
 public function index()
 {
     $this->load->library(array('form_validation'));
     $this->form_validation->set_rules('site_id', 'Site', 'required');
     $this->form_validation->set_rules('staff_id', 'Staff', 'required');
     $this->form_validation->set_rules('text_msg', 'Message', 'required');
     //$this->_filter = filter_load('filter', array('name_match'=>'','is_published'=>'True'));
     //$sites = $this->site_model->get_rows($this->_filter);
     toolbar_process_task($this);
     $data = array('row' => $this->_row, 'site_list' => $this->site_model->get_dropdown_list('Select Site'), 'staff_list' => $this->staff_model->get_dropdown_list('Select Staff'));
     $this->load->view('admin/broadcast_sms', $data);
 }
Exemplo n.º 5
0
 public function index()
 {
     $this->load->model(array('twilio_model'));
     if (!$this->twilio_model->load_by_id(1)) {
         set_message_note($this->lang->line('error_no_record'), MESSAGE_NOTE_FAILURE);
         redirect('admin/sites');
     }
     $this->load->library(array('form_validation'));
     $this->form_validation->set_rules('twilio_sid', 'SID', 'required');
     $this->form_validation->set_rules('twilio_token', 'Token', 'required');
     $this->form_validation->set_rules('twilio_number', 'From Number', 'required');
     $this->_row = $this->twilio_model->get_row();
     $this->_row = $this->form_validation->get_input_row($this->_row);
     toolbar_process_task($this);
     $data = array('row' => $this->_row);
     $this->load->view('admin/twilio_config', $data);
 }
Exemplo n.º 6
0
 public function edit($id)
 {
     if (!$this->reply_status_model->load_by_id(intval($id))) {
         set_message_note($this->lang->line('error_no_record'), MESSAGE_NOTE_FAILURE);
         redirect('admin/reply_status');
     }
     $this->load->library(array('form_validation'));
     $this->load->helper('jscolor_helper');
     $this->form_validation->set_rules('number', 'Number', '');
     $this->form_validation->set_rules('title', 'Title', 'required');
     $this->form_validation->set_rules('code', 'Code', 'required');
     $this->form_validation->set_rules('background_color', 'Background Color', '');
     $this->_row = $this->reply_status_model->get_row();
     $this->_row = $this->form_validation->get_input_row($this->_row);
     toolbar_process_task($this);
     $data = array('row' => $this->_row);
     $this->load->view('admin/reply_status_edit', $data);
 }
Exemplo n.º 7
0
 public function edit($id)
 {
     $this->load->helper('arcgis_helper');
     $this->park_model->load_by_id($id);
     $this->load->model('parks/park_point_model');
     $this->form_validation->set_rules('title', 'Title', 'required');
     $this->form_validation->set_rules('location', 'Location', 'required');
     $this->form_validation->set_rules('facilities', 'Facilities', '');
     $this->form_validation->set_rules('size', 'Size', '');
     $this->form_validation->set_rules('vistor_info', 'Vistor Info', '');
     $this->form_validation->set_rules('map_link', 'Map Link', '');
     $this->form_validation->set_rules('web_link', 'Web Link', '');
     $this->form_validation->set_rules('brochure_link', 'Brochure Link', '');
     $this->form_validation->set_rules('pos_x', 'Pos Y', '');
     $this->form_validation->set_rules('pos_y', 'Pos Y', '');
     $this->_row = $this->park_model->get_row();
     $this->_row = $this->form_validation->get_input_row($this->_row);
     if (toolbar_process_task($this)) {
         redirect(uri_string());
     }
     $data = array('row' => $this->_row, 'point_rows' => $this->park_point_model->get_rows(array('park_id' => $this->park_model->id)), 'point_type_list' => $this->park_point_model->get_type_dropdown_list('Select Type'));
     $this->load->view('park_edit', $data);
 }
Exemplo n.º 8
0
 public function edit($id)
 {
     if (!$this->site_model->load_by_id(intval($id))) {
         set_message_note($this->lang->line('error_no_record'), MESSAGE_NOTE_FAILURE);
         redirect('admin/sites');
     }
     $this->load->model(array('staff_model', 'site_shift_model', 'postal_district_model', 'staff_assignment_model'));
     $this->load->helper('jquery_tab_helper');
     $this->load->library(array('form_validation'));
     $this->form_validation->set_rules('name', 'Name', 'required');
     $this->form_validation->set_rules('code', 'Code', 'required');
     $this->form_validation->set_rules('street_number', 'Street Number', '');
     $this->form_validation->set_rules('street_name', 'Street Name', '');
     $this->form_validation->set_rules('unit_number', 'Unit Number', '');
     $this->form_validation->set_rules('city', 'City', '');
     $this->form_validation->set_rules('postcode', 'Post Code', '');
     $this->form_validation->set_rules('country', 'Country', '');
     $this->form_validation->set_rules('is_published', 'Published', '');
     $this->form_validation->set_rules('contract_sdate', 'Contract Start Date', '');
     $this->form_validation->set_rules('contract_edate', 'Contract End Date', '');
     $this->_row = $this->site_model->get_row();
     $this->_row = $this->form_validation->get_input_row($this->_row);
     toolbar_process_task($this);
     $data = array('row' => $this->_row, 'shift_rows' => $this->site_shift_model->get_rows(array('site_id' => $this->site_model->id)), 'postal_disctrict_row' => reset($this->postal_district_model->get_rows(array('postcode' => $this->_row->postcode))), 'assignment_rows' => $this->staff_assignment_model->get_rows(array('site_id' => $this->site_model->id)), 'shift_type_list' => $this->staff_assignment_model->get_shift_type_dropdown_list('Shift Type'), 'assign_type_list' => $this->staff_assignment_model->get_assign_type_dropdown_list('Assign Type'), 'staff_list' => $this->staff_model->get_dropdown_list('Select Staff'), 'workingdays_rows' => $this->site_model->get_workingdays_rows(array('site_id' => $this->site_model->id)));
     //var_dump($this->staff_model->get_dropdown_list('Select Staff'));exit;
     $this->load->view('admin/site_edit', $data);
 }
Exemplo n.º 9
0
 public function edit($id)
 {
     if (!$this->user_model->load_by_id(intval($id))) {
         set_message_note($this->lang->line('error_no_user'), MESSAGE_NOTE_FAILURE);
         redirect('admin/users');
     }
     $this->load->library('form_validation');
     $this->form_validation->set_rules('name', 'Name', 'required');
     $this->form_validation->set_rules('username', 'Username', 'required');
     $this->form_validation->set_rules('password', 'Password', '');
     $this->form_validation->set_rules('email', 'Email', 'required');
     $this->form_validation->set_rules('is_published', 'Published', '');
     $this->form_validation->set_rules('group_id', 'User Group', '');
     $this->_row = $this->user_model->get_row();
     $this->_row->password = '';
     $this->_row = $this->form_validation->get_input_row($this->_row);
     toolbar_process_task($this);
     $view_name = 'admin/user_edit';
     $user_edit_link = '';
     $data = array('row' => $this->_row, 'group_name' => $this->user_model->get_group_name(), 'groups' => $this->user_group_model->get_dropdown_list());
     $this->load->view($view_name, $data);
 }
Exemplo n.º 10
0
 public function index()
 {
     toolbar_process_task($this);
     $data = array();
     $this->load->view('admin/system_control', $data);
 }
Exemplo n.º 11
0
 public function edit($id)
 {
     if (!$this->duty_model->load_by_id(intval($id))) {
         set_message_note($this->lang->line('error_no_record'), MESSAGE_NOTE_FAILURE);
         redirect('admin/staff');
     }
     $this->load->library(array('form_validation'));
     $this->load->helper('jquery_tab');
     $this->load->model(array('schedule_model', 'work_status_model', 'site_shift_model'));
     $this->form_validation->set_rules('last_name', 'Last Name', 'required');
     $this->form_validation->set_rules('first_name', 'First Name', 'required');
     $this->form_validation->set_rules('phone_number', 'Phone Number', 'required');
     $this->form_validation->set_rules('email', 'Email', '');
     $this->form_validation->set_rules('address', 'Address', '');
     $this->form_validation->set_rules('is_published', 'Published', '');
     $this->form_validation->set_rules('call_type', 'Call Type', '');
     $this->form_validation->set_rules('call_minutes', 'Call Minutes', '');
     $this->_row = $this->duty_model->get_row();
     $this->_row = $this->form_validation->get_input_row($this->_row);
     toolbar_process_task($this);
     $assignment_rows = $this->staff_assignment_model->get_rows(array('staff_id' => $this->duty_model->id));
     foreach ($assignment_rows as $assignment_row) {
         $assignment_row->next_shift = $this->_get_next_shift_date_time($this->duty_model->id, $assignment_row->site_id, $assignment_row->shift_type);
     }
     $data = array('row' => $this->_row, 'assignment_rows' => $assignment_rows, 'site_list' => $this->site_model->get_dropdown_list('Select Site'), 'shift_type_list' => $this->staff_assignment_model->get_shift_type_dropdown_list('Shift Type'), 'assign_type_list' => $this->staff_assignment_model->get_assign_type_dropdown_list('Assign Type'), 'staff_list' => $this->duty_model->get_dropdown_list('Select Staff'), 'call_type_list' => $this->duty_model->get_call_type_dropdown_list(''));
     $this->load->view('admin/staff_edit', $data);
 }
Exemplo n.º 12
0
 public function edit($id)
 {
     if (!$this->schedule_model->load_by_id(intval($id))) {
         set_message_note($this->lang->line('error_no_record'), MESSAGE_NOTE_FAILURE);
         redirect('admin/schedule');
     }
     $this->load->helper('jquery_tab_helper');
     $this->load->library(array('form_validation'));
     $this->form_validation->set_rules('start_date', 'Start Date', 'required');
     $this->form_validation->set_rules('site_id', 'Site', '');
     $this->form_validation->set_rules('staff_id', 'Staff', '');
     $this->form_validation->set_rules('work_status_id', 'Work Status', '');
     $this->form_validation->set_rules('reply_status_id', 'Reply Status', '');
     $this->_row = $this->schedule_model->get_row();
     $this->_row = $this->form_validation->get_input_row($this->_row);
     toolbar_process_task($this);
     $data = array('row' => $this->_row, 'site_list' => $this->site_model->get_dropdown_list('Select Site'), 'staff_list' => $this->staff_model->get_dropdown_list('Select Staff'), 'shift_type_list' => $this->schedule_model->get_shift_type_dropdown_list('Select Shift Type'), 'work_status_list' => $this->work_status_model->get_dropdown_list('Select Work Status'), 'reply_status_list' => $this->reply_status_model->get_dropdown_list('Select Reply Status'));
     $this->load->view('admin/schedule_edit', $data);
 }