예제 #1
0
 /**
  * 构造函数
  */
 public function __construct()
 {
     /**
      * 读取通用、布局的语言包
      */
     Uk86Language::uk86_read('common');
     Uk86Language::uk86_read('microshop');
     /**
      * 判断微商城是否关闭
      */
     if (C('microshop_isuse') != '1') {
         header('location: ' . SHOP_SITE_URL);
         die;
     }
     /**
      * 设置布局文件内容
      */
     Tpl::setLayout('microshop_layout');
     /**
      * 转码
      */
     if ($_GET['column'] && strtoupper(CHARSET) == 'GBK') {
         $_GET = Uk86Language::uk86_getGBK($_GET);
     }
     /**
      * 获取导航
      */
     Tpl::output('nav_list', ($nav = F('nav')) ? $nav : H('nav', true, 'file'));
     /**
      * 搜索类型列表
      */
     $search_type = array();
     $search_type['goods'] = Uk86Language::uk86_get('nc_microshop_goods');
     $search_type['personal'] = Uk86Language::uk86_get('nc_microshop_personal');
     $search_type['store'] = Uk86Language::uk86_get('nc_microshop_store');
     //$search_type['album'] = Uk86Language::uk86_get('nc_microshop_album');
     Tpl::output('search_type', $search_type);
     /**
      * 登录后读取用户头像
      */
     if (!empty($_SESSION['member_id']) && intval($_SESSION['member_id']) > 0) {
         self::get_member_avatar($_SESSION['member_id']);
     }
     /**
      * 系统状态检查
      */
     if (!C('site_status')) {
         uk86_halt(C('closed_reason'));
     }
     /**
      * seo
      */
     Tpl::output('html_title', Uk86Language::uk86_get('nc_microshop') . '-' . C('site_name') . ' ');
     Tpl::output('seo_keywords', C('microshop_seo_keywords'));
     Tpl::output('seo_description', C('microshop_seo_description'));
 }
예제 #2
0
 public function __construct()
 {
     Uk86Language::uk86_read('common,home_layout');
     //输出头部的公用信息
     $this->showLayout();
     //输出会员信息
     $this->member_info = $this->getMemberAndGradeInfo(true);
     Tpl::output('member_info', $this->member_info);
     Tpl::setDir('home');
     Tpl::setLayout('home_layout');
     if ($_GET['column'] && strtoupper(CHARSET) == 'GBK') {
         $_GET = Uk86Language::uk86_getGBK($_GET);
     }
     if (!C('site_status')) {
         uk86_halt(C('closed_reason'));
     }
     //判断系统是否开启U币和U币中心功能
     if (C('points_isuse') != 1 || C('pointshop_isuse') != 1) {
         uk86_showMessage(Uk86Language::uk86_get('pointshop_unavailable'), uk86_urlShop('index', 'index'), 'html', 'error');
     }
     Tpl::output('index_sign', 'pointshop');
 }
예제 #3
0
 /**
  * 构造函数
  */
 public function __construct()
 {
     /**
      * cms开关判断
      */
     if (intval(C('cms_isuse')) !== 1) {
         header('location: ' . SHOP_SITE_URL);
         die;
     }
     /**
      * 读取通用、布局的语言包
      */
     Uk86Language::uk86_read('common');
     Uk86Language::uk86_read('cms');
     /**
      * 设置布局文件内容
      */
     Tpl::setLayout('cms_layout');
     /**
      * 转码
      */
     if ($_GET['column'] && strtoupper(CHARSET) == 'GBK') {
         $_GET = Uk86Language::uk86_getGBK($_GET);
     }
     /**
      * 获取导航
      */
     Tpl::output('nav_list', ($nav = F('nav')) ? $nav : H('nav', true, 'file'));
     /**
      * 登录后读取用户头像
      */
     if (!empty($_SESSION['member_id']) && intval($_SESSION['member_id']) > 0) {
         self::get_member_avatar($_SESSION['member_id']);
     }
     /**
      * 系统状态检查
      */
     if (!C('site_status')) {
         uk86_halt(C('closed_reason'));
     }
     /**
      * seo
      */
     Tpl::output('html_title', C('cms_seo_title') . '-' . C('site_name') . '');
     Tpl::output('seo_keywords', C('cms_seo_keywords'));
     Tpl::output('seo_description', C('cms_seo_description'));
     /**
      * 判断是不是管理员
      */
     if (!empty($_SESSION['member_name'])) {
         $this->publisher_name = $_SESSION['member_name'];
         $this->publisher_id = $_SESSION['member_id'];
         $this->publisher_type = self::ARTICLE_TYPE_MEMBER;
         $this->publisher_avator = self::get_member_avatar($_SESSION['member_id']);
         $this->attachment_path = $_SESSION['member_id'];
     }
     //发布状态,管理员直接发布,投稿如果后台开启审核未待审核状态
     if (intval(C('cms_submit_verify_flag')) === 1) {
         $this->publish_state = self::ARTICLE_STATE_VERIFY;
     } else {
         $this->publish_state = self::ARTICLE_STATE_PUBLISHED;
     }
 }