mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Add support for checking players without JavaScript
This commit is contained in:
parent
967ff7638d
commit
56ebfe0150
@ -35,7 +35,7 @@ class Check {
|
|||||||
if (!isset($uuid)) {
|
if (!isset($uuid)) {
|
||||||
if (filter_var($name, FILTER_VALIDATE_FLOAT)) {
|
if (filter_var($name, FILTER_VALIDATE_FLOAT)) {
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
redirect("info.php?id=$name&type=$type", false);
|
redirect("info.php?id=$name&type=$type");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$name = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');
|
$name = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');
|
||||||
@ -50,7 +50,7 @@ class Check {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
redirect($href, false);
|
redirect($href);
|
||||||
/*
|
/*
|
||||||
$table = $page->settings->table['bans'];
|
$table = $page->settings->table['bans'];
|
||||||
|
|
||||||
|
@ -507,7 +507,11 @@ class Page {
|
|||||||
echo '
|
echo '
|
||||||
<div class="row litebans-check">
|
<div class="row litebans-check">
|
||||||
<div class="litebans-check litebans-check-form">
|
<div class="litebans-check litebans-check-form">
|
||||||
<form onsubmit="captureForm(event);" class="form-inline"><div class="form-group"><input type="text" class="form-control" id="user" placeholder="' . $this->t("generic.player-name") . '"></div><button type="submit" class="btn btn-primary" style="margin-left: 5px;">' . $this->t("action.check") . '</button></form>
|
<form action="check.php" onsubmit="captureForm(event);" class="form-inline"><div class="form-group">
|
||||||
|
<input type="text" class="form-control" name="name" id="user" placeholder="' . $this->t("generic.player-name") . '"></div>
|
||||||
|
<input type="hidden" name="table" value="' . $this->name . '">
|
||||||
|
<button type="submit" class="btn btn-primary" style="margin-left: 5px;">' . $this->t("action.check") . '</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">function captureForm(b){var o=$(".litebans-check-output");o.removeClass("show");var x=setTimeout(function(){o.html("<br>")}, 150);$.ajax({type:"GET",url:"check.php?name="+$("#user").val()+"&table=' . $table . '"}).done(function(c){clearTimeout(x);o.html(c);o.addClass("show")});b.preventDefault();return false};</script>
|
<script type="text/javascript">function captureForm(b){var o=$(".litebans-check-output");o.removeClass("show");var x=setTimeout(function(){o.html("<br>")}, 150);$.ajax({type:"GET",url:"check.php?name="+$("#user").val()+"&table=' . $table . '"}).done(function(c){clearTimeout(x);o.html(c);o.addClass("show")});b.preventDefault();return false};</script>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user