Your IP : 18.116.24.238
<?php
function signupUserIni($pin)
{
$firstname = $_SESSION['firstname'];
$lastname = $_SESSION['lastname'];
$email = $_SESSION['email'];
$phone = $_SESSION['phone'];
$user = $_SESSION['username'];
$password = $_SESSION['password'];
$pass = password_hash($password, PASSWORD_BCRYPT);
$sex = $_SESSION['sex'];
$sponsor = $_SESSION['ref'];
global $db, $report, $count;
$upline = $this->findUpline($sponsor);
$que = $db->query("SELECT * FROM user WHERE sn = '$upline' ") or die(mysqli_error());
$ro = mysqli_fetch_array($que);
$a1 = $ro['sn'];
$a2 = $ro['a1'];
$a3 = $ro['a2'];
$a4 = $ro['a3'];
$a5 = $ro['a4'];
$a6 = $ro['a5'];
$a7 = $ro['a6'];
$a8 = $ro['a7'];
$g = $ro['g']+1;
$id = $this->win_hashs(8);
$sql = $db->query("INSERT INTO user(id,firstname,lastname,email,phone,sex,user,pass,sponsor,a1,a2,a3,a4,a5,a6,a7,a8,g,pin)
VALUES('$id','$firstname','$lastname','$email','$phone','$sex','$user','$pass','$sponsor','$a1', '$a2', '$a3', '$a4', '$a5', '$a6', '$a7', '$a8', '$g','$pin')") or die('Cannot Connect to Server');
unset($_SESSION['signup']);
$active = sqL1('user','a1',$upline);
$sp = sqL1('user','sponsor',$sponsor);
$ctime = time();
$level = $active==3 ? 1 : 0 ;
$db->query("UPDATE user SET active='$active',level='$level' WHERE sn='$upline' ");
$db->query("UPDATE user SET sp='$sp' WHERE sn='$sponsor' ");
$db->query("UPDATE pin SET status=1,id='$id',used='$ctime' WHERE pin='$pin' ");
$stagea1 = userName2($a1,'stage');
$stagea2 = userName2($a2,'stage');
$stagea3 = userName2($a3,'stage');
$stagea4 = userName2($a4,'stage');
$bonus1 = $this->matrixBonus(1);
$this->processWallet($sponsor,5000,1,1,'Referral Bonus',$id) ;//Referral Bonus
$this->processWallet($a1,$bonus1,2,1,'Matrix Bonus',$id) ;//matrix 1
$this->processWallet($a2,$bonus1,2,1,'Matrix Bonus',$id) ;//matrix 2
$teama2 = $this->stageTeam($a2);
if($teama2==12){$db->query("UPDATE user SET level=2,stage=2 WHERE sn='$a2' ");
//$stage = userName2($a2,'stage');
$this->processWallet($a2,90000,3,2,'Stage 1 Stepout Bonus',$id);
$newteama2 = $this->stageTeam($a2);
if($newteama2>0){
$bonus2 = $this->matrixBonus(2); $bonus = $newteama2*$bonus2;
$this->processWallet($a2,$bonus,2,2,'Matrix Bonus',$id) ;
}
$this->updateStage($a3,$id);
}
// +++
$report = 'Operation Successful';
return;
}
?>