示例#1
0
文件: Index.php 项目: pancke/yyaf
 /**
  * 首页
  */
 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());
 }
示例#2
0
 /**
  * 增加首页经理
  */
 public function addAction()
 {
     if ($this->_request->isPost()) {
         $aHomeManager = $this->_checkData('add');
         if (empty($aHomeManager)) {
             return null;
         }
         if (Model_HomeManager::addData($aHomeManager) > 0) {
             return $this->showMsg('首页经理增加成功!', true);
         } else {
             return $this->showMsg('首页经理增加失败!', false);
         }
     }
 }