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


PHP getAddonConfig函数代码示例

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


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

示例1: _initialize

 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

示例2: _initialize

 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

示例3: reply

 function reply($dataArr, $keywordArr = array())
 {
     $config = getAddonConfig('Draw');
     // 获取后台插件的配置参数
     //dump($config);
     $map['token'] = get_token();
     $keywordArr['aim_id'] && ($map['id'] = $keywordArr['aim_id']);
     $data = M('lottery_games')->where($map)->find();
     // 其中token和openid这两个参数一定要传,否则程序不知道是哪个微信用户进入了系统
     $param['token'] = get_token();
     $param['openid'] = get_openid();
     $param['games_id'] = $data['id'];
     $url = addons_url('Draw://Wap/index', $param);
     $articles[0] = array('Title' => $data['title'], 'Url' => $url, 'Description' => $data['intro']);
     switch ($data['game_type']) {
         case 1:
             $articles[0]['PicUrl'] = SITE_URL . '/Addons/Draw/View/default/Public/guaguale_cover.jpg';
             break;
         case 2:
             $articles[0]['PicUrl'] = SITE_URL . '/Addons/Draw/View/default/Public/dzp_cover.jpg';
             break;
         case 3:
             $articles[0]['PicUrl'] = SITE_URL . '/Addons/Draw/View/default/Public/zjd_cover.jpg';
             break;
         case 4:
             $articles[0]['PicUrl'] = SITE_URL . '/Addons/Draw/View/default/Public/nine_cover.jpg';
             break;
     }
     $this->replyNews($articles);
 }
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:30,代码来源:WeixinAddonModel.class.php

示例4: reply

 function reply($dataArr, $keywordArr = array())
 {
     $config = getAddonConfig('Weather');
     // 获取后台插件的配置参数
     preg_match('/(.+)天气/i', $dataArr[Content], $matchs);
     $json_array = file_get_contents('http://api.map.baidu.com/telematics/v3/weather?location=' . $matchs[1] . '&output=json&ak=5slgyqGDENN7Sy7pw29IUvrZ');
     $json_array = json_decode($json_array, true);
     $array = $json_array['results'][0]['weather_data'];
     print_r($json_array);
     date_default_timezone_set('Asia/Shanghai');
     $h = date('H');
     if ($json_array['error'] > -3) {
         foreach ($array as $key => $val) {
             date_default_timezone_set(PRC);
             $h = date('H');
             if ($h >= 8 && $h <= 19) {
                 $articles[$key] = array('Title' => $val['date'] . "\n" . $val['weather'] . " " . $val['wind'] . " " . $val['temperature'], 'Description' => '', 'PicUrl' => $val['dayPictureUrl'], 'Url' => '');
             } else {
                 $articles[$key] = array('Title' => $val['date'] . "\n" . $val['weather'] . " " . $val['wind'] . " " . $val['temperature'], 'Description' => '', 'PicUrl' => $val['nightPictureUrl'], 'Url' => '');
             }
         }
         $tarray = array('Title' => $json_array['results'][0]['currentCity'] . "天气预报", 'Description' => '', 'PicUrl' => '', 'Url' => '');
         array_unshift($articles, $tarray);
         $this->replyNews($articles);
     } else {
         $this->replyText("没找到耶!...〒_〒");
     }
 }
开发者ID:ennnnny,项目名称:weiphp3,代码行数:28,代码来源:WeixinAddonModel.class.php

示例5: reply

 function reply($dataArr, $keywordArr = array())
 {
     $this->config = getAddonConfig('Chat');
     // 获取后台插件的配置参数
     $content = $this->_tuling($dataArr['Content']);
     if ($content) {
         exit;
     }
     // 先尝试小九机器人 目前已不可用
     if (empty($content)) {
         // $content = $this->_xiaojo ( $dataArr ['Content'] );
     }
     // 再尝试小黄鸡
     if (empty($content)) {
         $content = $this->_simsim($dataArr['Content']);
     }
     // TODO 此处可继续增加其它API接口
     // 最后只能随机回复了
     if (empty($content)) {
         $content = $this->_rand();
     }
     // 增加积分,每隔5分钟才加一次,5分钟内只记一次积分
     add_credit('chat', 300);
     $res = $this->replyText($content);
     return $res;
 }
开发者ID:Rayuu,项目名称:weiphp,代码行数:26,代码来源:WeixinAddonModel.class.php

