Current File : /home/karenpetzb/application/modules/default/controllers/ServicesController.php
<?php

class ServicesController  extends Modules_Default_Controllers_MainController
{

	public function init()
	{
		$this->view->baseUrl = $this->getBaseUrl();
		$this->checkMaintenance();
	}

	public function indexAction()
	{
		$this->_forward('information');
	}
	public function informationAction()
	{
		if ($this->getRequest()->getParam('p') && (int)$this->getRequest()->getParam('p')>0) {
				
			$id = (int)$this->getRequest()->getParam('p');
			$footer = new FooterContent();
            $detailFooterRow = $footer->fetchRow('ID = '.$id);
            if ($detailFooterRow) {
                $detailFooter = $detailFooterRow->toArray();
                 
                $linksMenu[0]['NAVURL'] = "";
                $linksMenu[0]['NAVNOM'] = $detailFooter['TITRE'];
                $this->view->linksMenu = $linksMenu;
				
                $this->view->title = $detailFooter['TITRE'];
                $this->view->service = $detailFooter;
            } else {
                $this->log("Impossible de trouver l'information : ".$this->getRequest()->getRequestUri(), 'warn');
                $this->_redirect('/');
            }
		}
	}

	public function faqAction() {
		$linksMenu[0]['NAVURL'] = '/services/faq';
		$linksMenu[0]['NAVNOM'] = 'FAQ';
		$this->view->linksMenu = $linksMenu;
			
		$this->view->title = 'Foire aux questions';
			
		$faq = new FAQ();
		$this->view->faqs = $faq->getLists();
		$faqtype = new FAQType();
		$this->view->faqType = $faqtype->getTypes();
	}
}



?>