/** * Decline a pet posting * @return type string response page * @throws Exception */ public static function adminDecline() { // if (isset($_POST['id'])) { $get = Core\Input::get(); if (isset($get['petId'])) { //$petId = $_POST['id']; $petId = $get['petId']; $pet = Pet::constructById($petId); $pet->setApproved(2); $pet->setVisibility('n'); Model\Pet::updatePet($pet); } // ob_start(); // $url = 'http://sfsuswe.com/~nthanlee/index.php/PetBasket/admin'; // while (ob_get_status()) { // ob_end_clean(); // } // header("Location: $url"); }
/** * Update this Pet in the database * @return type mixed false on failure, integer of newly created row otherwise */ public function update() { return Model\Pet::updatePet($this); }