myatoo

ClixWallIntegrationFreeVersion

Oct 7th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. <?php
  2. include '../config.php';
  3.  
  4. $secret_password = 'your secret password'; //insert your secret password when you register in clixwall publisher
  5. $password = $_REQUEST['pwd'];
  6. $credited = $_REQUEST['c'];
  7. $id = trim($_REQUEST['u']);
  8. $type = trim($_REQUEST['t']);
  9. $status = trim($_REQUEST['s']);
  10.  
  11. if($multiplicator == "true"){
  12. $credited = $credited*$multiplicator_amount;
  13. }
  14.  
  15.  
  16. $calc = $credited / 100;
  17. $calc = $calc * $refshare;
  18. $calc = floor($calc);
  19.  
  20. if($cw_status == "false"){
  21. die("Disabled");
  22. }
  23.  
  24. if($password == $secret_password){
  25.  
  26. if($status == 1)
  27. {
  28. if($type ==1)
  29. {
  30. $sql = "SELECT * FROM wallets WHERE id = '$id'";
  31. $result = $conn->query($sql);
  32. $checko = "0";
  33. if ($result->num_rows > 0) {
  34. while($row = $result->fetch_assoc()) {
  35. $wallet = $row["wallet"];
  36. $ref = $row["ref"];
  37. $checko = "1";
  38. }
  39. }
  40.  
  41. if($checko == "1"){
  42. $sql = "UPDATE wallets SET balance = balance + '$credited' WHERE wallet = '$wallet'";
  43. $res = $conn->query($sql);
  44. $sql = "INSERT INTO transactions(id, wallet, type, amount)VALUES('', '$wallet', 'Offerwall', '$credited')";
  45. $runner = $conn->query($sql);
  46. }
  47.  
  48. if($ref == "none"){
  49. die("ok");
  50. } else {
  51. $sql = "UPDATE wallets SET balance = balance + '$calc' WHERE wallet = '$ref'";
  52. $res = $conn->query($sql);
  53. $sql = "UPDATE wallets SET refbal = refbal + '$calc' WHERE wallet = '$ref'";
  54. $res = $conn->query($sql);
  55. $sql = "INSERT INTO transactions(id, wallet, type, amount)VALUES('', '$ref', 'Referral', '$calc')";
  56. $runner = $conn->query($sql);
  57. }
  58.  
  59. die("Thank You For Watching");
  60. }
  61. else
  62. {
  63. $sql = "SELECT * FROM wallets WHERE id = '$id'";
  64. $result = $conn->query($sql);
  65. $checko = "0";
  66. if ($result->num_rows > 0) {
  67. while($row = $result->fetch_assoc()) {
  68. $wallet = $row["wallet"];
  69. $ref = $row["ref"];
  70. $checko = "1";
  71. }
  72. }
  73.  
  74. if($checko == "1"){
  75. $sql = "UPDATE wallets SET balance = balance + '$credited' WHERE wallet = '$wallet'";
  76. $res = $conn->query($sql);
  77. $sql = "INSERT INTO transactions(id, wallet, type, amount)VALUES('', '$wallet', 'Offerwall', '$credited')";
  78. $runner = $conn->query($sql);
  79. }
  80.  
  81. if($ref == "none"){
  82. die("ok");
  83. } else {
  84. $sql = "UPDATE wallets SET balance = balance + '$calc' WHERE wallet = '$ref'";
  85. $res = $conn->query($sql);
  86. $sql = "UPDATE wallets SET refbal = refbal + '$calc' WHERE wallet = '$ref'";
  87. $res = $conn->query($sql);
  88. $sql = "INSERT INTO transactions(id, wallet, type, amount)VALUES('', '$ref', 'Referral', '$calc')";
  89. $runner = $conn->query($sql);
  90. }
  91. die("Thank You For Watching");
  92. }
  93. } else {
  94. die("Error Contact Site Admin to Fix");
  95. }
  96. }
  97. ?>
Add Comment
Please, Sign In to add comment