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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

21 lines
418 B
PHP

<?php
require 'required.php';
$shop = $database->select('shopitems', '*');
$coins = $database->select('shopcoins', '*');
if ($_SESSION['loggedin']) {
$balance = $database->select('players', ['credits'], ['uuid' => $_SESSION['uuid']])[0]['credits'];
} else {
$balance = null;
}
$out = [
"status" => "OK",
"items" => $shop,
"coins" => $coins,
"balance" => $balance
];
echo json_encode($out);