• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_member_account函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getCartTotal

 public function getCartTotal()
 {
     $member = get_member_account(false);
     $openid = $member['openid'];
     $cartotal = mysqld_selectcolumn("select sum(total) from " . table('shop_cart') . " where session_id='" . $openid . "'");
     return empty($cartotal) ? 0 : $cartotal;
 }
开发者ID:jasonhzy,项目名称:bjcms,代码行数:7,代码来源:mobile.php


示例2: get_member_account

<?php

$member = get_member_account(false);
$member = member_get($member['openid']);
if (empty($member['openid'])) {
    $member = get_member_account(false);
    $member['createtime'] = time();
}
$is_login = is_login_account();
$cfg = globaSetting();
$weixinfans = get_weixin_fans_byopenid($member['openid'], $member['openid']);
if (!empty($weixinfans) && !empty($weixinfans['avatar'])) {
    $avatar = $weixinfans['avatar'];
}
include themePage('fansindex');
开发者ID:jasonhzy,项目名称:bjcms,代码行数:15,代码来源:fansindex.php


示例3: get_member_account

<?php

$member_account = get_member_account();
$openid = $member['openid'];
$order = mysqld_select("SELECT * FROM " . table('shop_order') . " WHERE  id=:id limit 1", array(':id' => $orderid));
$getmember = member_get($openid);
if ($getmember['gold'] >= $order['price']) {
    $usegold = member_gold($openid, $order['price'], 'usegold', "消费金额:" . $order['price'] . ",订单编号:" . $order['ordersn']);
    if ($usegold) {
        mysqld_update('shop_order', array('status' => '1', 'paytype' => '1'), array('id' => $orderid));
        message('订单提交成功,收货后请验货!', WEBSITE_ROOT . mobile_url('myorder'), 'success');
    } else {
        message('付款失败!', WEBSITE_ROOT . mobile_url('myorder'), 'error');
    }
} else {
    message('余额不足,无法完成付款!', WEBSITE_ROOT . mobile_url('myorder'), 'error');
}
开发者ID:jasonhzy,项目名称:bjcms,代码行数:17,代码来源:payaction.php


示例4: get_member_account

<?php

