Guest User

The fuck is wrong

a guest
Feb 8th, 2017
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.08 KB | None | 0 0
  1. $cheatsownedinfo_query = $sqlConnection->query("SELECT * FROM `ownedcheats` WHERE `username`='$username'");
  2.  
  3. if($cheatsownedinfo_query->num_rows == 0){
  4.     die($CHEATSOWNED_NoCheatsOwned);
  5. }
  6.  
  7. $validCheats_count = 0;
  8.  
  9. while($ownedCheats_index = $cheatsownedinfo_query->fetch_assoc()){
  10.     date_default_timezone_set("Australia/Sydney");
  11.     if($ownedCheats_index['isExpiryUnlimited'] == 'false'){
  12.         if($ownedCheats_index['expiryDate'] <= date("Y-m-d")){
  13.             continue;
  14.         }
  15.     }
  16.  
  17.     $allCheatsQuery = $sqlConnection->query("SELECT * FROM `cheats` WHERE `cheatName`='".$ownedCheats_index['cheatName']."'");
  18.     if($allCheatsQuery->num_rows == 0){
  19.         continue;
  20.     }
  21.    
  22.     while($currentCheatInfo = $allCheatsQuery->fetch_assoc()){
  23.         echo Base64_EncodeUrlSafe($ownedCheats_index['expiryDate']) . ":";
  24.         echo Base64_EncodeUrlSafe($currentCheatInfo['Name']) . ":";
  25.         echo Base64_EncodeUrlSafe($currentCheatInfo['targetprocess']) . ":";
  26.         echo Base64_EncodeUrlSafe($currentCheatInfo['credits']) . "\t";
  27.  
  28.         $validCheats_count++;
  29.     }
  30. }
  31.  
  32. if($validCheats_count == 0){
  33.     die($CHEATSOWNED_AllExpired);
  34. }
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment