SHARE
TWEET

Untitled

a guest Feb 21st, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. session_start();
  3. include_once "db_connect.php";
  4. include_once "functions.php";
  5.  
  6. $username=$_SESSION['username'];
  7.  
  8. $query=mysql_query("SELECT * FROM users WHERE username='$username' LIMIT 1");
  9.  
  10. $info = mysql_fetch_object($query);
  11.  
  12. $get=mysql_query("SELECT * FROM users WHERE username='$username'");
  13.  
  14. $get1 = mysql_fetch_object($get);
  15.  
  16. $kills = $get1->kills;
  17. $money = $get1->money;
  18. $bank = $get1->bank;
  19. $xp = $get1->rankpoints;
  20.  
  21. $moneyy = $get1->bank + $get1->money;
  22. $kills_total = $get1->kills * 2;
  23. $moneyPoints = floor( $moneyy / 100000000 );
  24. $xpPoints = floor( $get1->rankpoints / 10000 );
  25. $points = $kills_total + $moneyPoints + $xpPoints;
  26.  
  27. mysql_query("UPDATE users SET global_points='$points' WHERE username='$username'");
  28.  
  29. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top