Exemplo n.º 1
0
 function type_save($id = '', $page = '')
 {
     $data['page_name'] = '<b>Save Training Type</b>';
     $data['msg'] = '';
     $this->load->helper('list_box');
     $type = new Training_type();
     $data['type'] = $type->get_by_id($id);
     if (Input::get('op')) {
         $type->training_type = Input::get('training_type');
         $type->training_type_desc = Input::get('training_type_desc');
         $type->save();
         Session::flash('msg', 'Training Type saved!');
         return Redirect::to('training_manage/type/' . $page, 'refresh');
     }
     $data['main_content'] = 'type_save';
     return View::make('includes/template', $data);
 }