public function voteAction() { parent::isParticipanActive(); $_voteId = $this->getRequest()->getParam("vid"); $_answerId = $this->getRequest()->getParam("aid"); $_t = new ParticipantAnswerTable(); $_t->vote($_voteId, $_answerId, $this->_participant->id); $this->_redirect(APPLICATION_BASEURL_INDEX . "/participant/subscriptions"); }
public function init() { /* Initialize action controller here */ $this->_participant = parent::getActiveParticipant(); //Active participant... if (ADMIN_ENABLED !== 1) { throw new Exception("Get out of my sight! You don't belong here!"); } parent::isParticipanActive(); }
public function init() { /* Initialize action controller here */ parent::getActiveParticipant(); }
public function updateAction() { if (null === $this->_participant) { throw new Exception("We don't like trespassers, do you know that? Either knock the door or don't come at all..."); } parent::isParticipanActive(); $_form = new ParticipantUpdateForm(); $_form->loadFromModel($this->_participant); if ($_POST) { if ($_form->isValid($_POST)) { $_p = $this->_table->findById($this->_participant->id); $_p->loadFromForm($_form); $_p->save(); } } $this->view->form = $_form; }