Source for file page.core.php
Documentation is available at page.core.php
* @author PHPShop Software
$this->objBase= $GLOBALS['SysValue']['base']['table_name11'];
$this->action= array("nav"=> "CID");
* Экшен по умолчанию, вывод данных по странице
$row= parent::getFullInfoItem(array('*'),array('link'=> "='$link'",'enabled'=> "='1'"));
// Прикрываем страницу от дубля
if($row['category'] == 2000) return $this->setError404();
$this->set('pageContent',Parser($row['content']));
$this->set('pageTitle',$row['name']);
if(empty($row['title'])) $title= $row['name'];
else $title= $row['title'];
$this->title= $title. " - ". $this->PHPShopSystem->getValue("name");
// Навигация хлебные крошки
* Экшен выборки подробной информации при наличии переменной навигации CID
$this->category_name= $this->PHPShopCategory->getName();
$PHPShopOrm->debug= $this->debug;
$row= $PHPShopOrm->select(array('id,name'),array('parent_to'=> "=". $this->category),false,array('limit'=> 1));
if(!isset ($this->category_name)) return $this->setError404();
$this->dataArray= $this->PHPShopOrm->select(array('name,link,category'),array('category'=> '='. $this->category,'enabled'=> "='1'"),
array('order'=> 'num'),array('limit'=> 100));
foreach($this->dataArray as $row) {
$dis.= "<li><a href=\"/page/". $row['link']. ".html\" title=\"". $row['name']. "\">". $row['name']. "</a></li>";
$disp= "<h1>". $this->category_name. "</h1>";
// Если есть описание каталога
if(!empty($this->LoadItems['CatalogPage'][$this->category]['content_enabled']))
$disp.= $this->PHPShopCategory->getContent();
$this->set('pageContent',$disp);
$this->set('pageTitle',$this->category_name);
$this->title= $this->category_name. " - ". $this->PHPShopSystem->getValue("name");
// Навигация хлебные крошки
if(!empty($this->LoadItems['CatalogPage'][$this->category]['parent_to']))
$this->navigation($this->LoadItems['CatalogPage'][$this->category]['parent_to'],$this->category_name);
else $this->navigation($row['category'],$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=\"/page/CID_". $row['id']. ".html\" title=\"". $row['name']. "\">". $row['name']. "</a></li>";
$disp= "<h1>". $this->category_name. "</h1>";
// Если есть описание каталога
if(!empty($this->LoadItems['CatalogPage'][$this->category]['content_enabled']))
$disp.= $this->PHPShopCategory->getContent();
$this->set('pageContent',$disp);
$this->set('pageTitle',$this->category_name);
$this->title= $this->category_name. " - ". $this->PHPShopSystem->getValue("name");
// Навигация хлебные крошки
if(!empty($this->LoadItems['CatalogPage'][$this->category]['parent_to']))
$this->navigation($this->LoadItems['CatalogPage'][$this->category]['parent_to'],$this->category_name);
else $this->navigation($this->category,$this->category_name);
|