Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("config.php");
- include("includes/mysql.php");
- $Db1 = new DB_sql;
- $Db1->connect($DBHost, $DBDatabase, $DBUser, $DBPassword);
- $your_pwd = ""; /* Postback Password */
- $vip=getenv('REMOTE_ADDR');
- //$sent_pw = $_GET['pwd'];//No used
- $credited = intval($_GET['credit']);
- $credituser = $_GET['subid'];
- $rate = $_GET['amount'];
- $type = 1;// intval($_GET['t']);//not used, uses cash
- $allowed_ip = array('108.167.140.123');
- if(in_array($vip, $allowed_ip))// && $sent_pw == $your_pwd)
- {
- if($credited == '1')
- {
- if($type == '1')
- {
- $run = $Db1->query('UPDATE user SET balance=balance+'.$rate.' WHERE userid = '.$credituser);
- if($run)
- {
- exit('ok');
- } else{
- exit('issue');
- }
- }elseif($type == '2'){
- $run = $Db1->query('UPDATE user SET points=points+'.$rate.' WHERE userid = '.$credituser);
- if($run)
- {
- exit('ok');
- } else{
- exit('issue');
- }
- }
- }elseif($credited == '2')
- {
- if($type == '1')
- {
- $run = $Db1->query('UPDATE user SET balance=balance-'.$rate.' WHERE userid = '.$credituser);
- if($run)
- {
- exit('ok');
- } else{
- exit('issue');
- }
- }elseif($type == '2'){
- $run = $Db1->query('UPDATE user SET points=points-'.$rate.' WHERE userid = '.$credituser);
- if($run)
- {
- exit('ok');
- } else{
- exit('issue');
- }
- }
- }
- }
- else{
- die();
- }
- //FILE 03302014
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement