public function bottommenu_create()
 {
     $update_success = false;
     if ($this->input->post()) {
         $config['upload_path'] = './assets/images';
         $config['allowed_types'] = '*';
         $this->load->library('upload', $config);
         $parent_id = $this->input->post('slct_parent');
         $menu_name = $this->input->post('txt_menu_name');
         $link = $this->input->post('txt_link');
         $content = $this->input->post('txt_widget_content');
         $description = $this->input->post('txt_description');
         $menu_rank = $this->input->post('txt_rank');
         $ul = $this->input->post('slct_undeline');
         $image = '';
         if (!$this->upload->do_upload('inp_img')) {
             $error = array('error' => $this->upload->display_errors());
         } else {
             $data = array('upload_data' => $this->upload->data());
             $image = $data['upload_data']['file_name'];
         }
         $update_success = $this->model->create_bottom_menu($parent_id, $menu_rank, $menu_name, $link, $description, $ul, $content, $image);
     }
     if ($update_success) {
         reditect('admin/bottommenu/create', 'refresh');
     }
     $data['update_success'] = $update_success;
     $data["results"] = $this->navigation->create($this->model->fetch_bottom_navigation());
     $data['page_titles'] = $this->model->get_pages();
     $this->load->view('admin/bottommenu_create', $data);
 }
Example #2
0
 function delete($id)
 {
     $this->load->model('ajax_model');
     $this->ajax_model->delete_country($id);
     reditect('country');
 }