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

Source for file skin.core.php

Documentation is available at skin.core.php

  1. <?php
  2. /**
  3.  * Обработчик шаблонов для скачивания
  4.  * @author PHPShop Software
  5.  * @version 1.0
  6.  * @package PHPShopCore
  7.  */
  8. class PHPShopSkin extends PHPShopCore {
  9.  
  10.     /**
  11.      * Конструктор
  12.      */
  13.     function PHPShopSkin({
  14.         parent::PHPShopCore();
  15.     }
  16.  
  17.     /**
  18.      * Экшен по умолчанию, подключение к сервере phpshopcms.ru, вывод списка шаблонов
  19.      */
  20.     function index({
  21.  
  22.         // Подключаемся к phpshopcms.ru
  23.         $fp fsockopen("www.phpshopcms.ru"80$errno$errstr30);
  24.         if (!$fp{
  25.             echo "$errstr ($errno)<br />\n";
  26.         else {
  27.             $out "GET /pageHTML/skins.php HTTP/1.1\r\n";
  28.             $out .= "Host: www.phpshopcms.ru\r\n";
  29.             $out .= "Connection: Close\r\n\r\n";
  30.  
  31.             fwrite($fp$out);
  32.             while (!feof($fp)) {
  33.                 $disp.=  fgets($fp128);
  34.             }
  35.             fclose($fp);
  36.         }
  37.  
  38.         // Замена символов для картинок
  39.         $skins=explode("<!-- SKINS_START -->",$disp);
  40.         $dis=str_replace("/load/","http://www.phpshopcms.ru/load/",$skins[1]);
  41.         $dis=str_replace("save.gif","zoom.gif",$dis);
  42.  
  43.         // Мета
  44.         $this->title="Бесплатные шаблоны для сайта - ".$this->PHPShopSystem->getValue("name");
  45.  
  46.         // Определяем переменые
  47.         $this->set('pageContent',$dis);
  48.         $this->set('pageTitle','Бесплатные шаблоны для сайта');
  49.  
  50.         // Подключаем шаблон
  51.         $this->parseTemplate($this->getValue('templates.page_page_list'));
  52.     }
  53. }
  54. ?>

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