PHP game server for TerranQuest. https://terranquest.net

getbadges.php 486B

123456789101112131415161718
  1. <?php
  2. require 'required.php';
  3. require 'onlyloggedin.php';
  4. if (is_empty($VARS['user'])) {
  5. sendError("Missing data.", true);
  6. }
  7. $badges = $database->select(
  8. 'player_badges', ["[>]badges" => ["badgeid" => "badgeid"]], ['badgesid', 'badgename', 'badgedesc', 'gotdate'], ['playeruuid' => file_get_contents("https://sso.netsyms.com/api/getguid.php?user=" . $VARS['user'])]
  9. );
  10. $out = [];
  11. $out['status'] = 'OK';
  12. $out['badges'] = $badges;
  13. echo json_encode($out);