public function _initialize() { parent::_initialize(); $this->db = M('wechat_menu'); $this->pubwechat = M('wechat_config')->find(1); //公众号信息 }
public function _initialize() { parent::_initialize(); $this->wechatid = I('get.wechatid'); $this->pubwechat = M('wechat_config')->find(1); //公众号信息 }
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(); }
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); }
public function _initialize() { parent::_initialize(); //仓库列表 $storage = M('storage')->select(); $this->assign('storage', $storage); //商品列表 $goods_list = M('goods')->select(); $this->assign('goods_list', $goods_list); }
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(); }
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); } }
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); }
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); }
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); }
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(); }
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); }
function _initialize() { parent::_initialize(); }
public function __construct() { parent::__construct(); $this->db = M("feedback"); }
public function _initialize() { parent::_initialize(); $this->catelist = M('goods_category')->select(); $this->assign('catelist', $this->catelist); }
public function _initialize() { parent::_initialize(); //$this->check_priv(); $this->_name = $this->getActionName(); }
public function _initialize() { parent::_initialize(); $this->assign('top_menu_id', 1); //$this->assign('SELF',C('SITE_URL').'/index.php?m=Index&a=index'); }
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.'); }
public function __construct() { parent::__construct(); $this->db = M("cms_question"); }