首页 > 电脑专区 > CMS教程 > ecshop >

ecshop 注册送红包实现代码

来源:互联网 2023-03-14 12:48:49 284
在user.php 的注册成功信息显示前面,大概是 show_message(sprintf($_LANG['register_success'].............前面加入 注意下下面的 $bonus_type_id = 1; 需要先在后台加入对应的红包的id 复制代码代码如下: //phpsir 1111 $bonus_type_id=1; $bonus = $db->getRow('SELECT * FROM ' . $ecs->table("bonus_type") . " WHERE send_type = 0 And type_id = $bonus_type_id", true); if($bonus){ if(time()($bonus['send_end_date'] 28800)){ $sql = "INSERT INTO " . $ecs->table('user_bonus') . "(bonus_type_id, bonus_sn, user_id, used_time, order_id, emailed) " . "VALUES ('$bonus[type_id]', 0, '$_SESSION[user_id]', 0, 0, 0)"; $db->query($sql); } } //phpsir 1111_end

以上方法由办公区教程网编辑摘抄整理自互联网可供大家参考!Ei9办公区 - 实用经验教程分享!


标签: ECShop注册送红包

办公区 Copyright © 2016-2023 www.bgqu.net. Some Rights Reserved. 备案号:湘ICP备2020019561号统计代码