Beispiel #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());
 }
Beispiel #2
0
 /**
  * 增加资源圈子
  */
 public function addAction()
 {
     if ($this->_request->isPost()) {
         $aWorkMedia = $this->_checkData('add');
         if (empty($aWorkMedia)) {
             return null;
         }
         $aWorkMedia['iStatus'] = 1;
         $aWorkMedia['iCreateTime'] = time();
         if (Model_WorkMedia::addData($aWorkMedia) > 0) {
             return $this->showMsg('资源圈子增加成功!', true);
         } else {
             return $this->showMsg('资源圈子增加失败!', false);
         }
     }
     $this->assign('wtype', Model_WorkMedia::$wtype);
 }