Source for file photo.core.php
Documentation is available at photo.core.php
* Обработчик фото галереи
* @author PHPShop Software
* @var Int Кол-во фото в длину
$this->objBase= $GLOBALS['SysValue']['base']['table_name23'];
$this->action= array("nav"=> "CID");
// Массив для обработки хлебных крошек
* Экшен по умолчанию, заглушка
// Подключаем шаблон ошибки
* Экшен выборки информации при наличии переменной навигации CID
$this->category_name= $this->PHPShopPhotoCategory->getName();
$PHPShopOrm->debug= $this->debug;
$row= $PHPShopOrm->select(array('id,name'),array('parent_to'=> "=". $this->category,'enabled'=> "='1'"),false,array('limit'=> 1));
$this->dataArray= $this->PHPShopOrm->select(array('*'),array('category'=> '='. $this->category,'enabled'=> "='1'"),
array('order'=> 'num'),array('limit'=> 100));
foreach($this->dataArray as $row) {
if(is_file($_SERVER['DOCUMENT_ROOT']. $name_s))
$realsize = getimagesize($_SERVER['DOCUMENT_ROOT']. $name_s);
$disp.= '<TD valign="top" align="center" style="width:90px;">
<a class="highslide" onclick="return hs.expand(this)" target="_blank" href="'. $row['name']. '">
<img width="'. $realsize[0]. '" height="89" src="'. $name_s. '" border="0"></a><div class="highslide-caption">'. $row['info']. '</div>
// Если есть описание каталога
if(!empty($this->LoadItems['CatalogPhoto'][$this->category]['content_enabled']))
$content= $this->PHPShopPhotoCategory->getContent();
$d= '<script type="text/javascript" src="/highslide/highslide-p.js"></script>
<link rel="stylesheet" type="text/css" href="/highslide/highslide.css" />
<script type="text/javascript">
html: \'<div class="closebutton" onclick="return hs.close(this)" title="Закрыть"></div>\',
fade: 2 // fading the semi-transparent overlay looks bad in IE
hs.graphicsDir = \'/highslide/graphics/\';
hs.wrapperClassName = \'borderless\';
<table border="0" cellspacing="0" cellpadding="0" >
$this->set('pageContent',$d);
$this->set('pageTitle',$this->category_name);
$this->title= $this->category_name. " - ". $this->PHPShopSystem->getValue("name");
// Навигация хлебные крошки
$this->navigation($row['parent_to'],$this->category_name);
* Вывод списка категорий фото
$PHPShopOrm->debug= $this->debug;
$dataArray= $PHPShopOrm->select(array('name','id'),array('parent_to'=> '='. $this->category),array('order'=> 'num'),array('limit'=> 100));
foreach($dataArray as $row) {
$dis.= "<li><a href=\"/photo/CID_". $row['id']. ".html\" title=\"". $row['name']. "\">". $row['name']. "</a></li>";
$disp= "<h1>". $this->category_name. "</h1>";
// Если есть описание каталога
if(!empty($this->LoadItems['CatalogPhoto'][$this->category]['content_enabled']))
$disp.= $this->PHPShopPhotoCategory->getContent();
$this->set('pageContent',$disp);
$this->set('pageTitle',$this->category_name);
$this->title= $this->category_name. " - ". $this->PHPShopSystem->getValue("name");
// Навигация хлебные крошки
$this->navigation($this->category,$this->category_name);
* Упрощенный доступ к категориями фото галереи
* @author PHPShop Software
* @param int $objID ИД категории
$this->objBase= $GLOBALS['SysValue']['base']['table_name22'];
return parent::getParam("name");
* Выдача описания категории
return parent::getParam("content");
|