mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-24 08:52:45 +00:00
Clean up
This commit is contained in:
parent
a83db5dd6f
commit
8e99801af6
1512
includes/css/bootstrap.css
vendored
1512
includes/css/bootstrap.css
vendored
File diff suppressed because it is too large
Load Diff
22
info.php
22
info.php
@ -16,16 +16,6 @@ abstract class Info {
|
|||||||
$this->table = $page->table;
|
$this->table = $page->table;
|
||||||
}
|
}
|
||||||
|
|
||||||
function name() {
|
|
||||||
return ucfirst($this->page->type);
|
|
||||||
}
|
|
||||||
|
|
||||||
function permanent() {
|
|
||||||
return $this->row['until'] <= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract function basic_info($row, $player_name);
|
|
||||||
|
|
||||||
static function create($row, $page, $type) {
|
static function create($row, $page, $type) {
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case "ban":
|
case "ban":
|
||||||
@ -39,6 +29,16 @@ abstract class Info {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function name() {
|
||||||
|
return ucfirst($this->page->type);
|
||||||
|
}
|
||||||
|
|
||||||
|
function permanent() {
|
||||||
|
return $this->row['until'] <= 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract function basic_info($row, $player_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
class BanInfo extends Info {
|
class BanInfo extends Info {
|
||||||
@ -120,7 +120,7 @@ if ($st->execute(array($id))) {
|
|||||||
die("Error: $type not found in database.");
|
die("Error: $type not found in database.");
|
||||||
}
|
}
|
||||||
$player_name = $page->get_name($row['uuid']);
|
$player_name = $page->get_name($row['uuid']);
|
||||||
if ($player_name == null) {
|
if ($player_name === null) {
|
||||||
die("Error: Player name not found.");
|
die("Error: Player name not found.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user