public function voteAction()
 {
     $this->view->layout()->disableLayout();
     $votesModel = new Application_Model_Votes();
     $page = $this->getRequest()->getParam('page', 'index:index');
     $value = $this->getRequest()->getParam('value', 5);
     $votesModel->addVote($value, $page, $_SERVER['REMOTE_ADDR']);
     $this->view->votedata = $votesModel->getVote($page);
 }
 /**
  * 
  */
 public function votedata()
 {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $controller = $request->getControllerName();
     $action = $request->getActionName();
     $sub = $request->getParam('name', '') . $request->getParam('id', '');
     $page = $controller . ':' . $action . ':' . $sub;
     $votesModel = new Application_Model_Votes();
     $vote = $votesModel->getVote($page);
     return $vote;
 }
 /**
  * 
  */
 public function voteable()
 {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $controller = $request->getControllerName();
     $action = $request->getActionName();
     $sub = $request->getParam('name', '') . $request->getParam('id', '');
     $page = $controller . ':' . $action . ':' . $sub;
     if (@$_SERVER['REMOTE_ADDR']) {
         $votesModel = new Application_Model_Votes();
         $voteable = $votesModel->isAllowedToVote(@$_SERVER['REMOTE_ADDR'], $page);
         return $voteable;
     } else {
         return false;
     }
 }