本文整理汇总了PHP中get_openid函数的典型用法代码示例。如果您正苦于以下问题:PHP get_openid函数的具体用法?PHP get_openid怎么用?PHP get_openid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_openid函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: formText
private function formText($user, $config)
{
if (!$user) {
return '请先回复绑定并绑定真实信息以使用本功能.';
}
if ($user['user_type'] == 1) {
return '老师是没有考试安排的0.0';
} else {
$textArr = array();
$userSchedules = M('ksap')->where(array('school_id' => $user['school_id'], 'term' => $config['term']))->select();
if (0 == count($userSchedules)) {
return "空记录! 还没更新呢!";
}
foreach ($userSchedules as $item) {
$_t = '';
$_t .= "科目: {$item['course']},\n";
$_t .= "日期: {$item['date']}, \n";
$_t .= "时间: {$item['time']},\n";
$_t .= "教室: {$item['room']}";
array_push($textArr, $_t);
}
$basic = implode("\n\n", $textArr);
$params['openid'] = get_openid();
$params['token'] = get_token();
$more = "\n\n" . "<a href='" . addons_url("Ksap://Ksap/center", $params) . "'>查看完整记录</a>";
return $basic . $more;
}
}
开发者ID:amotewangrong,项目名称:WeiPHP-SWXZS,代码行数:28,代码来源:WeixinAddonModel.class.php
示例2: search
public function search()
{
$openid = get_openid();
$map['openid'] = $openid;
$res = $this->where($map)->select();
return $res;
}
开发者ID:yunzhiclub,项目名称:wemall,代码行数:7,代码来源:CouponModel.class.php
示例3: reply
function reply($dataArr, $keywordArr = array())
{
$map['id'] = $keywordArr['aim_id'];
$param['token'] = get_token();
$param['openid'] = get_openid();
if ($keywordArr['extra_text'] == 'custom_reply_mult') {
// 多图文回复
$mult = M('custom_reply_mult')->where($map)->find();
$map_news['id'] = array('in', $mult['mult_ids']);
$list = M('custom_reply_news')->where($map_news)->select();
foreach ($list as $k => $info) {
if ($k > 8) {
continue;
}
$articles[] = array('Title' => $info['title'], 'Description' => $info['intro'], 'PicUrl' => get_cover_url($info['cover']), 'Url' => $this->_getNewsUrl($info, $param));
}
$res = $this->replyNews($articles);
} elseif ($keywordArr['extra_text'] == 'custom_reply_news') {
// 单条图文回复
$info = M('custom_reply_news')->where($map)->find();
// 组装微信需要的图文数据,格式是固定的
$articles[0] = array('Title' => $info['title'], 'Description' => $info['intro'], 'PicUrl' => get_cover_url($info['cover']), 'Url' => $this->_getNewsUrl($info, $param));
$res = $this->replyNews($articles);
} else {
// 增加积分
add_credit('custom_reply', 300);
// 文本回复
$info = M('custom_reply_text')->where($map)->find();
$contetn = replace_url(htmlspecialchars_decode($info['content']));
$this->replyText($contetn);
}
}
开发者ID:noikiy,项目名称:weiphp,代码行数:32,代码来源:WeixinAddonModel.class.php
示例4: getid
function getid($port, $passwd)
{
$param['openid'] = get_openid();
$param['token'] = get_token();
$res = $this->where($param)->select();
return $res['uid'];
}
开发者ID:bestony,项目名称:ShadowsocksWechat,代码行数:7,代码来源:UserModel.class.php
示例5: indexAction
public function indexAction()
{
//获取支付编号
//取付款金额
$payid = I('get.payid', '');
if ($payid == '') {
$this->assign('msg', '支付失败!');
} else {
$payM = new OrderRelationModel();
$res = $payM->getPay($payid);
$customer = new CustomerModel();
$key = 'buy_openid';
$customerInfo = $customer->getCustomerInfo($res[$key]);
$this->assign('freezen_state', $customerInfo['freezen_state']);
$pay = $res['payable'];
$indexUrl = U('Home/Index/index');
$wxPayUrl = U('WxPay/Pay/payNow');
$wxPayUrl .= "?payid=" . $payid;
$introductionM = new IntroductionModel();
$id = 4;
$tips = $introductionM->getInfoById($id);
$this->assign('tips', $tips['content']);
$openid = get_openid();
$css = $this->fetch('indexCss');
$js = $this->fetch('js');
$this->assign('indexUrl', $indexUrl);
$this->assign('wxPay', $wxPayUrl);
$this->assign('pay', $pay);
$this->assign('css', $css);
$this->assign('js', $js);
$this->assign("YZBody", $this->fetch());
$this->display(YZ_TEMPLATE);
}
}
开发者ID:yunzhiclub,项目名称:wemall,代码行数:34,代码来源:IndexController.class.php
示例6: __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
示例7: 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
示例8: 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
示例9: index
public function index()
{
// 删除微信传递的token干扰
unset($_REQUEST['token']);
$weixin = D('Weixin');
// 获取数据
$data = $weixin->getData();
$this->data = $data;
if (!empty($data['ToUserName'])) {
get_token($data['ToUserName']);
}
if (!empty($data['FromUserName'])) {
get_openid($data['FromUserName']);
}
$this->token = $data['ToUserName'];
// 记录日志
addWeixinLog($data, $GLOBALS['HTTP_RAW_POST_DATA']);
// 初始化用户
$data['ToUserName'] == 'gh_3c884a361561' || $this->init_follow($data);
// 回复数据
$this->reply($data, $weixin);
// 客服接口群发消息:未发送成功的消息给用户重新发
$this->sendOldMessage($data['ToUserName'], $data['FromUserName']);
// 结束程序。防止oneThink框架的调试信息输出
exit;
}
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:26,代码来源:WeixinController.class.php
示例10: 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
示例11: consumption
public function consumption()
{
$sqm = 'HDLYY-WXKF00001';
$ywlx = '1';
$serviceid = 'GetPatItemFee';
// 构造xml
$openid = get_openid();
// get inhospno and name
$Order = M("Userinfo");
$where['openid'] = $openid;
$dataOrder = $Order->where($where)->find();
$url = U('/addon/Order/Order/binding');
if (!$dataOrder['name']) {
// header("Location:$url") ;
}
//301
if (!empty($dataOrder['lyh'])) {
$inhospno = $dataOrder['lyh'];
$name = $dataOrder['name'];
} else {
// test value 测试数据
}
// constitution 构造
$getxml = $this->buildInstr($inhospno, $name);
$instr = $getxml;
$getres = $this->GetHisService($sqm, $ywlx, $serviceid, $instr, $inhospno, $name);
// format xml to array 转换xml成array$name);
// format xml to array 转换xml成array
$resArr = $this->xml_to_array($getres);
// get reality content 获取主体内容
$reportArr = $resArr['body']['PatFee']['Record'];
/* var_dump($getres);exit(); */
$this->assign('xml', $reportArr);
$this->display();
}
开发者ID:benhuang1024,项目名称:phpTool,代码行数:35,代码来源:MyreportController.class.php
示例12: 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
示例13: 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
示例14: reply
function reply($dataArr, $keywordArr = array())
{
$param['openid'] = get_openid();
$param['token'] = get_token();
$url = addons_url('UserCenter://UserCenter/my', $param);
$articles[0] = array('Title' => '个人中心', 'Description' => '点此进入', 'PicUrl' => 'http://ipic-ipic.stor.sinaapp.com/original/2ddfdc417b03d7f43bbcb32eba079db0.jpg', 'Url' => $url);
$this->replyNews($articles);
}
开发者ID:Rayuu,项目名称:weiphp,代码行数:8,代码来源:WeixinAddonModel.class.php
示例15: reply
function reply($dataArr, $keywordArr = array())
{
$param['token'] = get_token();
$param['openid'] = get_openid();
$url = addons_url('Love://Love/show', $param);
$articles[0] = array('Title' => '微信表白墙', 'Description' => '请勇敢说出你的爱', 'PicUrl' => 'http://pic21.nipic.com/20120519/6589089_105229006397_2.jpg', 'Url' => $url);
$res = $this->replyNews($articles);
}
开发者ID:Rayuu,项目名称:weiphp,代码行数:8,代码来源:WeixinAddonModel.class.php
示例16: __construct
public function __construct()
{
$this->orderRelation = new OrderRelationModel();
parent::__construct();
$this->openId = get_openid();
$custmoer = get_customer_info($this->openId);
$this->id = $custmoer['id'];
}
开发者ID:yunzhiclub,项目名称:wemall,代码行数:8,代码来源:IndexController.class.php
示例17: _initialize
function _initialize()
{
parent::_initialize();
$openid = get_openid();
$this->user = getWeixinUserInfo($openid);
$this->user['uid'] = get_mid();
$this->assign('user', $this->user);
}
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:8,代码来源:WapController.class.php
示例18: __construct
public function __construct()
{
parent::__construct();
$openId = get_openid();
//获取openid
$customerInfo = get_customer_info($openId);
$this->customerId = $customerInfo['id'];
}
开发者ID:yunzhiclub,项目名称:wemall,代码行数:8,代码来源:MyOrderFormController.class.php
示例19: __construct
public function __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:yxz1025,项目名称:weiphp3.0,代码行数:8,代码来源:AlipaytypeController.class.php
示例20: reply
function reply($dataArr, $keywordArr = array())
{
$config = getAddonConfig('LostAndFound');
// 获取后台插件的配置参数
$param['token'] = get_token();
$param['openid'] = get_openid();
$url = addons_url("LostAndFound://LostAndFound/index", $param);
$articles[0] = array('Title' => $config['title'], 'Description' => $config['desc'], 'PicUrl' => get_cover_url($config['img']), 'Url' => $url);
$this->replyNews($articles);
}
开发者ID:Rayuu,项目名称:weiphp,代码行数:10,代码来源:WeixinAddonModel.class.php
注:本文中的get_openid函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论