コード例 #1
0
ファイル: parks.php プロジェクト: anupkelkar02/FSM
 public function toolbar_edit()
 {
     $id = form_checkids_id_value();
     if ($id) {
         redirect('parks/edit/' . $id);
     }
 }
コード例 #2
0
ファイル: sites.php プロジェクト: anupkelkar02/FSM
 public function toolbar_toggle_published()
 {
     $checkid = form_checkids_id_value();
     if ($checkid) {
         $this->site_model->toggle_is_published($checkid);
         redirect(uri_string());
     } else {
         set_message_note($this->lang->line('error_no_check_id', 'publish/unpublish'), MESSAGE_NOTE_WARNING);
     }
 }
コード例 #3
0
ファイル: dbbackup.php プロジェクト: anupkelkar02/FSM
 public function toolbar_restore()
 {
     $result = '';
     $checkid = form_checkids_id_value();
     if ($checkid) {
         $filename = trim($checkid);
         if ($filename) {
             $result = $this->database_manager->restore_database($filename);
             if ($result) {
                 set_message_note($this->lang->line('success_restore', $filename), MESSAGE_NOTE_SUCCESS);
             } else {
                 set_message_note($this->lang->line('error_restore', $this->database_manager->get_error()->message), MESSAGE_NOTE_FAILURE);
             }
         }
     } else {
         set_message_note($this->lang->line('error_no_check_id'), MESSAGE_NOTE_WARNING);
     }
     //		redirect(uri_string());
 }
コード例 #4
0
ファイル: dbupgrade.php プロジェクト: anupkelkar02/FSM
 public function toolbar_upgrade()
 {
     $result = '';
     $checkid = form_checkids_id_value();
     if ($checkid) {
         $files = $this->database_manager->get_upgrade_file_list();
         foreach ($files as $file) {
             if ($file->name == $checkid) {
                 $result = $this->database_manager->execute($file);
                 if ($result) {
                     set_message_note($this->lang->line('success_upgarde'), MESSAGE_NOTE_SUCCESS);
                 } else {
                     set_message_note($this->database_manager->get_error()->message, MESSAGE_NOTE_WARNING);
                 }
                 break;
             }
         }
     } else {
         set_message_note($this->lang->line('error_no_check_id', 'upgrade'), MESSAGE_NOTE_WARNING);
     }
     // redirect(uri_string());
 }
コード例 #5
0
ファイル: staff.php プロジェクト: anupkelkar02/FSM
 public function toolbar_request_attendance()
 {
     $check_id = form_checkids_id_value('assignment_check_id');
     if ($check_id == 0) {
         set_message_note($this->lang->line('error_no_site_check_id', 'request attendance'), MESSAGE_NOTE_WARNING);
         return;
     }
     if ($this->staff_model->phone_number == '91234567') {
         set_message_note($this->lang->line('error_invalid_phone_number', $this->staff_model->phone_number), MESSAGE_NOTE_WARNING);
         return;
     }
     $this->load->library('staff_phone_manager');
     if ($this->staff_assignment_model->load_by_id($check_id)) {
         $next_shift = $this->_get_next_shift_date_time($this->staff_model->id, $this->staff_assignment_model->site_id, $this->staff_assignment_model->shift_type);
         if ($next_shift) {
             $this->staff_phone_manager->request_attendance($next_shift->staff_id, $next_shift->site_id, $next_shift->schedule_id, $next_shift->shift_type, $next_shift->start_time);
         }
     }
     set_message_note($this->lang->line('success_attendance_requested', $this->staff_model->phone_number), MESSAGE_NOTE_SUCCESS);
 }