Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $connection = new mysqli($config["servername"], $config["username"],
- $config["password"], $config["dbname"]);
- if($connection->connect_errno)
- {
- die("Echec lors de la connexion à MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error);
- }
- if(!empty($username) and !empty($password) and !empty($secure))
- {
- if($secure != $secretkey)
- {
- echo "Secured! File!";
- goto end;
- }
- if($stmtCheckCo = $connection->prepare("SELECT id,firstname,lastname,country,username,age,email from users where username=? and password=?"))
- {
- $stmtCheckCo->bind_param("ss", $username, $hashedpassword);
- if($stmtCheckCo->execute())
- {
- echo $username . " & " . $hashedpassword;
- /*
- $result = $stmtCheckCo->get_result();
- $getInfo = array();
- while ($row = $result->fecth_assoc()) {
- $getInfo[] = $row;
- }
- */
- $getNumAccount = $stmtCheckCo->num_rows;
- }
- $stmtCheckCo->close();
- }
- $connection = new mysqli($config["servername"], $config["username"],
- $config["password"], $config["dbname"]);
- if($connection->connect_errno)
- {
- die("Echec lors de la connexion à MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error);
- }
- if(!empty($mac))
- {
- if($secure != $secretkey)
- {
- echo"Secured! File";
- goto end;
- }
- if($stmtcheckMAC = $connection->prepare("SELECT * FROM users WHERE macAddresses=?"))
- {
- $stmtcheckMAC->bind_param("s", $mac);
- if(!$stmtcheckMAC->execute())
- {
- echo $stmtcheckMAC->error;
- }
- $resultcheckMAC = $stmtcheckMAC->get_result();
- $stuts = $stmtcheckMAC->num_rows;
- if($stuts > 0 )
- {
- $allUsers = array();
- while ($row = $resultcheckMAC->fecth_assoc())
- {
- $allUsers[] = $row;
- if($allUsers["banned"]==1)
- {
- echo"2";
- goto end;
- }
- }
- echo "1"; // if user is exist and he not got banned
- }
- else
- {
- echo "3"; // optional this check if you want disable user have multi account 3 mean new user
- }
- }
- }
- else if(@$oip)
- {
- if($stmtcheckMAC = $connection->prepare("SELECT * FROM users WHERE ip=?"))
- {
- $stmtcheckMAC->bind_param("s", $ip);
- if(!$stmtcheckMAC->execute())
- {
- echo $stmtcheckMAC->error;
- }
- $resultcheckMAC = $stmtcheckMAC->get_result();
- $stuts = $stmtcheckMAC->num_rows;
- if($stuts > 0 )
- {
- $allUsers = array();
- while ($row = $resultcheckMAC->fecth_assoc())
- {
- $allUsers[] = $row;
- if($allUsers["banned"]==1)
- {
- echo"2";
- goto end;
- }
- }
- echo "1"; // if user is exist and he not got banned
- }
- else
- {
- echo "3"; // optional this check if you want disable user have multi account 3 mean new user
- }
- }
- }
- else
- {
- echo "Empty";
- }
Add Comment
Please, Sign In to add comment