Files
TSN-Ranksystem/other/search.php
Newcomer1989 309907ab30 made changes
2015-03-27 20:18:21 +01:00

18 lines
477 B
PHP

<?PHP
$q = strtolower($_GET["q"]);
if (!$q)
return;
require_once('config.php');
$dbuserlist = $mysqlcon->query("SELECT * FROM user ORDER BY online DESC");
$items = array();
$dbuserlist = $dbuserlist->fetchAll();
foreach ($dbuserlist as $userlist) {
$items[$userlist['name']] = $userlist['uuid'];
}
foreach ($items as $key => $value) {
if (strpos(strtolower($key), $q) !== false) {
$key=str_replace('|','&#124;',$key);
echo "$key|$value\n";
}
}
?>