1.首先在后台添加红包。如图:
2.修改文件。user.php
找到:228 行左右
- if (register($username, $password, $email, $other) !== false)
- {
复制代码
添加:
- if (register($username, $password, $email, $other) !== false)
- {
- /* 用户注册就发红包 */
- $bonus = $db->getRow('SELECT * FROM ' . $ecs->table("bonus_type") . ' WHERE send_type = 0', 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);
- }
- }
复制代码
打赏
打赏
扫码打赏,你说多少就多少
打开支付宝扫一扫,即可进行扫码打赏哦
百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!