示例#1
0
 public function submit()
 {
     check_if_post();
     $selected_data = json_decode($this->input->post('checkpost'));
     dsm($selected_data);
     echo anchor('dragdrop', 'Back');
 }
示例#2
0
 /**
  * The post of the update form is handled here.
  */
 public function update_order()
 {
     // if not post then user will redirect to notification page.
     check_if_post('notification');
     $order_number = 10423;
     $message = $this->input->post('comment');
     $this->load->model('orders_model', 'orders');
     $this->orders->update($order_number, array('comments' => $this->input->post('comment')));
     redirect('notification/edit_order');
 }
示例#3
0
 function save_role()
 {
     if (check_if_post()) {
         $actual_string = $this->input->post('role-name');
         $role_name = preg_replace('/[^a-zA-Z0-9]/', '_', $actual_string);
         $role_name = strtolower($role_name);
         $this->load->model('rolepermission_m', 'rm');
         $role_added = $this->rm->add_new_role($actual_string, $role_name);
         if ($role_added) {
             set_message('Role added: ' . $actual_string);
         } else {
             set_message('Role already exist.');
         }
         redirect('rolepermission/role/add_role');
     }
 }