mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 08:29:06 +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 (filter_var($name, FILTER_VALIDATE_FLOAT)) {
|
||||
echo "<br>";
|
||||
redirect("info.php?id=$name&type=$type", false);
|
||||
redirect("info.php?id=$name&type=$type");
|
||||
return;
|
||||
}
|
||||
$name = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');
|
||||
@ -50,7 +50,7 @@ class Check {
|
||||
}
|
||||
|
||||
echo "<br>";
|
||||
redirect($href, false);
|
||||
redirect($href);
|
||||
/*
|
||||
$table = $page->settings->table['bans'];
|
||||
|
||||
|
@ -507,7 +507,11 @@ class Page {
|
||||
echo '
|
||||
<div class="row litebans-check">
|
||||
<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>
|
||||
<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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user