Ejemplo n.º 1
0
 /** Delete an attending flo
  */
 public function deletefloAction()
 {
     if ($this->_request->isPost()) {
         $staffID = (int) $this->_request->getPost('staffID');
         $rallyID = (int) $this->_request->getPost('rallyID');
         $del = $this->_request->getPost('del');
         if ($del == 'Yes') {
             $rallies = new RallyXFlo();
             $where = array();
             $where[] = $this->rallies->getAdapter()->quoteInto('staffID = ?', (int) $staffID);
             $where[] = $rallies->getAdapter()->quoteInto('rallyID = ?', (int) $rallyID);
             $rallies->delete($where);
             $this->_flashMessenger->addMessage('Attending FLO for rally deleted!');
         }
         $this->_redirect(self::URL . 'rally/id/' . $rallyID);
     } else {
         $rallyID = (int) $this->_request->getParam('rallyID');
         $staffID = (int) $this->_request->getParam('staffID');
         $rallies = new RallyXFlo();
         $where = array();
         $where[] = $rallies->getAdapter()->quoteInto('staffID = ?', (int) $staffID);
         $where[] = $rallies->getAdapter()->quoteInto('rallyID = ?', (int) $rallyID);
         $this->view->rally = $rallies->fetchRow($where);
     }
 }