function _initialize()
 {
     parent::_initialize();
     $controller = strtolower(_CONTROLLER);
     $res['title'] = '会员卡制作';
     $res['url'] = addons_url('Card://Card/config');
     $res['class'] = $controller == 'card' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '会员管理';
     $res['url'] = addons_url('Card://member/lists');
     $res['class'] = $controller == 'member' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '通知管理';
     $res['url'] = addons_url('Card://notice/lists');
     $res['class'] = $controller == 'notice' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '优惠券';
     $res['url'] = addons_url('Coupon://Coupon/lists');
     $res['class'] = $controller == 'coupon' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
     $config = getAddonConfig('Card');
     $config['background_url'] = $config['background'] == 11 ? $config['background_custom'] : ADDON_PUBLIC_PATH . '/card_bg_' . $config['background'] . '.png';
     $this->assign('config', $config);
     //dump ( $config );
     //dump(get_token());
 }
示例#2
0
 function _initialize()
 {
     parent::_initialize();
     if (!empty($_REQUEST['shop_id'])) {
         $this->shop_id = I('shop_id');
         session('wap_shop_id', $this->shop_id);
     } else {
         $this->shop_id = session('wap_shop_id');
     }
     // dump ( $this->shop_id );
     if (empty($this->shop_id)) {
         $map['token'] = get_token();
         // $map ['manamger_id'] = session ( 'manamger_id' );
         $shop = M('shop')->where($map)->find();
         $this->shop_id = $shop['id'];
     } else {
         $shop = D('Shop')->getInfo($this->shop_id);
     }
     empty($shop['template']) && ($shop['template'] = 'jd');
     define('CUSTOM_TEMPLATE_PATH', ONETHINK_ADDON_PATH . '/Shop/View/default/Wap/Template/' . $shop['template'] . '/');
     $cart_count = count(D('Cart')->getMyCart($this->mid, true));
     $cart_count == 0 && ($cart_count = '');
     $this->assign('cart_count', $cart_count);
     $this->assign('shop_id', $this->shop_id);
     $this->assign('shop', $shop);
     // dump ( $shop );
 }
示例#3
0
 function _initialize()
 {
     parent::_initialize();
     // 获取当前登录的用户的商城
     $map['token'] = 'gh_386b39d0fa1a';
     //get_token();
     //$map ['manamger_id'] = $this->mid;
     //trace($this->mid,"BaseController::mid","user");
     $this->shop_id = 0;
     $currentShopInfo = M('shop')->where($map)->find();
     if ($currentShopInfo) {
         $this->shop_id = $currentShopInfo['id'];
     } elseif (_ACTION != 'summary' && _ACTION != 'add') {
         redirect(addons_url('Shop://Shop/summary'));
     }
     //        $controller = strtolower(_CONTROLLER);
     //        $res ['title'] = '营销概况';
     //        $res ['url'] = addons_url('Shop://Shop/lists');
     //        $res ['class'] = ($controller == 'shop' && _ACTION == "lists") ? 'current' : '';
     //        $nav [] = $res;
     //
     //        $res ['title'] = '订单管理';
     //        $res ['url'] = addons_url('Shop://Order/lists');
     //        $res ['class'] = ($controller == 'order' && _ACTION == "lists") ? 'current' : '';
     //        $nav [] = $res;
     $nav = array();
     $this->assign('nav', $nav);
     define('CUSTOM_TEMPLATE_PATH', ONETHINK_ADDON_PATH . 'Shop/View/default/Wap/Template');
 }
 function _initialize()
 {
     parent::_initialize();
     $controller = strtolower(_CONTROLLER);
     $action = strtolower(_ACTION);
     $res['title'] = '客服管理';
     $res['url'] = addons_url('YouaskService://YouaskService/lists');
     $res['class'] = ($controller == 'youaskservice' || $controller == 'group') && $action != 'config' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '关键词指定客服';
     $res['url'] = addons_url('YouaskService://KeywordKF/lists');
     $res['class'] = $controller == 'keywordkf' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '微信客服设置';
     $res['url'] = addons_url('YouaskService://YouaskService/config');
     $res['class'] = $controller == 'youaskservice' && $action == 'config' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
     $config = getAddonConfig('YouaskService');
     $config['cover_url'] = get_cover_url($config['cover']);
     $config['background'] = get_cover_url($config['background']);
     $this->config = $config;
     $this->assign('config', $config);
     // 定义模板常量
     $act = strtolower(_ACTION);
     $temp = $config['template_' . $act];
     $act = ucfirst($act);
 }
