예제 #1
0
 public function __construct()
 {
     parent::__construct();
     $this->load->helper('rewrite');
     $this->load->model('emulemodel');
     $_key = 'top_youMayLike';
     $youMayLike = $this->mem->get($_key);
     //var_dump($hotTopic);exit;
     if (empty($youMayLike)) {
         $youMayLike = $this->emulemodel->getTopYouMayLike(10);
         $this->mem->set($_key, $youMayLike, self::$ttl['2h']);
     }
     $channel = $this->mem->get('channel');
     if (empty($channel)) {
         $channel = $this->emulemodel->getAllChannel();
         $this->mem->set('channel', $channel, self::$ttl['12h']);
     }
     $this->isAdult = $this->cookie('isAdult');
     $this->assign(array('seo_keywords' => $this->seo_keywords, 'seo_description' => $this->seo_description, 'seo_title' => $this->seo_title, 'show_ad' => 1, 'isAdult' => $this->isAdult, 'showimgapi' => $this->showimgapi, 'error_img' => '/public/images/show404.jpg', 'youMayLike' => $youMayLike, 'channel' => $channel, 'isShowPoint' => 1, 'cpid' => 0, 'cid' => 0, 'playMod' => $this->playMod, 'editeUrl' => '/edite/index/emuleTopicAdd'));
     $this->_get_postion();
     //var_dump($this->viewData);exit;
 }
예제 #2
0
 public function __construct()
 {
     parent::__construct();
     //判断referer是否合法
     $allow_referer = $this->config->item('allow_referer');
     $domain_arr = explode('|', $allow_referer);
     $referer = false;
     foreach ($domain_arr as $v) {
         if (false !== strpos($_SERVER['HTTP_REFERER'], $v)) {
             $referer = true;
             break;
         }
     }
     if (!$referer) {
         die(0);
     }
     //判断请求是否Ajax
     if ('XMLHttpRequest' != $_SERVER['HTTP_X_REQUESTED_WITH']) {
         die(0);
     }
     $this->load->model('emulemodel');
 }
예제 #3
0
 public function __construct()
 {
     parent::__construct();
 }
예제 #4
0
 public function __construct()
 {
     parent::__construct();
     $this->assign(array('css_url' => $this->config->item('adm_css_url'), 'css_url' => $this->config->item('adm_css_url'), 'img_url' => $this->config->item('adm_img_url'), 'js_url' => $this->config->item('adm_js_url'), 'web_title' => $this->config->item('web_title'), 'version' => 20140109));
     $this->load->_ci_view_path = 'admin/';
 }