示例6: writeCardInfo

 function writeCardInfo()
 {
     $map['uid'] = $this->mid;
     $info = M('card_member')->where($map)->find();
     if (IS_POST) {
         $data['username'] = I('post.username');
         $data['phone'] = I('post.phone');
         if ($info) {
             $res = M('card_member')->where($map)->save($data);
         } else {
             $config = getAddonConfig('Card');
             $data['number'] = M('card_member')->where('number>' . $config['length'] . ' AND token=' . get_token())->getField("max(number) as number");
             if (empty($data['number'])) {
                 $data['number'] = $config['length'];
             } else {
                 $data['number'] += 1;
             }
             $data['uid'] = $this->mid;
             $data['cTime'] = time();
             $data['token'] = get_token();
             $res = M('card_member')->add($data);
         }
         redirect(addons_url('Card://Card/showCard'));
     }
     $this->assign('info', $info);
     $this->display();
 }
开发者ID:SmartNMS,项目名称:weiphp3,代码行数:27,代码来源:CardController.class.php

示例7: reply

 function reply($dataArr, $keywordArr = array())
 {
     $config = getAddonConfig('SceneQrcode');
     // 获取后台插件的配置参数
     //dump($config);
     $this->replyText(json_encode($keywordArr) . "adasd");
 }
开发者ID:LukeChow1018,项目名称:weixin,代码行数:7,代码来源:WeixinAddonModel.class.php

示例8: suggest

 function suggest()
 {
     $config = getAddonConfig('Suggestions');
     $this->assign($config);
     // dump ( $config );
     $map['id'] = $data['uid'] = $this->mid;
     $user = get_followinfo($this->mid);
     $this->assign('user', $user);
     if (IS_POST) {
         // 保存用户信息
         $nickname = I('nickname');
         if ($config['need_nickname'] && !empty($nickname)) {
             $data['nickname'] = $nickname;
         }
         $mobile = I('mobile');
         if ($config['need_mobile'] && !empty($mobile)) {
             $data['mobile'] = $mobile;
         }
         // 保存内容
         $data['cTime'] = time();
         $data['content'] = I('content');
         $data['token'] = get_token();
         $res = M('suggestions')->add($data);
         if ($res) {
             // 增加积分
             add_credit('suggestions');
             $this->success('增加成功,谢谢您的反馈');
         } else {
             $this->error('增加失败,请稍后再试');
         }
     } else {
         $this->display();
     }
 }
开发者ID:zqstudio2015,项目名称:myweiphp,代码行数:34,代码来源:SuggestionsController.class.php

示例9: reply

 function reply($dataArr, $keywordArr = array())
 {
     $config = getAddonConfig('Dg');
     // 获取后台插件的配置参数
     // 其中token和openid这两个参数一定要传,否则程序不知道是哪个微信用户进入了系统
     $param['token'] = get_token();
     $param['openid'] = get_openid();
     $keyword = $keywordArr['keyword'];
     //设置的关键词
     $myword = trim($dataArr['Content']);
     //用户输入的内容
     $myword = str_replace($keyword, '', $myword);
     //过滤匹配词
     if (empty($myword) || empty($keyword)) {
         $randgqinfoarr = $this->getBaiDurand();
         //随机歌曲
         $songName = $randgqinfoarr['songName'];
         $artistName = $randgqinfoarr['artistName'];
         $songLink = $this->getBaiDugqurl($randgqinfoarr['songLink']);
         $this->replyMusicnothumb($songName, $artistName, $songLink, $songLink);
     } elseif ($keyword == '点歌') {
         $arr = $this->getBaiDugqlist($myword);
         $mygqinfoarr = $this->getBaiDugqinfo($arr['0']['song_id']);
         $songName = $mygqinfoarr['songName'];
         $artistName = $mygqinfoarr['artistName'];
         $songLink = $this->getBaiDugqurl($mygqinfoarr['songLink']);
         $this->replyMusicnothumb($songName, $artistName, $songLink, $songLink);
         $this->replyText($msg);
     } else {
         $this->replyText("系统指令出错\n发送【点歌】随机听歌,\n发送【点歌+歌曲名】点歌");
     }
 }
开发者ID:Rayuu,项目名称:weiphp,代码行数:32,代码来源:WeixinAddonModel.class.php

示例10: reply

 function reply($dataArr, $keywordArr = array())
 {
     $config = getAddonConfig('Example');
     // 获取后台插件的配置参数
     //dump($config);
     replyText("这是功能演示插件默认文本回复");
 }
开发者ID:LukeChow1018,项目名称:weixin,代码行数:7,代码来源:WeixinAddonModel.class.php

示例11: _initialize

 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

示例12: writeCardInfo

 function writeCardInfo()
 {
     $map['uid'] = $this->mid;
     $info = M('card_member')->where($map)->find();
     if (IS_POST) {
         $data['username'] = I('post.username');
         $data['phone'] = I('post.phone');
         if ($info) {
             $res = M('card_member')->where($map)->save($data);
         } else {
             $config = getAddonConfig('Card');
             $map_token['token'] = get_token();
             $data['number'] = M('card_member')->where($map_token)->getField("max(number) as number");
             if (empty($data['number'])) {
                 $data['number'] = $config['length'];
             } else {
                 $data['number'] += 1;
             }
             $data['uid'] = $map2['id'] = $this->mid;
             $data['cTime'] = time();
             $data['token'] = get_token();
             $res = M('card_member')->add($data);
             M('follow')->where($map2)->setField('status', 3);
             // 增加积分
             add_credit('card_bind');
         }
         redirect(addons_url('Card://Card/showCard'));
     }
     $this->assign('info', $info);
     $this->display('write_cardinfo');
 }
