mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-07-09 15:27: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();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
|
// sanitize $_POST['table'] ($from)
|
||||||
|
$from_type = $page->type_info($from);
|
||||||
|
$type = $from_type['type'];
|
||||||
|
|
||||||
if (!isset($uuid)) {
|
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');
|
$name = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');
|
||||||
$this->println("$name " . $page->lang->check_notjoin);
|
$this->println("$name " . $page->lang->check_notjoin);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$href = "history.php?uuid=$uuid";
|
$href = "history.php?uuid=$uuid";
|
||||||
|
|
||||||
// sanitize $_POST['table'] ($from)
|
|
||||||
$from_type = $page->type_info($from);
|
|
||||||
$type = $from_type['type'];
|
|
||||||
if ($type !== null) {
|
if ($type !== null) {
|
||||||
$href .= "&from=" . Page::lc_first($from_type['title']);
|
$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'];
|
$table = $page->settings->table['bans'];
|
||||||
|
|
||||||
|
@ -211,9 +211,11 @@ final class Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function redirect($url) {
|
function redirect($url, $showtext = true) {
|
||||||
echo "<a href=\"$url\">Redirecting...</a>";
|
if ($showtext === true) {
|
||||||
echo "<script type=\"text/javascript\">document.location=\"$url\";</script>";
|
echo "<a href=\"$url\">Redirecting...</a>";
|
||||||
|
}
|
||||||
|
echo "<script data-cfasync=\"false\" type=\"text/javascript\">document.location=\"$url\";</script>";
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user