当前位置: 首页>>代码示例>>PHP>>正文


PHP Catalog::getViewed方法代码示例

本文整理汇总了PHP中Catalog::getViewed方法的典型用法代码示例。如果您正苦于以下问题:PHP Catalog::getViewed方法的具体用法?PHP Catalog::getViewed怎么用?PHP Catalog::getViewed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Catalog的用法示例。


在下文中一共展示了Catalog::getViewed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 function __construct()
 {
     if (Funcs::$uri[0] == '') {
         $tree = Tree::getTreeByUrl('wide');
         Funcs::setMeta($tree);
         //$tree['hits']=Index::getHits();
         //$tree['mainbanner']=Index::getMainBanner();
         //$id=Tree::getIdTreeByModule('news');
         //$tree['news']=News::getList($id,2);
         //$tree['banners']=Index::getBanners();
         /*$tree['about']=Fields::getFieldsByTree(8,'wide');
         		$tree['examples']=Index::getExamples();
         		$tree['forum']=Forum::getIndex();*/
         View::render('site/index', $tree);
     } elseif (Funcs::$uri[0] == 'sitemap') {
         //$tree=Tree::getTreeByUrl('wide');
         //Funcs::setMeta($tree);
         $model = new Tree();
         $tree['sitemap'] = $model->getSitemap();
         View::render('site/sitemap', $tree);
     } elseif (Funcs::$uri[0] == 'rss') {
         View::$layout = "empty";
         View::render('news/rss', News::getRSS());
     } elseif (Funcs::$uri[0] == 'contacts' && Funcs::$uri[1] == '') {
         $tree = Tree::getTreeByUrl('wide');
         Funcs::setMeta($tree);
         View::render('site/contacts', $tree);
     } elseif (Funcs::$uri[0] == 'viewed') {
         $tree = Tree::getTreeByUrl('wide');
         Funcs::setMeta($tree);
         $tree['list'] = Catalog::getViewed();
         $tree['recommended'] = Catalog::getRecommended();
         View::render('favorite/viewed', $tree);
     } elseif (Funcs::$uri[0] == 'customer' && Funcs::$uri[1] == 'partners' && Funcs::$uri[2] == 'anketa' && Funcs::$uri[3] == '') {
         $tree = Tree::getTreeByUrl('wide');
         Funcs::setMeta($tree);
         View::render('site/anketa', $tree);
     } else {
         $tree = Tree::getTreeByUrl();
         Funcs::setMeta($tree);
         if ($tree['info']['type'] == 'spage') {
             $class = strtoupper(substr($tree['info']['path'], 0, 1)) . substr($tree['info']['path'], 1, strlen($tree['info']['path']));
             if (class_exists($class)) {
                 if ($tree['info']['id2'] == 0) {
                     eval('$tree[\'list\']=' . $class . '::getList($tree[\'id\']);');
                     View::render($tree['info']['path'] . '/list', $tree);
                 } else {
                     eval('$tree[\'fields\']=' . $class . '::getOne($tree[\'id\']);');
                     if (isset($_GET['print'])) {
                         View::$layout = 'empty';
                         View::render($tree['info']['path'] . '/print', $tree);
                     } else {
                         View::render($tree['info']['path'] . '/one', $tree);
                     }
                 }
             } else {
                 if ($tree['info']['id2'] == 0) {
                     $tree['list'] = Spage::getList($tree['id']);
                     View::render($tree['info']['path'] . '/list', $tree);
                 } else {
                     $tree['fields'] = Spage::getOne($tree['id']);
                     if (isset($_GET['print'])) {
                         View::$layout = 'empty';
                         View::render($tree['info']['path'] . '/print', $tree);
                     } else {
                         View::render($tree['info']['path'] . '/one', $tree);
                     }
                 }
             }
         } else {
             View::render('site/page', $tree);
         }
     }
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:74,代码来源:IndexController.php

示例2: hor

 function hor()
 {
     $data['viewed'] = Catalog::getViewed();
     //$data['favorite']=Catalog::getFavorite();
     View::widget('panel/hor', $data);
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:6,代码来源:PanelWidget.php


注:本文中的Catalog::getViewed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。