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);
     }
 }
Beispiel #2
0
 /** Show all frequently asked questions
  * @access public
  * @return void
  */
 public function indexAction()
 {
     $faqs = new Faqs();
     $this->view->faqs = $faqs->getAll();
 }
Beispiel #3
0
 public function actionEditfaq($id)
 {
     $faq = Faqs::model()->findByPk($id);
     if (isset($_REQUEST['Faqs'])) {
         // обрабатывем данные из формы
         $faq = Faqs::model()->updateFromRequest($id);
     }
     $this->render('faq', array("faq" => $faq));
 }
Beispiel #4
0
<?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);
}
Beispiel #5
0
 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();
 }