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

Source for file doc.core.php

Documentation is available at doc.core.php

  1. <?php
  2. /**
  3.  * Обработчик подключаемых html файлов
  4.  * @author PHPShop Software
  5.  * @version 1.0
  6.  * @package PHPShopCore
  7.  */
  8. class PHPShopDoc extends PHPShopCore {
  9.  
  10.     /**
  11.      * Конструктор
  12.      */
  13.     function PHPShopDoc({
  14.         $this->setMeta();
  15.         parent::PHPShopCore();
  16.     }
  17.  
  18.     /**
  19.      * Возврат содержимого файла
  20.      * @global array $SysValue настройки
  21.      * @param string $pages имя файла без расширения
  22.      * @return string
  23.      */
  24.     function OpenHTML($pages{
  25.         global $SysValue;
  26.         $dir="pageHTML/";
  27.         $pages=$pages.".php";
  28.         $handle=opendir($dir);
  29.         while ($file readdir($handle)) {
  30.             if($file==$pages{
  31.                 $urlfile=fopen ("$dir$file","r");
  32.                 $text=fread($urlfile,1000000);
  33.                 return $text;
  34.             }
  35.         }
  36.         return false;
  37.     }
  38.     /**
  39.      * Экшен по умолчанию
  40.      */
  41.     function index({
  42.  
  43.         // Читаем файл
  44.         $dis=$this->OpenHTML($this->SysValue['nav']['name']);
  45.  
  46.         // Мета
  47.         $this->title=$this->meta[$this->SysValue['nav']['name']].' - '.$this->PHPShopSystem->getValue("name");
  48.  
  49.         // Определяем переменые
  50.         $this->set('pageContent',$dis);
  51.         $this->set('pageTitle',$this->meta[$this->SysValue['nav']['name']]);
  52.  
  53.  
  54.         // Подключаем шаблон
  55.         $this->parseTemplate($this->getValue('templates.page_page_list'));
  56.  
  57.     }
  58.  
  59.     // Настройка титлов
  60.     function setMeta({
  61.         $this->meta=array(
  62.                 'license'=>'Лицензионное соглашение',
  63.                 'design'=>'Редактирование дизайна',
  64.                 'test'=>'Подключение HTML файлов'
  65.         );
  66.     }
  67.  
  68. }
  69.  
  70. ?>

Documentation generated on Thu, 17 Feb 2011 15:58:28 +0300 by phpDocumentor 1.4.3