Reformat code

This commit is contained in:
ruan 2016-02-12 11:44:36 +02:00
parent a91df5ae9d
commit 4d019365f6
8 changed files with 21 additions and 21 deletions

View File

@ -21,7 +21,7 @@ class Check {
}
if (!isset($uuid)) {
$name = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');
$this->println("$name ".$page->lang->check_notjoin);
$this->println("$name " . $page->lang->check_notjoin);
return;
}
$href = "history.php?uuid=$uuid";

View File

@ -77,9 +77,9 @@ $name = $page->get_name($uuid);
$name !== null or die($page->lang->history_playernotfound);
if ($staffhistory) {
$page->name = $page->lang->history_recentby.$name;
$page->name = $page->lang->history_recentby . $name;
} else {
$page->name = $page->lang->history_recentfor.$name;
$page->name = $page->lang->history_recentfor . $name;
}
@ -196,11 +196,11 @@ try {
$page->print_pager($total, $args, $prevargs);
}
} else {
echo $page->lang->history_nopunishments."<br>";
echo $page->lang->history_nopunishments . "<br>";
}
if ($from_href !== null) {
echo "<br><a class=\"btn\" href=\"$from_href\">".$page->lang->history_returnto." $from_title</a>";
echo "<br><a class=\"btn\" href=\"$from_href\">" . $page->lang->history_returnto . " $from_title</a>";
}
$page->print_footer();

View File

@ -7,7 +7,7 @@ class Page {
require_once './inc/settings.php';
$settings = new Settings();
setlocale(LC_ALL, $settings->lang);
require_once './lang/'.$settings->lang.'.php';
require_once './lang/' . $settings->lang . '.php';
$lang = new Lang();
$this->lang = $lang;
header('Content-Type: text/html; charset=UTF-8');
@ -327,7 +327,7 @@ class Page {
echo '
<div style="text-align: left;" class="row">
<div style="margin-left: 15px;">
<form onsubmit="captureForm(event);" class="form-inline"><div class="form-group"><input type="text" class="form-control" id="user" placeholder="'.$this->lang->page_check_user.'"></div><button type="submit" class="btn btn-default" style="margin-left: 5px;">'.$this->lang->page_check_submit.'</button></form>
<form onsubmit="captureForm(event);" class="form-inline"><div class="form-group"><input type="text" class="form-control" id="user" placeholder="' . $this->lang->page_check_user . '"></div><button type="submit" class="btn btn-default" style="margin-left: 5px;">' . $this->lang->page_check_submit . '</button></form>
</div>
<script type="text/javascript">function captureForm(b){var o=$("#output");o.removeClass("in");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("in")});b.preventDefault();return false};</script>
<div id="output" class="success fade" data-alert="alert" style="margin-left: 15px;"><br></div>
@ -366,7 +366,7 @@ class Page {
if ($next_active) {
$pager_next = "<a href=\"$page?page={$next}{$args}\">$pager_next</a>";
}
$pager_count = '<div style=\"margin-top: 32px;\"><div style=\"text-align: center; font-size:15px;\">'.$this->lang->page_page.' '.$cur.'/'.$pages.'</div></div>';
$pager_count = '<div style=\"margin-top: 32px;\"><div style=\"text-align: center; font-size:15px;\">' . $this->lang->page_page . ' ' . $cur . '/' . $pages . '</div></div>';
echo "$pager_prev $pager_next $pager_count";
}

View File

@ -6,7 +6,9 @@ $page->print_title();
?>
<div class="container">
<div class="jumbotron">
<div style="text-align: center;"><h2><?php echo $page->lang->index_welcome1; echo $page->settings->name; echo $page->lang->index_welcome2; ?></h2></div>
<div style="text-align: center;"><h2><?php echo $page->lang->index_welcome1;
echo $page->settings->name;
echo $page->lang->index_welcome2; ?></h2></div>
<div style="text-align: center;"><p><?php echo $page->lang->index_allsins; ?></p></div>
</div>

View File

@ -130,7 +130,7 @@ $query = "SELECT $sel FROM $table WHERE id=? LIMIT 1";
$st = $page->conn->prepare($query);
if ($st->execute(array($id))) {
($row = $st->fetch()) or die($page->lang->info_error_notfound1.$type.$page->lang->info_error_notfound2);
($row = $st->fetch()) or die($page->lang->info_error_notfound1 . $type . $page->lang->info_error_notfound2);
$player_name = $page->get_name($row['uuid']);

View File

@ -1,7 +1,6 @@
<?php
final class Lang {
public static $TRUE = "1", $FALSE = "0";
final class Lang {
public function __construct($connect = true) {
$this->index_welcome1 = 'Vítej na ';
$this->index_welcome2 = '.';
@ -87,4 +86,5 @@ final class Lang {
$this->warns_no = "Ne";
}
}
?>

View File

@ -1,7 +1,6 @@
<?php
final class Lang {
public static $TRUE = "1", $FALSE = "0";
final class Lang {
public function __construct($connect = true) {
$this->index_welcome1 = 'Welcome to ';
$this->index_welcome2 = '\'s Ban List.';
@ -87,4 +86,3 @@ final class Lang {
$this->warns_no = "No";
}
}
?>