You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
395 B
PHP
19 lines
395 B
PHP
<?php
|
|
|
|
require 'required.php';
|
|
|
|
require 'onlyloggedin.php';
|
|
|
|
if (is_empty($VARS['user'])) {
|
|
sendError("Missing data.", true);
|
|
}
|
|
|
|
$stats = $database->select('players', ['level', 'energy', 'maxenergy', 'teamid', 'lastping'], ['nickname' => $VARS['user']])[0];
|
|
|
|
|
|
$out = [];
|
|
$out['status'] = 'OK';
|
|
$out['stats'] = $stats;
|
|
$out['stats']['lastping'] = 0;
|
|
echo json_encode($out);
|