public function executeUpdateHangout(sfWebRequest $request) { if (empty($_GET['confirmation_key']) or !isset($_GET['confirmation_key'])) { die('No confirmation key found.'); } if (empty($_GET['status']) or !isset($_GET['status'])) { die('No status found.'); } else { if (!in_array($_GET['status'], array(3, 4))) { die('Invalid status found.'); } } $Requester = new Requester(); $q = $Requester->updateHangoutRequest($_GET['status'], $_GET['confirmation_key']); try { if ($q) { list($total, $postingId) = $Requester->getTotalHangoutRequest($_GET['confirmation_key']); if (!is_null($postingId)) { $Postings = new Postings(); $totalNumPpl = $Postings->getPostingDetails($postingId); if ($total == $totalNumPpl) { //update posting to complete //$Postings->setPostingToComplete($postingId); //next //send email alerts to requesters with status awaiting that the postings is now complete } } die('Hangout request is now accepted'); } else { die("Can't update hangout request."); } } catch (Exception $e) { die($e->getMessage()); } }