$member = get_member_account(true, true);
$openid = $member['openid'];
$member = member_get($openid);
$paymentconfig = "";
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger')) {
    $paymentconfig = " and code!='alipay'";
} else {
    if (is_mobile_request()) {
        $paymentconfig = " and code!='weixin'";
    }
}
$paymentlist = mysqld_selectall("select * from " . table("payment") . " where `enabled`=1  and `code`!='gold' and `online`=1 {$paymentconfig} ");
$paymentscount = mysqld_selectcolumn("select count(id) from " . table("payment") . " where `enabled`=1  and `code`!='gold' and `online`=1 {$paymentconfig} ");
if (empty($paymentscount)) {
    message("未找到可用的在线支付方式,暂时不支持余额充值。");
}
if (checksubmit("submit")) {
    if (empty($_GP['charge']) || round($_GP['charge'], 2) <= 0) {
        message("请输入要充值的金额");
    }
    $paytypecode = $_GP['paymentcode'];
    if (empty($paytypecode)) {
        message("请选择充值方式。");
    }
    $payment = mysqld_select("select * from " . table("payment") . " where `enabled`=1 and `code`=:code and `code`!='gold' and `online`=1", array('code' => $paytypecode));
    if (empty($payment['id'])) {
        message("未找到付款方式,付款失败");
    }
    $goodtitle = "余额充值" . $_GP['charge'] . "元";
开发者ID:jaydom,项目名称:weishang,代码行数:31,代码来源:rechargegold.php


示例5: do_getaward

 public function do_getaward()
 {
     global $_GP;
     $reply = mysqld_select("SELECT * FROM " . table("bigwheel_reply") . "  ORDER BY `id` DESC");
     $member = get_member_account(true, intval($reply['needreg']) == 1);
     $openid = $member['openid'];
     $from_user = $openid;
     if ($reply == false) {
         $this->message();
     }
     if ($reply['isshow'] != 1) {
         //活动已经暂停,请稍后...
         $this->message(array("success" => 2, "msg" => '活动暂停,请稍后...'), "");
     }
     if ($reply['starttime'] > time()) {
         $this->message(array("success" => 2, "msg" => '活动还没有开始呢,请等待...'), "");
     }
     $endtime = $reply['endtime'] + 68399;
     if ($endtime < time()) {
         $this->message(array("success" => 2, "msg" => '活动已经结束了,下次再来吧!'), "");
     }
     $fansID = 0;
     //第一步,判断有没有已经领取奖品了,如果领取了,则不能再领取了
     $fans = mysqld_select("SELECT * FROM " . table("bigwheel_fans") . " WHERE  from_user='" . $openid . "'");
     if ($fans == false) {
         //不存在false的情况,如果是false,则表明是非法
         //$this->message();
         $fans = array('fansID' => $fansID, 'from_user' => $openid, 'todaynum' => 0, 'totalnum' => 0, 'awardnum' => 0, 'createtime' => time());
         mysqld_insert("bigwheel_fans", $fans);
         $fans['id'] = mysqld_insertid();
     }
     //更新当日次数
     $nowtime = mktime(0, 0, 0);
     if ($fans['last_time'] < $nowtime) {
         $fans['todaynum'] = 0;
     }
     //判断总次数超过限制,一般情况不会到这里的,考虑特殊情况,回复提示文字msg,便于测试
     if ($fans['totalnum'] >= $reply['number_times'] && $reply['number_times'] > 0) {
         // $this->message('', '超过抽奖总限制次数');
         $this->message(array("success" => 2, "msg" => '您超过抽奖总次数了,不能抽奖了!'), "");
     }
     //判断当日是否超过限制,一般情况不会到这里的,考虑特殊情况,回复提示文字msg,便于测试
     if ($fans['todaynum'] >= $reply['most_num_times'] && $reply['most_num_times'] > 0) {
         //$this->message('', '超过当日限制次数');
         $this->message(array("success" => 2, "msg" => '您超过当日抽奖次数了,不能抽奖了!'), "");
     }
     $last_time = strtotime(date("Y-m-d", mktime(0, 0, 0)));
     //当天抽奖次数
     mysqld_update('bigwheel_fans', array('todaynum' => $fans['todaynum'] + 1, 'last_time' => $last_time), array('id' => $fans['id']));
     //总抽奖次数
     mysqld_update('bigwheel_fans', array('totalnum' => $fans['totalnum'] + 1), array('id' => $fans['id']));
     $gifts = array("one" => array("name" => $reply['c_name_one'], "type" => $reply['c_type_one'], "probalilty" => $reply['c_rate_one'], "total" => $reply['c_num_one'], "draw" => $reply['c_draw_one']), "two" => array("name" => $reply['c_name_two'], "type" => $reply['c_type_two'], "probalilty" => $reply['c_rate_two'], "total" => $reply['c_num_two'], "draw" => $reply['c_draw_two']), "three" => array("name" => $reply['c_name_three'], "type" => $reply['c_type_three'], "probalilty" => $reply['c_rate_three'], "total" => $reply['c_num_three'], "draw" => $reply['c_draw_three']), "four" => array("name" => $reply['c_name_four'], "type" => $reply['c_type_four'], "probalilty" => $reply['c_rate_four'], "total" => $reply['c_num_four'], "draw" => $reply['c_draw_four']), "five" => array("name" => $reply['c_name_five'], "type" => $reply['c_type_five'], "probalilty" => $reply['c_rate_five'], "total" => $reply['c_num_five'], "draw" => $reply['c_draw_five']), "six" => array("name" => $reply['c_name_six'], "type" => $reply['c_type_six'], "probalilty" => $reply['c_rate_six'], "total" => $reply['c_num_six'], "draw" => $reply['c_draw_six']));
     //计算每个礼物的概率
     $probability = 0;
     $rate = 1;
     $award = array();
     $awards = array();
     //奖品名字 (同时可中多个奖品,然后随机派奖)
     foreach ($gifts as $name => $gift) {
         if ($gift['total'] - $gift['draw'] <= 0) {
             continue;
         }
         if (empty($gift['probalilty'])) {
             continue;
         }
         $probability = $gift['probalilty'];
         if ($probability < 1) {
             $temp = explode('.', $probability);
             $temp = pow(10, strlen($temp[1]));
             $rate = $temp < $rate ? $rate : $temp;
             $probability = $probability * $rate;
         }
         $award[] = array('prizetype' => $name, 'name' => $gift['name'], 'probalilty' => $probability, 'total' => $gift['total']);
     }
     $all = 100 * $rate;
     mt_srand((double) microtime() * 1000000);
     $rand = mt_rand(1, $all);
     foreach ($award as $gift) {
         if ($rand > 0 && $rand <= $gift['probalilty'] && $gift['total'] > 0) {
             $awards[] = $gift['prizetype'];
         }
     }
     $prizetype = "";
     $awardtype = "";
     $awardname = "";
     if (count($awards) > 0) {
         mt_srand((double) microtime() * 1000000);
         $randid = mt_rand(0, count($awards) - 1);
         $prizetype = $awards[$randid];
         $awardtype = $gifts[$prizetype]['type'];
         $awardname = $gifts[$prizetype]['name'];
     }
     if (!empty($prizetype) && (!empty($reply['award_times']) && $fans['awardnum'] < $reply['award_times']) || empty($reply['award_times'])) {
         //中奖
         $sn = random(16);
         mysqld_update('bigwheel_reply', array('c_draw_' . $prizetype => $reply['c_draw_' . $prizetype] + 1), array('id' => $reply['id']));
         //保存sn到award中
         $insert = array('fansID' => $fansID, 'from_user' => $from_user, 'name' => $awardtype, 'description' => $awardname, 'prizetype' => $prizetype, 'award_sn' => $sn, 'createtime' => time(), 'status' => 1);
         $temp = mysqld_insert('bigwheel_award', $insert);
         //保存中奖人信息到fans中
//.........这里部分代码省略.........
开发者ID:jasonhzy,项目名称:bjcms2.3,代码行数:101,代码来源:mobile.php


示例6: do_rule

 public function do_rule()
 {
     global $_GP;
     $xc_zjp = mysqld_select("SELECT * FROM " . table('xc_zjp_reply') . "  LIMIT 1");
     $member = get_member_account(true, intval($xc_zjp['needreg']) == 1);
     $openid = $member['openid'];
     $myuser = mysqld_select("SELECT id,points,count FROM " . table('xc_zjp_user') . " WHERE  open_id = '{$openid}' ");
     include addons_page('rule');
 }
开发者ID:jasonhzy,项目名称:bjcms2.3,代码行数:9,代码来源:mobile.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_member_icon函数代码示例发布时间:2022-05-15
下一篇:
PHP get_member函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap