Example #1
0
 /**
  * 首页
  */
 public function indexAction()
 {
     $this->assign('aAUser', $this->getCurrUser(Model_User::TYPE_AD));
     $this->assign('aMUser', $this->getCurrUser(Model_User::TYPE_MEDIA));
     $this->assign('aBanner', Model_Banner::getAll(array('where' => array('iStatus' => 1), 'limit' => 5, 'order' => 'rank asc')));
     $this->assign('aCricle', Model_WorkMedia::getAllData());
     $this->assign('aCase', Model_HomeCase::getAllData());
     $this->assign('aManager', Model_HomeManager::getAllData());
     $this->assign('sTopMenu', 'home');
     $this->setMeta('home_page', array());
 }
Example #2
0
 /**
  * 增加首页实例
  */
 public function addAction()
 {
     if ($this->_request->isPost()) {
         $aHomeCase = $this->_checkData('add');
         if (empty($aHomeCase)) {
             return null;
         }
         if (Model_HomeCase::addData($aHomeCase) > 0) {
             return $this->showMsg('首页实例增加成功!', true);
         } else {
             return $this->showMsg('首页实例增加失败!', false);
         }
     }
     $this->assign('wtype', Model_HomeCase::$wtype);
 }