/** * Visualização post individual, e não autenticado */ public function postAction() { $this->view->content = 400; $this->view->nu_post = $this->getRequest()->getParam('id'); $this->view->post = Model_Post::getInstance()->get(array('tipo' => 'id', 'nu_post' => $this->getRequest()->getParam('id'))); $this->view->title = "Post"; $this->view->description = current($this->view->post); $this->view->description = $this->view->description['tx_post']; if (!$this->view->post) { $this->_helper->viewRenderer->setNoRender(); echo $this->view->partial('helpers/404.phtml'); } }
public function getpostAction() { self::requireIsPost(); General::permissaoAuth(false); $param = array(); $param['tipo'] = $this->getRequest()->getParam('tipo'); $param['uptime'] = $this->getRequest()->getParam('uptime'); $param['nu_usuario'] = $this->getRequest()->getParam('nu_usuario'); $param = array_filter($param); $arPost = Model_Post::getInstance()->get($param); if (count($arPost)) { foreach ($arPost as $item) { echo General::compressHtml($this->view->partial('helpers/li_post.phtml', $item)); } } }