示例#1
0
 public function _initialize()
 {
     parent::_initialize();
     $this->db = M('wechat_menu');
     $this->pubwechat = M('wechat_config')->find(1);
     //公众号信息
 }
示例#2
0
 public function _initialize()
 {
     parent::_initialize();
     $this->wechatid = I('get.wechatid');
     $this->pubwechat = M('wechat_config')->find(1);
     //公众号信息
 }
示例#3
0
 public function _initialize()
 {
     parent::_initialize();
     $navlist = M('navlink')->where(array('fup' => 0))->select();
     $this->assign('navlist', $navlist);
     //前台链接地址
     $url = array(array('title' => '商城首页', 'url' => U('Weixin/Index/index')), array('title' => '商品列表', 'url' => U('Weixin/Index/product_list')), array('title' => '商品分类', 'url' => U('Weixin/Index/category')), array('title' => '购物车', 'url' => U('Weixin/Index/cart')), array('title' => '注册', 'url' => U('Weixin/Member/reg')), array('title' => '我要开店', 'url' => U('Weixin/Member/shop_reg')), array('title' => '登录', 'url' => U('Weixin/Member/login')), array('title' => '开店', 'url' => U('Weixin/Member/shop_reg')), array('title' => '我的店铺', 'url' => U('Weixin/Index/shop_index')), array('title' => '个人中心', 'url' => U('Weixin/Ucenter/index')), array('title' => '我的订单', 'url' => U('Weixin/Ucenter/order_list')), array('title' => '积分订单', 'url' => U('Weixin/Ucenter/jifen_order')), array('title' => '销售订单', 'url' => U('Weixin/Ucenter/sale_order')), array('title' => '店铺管理', 'url' => U('Weixin/Ucenter/shop_config')), array('title' => '资金账户', 'url' => U('Weixin/Ucenter/fund')), array('title' => '积分账户', 'url' => U('Weixin/Ucenter/jifen')));
     //产品分类列表
     $cate = M('goods_category')->field('id,name')->select();
     foreach ($cate as $val) {
         $cate_nav[] = array('title' => $val['name'], 'url' => U('Weixin/Index/product_list', array('id' => $val['id'])));
     }
     $all_url = array_merge($cate_nav, $url);
     $this->assign('url', $all_url);
     //文章列表
     $cms_list = M('cms_sort')->field('id,name')->select();
     foreach ($cms_list as $key => $val) {
         $art = M('cms_article')->field('id,title')->where(array('fid' => $val['id']))->select();
         foreach ($art as $k => $v) {
             $art[$k]['url'] = U('Weixin/Cms/read', array('id' => $v['id']));
         }
         $cms_list[$key]['art'] = $art;
         unset($art);
     }
     $this->assign('cms_list', $cms_list);
     //dump($cms_list);die();
 }
示例#4
0
 public function _initialize()
 {
     parent::_initialize();
     header("content-type:text/html;charset=utf-8");
     import("@.ORG.Wxhelper");
     $this->wechatid = I('get.wechatid');
     $this->pubwechat = M('pubchatuser')->find(1);
     //公众号信息
     $this->wxhelper = new Wxhelper($this->pubwechat);
 }
示例#5
0
 public function _initialize()
 {
     parent::_initialize();
     //仓库列表
     $storage = M('storage')->select();
     $this->assign('storage', $storage);
     //商品列表
     $goods_list = M('goods')->select();
     $this->assign('goods_list', $goods_list);
 }
示例#6
0
 public function _initialize()
 {
     parent::_initialize();
     //网站状态
     if (!C('WEB_SITE_CLOSE')) {
         header('Content-Type:text/html; charset=utf-8');
         exit(C('WEB_SITE_CLOSE_REASON'));
     }
     $this->detect = new mobile_detect();
 }
示例#7
0
 function _initialize()
 {
     parent::_initialize();
     if (file_exists("./Public/Conf/group_" . $_SESSION["wadmin"] . ".php")) {
         require "./Public/Conf/group_" . $_SESSION["wadmin"] . ".php";
         $this->group_json = json_decode($group_json);
     } else {
         $this->group_json = array(1, 2, 3, 4, 5, 6, 7);
     }
 }
