phpDocumentor PHPShopCore
[ class tree: PHPShopCore ] [ all elements ]

Source for file index.core.php

Documentation is available at index.core.php

  1. <?php
  2.  
  3. /**
  4.  * Обработчик первой страницы
  5.  * @author PHPShop Software
  6.  * @version 1.0
  7.  * @package PHPShopCore
  8.  */
  9. class PHPShopIndex extends PHPShopCore {
  10.  
  11.     /**
  12.      * Конструктор
  13.      */
  14.     function PHPShopIndex({
  15.         parent::PHPShopCore();
  16.     }
  17.  
  18.  
  19.     /**
  20.      * Экшен по умолчанию
  21.      */
  22.     function index({
  23.  
  24.         // Проверка на главную страницу
  25.         if($GLOBALS['SysValue']['nav']['truepath'== "/")
  26.             $this->indexpage();
  27.         else $this->page();
  28.  
  29.     }
  30.  
  31.  
  32.     /**
  33.      * Начальная страница
  34.      */
  35.     function indexpage({
  36.         global $PHPShopModules;
  37.  
  38.         // Читаем файл
  39.         $dis=$this->OpenHTML('index');
  40.  
  41.         // Мета
  42.         $meta $this->getMeta($dis);
  43.  
  44.         $this->title=$meta['title'].' - '.$this->PHPShopSystem->getValue("name");
  45.         $this->description = $meta['description'];
  46.         $this->keywords = $meta['keywords'];
  47.  
  48.         // Определяем переменые
  49.         $this->set('pageContent',$dis);
  50.         $this->set('pageTitle',$meta['title']);
  51.  
  52.         // Перехват модуля
  53.         $PHPShopModules->setHookHandler(__CLASS__,__FUNCTION__$this$dis);
  54.  
  55.         // Подключаем шаблон
  56.         $this->parseTemplate($this->getValue('templates.page_page_list'));
  57.     }
  58.  
  59.     /**
  60.      * Экшен по умолчанию
  61.      */
  62.     function page({
  63.         global $PHPShopModules;
  64.  
  65.         $link=PHPShopSecurity::TotalClean($this->PHPShopNav->getName(),2);
  66.         
  67.  
  68.         // Читаем файл
  69.         $dis $this->OpenHTML($link);
  70.  
  71.         if(!empty($disand $link != "menu" and $link != "catalog"{
  72.  
  73.             // Мета
  74.             $meta $this->getMeta($dis);
  75.  
  76.             $this->title = $meta['title'].' - '.$this->PHPShopSystem->getValue("name");
  77.             $this->description = $meta['description'];
  78.             $this->keywords = $meta['keywords'];
  79.  
  80.             // Определяем переменые
  81.             $this->set('pageContent',$dis);
  82.             $this->set('pageTitle',$meta['title']);
  83.  
  84.             // Перехват модуля
  85.             $PHPShopModules->setHookHandler(__CLASS__,__FUNCTION__$this$dis);
  86.  
  87.             // Подключаем шаблон
  88.             $this->parseTemplate($this->getValue('templates.page_page_list'));
  89.         else {
  90.             header("HTTP/1.0 404 Not Found");
  91.             header("Status: 404 Not Found");
  92.             $this->title="404 Not Found";
  93.             $this->parseTemplate($this->getValue('templates.error_page_forma'));
  94.         }
  95.  
  96.     }
  97.  
  98. }
  99. ?>

Documentation generated on Mon, 25 Jun 2012 15:09:46 +0400 by phpDocumentor 1.4.3