Пример #1
0
 /**
  * /admin/business/information_save/ [POST]
  */
 public function information_save($parameters)
 {
     if ($parameters || !$_POST || !$_FILES) {
         $this->loadView('404');
     }
     $business = new BusinessModel($this->db, $this->business_id);
     $save_attempt = $business->saveInformation($_POST, $_FILES);
     // save attempt will return error if image save fails only
     if (!$save_attempt['status']) {
         $_SESSION['message'] = array('message' => $save_attempt['message'], 'status' => 'error');
     } else {
         $_SESSION['message'] = array('message' => 'Business information saved.', 'status' => 'success');
     }
     header('Location: /admin/business/information/');
     exit;
 }