mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-07-09 07:17:32 +00:00
Make it possible to search for punishments by ID
This commit is contained in:
parent
fea240ef03
commit
87953d86f8
16
check.php
16
check.php
@ -20,21 +20,29 @@ class Check {
|
||||
}
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
// sanitize $_POST['table'] ($from)
|
||||
$from_type = $page->type_info($from);
|
||||
$type = $from_type['type'];
|
||||
|
||||
if (!isset($uuid)) {
|
||||
if (filter_var($name, FILTER_VALIDATE_FLOAT)) {
|
||||
echo "<br>";
|
||||
$page->settings->redirect("info.php?id=$name&type=$type", false);
|
||||
return;
|
||||
}
|
||||
$name = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');
|
||||
$this->println("$name " . $page->lang->check_notjoin);
|
||||
return;
|
||||
}
|
||||
$href = "history.php?uuid=$uuid";
|
||||
|
||||
// sanitize $_POST['table'] ($from)
|
||||
$from_type = $page->type_info($from);
|
||||
$type = $from_type['type'];
|
||||
if ($type !== null) {
|
||||
$href .= "&from=" . Page::lc_first($from_type['title']);
|
||||
}
|
||||
|
||||
echo "<br><script data-cfasync=\"false\" type=\"text/javascript\">document.location.href=\"$href\";</script>";
|
||||
echo "<br>";
|
||||
$page->settings->redirect($href, false);
|
||||
/*
|
||||
$table = $page->settings->table['bans'];
|
||||
|
||||
|
@ -211,9 +211,11 @@ final class Settings {
|
||||
}
|
||||
|
||||
|
||||
function redirect($url) {
|
||||
echo "<a href=\"$url\">Redirecting...</a>";
|
||||
echo "<script type=\"text/javascript\">document.location=\"$url\";</script>";
|
||||
function redirect($url, $showtext = true) {
|
||||
if ($showtext === true) {
|
||||
echo "<a href=\"$url\">Redirecting...</a>";
|
||||
}
|
||||
echo "<script data-cfasync=\"false\" type=\"text/javascript\">document.location=\"$url\";</script>";
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user