示例#8
0
 public function _initialize()
 {
     parent::_initialize();
     $this->pubwechat = M('wechat_config')->find(1);
     //会员等级
     $_user_level = M('user_level')->select();
     foreach ($_user_level as $val) {
         $user_level[$val['id']] = $val;
     }
     $this->assign('user_level', $user_level);
 }
示例#9
0
 public function _initialize()
 {
     header("content-type:text/html;charset=utf-8");
     parent::_initialize();
     //城市列表
     $map = array('region_type' => 2);
     $keyword = I('get.keyword');
     if (!empty($keyword)) {
         $map['region_name'] = array('like', '%' . $keyword . '%');
     }
     $city_list = M('region')->where($map)->order('first_spell')->select();
     $this->assign('city_list', $city_list);
 }
示例#10
0
 public function _initialize()
 {
     parent::_initialize();
     $_brands = M('goods_brand')->select();
     foreach ($_brands as $val) {
         $brands[$val['id']] = $val;
     }
     $_categorys = M('goods_category')->select();
     foreach ($_categorys as $val) {
         $categorys[$val['id']] = $val;
     }
     $this->assign('brands', $brands);
     $this->assign('categorys', $categorys);
 }
示例#11
0
 public function _initialize()
 {
     parent::_initialize();
     $this->db = M('wechat_replyconf');
     $wx_nav = array(array('name' => '商城首页', 'url' => U('Weixin/Index/index')), array('name' => '商品列表', 'url' => U('Weixin/Index/product_list')), array('name' => '热销商品', 'url' => U('Weixin/Index/product_list', array('is_hot' => 1))), array('name' => '活动商品', 'url' => U('Weixin/Index/product_list', array('is_active' => 1))), array('name' => '个人中心', 'url' => U('Weixin/Ucenter/index')), array('name' => '我的订单', 'url' => U('Weixin/Ucenter/order_list')), array('name' => '我的钱包', 'url' => U('Weixin/Ucenter/wallet')), array('name' => '我的二维码', 'url' => U('Weixin/Ucenter/qrcode')), array('name' => '新人礼包', 'url' => U('Weixin/Ucenter/coupon_list')));
     $this->assign('wx_nav', $wx_nav);
     //系统内容
     $cmslist = M('cms_sort')->field('id,name')->select();
     foreach ($cmslist as $key => $val) {
         $artlist = M('cms_article')->field('id,title')->where(array('fid' => $val['id']))->select();
         $cmslist[$key]['artlist'] = $artlist;
     }
     $this->assign('cmslist', $cmslist);
     //dump($cmslist);die();
 }
示例#12
0
 public function _initialize()
 {
     parent::_initialize();
     header("content-type:text/html;charset=utf-8");
     $_brands = M('goods_brand')->select();
     foreach ($_brands as $val) {
         $brands[$val['id']] = $val;
     }
     $_categorys = M('goods_category')->select();
     foreach ($_categorys as $val) {
         $categorys[$val['id']] = $val;
     }
     $this->assign('brands', $brands);
     $this->assign('categorys', $categorys);
 }
示例#13
0
 function _initialize()
 {
     parent::_initialize();
 }
示例#14
0
 public function __construct()
 {
     parent::__construct();
     $this->db = M("feedback");
 }
示例#15
0
 public function _initialize()
 {
     parent::_initialize();
     $this->catelist = M('goods_category')->select();
     $this->assign('catelist', $this->catelist);
 }
示例#16
0
 public function _initialize()
 {
     parent::_initialize();
     //$this->check_priv();
     $this->_name = $this->getActionName();
 }
示例#17
0
 public function _initialize()
 {
     parent::_initialize();
     $this->assign('top_menu_id', 1);
     //$this->assign('SELF',C('SITE_URL').'/index.php?m=Index&a=index');
 }
示例#18
0
 function newsletter()
 {
     if (empty($_POST['email'])) {
         $this->error('Please input email address');
     }
     self::$Model = D('Newsletter');
     $map['email'] = $data['email'] = $_POST['email'];
     if (self::$Model->where($map)->find()) {
         $this->error('Your email address is subscribed to newsletter!');
     } else {
         $data['addtime'] = time();
         self::$Model->add($data);
     }
     $this->success('Thank you. Your information has been submitted.');
 }
示例#19
0
 public function __construct()
 {
     parent::__construct();
     $this->db = M("cms_question");
 }