public function eliminarAction() { $this->view->subtitle = $this->info->sitio->faqs->eliminar->titulo; $faq = new Faqs(); if ($this->_request->isPost()) { Zend_Loader::loadClass('Zend_Filter_Alpha'); $filter = new Zend_Filter_Alpha(); $id = (int) $this->_request->getPost('id'); $del = $filter->filter($this->_request->getPost('del')); if ($del == 'Si' && $id > 0) { $where = 'id = ' . $id; $rows_affected = $faq->delete($where); } } else { $id = (int) $this->_request->getParam('id'); if ($id > 0) { $this->view->faq = $faq->fetchRow('id=' . $id); if ($this->view->faq->id > 0) { $this->render(); return; } } } $this->_redirect('/admin/faqs/'); }