diff --git a/check.php b/check.php index 8c84903..83b45d5 100644 --- a/check.php +++ b/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 "
"; + $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 "
"; + echo "
"; + $page->settings->redirect($href, false); /* $table = $page->settings->table['bans']; diff --git a/inc/settings.php b/inc/settings.php index 2bbb617..be145ae 100644 --- a/inc/settings.php +++ b/inc/settings.php @@ -211,9 +211,11 @@ final class Settings { } - function redirect($url) { - echo "Redirecting..."; - echo ""; + function redirect($url, $showtext = true) { + if ($showtext === true) { + echo "Redirecting..."; + } + echo ""; die; } }