mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Make it possible to translate info.php tags - Active, Inactive, Permanent
This commit is contained in:
parent
f9f3ffde8c
commit
da32ec89b2
@ -30,7 +30,7 @@
|
||||
require_once '../inc/settings.php';
|
||||
$settings = new Settings(false);
|
||||
$host = $settings->host;
|
||||
if ($host === "localhost" || $host === "127.0.0.1") {
|
||||
if ($host === "localhost" || $host === "127.0.0.1" || $host === "0.0.0.0") {
|
||||
echo("<br>- The web interface is connected to <a class=\"text-info\">$host</a>. If LiteBans and the web interface are both connected to <a class=\"text-info\">$host</a>, they should not be hosted on two separate servers.");
|
||||
}
|
||||
$table_prefix = $settings->table_prefix;
|
||||
|
@ -203,7 +203,7 @@ final class Settings {
|
||||
|
||||
static function append_query($existing, $new) {
|
||||
if ($existing !== "") {
|
||||
return $existing . " AND $new";
|
||||
return "$existing AND $new";
|
||||
}
|
||||
return "WHERE $new";
|
||||
}
|
||||
|
6
info.php
6
info.php
@ -156,12 +156,12 @@ if ($st->execute(array($id))) {
|
||||
$style = 'style="margin-left: 13px; font-size: 16px;"';
|
||||
$active = $page->active($row);
|
||||
if ($active === true) {
|
||||
$header .= "<span $style class='label label-danger'>Active</span>";
|
||||
$header .= "<span $style class='label label-danger'>" . $page->t("info_tag_active") . "</span>";
|
||||
if ($permanent) {
|
||||
$header .= "<span $style class='label label-danger'>Permanent</span>";
|
||||
$header .= "<span $style class='label label-danger'>" . $page->t("info_tag_permanent") . "</span>";
|
||||
}
|
||||
} else {
|
||||
$header .= "<span $style class='label label-warning'>Inactive</span>";
|
||||
$header .= "<span $style class='label label-warning'>" . $page->t("info_tag_inactive") . "</span>";
|
||||
}
|
||||
}
|
||||
$page->print_header(true, $header);
|
||||
|
@ -63,6 +63,11 @@ class DefaultLang {
|
||||
$array["info_kick_reason"] = "Kick Reason";
|
||||
$array["info_kick_when"] = "Kick Date";
|
||||
|
||||
$array["info_tag_active"] = "Active";
|
||||
$array["info_tag_inactive"] = "Inactive";
|
||||
$array["info_tag_permanent"] = "Permanent";
|
||||
|
||||
|
||||
$array["bans_player"] = "Name";
|
||||
$array["bans_by"] = "Banned By";
|
||||
$array["bans_reason"] = "Reason";
|
||||
|
Loading…
x
Reference in New Issue
Block a user