public function verAction() { $this->view->subtitle = $this->info->sitio->faqs->ver->titulo; $id = (int) $this->_request->getParam('id', 0); if ($id > 0) { $this->view->faq = Faqs::getFaq($id); } }
/** Show all frequently asked questions * @access public * @return void */ public function indexAction() { $faqs = new Faqs(); $this->view->faqs = $faqs->getAll(); }
public function actionEditfaq($id) { $faq = Faqs::model()->findByPk($id); if (isset($_REQUEST['Faqs'])) { // обрабатывем данные из формы $faq = Faqs::model()->updateFromRequest($id); } $this->render('faq', array("faq" => $faq)); }
<?php include_once "../includes/webservice.inc.php"; $webService = new Webservices_Writer(); $webService->init(); $faqsObj = new Faqs(); $result = $faqsObj->getFaqs(); if (count($result) > 0) { $webService->createXMLInstance(); $webService->appendArrayToRootNode('', $result); $webService->displayXML(); } else { $xmls = $webService->errorXML(join(",", $faqsObj->errorMessages)); $webService->outputXML($xmls); }
public static function getFaq($id) { $faq = new Faqs(); return $faq->fetchRow("id = '{$id}'"); }
public function verAction() { $this->view->subtitle = $this->info->sitio->faqs->ver->titulo; $faq = new Faqs(); $id = (int) $this->_request->getParam('id', 0); if ($id > 0) { $this->view->faq = $faq->fetchRow('id=' . $id); } $this->render(); }