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


PHP addons_url函数代码示例

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


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

示例1: ask_answer

 function ask_answer()
 {
     $param['ask_id'] = I('id', 0, 'intval');
     $url = addons_url('Ask://Answer/lists', $param);
     // dump($url);
     redirect($url);
 }
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:7,代码来源:AskController.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: preview

 function preview()
 {
     $vote_id = I('id', 0, 'intval');
     $url = addons_url('Invite://Wap/index', array('id' => $vote_id));
     $this->assign('url', $url);
     $this->display(SITE_PATH . '/Application/Home/View/default/Addons/preview.html');
 }
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:7,代码来源:InviteController.class.php

示例4: preview

 function preview()
 {
     $param['forms_id'] = I('id', 0, 'intval');
     $url = addons_url('Forms://FormsValue/add', $param);
     // dump($url);
     redirect($url);
 }
开发者ID:Backflag,项目名称:weiphp2.0.1202,代码行数:7,代码来源:FormsController.class.php

示例5: formText

 private function formText($user, $config)
 {
     if (!$user) {
         return '请先回复绑定并绑定真实信息以使用本功能.';
     }
     if ($user['user_type'] == 1) {
         return '老师是没有考试成绩的0.0';
     } else {
         $textArr = array();
         $userGrades = M('cjcx')->where(array('school_id' => $user['school_id'], 'term' => $config['term']))->select();
         if (0 == count($userGrades)) {
             return "空记录! 还没有更新呢!";
         }
         foreach ($userGrades as $item) {
             $_t = '';
             $_t .= "课程名称: {$item['course_name']},\n";
             $_t .= "课程属性: {$item['class_type']}, \n";
             $_t .= "学分: {$item['study_score']},\n";
             $_t .= "分数: {$item['stu_grade']}";
             array_push($textArr, $_t);
         }
         $basic = implode("\n\n", $textArr);
         $params['openid'] = get_openid();
         $params['token'] = get_token();
         $more = "\n\n" . "<a href='" . addons_url("Cjcx://Cjcx/center", $params) . "'>查看完整记录</a>";
         return $basic . $more;
     }
 }
开发者ID:amotewangrong,项目名称:WeiPHP-SWXZS,代码行数:28,代码来源:WeixinAddonModel.class.php

示例6: callback

 /**
  * callback  登陆后回调地址
  * @author:xjw129xjt(肖骏涛) xjt@ourstu.com
  */
 public function callback()
 {
     $code = I('get.code');
     $type = I('get.type');
     $is_login = is_login();
     $sns = \ThinkOauth::getInstance($type);
     //腾讯微博需传递的额外参数
     $extend = null;
     if ($type == 'tencent') {
         $extend = array('openid' => I('get.openid'), 'openkey' => I('get.openkey'));
     }
     $token = $sns->getAccessToken($code, $extend);
     if (empty($token)) {
         $this->error('参数错误');
     }
     $session = array('TOKEN' => $token, 'TYPE' => $type, 'OPENID' => $token['openid'], 'ACCESS_TOKEN' => $token['access_token']);
     session('SYNCLOGIN', $session);
     if ($is_login) {
         $this->dealIsLogin($is_login);
     } else {
         $addon_config = get_addon_config('SyncLogin');
         $check = $this->checkIsSync(array('type_uid' => $token['openid'], 'type' => $type));
         if ($addon_config['bind'] && !$check) {
             redirect(addons_url('SyncLogin://Base/bind'));
         } else {
             $this->unBind();
         }
     }
 }
开发者ID:ccccy,项目名称:wuanlife,代码行数:33,代码来源:BaseController.class.php

示例7: survey_answer

 function survey_answer()
 {
     $param['survey_id'] = I('id', 0, 'intval');
     $url = addons_url('Survey://Answer/lists', $param);
     // dump($url);
     redirect($url);
 }
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:7,代码来源:SurveyController.class.php

