This commit is contained in:
ruan 2015-09-10 20:07:15 +02:00
parent a83db5dd6f
commit 8e99801af6
2 changed files with 1531 additions and 25 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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.");
} }