Stand/api.stand.one/internal_check_pinkeye/index.php

16 lines
442 B
PHP
Raw Permalink Normal View History

2024-10-16 11:20:42 +08:00
<?php
$data = [];
if(!empty($_GET["0"]))
{
require __DIR__."/../common/include.php";
$data = $db->query("SELECT `dev`, `pinkeyed` FROM `accounts` WHERE `activation_key`=? AND `suspended_for`=''", "s", $_GET["0"])[0];
$data["dev"] = (bool)$data["dev"];
$data["pinkeyed"] = (bool)$data["pinkeyed"];
}
if (empty($data))
{
$data = [ "dev" => false, "pinkeyed" => false ];
}
header("Content-Type: application/json");
echo json_encode($data);