mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 08:29:06 +00:00
Refactor
This commit is contained in:
parent
50cbbe2594
commit
ee87e090ea
4
bans.php
4
bans.php
@ -2,9 +2,9 @@
|
||||
require_once './inc/page.php';
|
||||
|
||||
$page = new Page("bans");
|
||||
$page->print_title();
|
||||
|
||||
$page->print_page_header();
|
||||
$page->print_title();
|
||||
$page->print_header();
|
||||
|
||||
$page->print_check_form();
|
||||
|
||||
|
@ -84,7 +84,7 @@ if ($staffhistory) {
|
||||
|
||||
|
||||
$page->print_title();
|
||||
$page->print_page_header();
|
||||
$page->print_header();
|
||||
|
||||
$from = null;
|
||||
$from_title = null;
|
||||
|
@ -346,7 +346,7 @@ class Page {
|
||||
echo "<tbody>";
|
||||
}
|
||||
|
||||
function print_page_header($container_start = true) {
|
||||
function print_header($container_start = true) {
|
||||
$title = $this->title;
|
||||
if ($container_start) {
|
||||
echo '<div class="container">';
|
||||
@ -372,10 +372,10 @@ class Page {
|
||||
}
|
||||
|
||||
function print_pager($total = -1, $args = "", $prevargs = "") {
|
||||
if (!$this->settings->show_pager) return;
|
||||
$table = $this->table;
|
||||
$page = $this->name . ".php";
|
||||
|
||||
if (!$this->settings->show_pager) return;
|
||||
if ($total === -1) {
|
||||
$result = $this->conn->query("SELECT COUNT(*) AS count FROM $table")->fetch(PDO::FETCH_ASSOC);
|
||||
$total = $result['count'];
|
||||
|
2
info.php
2
info.php
@ -156,7 +156,7 @@ if ($st->execute(array($id))) {
|
||||
$page->name .= "<span $style class='label label-danger'>Permanent</span>";
|
||||
}
|
||||
}
|
||||
$page->print_page_header();
|
||||
$page->print_header();
|
||||
|
||||
$page->table_begin();
|
||||
$map = $info->basic_info($row, $player_name);
|
||||
|
@ -2,9 +2,9 @@
|
||||
require_once './inc/page.php';
|
||||
|
||||
$page = new Page("kicks");
|
||||
$page->print_title();
|
||||
|
||||
$page->print_page_header();
|
||||
$page->print_title();
|
||||
$page->print_header();
|
||||
|
||||
$page->print_check_form();
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
require_once './inc/page.php';
|
||||
|
||||
$page = new Page("mutes");
|
||||
$page->print_title();
|
||||
|
||||
$page->print_page_header();
|
||||
$page->print_title();
|
||||
$page->print_header();
|
||||
|
||||
$page->print_check_form();
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
require_once './inc/page.php';
|
||||
|
||||
$page = new Page("warnings");
|
||||
$page->print_title();
|
||||
|
||||
$page->print_page_header();
|
||||
$page->print_title();
|
||||
$page->print_header();
|
||||
|
||||
$page->print_check_form();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user