This repository has been archived on 2019-05-05. You can view files and clone it, but cannot push or open issues or pull requests.
Server-v1/admin/badgesearch.php

12 lines
273 B
PHP

<?php
require_once './required.php';
if (!isAdmin()) {
die("Unauthorized.");
}
header('Content-Type: application/json');
$data = $database->select("badges", "badgesid", ["OR" => ["badgesid[~]" => $_GET['q'], "badgename[~]" => $_GET['q']]]);
echo json_encode($data);