public function edit_portfolio()
 {
     if (!$this->securitypolicy->validateAccessRight(4, 'write')) {
         $this->load->view('access_denied');
     }
     $this->load->library('form_validation');
     $this->load->helper('form');
     $portfolio = new Portfolio();
     $data['showmsg'] = true;
     if ($this->form_validation->run() == false) {
         $data['status'] = 'error';
         $this->load->view('hotel_mngt_add_hotel_portfolio', $data);
     } else {
         $portfolio->update();
         if (!empty($portfolio->errors)) {
             $data['msg'] = $portfolio->errors;
             $data['status'] = 'error';
             $this->load->view('hotel_mngt_add_hotel_portfolio', $data);
         } else {
             $this->session->set_userdata(array("status" => "success"));
             redirect(site_url('Admin/edit_portfolio/' . $portfolio->getId()));
         }
     }
 }