示例#5
0
 function _initialize()
 {
     parent::_initialize();
     $controller = strtolower(_CONTROLLER);
     $action = strtolower(_ACTION);
     $res['title'] = '支付配置';
     $res['url'] = addons_url('Payment://Payment/lists');
     $res['class'] = $action == 'lists' || $action == 'listsv3' || $action == 'zfbpay' || $action == 'cftwappay' || $action == 'ctfpay' || $action == 'quickpay' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '功能配置';
     $res['url'] = addons_url('Payment://Payment/config');
     $res['class'] = $action == 'config' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
     $config = getAddonConfig('Payment');
     $config['cover_url'] = get_cover_url($config['cover']);
     $config['background'] = get_cover_url($config['background']);
     $this->config = $config;
     $this->assign('config', $config);
     // 定义模板常量
     $act = strtolower(_ACTION);
     $temp = $config['template_' . $act];
     $act = ucfirst($act);
     define('CUSTOM_TEMPLATE_PATH', ONETHINK_ADDON_PATH . 'Payment/View/default/Template');
 }
 function _initialize()
 {
     parent::_initialize();
     $config = getAddonConfig('Leaflets');
     $config['img'] = is_numeric($config['img']) ? get_cover_url($config['img']) : SITE_URL . '/Addons/Leaflets/View/default/Public/qrcode_default.jpg';
     $this->assign('config', $config);
     // dump($config);
 }
 protected function _initialize()
 {
     $this->token = session('SYNCLOGIN_TOKEN');
     $this->type = session('SYNCLOGIN_TYPE');
     $this->openid = session('SYNCLOGIN_OPENID');
     $this->access_token = session('SYNCLOGIN_ACCESS_TOKEN');
     parent::_initialize();
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->model = $this->getModel('address');
     $res['title'] = '用户地址管理';
     $res['url'] = U('lists');
     $res['class'] = 'current';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
 public function _initialize()
 {
     $controller = strtolower(_CONTROLLER);
     $action = strtolower(_ACTION);
     $res['title'] = '插件配置';
     $res['url'] = addons_url('MoonEating://MoonEating/config');
     $res['class'] = $controller == 'mooneating' && $action == 'config' ? 'current' : '';
     $nav[] = $res;
     parent::_initialize();
 }
示例#10
0
 function _initialize()
 {
     parent::_initialize();
     $controller = strtolower(_CONTROLLER);
     $res['title'] = '优惠券';
     $res['url'] = addons_url('Coupon://Coupon/lists');
     $res['class'] = $controller == 'coupon' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
示例#11
0
 public function _initialize()
 {
     parent::_initialize();
     $controller = strtolower(_ACTION);
     $res['title'] = '酒店管理';
     $res['url'] = addons_url('Hotel://Hotel/lists');
     $res['class'] = 'current';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
示例#12
0
 function _initialize()
 {
     parent::_initialize();
     $controller = strtolower(_CONTROLLER);
     $res['title'] = '刮刮卡';
     $res['url'] = addons_url('Scratch://Scratch/lists');
     $res['class'] = $controller == 'scratch' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
 function _initialize()
 {
     parent::_initialize();
     // 获取当前登录的用户的商城
     $map['token'] = get_token();
     $map['manamger_id'] = $this->mid;
     $this->shop_id = 0;
     $currentShopInfo = M('shop')->where($map)->find();
     if ($currentShopInfo) {
         $this->shop_id = $currentShopInfo['id'];
     } elseif (_ACTION != 'summary' && _ACTION != 'add') {
         redirect(addons_url('Shop://Shop/summary'));
     }
     $controller = strtolower(_CONTROLLER);
     // $res ['title'] = '商店管理';
     // $res ['url'] = addons_url ( 'Shop://Shop/lists' );
     // $res ['class'] = ($controller == 'shop' && _ACTION == "lists") ? 'current' : '';
     // $nav [] = $res;
     $res['title'] = '店铺汇总';
     $res['url'] = addons_url('Shop://Shop/summary');
     $res['class'] = $controller == 'shop' && _ACTION == "summary" ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '基本信息';
     $res['url'] = addons_url('Shop://Shop/edit');
     $res['class'] = $controller == 'shop' && _ACTION == "edit" ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '幻灯片';
     $res['url'] = addons_url('Shop://Slideshow/lists');
     $res['class'] = $controller == 'slideshow' && _ACTION == "lists" ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '商品分组';
     $res['url'] = addons_url('Shop://Category/lists');
     $res['class'] = $controller == 'category' && _ACTION == "lists" ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '商品管理';
     $res['url'] = addons_url('Shop://Goods/lists');
     $res['class'] = $controller == 'goods' && _ACTION == "lists" ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '订单管理';
     $res['url'] = addons_url('Shop://Order/lists');
     $res['class'] = $controller == 'order' && _ACTION == "lists" ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '模板管理';
     $res['url'] = addons_url('Shop://Template/lists');
     $res['class'] = $controller == 'template' && _ACTION == "lists" ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '支付配置';
     $res['url'] = addons_url('Payment://Payment/lists');
     $res['class'] = $controller == 'payment' && _ACTION == "lists" ? 'current' : '';
     $nav[] = $res;
     //$nav = array ();
     $this->assign('nav', $nav);
     define('CUSTOM_TEMPLATE_PATH', ONETHINK_ADDON_PATH . 'Shop/View/default/Wap/Template');
 }
示例#14
0
 function _initialize()
 {
     parent::_initialize();
     $res['title'] = '优惠券';
     $res['url'] = addons_url('Coupon://Coupon/lists');
     $nav[] = $res;
     $res['title'] = '门店管理';
     $res['url'] = addons_url('Coupon://Shop/lists', array('coupon_id' => I('coupon_id')));
     $res['class'] = 'current';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
示例#15
0
 function _initialize()
 {
     parent::_initialize();
     $this->token = get_token();
     $this->assign('token', get_token());
     if (!session("session_hotel_openid")) {
         session("session_hotel_openid", get_openid() != -1 ? get_openid() : 'guest_' . time() . rand(100000, 999999));
     }
     $this->openid = session("session_hotel_openid");
     $this->assign('openid', $this->openid);
     $this->hid = $_SESSION["session_hotel_{get_token()}"];
     $this->assign('hid', $this->hid);
 }
示例#16
0
 function _initialize()
 {
     parent::_initialize();
     $controller = strtolower(_CONTROLLER);
     /*
      * $res ['title'] = '微网设置';
      * $res ['url'] = addons_url ( 'WeiSite://WeiSite/config' );
      * $res ['class'] = $controller == 'weisite' ? 'current' : '';
      * $nav [] = $res;
      *
      * $res ['title'] = '分类管理';
      * $res ['url'] = addons_url ( 'WeiSite://Category/lists' );
      * $res ['class'] = $controller == 'category' ? 'current' : '';
      * $nav [] = $res;
      *
      * $res ['title'] = '首页幻灯片';
      * $res ['url'] = addons_url ( 'WeiSite://Slideshow/lists' );
      * $res ['class'] = $controller == 'slideshow' ? 'current' : '';
      * $nav [] = $res;
      *
      * $res ['title'] = '底部导航';
      * $res ['url'] = addons_url ( 'WeiSite://Footer/lists' );
      * $res ['class'] = $controller == 'footer' ? 'current' : '';
      * $nav [] = $res;
      *
      * $res ['title'] = '文章管理';
      * $res ['url'] = addons_url ( 'WeiSite://Cms/lists' );
      * $res ['class'] = $controller == 'cms' ? 'current' : '';
      * $nav [] = $res;
      *
      * $res ['title'] = '模板管理';
      * $res ['url'] = addons_url ( 'WeiSite://Template/index' );
      * $res ['class'] = $controller == 'template' ? 'current' : '';
      * $nav [] = $res;
      */
     $this->assign('nav', array());
     $config = getAddonConfig('WeiSite');
     $config['cover_url'] = get_cover_url($config['cover']);
     $config['background_id'] = $config['background'];
     $config['background'] = get_cover_url($config['background']);
     $this->config = $config;
     $this->assign('config', $config);
     // dump ( $config );
     // dump(get_token());
     // 定义模板常量
     $act = strtolower(_ACTION);
     $temp = $config['template_' . $act];
     $act = ucfirst($act);
     $this->assign('page_title', $config['title']);
     define('CUSTOM_TEMPLATE_PATH', ONETHINK_ADDON_PATH . 'WeiSite/View/default/Template');
 }
 function _initialize()
 {
     parent::_initialize();
     $controller = strtolower(_CONTROLLER);
     //         $res ['title'] = '微名片';
     //         $res ['url'] = addons_url ( 'BusinessCard://BusinessCard/lists' );
     //         $res ['class'] = $controller == 'businesscard' ? 'current' : '';
     //         $nav [] = $res;
     $res['title'] = '栏目管理';
     $res['url'] = addons_url('BusinessCard://BusinessCardColunm/lists');
     $res['class'] = $controller == 'businesscardcolunm' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
示例#18
0
 function _initialize()
 {
     parent::_initialize();
     $controller = strtolower(_CONTROLLER);
     // $res['title'] = '抽奖活动';
     // $res['url'] = addons_url('Draw://Draw/lists');
     // $res['class'] = $controller == 'draw' ? 'current' : '';
     // $nav[] = $res;
     $res['title'] = '奖品管理';
     $res['url'] = addons_url('Draw://Award/lists');
     $res['class'] = $controller == 'award' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
示例#19
0
 function _initialize()
 {
     parent::_initialize();
     $controller = strtolower(_CONTROLLER);
     $res['title'] = '模拟测试';
     $res['url'] = addons_url('Debug://Debug/lists');
     $res['class'] = $controller == 'debug' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '消息日志';
     $res['url'] = addons_url('Debug://Log/lists');
     $res['class'] = $controller == 'log' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
 public function _initialize()
 {
     parent::_initialize();
     $controller = strtolower(_ACTION);
     $res['title'] = '模板消息';
     $res['url'] = addons_url('Tmplmsg://Tmplmsg/lists');
     $res['class'] = $controller == 'lists' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '模板消息测试';
     $res['url'] = addons_url('Tmplmsg://Tmplmsg/test');
     $res['class'] = $controller == 'test' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
示例#21
0
 function _initialize()
 {
     parent::_initialize();
     // 本地未绑定用户信息 如果是需要用户信息的操作 则转至用户新绑定页面
     if (!cookie($this->SHOP_COOKIE_NAME . C('SITE_VERSION'))) {
         $actionsNotNeedLogin = array('index', 'bindUser', 'asynNoticeFromQianFang');
         if (!in_array(_ACTION, $actionsNotNeedLogin)) {
             $this->redirect("bindUser");
         }
     } else {
         $userInfoJson = cookie($this->SHOP_COOKIE_NAME . C('SITE_VERSION'));
         $this->userID = json_decode($userInfoJson);
     }
 }
 function _initialize()
 {
     parent::_initialize();
     $this->model = $this->getModel('exam_question');
     $param['exam_id'] = $this->exam_id = intval($_REQUEST['exam_id']);
     $res['title'] = '微考试';
     $res['url'] = addons_url('Exam://Exam/lists');
     $res['class'] = '';
     $nav[] = $res;
     $res['title'] = '题目管理';
     $res['url'] = addons_url('Exam://Question/lists', $param);
     $res['class'] = 'current';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->model = $this->getModel('scene_qrcode');
     $controller = strtolower(_CONTROLLER);
     $res['title'] = '二维码管理';
     $res['url'] = addons_url('SceneQrcode://SceneQrcode/lists');
     $res['class'] = $controller == 'sceneqrcode' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '扫描统计';
     $res['url'] = addons_url('SceneQrcode://Statistics/lists');
     $res['class'] = $controller == 'statistics' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
示例#24
0
 function _initialize()
 {
     parent::_initialize();
     $this->model = $this->getModel('hotel_room');
     $param['hid'] = $this->hid = intval($_REQUEST['hid']);
     $res['title'] = '酒店管理';
     $res['url'] = addons_url('Hotel://Hotel/lists');
     $res['class'] = '';
     $nav[] = $res;
     $res['title'] = '房间管理';
     $res['url'] = addons_url('Hotel://Room/lists', $param);
     $res['class'] = 'current';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
 function _initialize()
 {
     parent::_initialize();
     $this->model = $this->getModel('survey_answer');
     $param['survey_id'] = $this->survey_id = intval($_REQUEST['survey_id']);
     $res['title'] = '微调研';
     $res['url'] = addons_url('Survey://Survey/lists');
     $res['class'] = '';
     $nav[] = $res;
     $res['title'] = '数据管理';
     $res['url'] = addons_url('Survey://Answer/lists', $param);
     $res['class'] = 'current';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
 function _initialize()
 {
     parent::_initialize();
     $this->model = $this->getModel('ask_question');
     $param['ask_id'] = $this->ask_id = intval($_REQUEST['ask_id']);
     $res['title'] = '微抢答';
     $res['url'] = addons_url('Ask://Ask/lists');
     $res['class'] = '';
     $nav[] = $res;
     $res['title'] = '问题管理';
     $res['url'] = addons_url('Ask://Question/lists', $param);
     $res['class'] = 'current';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
 function _initialize()
 {
     parent::_initialize();
     $controller = strtolower(_CONTROLLER);
     $action = strtolower(_ACTION);
     $res['title'] = '插件配置';
     $res['url'] = addons_url('Suggestions://Suggestions/config');
     $res['class'] = $controller == 'suggestions' && $action == 'config' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '用户反馈';
     $res['url'] = addons_url('Suggestions://Suggestions/lists');
     $res['class'] = $controller == 'suggestions' && $action == 'lists' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
 function _initialize()
 {
     parent::_initialize();
     $this->model = $this->getModel('test_answer');
     $param['test_id'] = $this->test_id = intval($_REQUEST['test_id']);
     $res['title'] = '微测试';
     $res['url'] = addons_url('Test://Test/lists');
     $res['class'] = '';
     $nav[] = $res;
     $res['title'] = '数据管理';
     $res['url'] = addons_url('Test://Answer/lists', $param);
     $res['class'] = 'current';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }
 function _initialize()
 {
     parent::_initialize();
     $res['title'] = '优惠券';
     $res['url'] = addons_url('Coupon://Coupon/lists');
     $res['class'] = 'current';
     $nav[] = $res;
     $res['title'] = '门店管理';
     $res['url'] = addons_url('Coupon://Shop/lists', array('coupon_id' => I('coupon_id')));
     $res['class'] = '';
     $nav[] = $res;
     $this->assign('nav', $nav);
     if (_ACTION == 'package') {
         $GLOBALS['is_wap'] = true;
     }
 }
 function _initialize()
 {
     parent::_initialize();
     $res['title'] = '抽奖游戏活动';
     $res['url'] = addons_url('Draw://Games/lists');
     $res['class'] = _CONTROLLER == 'Games' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '奖品库管理';
     $res['url'] = addons_url('Draw://Award/lists');
     $res['class'] = _CONTROLLER == 'Award' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '中奖者列表';
     $res['url'] = addons_url('Draw://LuckyFollow/games_lucky_lists');
     $res['class'] = _CONTROLLER == 'LuckyFollow' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
 }