|
@@ -107,6 +107,14 @@ class account_helper
|
|
|
|
|
|
public static function invite_bonus($relay_id,&$err)
|
|
|
{
|
|
|
+ $last_type = bonus_helper::last_invite_type($relay_id);
|
|
|
+ if(is_null($last_type) == false) {
|
|
|
+ $type = bonus_helper::create_type($last_type);
|
|
|
+ if($type->binded_over() == false && $type->isEnd() == false) {
|
|
|
+ return $type->getType_sn();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$param = self::invite_param($relay_id,$rates);
|
|
|
$ret = bonus_helper::make_bonus($param,$rates);
|
|
|
if($ret != false) {
|