Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include '../config.php';
- $secret_password = 'your secret password'; //insert your secret password when you register in clixwall publisher
- $password = $_REQUEST['pwd'];
- $credited = $_REQUEST['c'];
- $id = trim($_REQUEST['u']);
- $type = trim($_REQUEST['t']);
- $status = trim($_REQUEST['s']);
- if($multiplicator == "true"){
- $credited = $credited*$multiplicator_amount;
- }
- $calc = $credited / 100;
- $calc = $calc * $refshare;
- $calc = floor($calc);
- if($cw_status == "false"){
- die("Disabled");
- }
- if($password == $secret_password){
- if($status == 1)
- {
- if($type ==1)
- {
- $sql = "SELECT * FROM wallets WHERE id = '$id'";
- $result = $conn->query($sql);
- $checko = "0";
- if ($result->num_rows > 0) {
- while($row = $result->fetch_assoc()) {
- $wallet = $row["wallet"];
- $ref = $row["ref"];
- $checko = "1";
- }
- }
- if($checko == "1"){
- $sql = "UPDATE wallets SET balance = balance + '$credited' WHERE wallet = '$wallet'";
- $res = $conn->query($sql);
- $sql = "INSERT INTO transactions(id, wallet, type, amount)VALUES('', '$wallet', 'Offerwall', '$credited')";
- $runner = $conn->query($sql);
- }
- if($ref == "none"){
- die("ok");
- } else {
- $sql = "UPDATE wallets SET balance = balance + '$calc' WHERE wallet = '$ref'";
- $res = $conn->query($sql);
- $sql = "UPDATE wallets SET refbal = refbal + '$calc' WHERE wallet = '$ref'";
- $res = $conn->query($sql);
- $sql = "INSERT INTO transactions(id, wallet, type, amount)VALUES('', '$ref', 'Referral', '$calc')";
- $runner = $conn->query($sql);
- }
- die("Thank You For Watching");
- }
- else
- {
- $sql = "SELECT * FROM wallets WHERE id = '$id'";
- $result = $conn->query($sql);
- $checko = "0";
- if ($result->num_rows > 0) {
- while($row = $result->fetch_assoc()) {
- $wallet = $row["wallet"];
- $ref = $row["ref"];
- $checko = "1";
- }
- }
- if($checko == "1"){
- $sql = "UPDATE wallets SET balance = balance + '$credited' WHERE wallet = '$wallet'";
- $res = $conn->query($sql);
- $sql = "INSERT INTO transactions(id, wallet, type, amount)VALUES('', '$wallet', 'Offerwall', '$credited')";
- $runner = $conn->query($sql);
- }
- if($ref == "none"){
- die("ok");
- } else {
- $sql = "UPDATE wallets SET balance = balance + '$calc' WHERE wallet = '$ref'";
- $res = $conn->query($sql);
- $sql = "UPDATE wallets SET refbal = refbal + '$calc' WHERE wallet = '$ref'";
- $res = $conn->query($sql);
- $sql = "INSERT INTO transactions(id, wallet, type, amount)VALUES('', '$ref', 'Referral', '$calc')";
- $runner = $conn->query($sql);
- }
- die("Thank You For Watching");
- }
- } else {
- die("Error Contact Site Admin to Fix");
- }
- }
- ?>
Add Comment
Please, Sign In to add comment