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

Source for file links.core.php

Documentation is available at links.core.php

  1. <?php
  2. /**
  3.  * Обработчик полезных ссылок
  4.  * @author PHPShop Software
  5.  * @version 1.0
  6.  * @package PHPShopCore
  7.  */
  8.  
  9. class PHPShopLinks extends PHPShopCore {
  10.  
  11.     /**
  12.      * Конструктор
  13.      */
  14.     function PHPShopLinks({
  15.         // Имя Бд
  16.         $this->objBase=$GLOBALS['SysValue']['base']['table_name17'];
  17.  
  18.         // Путь для навигации
  19.         $this->objPath="/links/links_";
  20.  
  21.         // Отладка
  22.         $this->debug=false;
  23.  
  24.         // список экшенов
  25.         $this->action=array("nav"=>"index","get"=>"add_forma","post"=>"send_gb");
  26.         parent::PHPShopCore();
  27.     }
  28.  
  29.  
  30.     /**
  31.      * Экшен по умолчанию
  32.      */
  33.     function index({
  34.  
  35.         // Выборка данных
  36.         $this->dataArray=parent::getListInfoItem(array('*'),array('enabled'=>"='1'"),array('order'=>'id DESC'));
  37.  
  38.         // 404
  39.         if(!isset($this->dataArray)) return $this->setError404();
  40.  
  41.         
  42.         if(is_array($this->dataArray))
  43.             foreach($this->dataArray as $row{
  44.  
  45.                 // Определяем переменые
  46.                 $this->set('linksImage',$row['image']);
  47.                 $this->set('linksName',$row['name']);
  48.                 $this->set('linksOpis',$row['content']);
  49.                 $this->set('linksLink',$row['link']);
  50.  
  51.                 // Подключаем шаблон
  52.                 $this->addToTemplate($this->getValue('templates.main_links_forma'));
  53.             }
  54.  
  55.         // Пагинатор
  56.         $this->setPaginator();
  57.  
  58.         // Мета
  59.         $this->title="Полезные ссылки - ".$this->PHPShopSystem->getValue("name");
  60.  
  61.         // Подключаем шаблон
  62.         $this->parseTemplate($this->getValue('templates.links_page_list'));
  63.     }
  64.     
  65. }
  66. ?>

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