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


PHP Model_Ad::getAdListAllHome方法代码示例

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


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

示例1: indexAction

 public function indexAction()
 {
     $this->_helper->layout()->setLayout('home');
     $this->view->suggestIP = $this->_helper->getLocationGeoIP->suggest();
     //check if user is locked
     $locked = $this->_helper->checkLockedUser->check();
     if ($locked == 1) {
         $this->_redirect('/' . $this->view->lang . '/auth/logout');
     }
     //if user is logged the redir to proper location, if not stand on not logged home view (index)
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $this->_redirect('/' . $this->view->lang . '/woeid/' . $this->location . '/give');
     }
     //check if request is / redir to /lang
     $langIndex = $this->getRequest()->getParam('language');
     if ($langIndex == null) {
         //add meta robots to not index the page without language param but allow follow-crawl all the rest
         //$this->view->metaRobots = 'noindex,follow';
         //force redirect with language
         $this->_redirect('/es', array('code' => 301));
     } else {
         $this->view->metaRobots = 'index,follow';
     }
     //add link rel canonical , better seo
     $this->view->canonicalUrl = 'http://' . $_SERVER['HTTP_HOST'] . '/' . $this->lang;
     $modelAd = new Model_Ad();
     $this->view->allGives = $modelAd->getAdListAllHome(1, null);
     $this->view->rankingWoeid = $modelAd->getRankingWoeid($limit = 40);
     $this->view->rankingUsers = $modelAd->getRankingUsers($limit = 80);
     //add meta description to head
     $this->view->metaDescription = $this->view->translate('nolotiro.org is a website where you can give away things you no longer want or no longer need to pick them up other people who may serve or be of much use.');
 }
开发者ID:Arteaga2k,项目名称:nolotiro,代码行数:33,代码来源:IndexController.php


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