Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function create() {
- $this->bep_assets->load_asset_group('TINYMCE');
- if ($this->input->post('name')) {
- $rules['name'] = 'required';
- $this->form_validation->set_rules($rules);
- if ($this->form_validation->run() == FALSE) {
- echo "prince"; die;
- $this->form_validation->output_errors();
- //redirect($this->module.'/admin/create');
- $data['title'] = "Create Accomodation ";
- // Set breadcrumb
- $this->bep_site->set_crumb($this->lang->line('kago_create')." ".$this->lang->line('kago_accommodation'),$this->module.'/admin/create');
- $data['header'] = $this->lang->line('backendpro_access_control');
- $data['page'] = $this->config->item('backendpro_template_admin') . "admin_accommodation_create";
- $data['cancel_link']= $this->module."/admin/index/";
- $data['module'] = $this->module;
- $this->load->view($this->_container,$data);
- }else{
- $data = $this->_fields();
- $id = $this->MKaimonokago->addItem($this->module, $data, $return_id=TRUE);
- //flashMsg('success','Accomodation created');
- redirect($this->module.'/admin/edit/'.$id.'#tab2','refresh');
- }
- }else{
- $data['title'] = "Create Accomodation ";
- $this->do_upload();
- // Set breadcrumb
- $this->bep_site->set_crumb($this->lang->line('kago_create')." ".$this->lang->line('kago_accommodation'),$this->module.'/admin/create');
- $data['header'] = $this->lang->line('backendpro_access_control');
- $data['page'] = $this->config->item('backendpro_template_admin') . "admin_accommodation_create";
- $data['cancel_link']= $this->module."/admin/index/";
- $data['module'] = $this->module;
- $data['zone'] = $this->MZone->getIdwithnoneLang();
- $data['member'] = $this->MAccommodationMember->getIdwithnoneLang();
- $data['style'] = $this->MAccommodationStyle->getIdwithnoneLang();
- $data['type'] = $this->MAccommodationType->getIdwithnoneLang();
- $this->load->view($this->_container,$data);
- }
- }
Add Comment
Please, Sign In to add comment