Example #1
0
 public function deleteBannerAction()
 {
     $id_content = $this->request->getPost("id", null, false);
     $content_obj = new \HaiQuan\Backend\Models\Banner();
     $content_obj->deleteBannerByID($id_content);
     echo json_encode(array("status" => 1));
     exit;
 }
Example #2
0
 public function getTopBarGameBanner()
 {
     $content_obj = new \HaiQuan\Backend\Models\Banner();
     $result = $content_obj->findFirst(array("bn_position = 'topbar_game'"));
     if ($result) {
         $result = $result->toArray();
     }
     return $result;
 }
Example #3
0
 public function initialize()
 {
     $this->dataCenter = new \datacenter\dataCenter($this->cache, $this->session, $this->config);
     $this->_updateUserInfoCache();
     $this->user = $this->_getCurrentUser();
     $this->_filterUser();
     $this->minJS = $this->config['MIN_JS'];
     $this->minCSS = $this->config['MIN_CSS'];
     $this->version = $this->config['VERSION'];
     //Set View Var
     $this->view->dataCenter = $this->dataCenter;
     $this->view->user = $this->user;
     $this->view->config = $this->config;
     //Get Right Bar Data
     $bannerModel = new \HaiQuan\Backend\Models\Banner();
     $this->view->banner_top_1 = $bannerModel->getBannerTop1();
     $this->view->banner_top_2 = $bannerModel->getBannerTop2();
     $this->view->banner_right = $bannerModel->getBannerRight();
     $this->view->banner_bottom = $bannerModel->getBannerBottom();
     $this->view->vanban_important = \HaiQuan\Backend\Models\CtgVanbang::getImportantVanBan();
     $this->view->ty_gia = Util::get_tygia();
 }