function saveAction() { $request = $this->getRequest(); if ($request->isPost()) { $aData = $request->getParams(); try { $hol = new Pandamp_Core_Hol_Poll(); $hol->poll($aData); } catch (Zend_Exception $e) { throw new Zend_Exception($e->getMessage()); } } $this->_forward('browse', 'manager', 'polling', array('guid' => $request->getParam('id'))); }
function deleteAction() { $pguid = $this->_getParam('pguid') ? $this->_getParam('pguid') : ''; $hol = new Pandamp_Core_Hol_Poll(); try { $hol->delete($pguid); $response['success'] = true; $response['message'] = "Poll Deletion Success"; } catch (Exception $e) { $response['success'] = false; $response['error'] = $e->getMessage(); } echo Zend_Json::encode($response); }
function newAction() { $r = $this->getRequest(); if ($r->isPost()) { $aData = $r->getParams(); try { $hol = new Pandamp_Core_Hol_Poll(); $hol->save($aData); $message = "Polling has been successfully saved"; } catch (Exception $e) { $message = $e->getMessage(); } $this->view->message = $message; } $this->_helper->layout()->headerTitle = "Polling"; }