mirror of
				https://gitlab.com/ruany/litebans-php.git
				synced 2025-10-29 22:12:25 +00:00 
			
		
		
		
	Reformat code
This commit is contained in:
		
							parent
							
								
									a91df5ae9d
								
							
						
					
					
						commit
						4d019365f6
					
				| @ -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"; | ||||
|  | ||||
| @ -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(); | ||||
|  | ||||
| @ -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"; | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -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> | ||||
|  | ||||
							
								
								
									
										2
									
								
								info.php
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								info.php
									
									
									
									
									
								
							| @ -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']); | ||||
| 
 | ||||
|  | ||||
| @ -1,10 +1,9 @@ | ||||
| <?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 = '.'; | ||||
|         $this->index_welcome2 = '.'; | ||||
|         $this->index_allsins = 'Zde nalezneš vypsány všechny své tresty.'; | ||||
|         $this->header_index = 'Úvod'; | ||||
|         $this->header_bans = 'Bany'; | ||||
| @ -87,4 +86,5 @@ final class Lang { | ||||
|         $this->warns_no = "Ne"; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
|  | ||||
| @ -1,10 +1,9 @@ | ||||
| <?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.'; | ||||
|         $this->index_welcome2 = '\'s Ban List.'; | ||||
|         $this->index_allsins = 'Here is where all of our punishments are listed.'; | ||||
|         $this->header_index = 'Home'; | ||||
|         $this->header_bans = 'Bans'; | ||||
| @ -87,4 +86,3 @@ final class Lang { | ||||
|         $this->warns_no = "No"; | ||||
|     } | ||||
| } | ||||
| ?>
 | ||||
|  | ||||
| @ -16,10 +16,10 @@ while ($row = $result->fetch(PDO::FETCH_ASSOC)) { | ||||
|     if ($player_name === null) continue; | ||||
| 
 | ||||
|     $page->print_table_rows($row, array( | ||||
|         $page->lang->warns_player => $page->get_avatar($player_name, $row['uuid']), | ||||
|         $page->lang->warns_by     => $page->get_avatar($page->get_banner_name($row), $row['banned_by_uuid']), | ||||
|         $page->lang->warns_reason => $page->clean($row['reason']), | ||||
|         $page->lang->warns_when   => $page->expiry($row), | ||||
|         $page->lang->warns_player  => $page->get_avatar($player_name, $row['uuid']), | ||||
|         $page->lang->warns_by      => $page->get_avatar($page->get_banner_name($row), $row['banned_by_uuid']), | ||||
|         $page->lang->warns_reason  => $page->clean($row['reason']), | ||||
|         $page->lang->warns_when    => $page->expiry($row), | ||||
|         $page->lang->warns_receive => (($page->active($row, 'warned') === true) ? $page->lang->warns_yes : $page->lang->warns_no), | ||||
|     )); | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 ruan
						ruan