示例8: getCommonArticles

 public function getCommonArticles($extra_int)
 {
     $map['token'] = get_token();
     $extra_int && ($map['id'] = $extra_int);
     $data = M('scratch')->where($map)->order('id desc')->select();
     if (!$data) {
         return true;
     }
     // 其中token和openid这两个参数一定要传,否则程序不知道是哪个微信用户进入了系统
     //$param ['token'] = get_token ();
     //$param ['openid'] = get_openid ();
     foreach ($data as $key => $vo) {
         $param['id'] = $vo['id'];
         $url = addons_url('Scratch://Scratch/show', $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
     $this->replyNews($articles);
 }
开发者ID:strivi,项目名称:siples,代码行数:27,代码来源:WeixinAddonModel.class.php

示例9: text

 public function text($data)
 {
     if ($data['Content'] == '捐赠列表') {
         $url = addons_url('Donations://Donations/donations_list');
         replyText($url);
     }
 }
开发者ID:LukeChow1018,项目名称:weixin,代码行数:7,代码来源:WeixinAddonModel.class.php

示例10: _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

示例11: add

 function add()
 {
     $business_card_id = I('business_card_id', 0, 'intval');
     $model = $this->getModel('business_card_column');
     if (IS_POST) {
         $map['id'] = $_POST['business_card_id'];
         $cardUid = D('BusinessCard')->where($map)->getField('uid');
         $_POST['uid'] = $cardUid;
         $Model = D(parse_name(get_table_name($model['id']), 1));
         // 获取模型的字段信息
         $Model = $this->checkAttr($Model, $model['id']);
         if ($Model->create() && ($id = $Model->add())) {
             // 清空缓存
             method_exists($Model, 'clear') && $Model->clear($id, 'add');
             $this->success('添加' . $model['title'] . '成功!', U('lists?model=' . $model['name'], $this->get_param));
         } else {
             $this->error($Model->getError());
         }
     } else {
         $fields = get_model_attribute($model['id']);
         if (empty($business_card_id)) {
             $map['uid'] = $this->mid;
             $business_card_id = M('business_card')->where($map)->getField('id');
             if (empty($business_card_id)) {
                 $this->error('请先添加微名片基本信息', addons_url('BusinessCard://BusinessCard/edit'));
             }
         }
         $fields['business_card_id']['value'] = $business_card_id;
         // 	        $fields['business_card_id']['is_show']=4;
         $this->assign('fields', $fields);
         $this->display();
     }
 }
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:33,代码来源:BusinessCardColunmController.class.php

示例12: 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

示例13: _initialize

 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

示例14: callback

 /**
  * 登陆后回调地址
  * autor:xjw129xjt
  */
 public function callback()
 {
     $code = I('get.code');
     $type = I('get.type');
     $is_login = is_login();
     $sns = \ThinkOauth::getInstance($type);
     //腾讯微博需传递的额外参数
     $extend = null;
     if ($type == 'tencent') {
         $extend = array('openid' => I('get.openid'), 'openkey' => I('get.openkey'));
     }
     $token = $sns->getAccessToken($code, $extend);
     session('SYNCLOGIN_TOKEN', $token);
     session('SYNCLOGIN_TYPE', $type);
     session('SYNCLOGIN_OPENID', $token['openid']);
     session('SYNCLOGIN_ACCESS_TOKEN', $token['access_token']);
     $check = D('sync_login')->where("`type_uid`='" . $token['openid'] . "' AND type='" . $type . "'")->select();
     $addon_config = get_addon_config('SyncLogin');
     if ($is_login) {
         $this->dealIsLogin($is_login);
     } else {
         if ($addon_config['bind'] && !$check) {
             redirect(addons_url('SyncLogin://Base/bind'));
         } else {
             $this->unbind();
         }
     }
 }
开发者ID:fishling,项目名称:chatPro,代码行数:32,代码来源:BaseController.class.php

示例15: _initialize

 function _initialize()
 {
     $act = strtolower(ACTION_NAME);
     $controller = strtolower(CONTROLLER_NAME);
     $res['title'] = '用户列表';
     $res['url'] = U('Home/UserCenter/lists');
     $res['class'] = $controller == 'usercenter' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '用户分组';
     $res['url'] = U('Home/AuthGroup/lists');
     $res['class'] = $controller == 'authgroup' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '用户积分';
     $res['url'] = U('Home/CreditData/lists');
     $res['class'] = $controller == 'creditdata' || $controller == 'creditconfig' ? 'current' : '';
     $nav[] = $res;
     $res['title'] = '基础配置';
     $res['url'] = addons_url('UserCenter://UserCenter/config');
     $res['class'] = $controller == 'usecnter' ? 'current' : '';
     $nav[] = $res;
     $this->assign('nav', $nav);
     $ret['title'] = '积分记录';
     $ret['url'] = U('Home/CreditData/lists');
     $ret['class'] = $controller == 'creditdata' ? 'cur' : '';
     $sub_nav[] = $ret;
     $ret['title'] = '积分配置';
     $ret['url'] = U('Home/CreditConfig/lists');
     $ret['class'] = $controller == 'creditconfig' ? 'cur' : '';
     $sub_nav[] = $ret;
     $this->assign('sub_nav', $sub_nav);
 }
开发者ID:LukeChow1018,项目名称:weixin,代码行数:31,代码来源:CreditConfigController.class.php


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