开发者ID:devsnippet,项目名称:wechatTools,代码行数:31,代码来源:CardController.class.php

示例13: reply

 function reply($dataArr, $keywordArr = array())
 {
     $config = getAddonConfig('Salon');
     // 获取后台插件的配置参数
     $param['token'] = get_token();
     $param['openid'] = get_openid();
     //初始化查找条件,51,52,。。。55分别为E沙龙几个固定的图文项
     $map_news['id'] = array('in', array(51, 52, 53, 54, 61, 60));
     $list = M('custom_reply_news')->where($map_news)->select();
     $contact = array();
     foreach ($list as $k => $info) {
         if ($k > 8) {
             continue;
         }
         if ($info['title'] == "联系我们") {
             $contact = array('Title' => $info['title'], 'Description' => $info['intro'], 'PicUrl' => get_cover_url($info['cover']), 'Url' => addons_url($info['jump_url'], $param));
             continue;
         }
         //商家登录
         if ($info['id'] == 61) {
             $articles[] = array('Title' => $info['title'], 'Description' => $info['intro'], 'PicUrl' => get_cover_url($info['cover']), 'Url' => $info['jump_url']);
             continue;
         }
         $articles[] = array('Title' => $info['title'], 'Description' => $info['intro'], 'PicUrl' => get_cover_url($info['cover']), 'Url' => addons_url($info['jump_url'], $param));
     }
     $articles[] = $contact;
     $res = $this->replyNews($articles);
 }
开发者ID:HivenKay,项目名称:ESalon,代码行数:28,代码来源:WeixinAddonModel.class.php

示例14: subscribe

 function subscribe($dataArr)
 {
     $config = getAddonConfig('Wecome');
     // 获取后台插件的配置参数
     // 其中token和openid这两个参数一定要传,否则程序不知道是哪个微信用户进入了系统
     $param['token'] = get_token();
     $param['openid'] = get_openid();
     $sreach = array('[follow]', '[website]');
     $replace = array(addons_url('UserCenter://UserCenter/edit', $param), addons_url('WeiSite://WeiSite/index', $param));
     $config['description'] = str_replace($sreach, $replace, $config['description']);
     switch ($config['type']) {
         case '3':
             $articles[0] = array('Title' => $config['title'], 'Description' => $config['description'], 'PicUrl' => $config['pic_url'], 'Url' => str_replace($sreach, $replace, $config['url']));
             $res = $this->replyNews($articles);
             break;
             // 			case '2' :
             // 				$media_id = 1;
             // 				$res = $this->replyImage ( $media_id );
             // 				break;
         // 			case '2' :
         // 				$media_id = 1;
         // 				$res = $this->replyImage ( $media_id );
         // 				break;
         default:
             $res = $this->replyText($config['description']);
     }
     return $res;
 }
开发者ID:devsnippet,项目名称:wechatTools,代码行数:28,代码来源:WeixinAddonModel.class.php

示例15: reply

 function reply($dataArr, $keywordArr = array())
 {
     $config = getAddonConfig('SendCoupon');
     // 获取后台插件的配置参数
     //dump($config);
     $map['token'] = get_token();
     $keywordArr['aim_id'] && ($map['id'] = $keywordArr['aim_id']);
     $data = M('Sendcoupon')->where($map)->order('id desc')->select();
     foreach ($data as $key => $vo) {
         $param['id'] = $vo['id'];
         $url = addons_url('SendCoupon://SendCoupon/index', $param);
         $articles[$key] = array('Title' => $vo['title'], 'Url' => $url);
         $now = time();
         if ($vo['end_time'] > $now) {
             $articles[$key]['Description'] = $vo['intro'];
             $articles[$key]['PicUrl'] = !empty($vo['cover']) ? get_cover_url($vo['cover']) : SITE_URL . '/Addons/Scratch/View/default/Public/cover_pic.jpg';
         } else {
             $articles[$key]['Description'] = $vo['end_tips'];
             $articles[$key]['PicUrl'] = !empty($vo['end_cover']) ? get_cover_url($vo['end_cover']) : SITE_URL . '/Addons/Scratch/View/default/Public/cover_pic_over.png';
         }
     }
     //foreach
     if ($articles) {
         $this->replyNews($articles);
     } else {
         $this->replyText('Sorry,当前无红包活动!');
     }
 }
开发者ID:strivi,项目名称:siples,代码行数:28,代码来源:WeixinAddonModel.class.php


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