本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
1 添加一个红包 促销管理-->红包类型-->添加红包类型,如图: 2 修改user.php if (register($username, $password, $email, $other) !== false) { 在这一段代码下面添加 /* 用户注册就发红包 */ $bonus = $db->getRow('SELECT * FROM ' . $ecs->table("bonus_type") . ' WHERE send_type = 0 And type_id = 1 ', true); if($bonus){ if(time()<($bonus['send_end_date']+10)){ $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); } } type_id 指你红包的ID号,查看红包ID的方法:促销管理—红包类型—鼠标指到相关的红包,看你浏览器下面的链接地址。
|