当前位置: 首页>>代码示例>>PHP>>正文


PHP Controller\AddonsController类代码示例

本文整理汇总了PHP中Home\Controller\AddonsController的典型用法代码示例。如果您正苦于以下问题:PHP AddonsController类的具体用法?PHP AddonsController怎么用?PHP AddonsController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了AddonsController类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->model = M('Model')->getByName('e_iteam');
     $this->assign('model', $this->model);
     $this->assign('is_iteam', 1);
 }
开发者ID:HivenKay,项目名称:ESalon,代码行数:7,代码来源:AcademicController.class.php

示例2: lists

 public function lists()
 {
     $normal_tips = "<a href='http://idouly.com/wenda/?/article/37' target='_blank'>插件更新说明</a>";
     $this->assign('normal_tips', $normal_tips);
     $this->assign('add_button', false);
     parent::lists($this->model);
 }
开发者ID:Rayuu,项目名称:weiphp,代码行数:7,代码来源:LoveController.class.php

示例3: strtolower

 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');
 }
开发者ID:strivi,项目名称:siples,代码行数:25,代码来源:BaseController.class.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->token = get_token();
     $this->wecha_id = get_openid();
     // 读取配置
     $pay_config_db = M('payment_set');
     $paymentSet = $pay_config_db->where(array('token' => $this->token))->find();
     if ($paymentSet['wx_cert_pem'] && $paymentSet['wx_key_pem']) {
         $ids[] = $paymentSet['wx_cert_pem'];
         $ids[] = $paymentSet['wx_key_pem'];
         $map['id'] = array('in', $ids);
         $fileData = M('file')->where($map)->select();
         $downloadConfig = C(DOWNLOAD_UPLOAD);
         foreach ($fileData as $f) {
             if ($paymentSet['wx_cert_pem'] == $f['id']) {
                 $certpath = SITE_PATH . str_replace('/', '\\', substr($downloadConfig['rootPath'], 1) . $f['savepath'] . $f['savename']);
             } else {
                 $keypath = SITE_PATH . str_replace('/', '\\', substr($downloadConfig['rootPath'], 1) . $f['savepath'] . $f['savename']);
             }
         }
         $paymentSet['cert_path'] = $certpath;
         $paymentSet['key_path'] = $keypath;
     }
     $this->payConfig = $paymentSet;
     session('paymentinfo', $this->payConfig);
 }
开发者ID:chenpusn,项目名称:guoxian,代码行数:27,代码来源:WeixinController.class.php

示例5: strtolower

 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);
 }
开发者ID:LukeChow1018,项目名称:weixin,代码行数:28,代码来源:BaseController.class.php

示例6: I

 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 );
 }
开发者ID:ennnnny,项目名称:weiphp3,代码行数:27,代码来源:WapController.class.php

示例7: strtolower

 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());
 }
开发者ID:zqstudio2015,项目名称:myweiphp,代码行数:27,代码来源:BaseController.class.php

示例8: M

 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');
 }
开发者ID:chenpusn,项目名称:guoxian,代码行数:29,代码来源:BaseController.class.php

示例9: lists

 public function lists()
 {
     $this->assign('add_button', true);
     $this->assign('del_button', true);
     $this->assign('check_all', false);
     $model = $this->getModel('xytl');
     parent::common_lists($model);
 }
开发者ID:amotewangrong,项目名称:WeiPHP-SWXZS,代码行数:8,代码来源:XytlController.class.php

示例10: _initialize

 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();
 }
开发者ID:admpub,项目名称:OpenCenter,代码行数:8,代码来源:BaseController.class.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $this->SQL_QUERY_CANDIDATES = "SELECT *, COALESCE(T2.count2, 0) AS count FROM " . C('DB_PREFIX') . "wevote_candidates AS T1\nLEFT JOIN (SELECT COUNT(id) AS count2, candidate_id FROM " . C('DB_PREFIX') . "wevote_info GROUP BY candidate_id) AS T2\nON T1.id = T2.candidate_id\nWHERE (action_id = %d) AND (status = 1) %s\nORDER BY count DESC LIMIT %d, %d";
     $this->SQL_QUERY_CANDIDATES_LATEST = "SELECT *, COALESCE(T2.count2, 0) AS count FROM " . C('DB_PREFIX') . "wevote_candidates AS T1\nLEFT JOIN (SELECT COUNT(id) AS count2, candidate_id FROM " . C('DB_PREFIX') . "wevote_info GROUP BY candidate_id) AS T2\nON T1.id = T2.candidate_id\nWHERE (action_id = %d) AND (status = 1) %s\nORDER BY T1.datetime DESC LIMIT %d, %d";
     $this->SQL_QUERY_CANDIDATES_ALL = "SELECT *, COALESCE(T2.count2, 0) AS count FROM " . C('DB_PREFIX') . "wevote_candidates AS T1\nLEFT JOIN (SELECT COUNT(id) AS count2, candidate_id FROM " . C('DB_PREFIX') . "wevote_info GROUP BY candidate_id) AS T2\nON T1.id = T2.candidate_id\nWHERE (action_id = %d) AND (status = 1) %s\nORDER BY T1.id DESC LIMIT %d, %d";
     $this->SQL_QUERY_VoteInfo = "SELECT c.title,COUNT(0) num FROM " . C('DB_PREFIX') . "wevote_voters AS v\nLEFT JOIN  " . C('DB_PREFIX') . "wevote_info i ON v.id = i.voter_id\nLEFT JOIN " . C('DB_PREFIX') . "wevote_candidates c ON i.candidate_id = c.id\nWHERE (v.openid = '%s') AND (v.action_id = %d) GROUP BY c.title";
 }
开发者ID:Backflag,项目名称:weiphp2.0.1202,代码行数:8,代码来源:HomeController.class.php

示例12: getAddonConfig

 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);
 }
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:8,代码来源:LeafletsController.class.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $this->token = get_token();
     $this->wecha_id = get_openid();
     // 读取配置
     $alipay_config_db = M('payment_set');
     $this->alipayConfig = $alipay_config_db->where(array('token' => $this->token))->find();
 }
开发者ID:LukeChow1018,项目名称:weixin,代码行数:9,代码来源:AlipayController.class.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $this->model = M('Model')->getByName($_REQUEST['_controller']);
     $this->model || $this->error('模型不存在!');
     $this->assign('model', $this->model);
     $this->option = M('Model')->getByName('vote_option');
     $this->assign('option', $this->option);
 }
开发者ID:pondyond,项目名称:WeiPHP,代码行数:9,代码来源:VoteController.class.php

示例15: _initialize

 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);
 }
开发者ID:Rayuu,项目名称:weiphp,代码行数:10,代码来源:HotelController.class.php


注:本文中的Home\Controller\AddonsController类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。