public function delete() { $id_item = $this->input->post('id_item'); $item = $this->item_model->get($id_item); if (!empty($item)) { // Delete the element $affected_rows = $this->item_model->delete($id_item); if ($affected_rows > 0) { $this->success(lang('ionize_message_operation_ok')); } } $this->error(lang('ionize_message_operation_nok')); }