v 1.3.0 - i18n
This commit is contained in:
		
							
								
								
									
										5
									
								
								api/i18n.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								api/i18n.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
<?php
 | 
			
		||||
header('Content-Type:application/javascript');
 | 
			
		||||
require_once __DIR__ . "/../include/language.php";
 | 
			
		||||
?>
 | 
			
		||||
var textShowMore = "<?php json_encode(tl($lang["index"]["showmore"])); ?>", textShowLess = "<?php json_encode(tl($lang["index"]["showless"])); ?>", statusOnline = "<?php json_encode(tl($lang["serverstatus"]["online"])); ?>", statusOffline = "<?php json_encode(tl($lang["serverstatus"]["offline"])); ?>", statusUptime = "<?php json_encode(tl($lang["serverstatus"]["uptime"])); ?>", statusVersion = "<?php json_encode(tl($lang["serverstatus"]["version"])); ?>", statusAvgping = "<?php json_encode(tl($lang["serverstatus"]["avgping"])); ?>", statusAvgpl = "<?php json_encode(tl($lang["serverstatus"]["avgpl"])); ?>";
 | 
			
		||||
							
								
								
									
										23
									
								
								bans.php
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								bans.php
									
									
									
									
									
								
							@@ -26,24 +26,24 @@ if (is_null($banlist)) {
 | 
			
		||||
 | 
			
		||||
<div class="panel panel-default">
 | 
			
		||||
    <div class="panel-heading">
 | 
			
		||||
        <h3 class="panel-title"><i class="fa fa-ban" aria-hidden="true"></i> Lista banów</h3>
 | 
			
		||||
        <h3 class="panel-title"><i class="fa fa-ban" aria-hidden="true"></i> <?php tl($lang["banlist"]["title"]); ?></h3>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="panel-body">
 | 
			
		||||
 | 
			
		||||
        <?php if(empty($banlist[0])) { ?>
 | 
			
		||||
            <div class="alert alert-success">
 | 
			
		||||
                <p class="text-center">BRAK ZBANOWANYCH UŻYTKOWNIKÓW</p>
 | 
			
		||||
                <p class="text-center"><?php tl($lang["banlist"]["emptylist"]); ?></p>
 | 
			
		||||
            </div>
 | 
			
		||||
        <?php } else { ?>
 | 
			
		||||
        <div class="table-responsive">
 | 
			
		||||
            <table id="banlist" class="table table-striped table-bordered" cellspacing="0" width="100%">
 | 
			
		||||
                <thead>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <th>Nick</th>
 | 
			
		||||
                        <th>Powód</th>
 | 
			
		||||
                        <th>Zbanowany przez</th>
 | 
			
		||||
                        <th>Data zbanowania</th>
 | 
			
		||||
                        <th>Wygasa</th>
 | 
			
		||||
                        <th><?php tl($lang["banlist"]["table"]["nickname"]); ?></th>
 | 
			
		||||
                        <th><?php tl($lang["banlist"]["table"]["reason"]); ?></th>
 | 
			
		||||
                        <th><?php tl($lang["banlist"]["table"]["bannedby"]); ?></th>
 | 
			
		||||
                        <th><?php tl($lang["banlist"]["table"]["bandate"]); ?></th>
 | 
			
		||||
                        <th><?php tl($lang["banlist"]["table"]["expires"]); ?></th>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
@@ -55,13 +55,14 @@ if (is_null($banlist)) {
 | 
			
		||||
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="panel-footer">
 | 
			
		||||
        Stan na <?php echo $banlist[1]; ?><!-- <span style="float: right">Podgląd odświerza się co 60 sekund</span> -->
 | 
			
		||||
        <?php tl($lang["banlist"]["lastupdate"], [$banlist[1]]); ?><!-- <span style="float: right">Podgląd odświerza się co 60 sekund</span> -->
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
function getBanlist() {
 | 
			
		||||
    global $lang;
 | 
			
		||||
 | 
			
		||||
    try {
 | 
			
		||||
        $tsAdmin = TeamSpeak3::factory(getTeamspeakURI(). "#no_query_clients");
 | 
			
		||||
@@ -82,10 +83,10 @@ function getBanlist() {
 | 
			
		||||
            $duration =         $ban['duration'];
 | 
			
		||||
 | 
			
		||||
            if(empty($reason))
 | 
			
		||||
                $reason = "<b>(brak powodu)</b>";
 | 
			
		||||
                $reason = "<b>" . translate($lang["banlist"]["table"]["emptyreason"]) . "</b>";
 | 
			
		||||
 | 
			
		||||
            if($duration == 0)
 | 
			
		||||
                $expires = "Ban permanentny";
 | 
			
		||||
                $expires = translate($lang["banlist"]["table"]["permaban"]);
 | 
			
		||||
            else
 | 
			
		||||
                $expires = date('d-m-Y H:i:s', $ban['created'] + $duration);
 | 
			
		||||
 | 
			
		||||
@@ -97,7 +98,7 @@ function getBanlist() {
 | 
			
		||||
        if($e->getCode() == 1281) {
 | 
			
		||||
            return '';
 | 
			
		||||
        } else {
 | 
			
		||||
            return '<div class="alert alert-danger"><p class="text-center">Wystąpił błąd ' . $e->getCode() . ': ' . $e->getMessage() . '</p></div>';
 | 
			
		||||
            return '<div class="alert alert-danger"><p class="text-center">' . translate($lang["general"]["scripterror"], [$e->getCode(), $e->getMessage()]) . '</p></div>';
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,65 +1,65 @@
 | 
			
		||||
<?php
 | 
			
		||||
/*
 | 
			
		||||
    Autor: Wruczek
 | 
			
		||||
    Kontakt:
 | 
			
		||||
    Author: Wruczek
 | 
			
		||||
    Contact me:
 | 
			
		||||
        TeamSpeak: ts.wruczek.top
 | 
			
		||||
        E-mail: wruczekk@gmail.com
 | 
			
		||||
        Prześlij dotację: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9PL5J7ULZQYJQ
 | 
			
		||||
        Email: wruczekk@gmail.com
 | 
			
		||||
        Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9PL5J7ULZQYJQ
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************* Konfiguracja generalna strony *************/
 | 
			
		||||
/************* General configuration *************/
 | 
			
		||||
 | 
			
		||||
$config["general"]["title"]         = "TwojTS.PL";                                  // Tytuł strony - wyświetlany np. w menu i na pasku nawigacji
 | 
			
		||||
$config["general"]["theme"]         = "superhero";                                  // Motyw strony - http://bootswatch.com/ (ALPHA)
 | 
			
		||||
$config["general"]["icon"]          = "img/icon/icon-32.png";                       // Ikona używana na pasku nawigacji
 | 
			
		||||
$config["general"]["subtitle"]      = " - Najlepszy serwer Teamspeak!";             // Dodatkowy tekst dodawany do tytułu na pasku przeglądarki
 | 
			
		||||
$config["general"]["desc"]          = "Polski serwer TeamSpeak! Zapraszamy :)";     // Opis strony - wyświetlany np. w wynikach wyszukiwarki Google
 | 
			
		||||
$config["general"]["newsDir"]       = "config/news";                                // Folder z newsami (relatywnie do głównego folderu)
 | 
			
		||||
$config["general"]["title"]         = "BestTS.NET";                                 // Website title - displayed in the menu
 | 
			
		||||
$config["general"]["icon"]          = "img/icon/icon-32.png";                       // Website icon
 | 
			
		||||
$config["general"]["subtitle"]      = " - Best TeamSpeak server!";                  // Website subtitle
 | 
			
		||||
$config["general"]["desc"]          = "Polski serwer TeamSpeak! Zapraszamy :)";     // Website description - displayed in Google search engine
 | 
			
		||||
$config["general"]["newsDir"]       = "config/news";                                // News folder (relative to project folder)
 | 
			
		||||
 | 
			
		||||
$config["general"]["enablehta"]     = false; // Właczenie / wyłączenie dodatkowych usprawnień strony w htaccess (zalecane,
 | 
			
		||||
                                             // wymaga jednak aktualnej wersji Apache oraz włączenia htaccess oraz mod_rewrite)
 | 
			
		||||
$config["general"]["enablehta"]     = false; // Enable / Disable additional website features (recommended, but
 | 
			
		||||
                                             // you need to have up-to-date version of Apache and install mod_rewrite)
 | 
			
		||||
                                             // After setting to true, go into .htaccess file and uncomment 19 line
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/********* Konfiguracja serwera TeamSpeak *********/
 | 
			
		||||
/********* TeamSpeak configuration *********/
 | 
			
		||||
 | 
			
		||||
$config['teamspeak']['host']          = '127.0.0.1';          // Adres serwera TeamSpeak
 | 
			
		||||
$config['teamspeak']['login']         = 'serveradmin';        // Login konta Query
 | 
			
		||||
$config['teamspeak']['password']      = 'pa$$word';           // Hasło konta Query
 | 
			
		||||
$config['teamspeak']['server_port']   = 9987;                 // Port serwera TeamSpeak
 | 
			
		||||
$config['teamspeak']['query_port']    = 10011;                // Port Query
 | 
			
		||||
$config['teamspeak']['displayip']     = 'ts.serwer.pl';       // IP wyświetlane na stronie i używane do połączeń
 | 
			
		||||
$config['teamspeak']['host']          = '127.0.0.1';          // TeamSpeak host address
 | 
			
		||||
$config['teamspeak']['login']         = 'serveradmin';        // Login
 | 
			
		||||
$config['teamspeak']['password']      = 'pa$$word';           // Password
 | 
			
		||||
$config['teamspeak']['server_port']   = 9987;                 // TeamSpeak server port
 | 
			
		||||
$config['teamspeak']['query_port']    = 10011;                // Query port
 | 
			
		||||
$config['teamspeak']['displayip']     = 'ts.server.net';       // IP shown to users and used for connections
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************* Dodatkowe linki na pasku nawigacji *************/
 | 
			
		||||
/************* Additional navigation links - you can link to your stuff *************/
 | 
			
		||||
 | 
			
		||||
$config["navlinks"] = array(
 | 
			
		||||
    // WZÓR: array("ikona", "tekst", "link") GDZIE ikona to nazwa ikony ze strony: http://fontawesome.io/icons/
 | 
			
		||||
    array("fa-facebook-official", "Facebook", "https://facebook.com/najlepszytsXd"),
 | 
			
		||||
    // TEMPLATE: array("icon", "displayed text", "link"), ICON is an icon name from: http://fontawesome.io/icons/
 | 
			
		||||
    array("fa-facebook-official", "Facebook", "https://facebook.com/bestteamspeakXd"),
 | 
			
		||||
    array("fa-comments", "Forum", "forum"),
 | 
			
		||||
    array("fa-shopping-cart", "Sklep", "sklep")
 | 
			
		||||
    array("fa-shopping-cart", "Shop", "shop")
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************* Konfiguracja listy administratorow *************/
 | 
			
		||||
/************* Adminlist configuration *************/
 | 
			
		||||
 | 
			
		||||
// ID grup wyświetlanych na liście administracji. Kolejność grup decyduje o kolejności wyświetlania na stronie
 | 
			
		||||
// ID of servergroups displayed as admins in Adminlist. Put it in the same way you want it to be displayed.
 | 
			
		||||
$config["adminlist"] = array(6, 17, 19);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************* Konfiguracja panelu "kontakt" *************/
 | 
			
		||||
/************* Contact panel configuration *************/
 | 
			
		||||
 | 
			
		||||
// Ustaw $config['contact']['text'] = ''; by kompletnie wyłączyć wyświetlanie panelu
 | 
			
		||||
$config['contact']['title'] = 'Kontakt z właścicielem';
 | 
			
		||||
// Set $config['contact']['text'] = ''; to hide this panel
 | 
			
		||||
$config['contact']['title'] = 'Contact the staff';
 | 
			
		||||
$config['contact']['text'] = '
 | 
			
		||||
<ul class="list-unstyled">
 | 
			
		||||
<li>TeamSpeak: <span class="pullright">kanał <a href="ts3server://ts.wruczek.top?channel=Kana%C5%82y%20publiczne%2FPogaduchy%2FPogaduchy%205">Pomoc</a></span></li>
 | 
			
		||||
<li>TeamSpeak: <span class="pullright">channel <a href="ts3server://ts.wruczek.top?channel=Kana%C5%82y%20publiczne%2FPogaduchy%2FPogaduchy%205">Pomoc</a></span></li>
 | 
			
		||||
<li>Email: <span class="pullright"><a href="mailto:kontakt@email.com">konakt@email.com</a></span></li>
 | 
			
		||||
<li>GaduGadu: <span class="pullright"><a href="gg:49568758">49568758 <img src="https://status.gadu-gadu.pl/users/status.asp?id=49568758&styl=1"></a></span></li>
 | 
			
		||||
<li>GaduGadu: <span class="pullright"><a href="gg:123456789">123456789 <img src="https://status.gadu-gadu.pl/users/status.asp?id=49568758&styl=1"></a></span></li>
 | 
			
		||||
<li>Steam: <span class="pullright"><a href="http://steamcommunity.com/id/wruczek">Wruczek</a></span></li>
 | 
			
		||||
</ul>
 | 
			
		||||
';
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										104
									
								
								config/languages/lang.en.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										104
									
								
								config/languages/lang.en.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,104 @@
 | 
			
		||||
<?php
 | 
			
		||||
/*
 | 
			
		||||
 * The english language for ts-website
 | 
			
		||||
 * @copy Wruczek <wruczekk@gmail.com>
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
$lang = array();
 | 
			
		||||
 | 
			
		||||
/************* General *************/
 | 
			
		||||
 | 
			
		||||
$lang["general"]["langcode"] = "en_GB";
 | 
			
		||||
$lang["general"]["scripterror"] = "An error occured! {0}: {1}";
 | 
			
		||||
 | 
			
		||||
/************* Navbar *************/
 | 
			
		||||
 | 
			
		||||
$lang["navbar"]["navigation"] = "Navigation";
 | 
			
		||||
 | 
			
		||||
$lang["navbar"]["viewer"] = "Server Viewer";
 | 
			
		||||
$lang["navbar"]["bans"] = "Ban List";
 | 
			
		||||
$lang["navbar"]["rules"] = "Server Rules";
 | 
			
		||||
 | 
			
		||||
$lang["navbar"]["connect"] = "Connect to server";
 | 
			
		||||
$lang["navbar"]["connecttooltip"] = "Click to connect to {0}";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************* Footer *************/
 | 
			
		||||
 | 
			
		||||
$lang["footer"]["website"] = "Website";
 | 
			
		||||
$lang["footer"]["css"] = "CSS thanks to courtesy of";
 | 
			
		||||
$lang["footer"]["background"] = "background";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************* Server status *************/
 | 
			
		||||
 | 
			
		||||
$lang["serverstatus"]["title"] = "Server status";
 | 
			
		||||
$lang["serverstatus"]["address"] = "Address";
 | 
			
		||||
$lang["serverstatus"]["loading"] = "Loading...";
 | 
			
		||||
 | 
			
		||||
$lang["serverstatus"]["online"] = "Online";
 | 
			
		||||
$lang["serverstatus"]["offline"] = "Offline";
 | 
			
		||||
$lang["serverstatus"]["uptime"] = "Uptime";
 | 
			
		||||
$lang["serverstatus"]["version"] = "Version";
 | 
			
		||||
$lang["serverstatus"]["avgping"] = "Average ping";
 | 
			
		||||
$lang["serverstatus"]["avgpl"] = "Average packet loss";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************* Admin list *************/
 | 
			
		||||
 | 
			
		||||
$lang["adminlist"]["title"] = "Adminlist";
 | 
			
		||||
$lang["adminlist"]["emptygroup"] = "This group is empty";
 | 
			
		||||
$lang["adminlist"]["status"]["online"] = "Online";
 | 
			
		||||
$lang["adminlist"]["status"]["away"] = "Away";
 | 
			
		||||
$lang["adminlist"]["status"]["offline"] = "Offline";
 | 
			
		||||
$lang["adminlist"]["lastupdate"] = "Last update: {0}";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************* Server viewer promo box (under adminlist and contact) *************/
 | 
			
		||||
 | 
			
		||||
$lang["svpb"]["title"] = "Server Viewer";
 | 
			
		||||
$lang["svpb"]["takealook"] = "Take a look »";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************************************/
 | 
			
		||||
/************* SUBPAGES *************/
 | 
			
		||||
/************************************/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************* News - index.php *************/
 | 
			
		||||
 | 
			
		||||
$lang["index"]["title"] = "News";
 | 
			
		||||
$lang["index"]["showmore"] = "Read more";
 | 
			
		||||
$lang["index"]["showless"] = "Show less";
 | 
			
		||||
 | 
			
		||||
$lang["index"]["errortitle"] = "Error: news directory has not been found!";
 | 
			
		||||
$lang["index"]["errorsubtitle"] = "Please make sure that directory location set in <code>config/config.php</code> is valid.";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************* Server viewer - viewer.php *************/
 | 
			
		||||
 | 
			
		||||
$lang["viewer"]["title"] = "Server Viewer";
 | 
			
		||||
$lang["viewer"]["lastupdate"] = "Last update: {0}";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/************* Ban List - bans.php *************/
 | 
			
		||||
 | 
			
		||||
$lang["banlist"]["title"] = "Ban List";
 | 
			
		||||
$lang["banlist"]["datatablesurl"] = "//cdn.datatables.net/plug-ins/1.10.12/i18n/English.json";
 | 
			
		||||
$lang["banlist"]["emptylist"] = "BAN LIST IS EMPTY";
 | 
			
		||||
$lang["banlist"]["lastupdate"] = "Last update: {0}";
 | 
			
		||||
 | 
			
		||||
$lang["banlist"]["table"]["emptyreason"] = "(no reason set)";
 | 
			
		||||
$lang["banlist"]["table"]["permaban"] = "Never";
 | 
			
		||||
 | 
			
		||||
$lang["banlist"]["table"]["nickname"] = "Nick";
 | 
			
		||||
$lang["banlist"]["table"]["reason"] = "Reason";
 | 
			
		||||
$lang["banlist"]["table"]["bannedby"] = "Banned by";
 | 
			
		||||
$lang["banlist"]["table"]["bandate"] = "Ban date";
 | 
			
		||||
$lang["banlist"]["table"]["expires"] = "Expires";
 | 
			
		||||
 | 
			
		||||
/************* Rules - rules.php *************/
 | 
			
		||||
 | 
			
		||||
$lang["rules"]["title"] = "Server Rules";
 | 
			
		||||
$lang["rules"]["filenotfound"] = "Error: file <code>config/rules.md</code> has not been found!";
 | 
			
		||||
$lang["rules"]["readerror"] = "Error: cannot access the file <code>config/rules.md</code>!";
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
Readme od jQuery - do testów systemu
 | 
			
		||||
jQuery Readme - system test
 | 
			
		||||
jQuery, 2016-06-24, 21:00
 | 
			
		||||
 | 
			
		||||
[jQuery](https://jquery.com/) — New Wave JavaScript
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
Readme od Bootstrap - do testów systemu
 | 
			
		||||
Bootstrap Readme - system test
 | 
			
		||||
Bootstrap, 2016-06-24, 21:00
 | 
			
		||||
 | 
			
		||||
# [Bootstrap](http://getbootstrap.com)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,9 @@
 | 
			
		||||
### Regulamin serwera
 | 
			
		||||
 | 
			
		||||
This is a dedicated file to keep your server rules. Its loaded and displayed on "rules.php" page. To change it, go to the <code>config</code> directory and edit file <code>rules.md</code>
 | 
			
		||||
 | 
			
		||||
<br>
 | 
			
		||||
 | 
			
		||||
Oto dedykowany plik na regulamin twojego Teamspeaka wyświetlany na podstronie "regulamin". Plik z regulaminem znajdziesz w folderze <code>config</code> pod nazwą <code>rules.md</code>. Edytuje się go podobnie jak newsy.
 | 
			
		||||
 | 
			
		||||
<br>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								css/flags/famfamfam-flags.min.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								css/flags/famfamfam-flags.min.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								css/flags/famfamfam-flags.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								css/flags/famfamfam-flags.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 77 KiB  | 
@@ -60,3 +60,7 @@
 | 
			
		||||
    margin-top: 14.5px;
 | 
			
		||||
    margin-bottom: 14.5px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar .dropdown-menu>li>a {
 | 
			
		||||
    font-size: 14px;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -40,6 +40,10 @@ a {
 | 
			
		||||
    float: right
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.serverstatus .fa {
 | 
			
		||||
    margin: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.serverstatus span {
 | 
			
		||||
    float: right
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@ body {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-default {
 | 
			
		||||
    background-color: #004449 !important;
 | 
			
		||||
    background-color: #055157 !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.btn-dark {
 | 
			
		||||
@@ -197,7 +197,7 @@ fieldset[disabled] .btn-link:focus {
 | 
			
		||||
 | 
			
		||||
.navbar-default .navbar-nav>li>a:hover,
 | 
			
		||||
.navbar-default .navbar-nav>li>a:focus {
 | 
			
		||||
    background-color: #004449
 | 
			
		||||
    background-color: #083d48
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-default .navbar-nav>.active>a,
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,4 @@
 | 
			
		||||
<?php
 | 
			
		||||
$bansPage = true;
 | 
			
		||||
require_once __DIR__ . "/tsutils.php";
 | 
			
		||||
require_once __DIR__ . "/../lib/phpfastcache/autoload.php";
 | 
			
		||||
 | 
			
		||||
@@ -25,6 +24,7 @@ if (is_null($adminlist)) {
 | 
			
		||||
 | 
			
		||||
function getAdminList() {
 | 
			
		||||
    global $config;
 | 
			
		||||
    global $lang;
 | 
			
		||||
 | 
			
		||||
    $admingroups = $config["adminlist"];
 | 
			
		||||
    $localIcons = array(100, 200, 300, 400, 500, 600);
 | 
			
		||||
@@ -60,7 +60,7 @@ function getAdminList() {
 | 
			
		||||
            $clients = $group->clientList();
 | 
			
		||||
 | 
			
		||||
            if(empty($clients)) {
 | 
			
		||||
                $output .= '<p class="text-center"><i>Ta grupa jest pusta</i></p>';
 | 
			
		||||
                $output .= '<p class="text-center"><i>' . translate($lang["adminlist"]["emptygroup"]) . '</i></p>';
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
@@ -68,17 +68,17 @@ function getAdminList() {
 | 
			
		||||
                $user = getClientByDbid($tsAdmin, $userInfo['cldbid']);
 | 
			
		||||
 | 
			
		||||
                if(!$user) {
 | 
			
		||||
                    $output .=  '<p><span class="label label-primary iconspacer">' . $userInfo['client_nickname'] . '</span><span class="label label-danger pullright">Offline</span></p>';
 | 
			
		||||
                    $output .=  '<p><span class="label label-primary iconspacer">' . $userInfo['client_nickname'] . '</span><span class="label label-danger pullright">' . translate($lang["adminlist"]["status"]["offline"]) . '</span></p>';
 | 
			
		||||
                    continue;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                $output .=  '<p><img src="lib/ts3phpframework/images/viewer/' . $user->getIcon() . '.png" alt="Status użytkownika">' . '<span class="label label-primary">' . $user . '</span>' . ($user['client_away'] ? '<span class="label label-warning pullright">Away</span>' : '<span class="label label-success pullright">Online</span>') . '</p>';
 | 
			
		||||
                $output .=  '<p><img src="lib/ts3phpframework/images/viewer/' . $user->getIcon() . '.png" alt="Status użytkownika">' . '<span class="label label-primary">' . $user . '</span>' . ($user['client_away'] ? '<span class="label label-warning pullright">' . translate($lang["adminlist"]["status"]["away"]) . '</span>' : '<span class="label label-success pullright">' . translate($lang["adminlist"]["status"]["online"]) . '</span>') . '</p>';
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return $output;
 | 
			
		||||
    } catch(TeamSpeak3_Exception $e) {
 | 
			
		||||
        return '<div class="alert alert-danger"><p class="text-center">Wystąpił błąd ' . $e->getCode() . ': ' . $e->getMessage() . '</p></div>';
 | 
			
		||||
        return '<div class="alert alert-danger"><p class="text-center">' . translate($lang["general"]["scripterror"], [$e->getCode(), $e->getMessage()]) . '</p></div>';
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -7,10 +7,10 @@
 | 
			
		||||
    <div class="footer">
 | 
			
		||||
        <div class="container">
 | 
			
		||||
            <hr>
 | 
			
		||||
            <p class="pull-left">© <?php echo $config["general"]["title"]; ?> 2016</p>
 | 
			
		||||
            <p class="pull-left">© <?php tl($config["general"]["title"]); ?> 2016</p>
 | 
			
		||||
            <div class="pull-right">
 | 
			
		||||
                <ul class="list-inline">
 | 
			
		||||
                    <li><p><small>Strona © <a href="http://wruczek.top">Wruczek</a> 2016 | <a href="https://github.com/Wruczek/ts-website">ts-website</a> v 1.2.4 | MIT License<br>CSS dzięki uprzejmości <a href="https://flamespersecond.de">NothingTV</a>, tło © <a href="http://nabulsigraphix.wix.com/commissions">NabulsiGraphix</a></small></p></li>
 | 
			
		||||
                    <li><p><small><?php tl($lang["footer"]["website"]); ?> © <a href="http://wruczek.top">Wruczek</a> 2016 | <a href="https://github.com/Wruczek/ts-website">ts-website</a> v 1.3.0 | MIT License<br><?php tl($lang["footer"]["css"]); ?> <a href="https://flamespersecond.de">NothingTV</a>, <?php tl($lang["footer"]["background"]); ?> © <a href="http://nabulsigraphix.wix.com/commissions">NabulsiGraphix</a></small></p></li>
 | 
			
		||||
                </ul>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
@@ -30,6 +30,8 @@
 | 
			
		||||
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Readmore.js/2.2.0/readmore.min.js"></script>
 | 
			
		||||
 | 
			
		||||
    <?php if(isset($bansPage)) { ?>
 | 
			
		||||
    <script>var datatablesUrl = "<?php tl($lang["banlist"]["datatablesurl"]); ?>";</script>
 | 
			
		||||
 | 
			
		||||
    <!-- DataTables for Bootstrap -->
 | 
			
		||||
    <script src="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.12/js/jquery.dataTables.min.js"></script>
 | 
			
		||||
    <script src="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.12/js/dataTables.bootstrap.min.js"></script>
 | 
			
		||||
@@ -37,7 +39,9 @@
 | 
			
		||||
    <?php } ?>
 | 
			
		||||
 | 
			
		||||
    <!-- Custom JS -->
 | 
			
		||||
    <script>var apiurl = "api/status<?php echo $config["general"]["enablehta"] ? "" : ".php" ?>";</script>
 | 
			
		||||
    <script>
 | 
			
		||||
        var apiurl = "api/status<?php echo $config["general"]["enablehta"] ? "" : ".php"; ?>";
 | 
			
		||||
    </script>
 | 
			
		||||
 | 
			
		||||
    <script src="js/script.js"></script>
 | 
			
		||||
    <script src="js/status.js"></script>
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,7 @@
 | 
			
		||||
$start = microtime(true);
 | 
			
		||||
require_once __DIR__ . "/../include/modulecheck.php";
 | 
			
		||||
require_once __DIR__ . "/../config/config.php";
 | 
			
		||||
require_once __DIR__ . "/../include/language.php";
 | 
			
		||||
require_once __DIR__ . "/../include/adminlist.php";
 | 
			
		||||
?>
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
@@ -21,7 +22,7 @@ require_once __DIR__ . "/../include/adminlist.php";
 | 
			
		||||
    <link rel="shortcut icon" href="img/icon/icon-64.png">
 | 
			
		||||
 | 
			
		||||
    <!-- Bootswatch -->
 | 
			
		||||
    <link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.6/<?php echo $config["general"]["theme"]; ?>/bootstrap.min.css" rel="stylesheet">
 | 
			
		||||
    <link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.6/superhero/bootstrap.min.css" rel="stylesheet">
 | 
			
		||||
    <link href="css/theme.css" rel="stylesheet">
 | 
			
		||||
 | 
			
		||||
    <!-- Font Awesome -->
 | 
			
		||||
@@ -32,10 +33,14 @@ require_once __DIR__ . "/../include/adminlist.php";
 | 
			
		||||
    <link href="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.12/css/dataTables.bootstrap.min.css" rel="stylesheet">
 | 
			
		||||
    <?php } ?>
 | 
			
		||||
 | 
			
		||||
    <link href="css/flags/famfamfam-flags.min.css" rel="stylesheet">
 | 
			
		||||
 | 
			
		||||
    <!-- Custom CSS -->
 | 
			
		||||
    <link href="css/navbar.css" rel="stylesheet">
 | 
			
		||||
    <link href="css/style.css" rel="stylesheet">
 | 
			
		||||
 | 
			
		||||
    <script src="api/i18n.php"></script>
 | 
			
		||||
 | 
			
		||||
    <!--[if IE]>
 | 
			
		||||
        <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
 | 
			
		||||
        <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
 | 
			
		||||
@@ -49,7 +54,7 @@ require_once __DIR__ . "/../include/adminlist.php";
 | 
			
		||||
            <!-- Brand and toggle get grouped for better mobile display -->
 | 
			
		||||
            <div class="navbar-header">
 | 
			
		||||
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
 | 
			
		||||
                    <span class="sr-only">Nawigacja</span>
 | 
			
		||||
                    <span class="sr-only"><?php tl($lang["navbar"]["navigation"]); ?></span>
 | 
			
		||||
                    <span class="icon-bar"></span>
 | 
			
		||||
                    <span class="icon-bar"></span>
 | 
			
		||||
                    <span class="icon-bar"></span>
 | 
			
		||||
@@ -61,9 +66,9 @@ require_once __DIR__ . "/../include/adminlist.php";
 | 
			
		||||
            <!-- Collect the nav links, forms, and other content for toggling -->
 | 
			
		||||
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
 | 
			
		||||
                <ul class="nav navbar-nav">
 | 
			
		||||
                    <li><a href="viewer<?php echo $config["general"]["enablehta"] ? "" : ".php" ?>"><i class="fa fa-eye" aria-hidden="true"></i> Podgląd serwera</a></li>
 | 
			
		||||
                    <li><a href="bans<?php echo $config["general"]["enablehta"] ? "" : ".php" ?>"><i class="fa fa-ban" aria-hidden="true"></i> Lista banów</a></li>
 | 
			
		||||
                    <li><a href="rules<?php echo $config["general"]["enablehta"] ? "" : ".php" ?>"><i class="fa fa-book" aria-hidden="true"></i> Regulamin</a></li>
 | 
			
		||||
                    <li><a href="viewer<?php echo $config["general"]["enablehta"] ? "" : ".php" ?>"><i class="fa fa-eye" aria-hidden="true"></i> <?php tl($lang["navbar"]["viewer"]); ?></a></li>
 | 
			
		||||
                    <li><a href="bans<?php echo $config["general"]["enablehta"] ? "" : ".php" ?>"><i class="fa fa-ban" aria-hidden="true"></i> <?php tl($lang["navbar"]["bans"]); ?></a></li>
 | 
			
		||||
                    <li><a href="rules<?php echo $config["general"]["enablehta"] ? "" : ".php" ?>"><i class="fa fa-book" aria-hidden="true"></i> <?php tl($lang["navbar"]["rules"]); ?></a></li>
 | 
			
		||||
                    <!-- Nie mam na to czasu
 | 
			
		||||
                    <li class="dropdown">
 | 
			
		||||
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-television" aria-hidden="true"></i></i>Ranking <span class="caret"></span></a>
 | 
			
		||||
@@ -83,7 +88,16 @@ require_once __DIR__ . "/../include/adminlist.php";
 | 
			
		||||
                    <li><a href="<?php echo $link; ?>"><i class="fa <?php echo $icon; ?>" aria-hidden="true"></i> <?php echo $text; ?></a></li>
 | 
			
		||||
                    <?php } ?>
 | 
			
		||||
 | 
			
		||||
                    <li data-toggle="tooltip" data-placement="bottom" title="Kliknij, by połączyć się z serwerem <?php echo $config['teamspeak']['displayip']; ?>"><a href="ts3server://<?php echo $config['teamspeak']['displayip']; ?>"><i class="fa fa-sign-in" aria-hidden="true"></i>Połącz z serwerem</a></li>
 | 
			
		||||
                    <li data-toggle="tooltip" data-placement="bottom" title="<?php tl($lang["navbar"]["connecttooltip"], [$config['teamspeak']['displayip']]); ?>"><a href="ts3server://<?php echo $config['teamspeak']['displayip']; ?>"><i class="fa fa-sign-in" aria-hidden="true"></i><?php tl($lang["navbar"]["connect"]); ?></a></li>
 | 
			
		||||
 | 
			
		||||
                    <li class="dropdown">
 | 
			
		||||
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="famfamfam-flags <?php echo $langcode == "en" ? "gb" : $langcode; ?>" aria-hidden="true"></i> Language <span class="caret"></span></a>
 | 
			
		||||
                        <ul class="dropdown-menu">
 | 
			
		||||
                            <li><a href="?lang=en"><i class="famfamfam-flags gb" aria-hidden="true"></i> English</a></li>
 | 
			
		||||
                            <li><a href="?lang=pl"><i class="famfamfam-flags pl" aria-hidden="true"></i> Polski</a></li>
 | 
			
		||||
                            <li><a href="?lang=de"><i class="famfamfam-flags de" aria-hidden="true"></i> Deutsch</a></li>
 | 
			
		||||
                        </ul>
 | 
			
		||||
                    </li>
 | 
			
		||||
                </ul>
 | 
			
		||||
            </div>
 | 
			
		||||
            <!-- /.navbar-collapse -->
 | 
			
		||||
@@ -97,14 +111,14 @@ require_once __DIR__ . "/../include/adminlist.php";
 | 
			
		||||
 | 
			
		||||
            <div class="col-md-3 col-md-push-9">
 | 
			
		||||
                <div class="panel panel-default">
 | 
			
		||||
                    <div class="panel-heading"><i class="fa fa-bar-chart" aria-hidden="true"></i> Status serwera</div>
 | 
			
		||||
                    <div class="panel-heading"><i class="fa fa-bar-chart" aria-hidden="true"></i> <?php tl($lang["serverstatus"]["title"]); ?></div>
 | 
			
		||||
                    <div class="panel-body">
 | 
			
		||||
                        <div class="serverstatus">
 | 
			
		||||
                            <p><i class="fa fa-globe" aria-hidden="true"></i> Adres: <a href="ts3server://<?php echo $config['teamspeak']['displayip']; ?>"><?php echo $config['teamspeak']['displayip']; ?></a></p>
 | 
			
		||||
                            <p><i class="fa fa-globe" aria-hidden="true"></i> <?php tl($lang["serverstatus"]["address"]); ?>: <a href="ts3server://<?php echo $config['teamspeak']['displayip']; ?>"><?php echo $config['teamspeak']['displayip']; ?></a></p>
 | 
			
		||||
                            <div id="serverstatus">
 | 
			
		||||
                                <div class="text-center">
 | 
			
		||||
                                    <i class="fa fa-refresh fa-spin fa-3x fa-fw"></i>
 | 
			
		||||
                                    <span class="sr-only">Ładowanie...</span>
 | 
			
		||||
                                    <span class="sr-only"><?php tl($lang["serverstatus"]["loading"]); ?></span>
 | 
			
		||||
                                </div>
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
@@ -113,7 +127,7 @@ require_once __DIR__ . "/../include/adminlist.php";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                <div class="panel panel-default">
 | 
			
		||||
                    <div class="panel-heading"><i class="fa fa-shield" aria-hidden="true"></i> Status administracji <span class="pullright"><i class="fa fa-question-circle" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="Stan na <?php echo $adminlist[1]; ?>"></i></span></div>
 | 
			
		||||
                    <div class="panel-heading"><i class="fa fa-shield" aria-hidden="true"></i> <?php tl($lang["adminlist"]["title"]); ?> <span class="pullright"><i class="fa fa-question-circle" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="<?php tl($lang["adminlist"]["lastupdate"], [$adminlist[1]]); ?>"></i></span></div>
 | 
			
		||||
                    <div class="panel-body adminlist">
 | 
			
		||||
                        <?php echo $adminlist[0]; ?>
 | 
			
		||||
                    </div>
 | 
			
		||||
@@ -129,9 +143,9 @@ require_once __DIR__ . "/../include/adminlist.php";
 | 
			
		||||
                <?php } ?>
 | 
			
		||||
 | 
			
		||||
                <div class="panel panel-default">
 | 
			
		||||
                    <div class="panel-heading"><i class="fa fa-eye" aria-hidden="true"></i> Podgląd serwera</div>
 | 
			
		||||
                    <div class="panel-heading"><i class="fa fa-eye" aria-hidden="true"></i> <?php tl($lang["svpb"]["title"]); ?></div>
 | 
			
		||||
                    <div class="panel-body">
 | 
			
		||||
                        <a href="viewer<?php echo $config["general"]["enablehta"] ? "" : ".php" ?>" class="btn btn-primary btn-lg btn-block"><i class="fa fa-eye" aria-hidden="true"></i> Zobacz »</a>
 | 
			
		||||
                        <a href="viewer<?php echo $config["general"]["enablehta"] ? "" : ".php" ?>" class="btn btn-primary btn-lg btn-block"><i class="fa fa-eye" aria-hidden="true"></i> <?php tl($lang["svpb"]["takealook"]); ?></a>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										47
									
								
								include/language.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								include/language.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,47 @@
 | 
			
		||||
<?php
 | 
			
		||||
session_start();
 | 
			
		||||
header('Cache-control: private');
 | 
			
		||||
 | 
			
		||||
if (isset($_GET['lang'])) {
 | 
			
		||||
    $langcode = $_GET['lang'];
 | 
			
		||||
 | 
			
		||||
    $_SESSION['lang'] = $langcode;
 | 
			
		||||
 | 
			
		||||
    setcookie('lang', $langcode, time() + (3600 * 24 * 60));
 | 
			
		||||
} else if (isset($_SESSION['lang'])) {
 | 
			
		||||
    $langcode = $_SESSION['lang'];
 | 
			
		||||
} else if (isset($_COOKIE['lang'])) {
 | 
			
		||||
    $langcode = $_COOKIE['lang'];
 | 
			
		||||
} else if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
 | 
			
		||||
    $langcode = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
 | 
			
		||||
} else {
 | 
			
		||||
    $langcode = "en";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if(!file_exists(getLanguagePath($langcode)))
 | 
			
		||||
    $langcode = "en";
 | 
			
		||||
 | 
			
		||||
require_once getLanguagePath($langcode);
 | 
			
		||||
 | 
			
		||||
function getLanguagePath($langcode) {
 | 
			
		||||
    return __DIR__ . '/../config/languages/lang.' . $langcode . '.php';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function tl($pattern, $args = null) {
 | 
			
		||||
    echo translate($pattern, $args);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function translate($pattern, $args = null) {
 | 
			
		||||
 | 
			
		||||
    if(!$args) {
 | 
			
		||||
        return $pattern;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $size = count($args);
 | 
			
		||||
 | 
			
		||||
    for ($i = 0; $i < $size; $i++) {
 | 
			
		||||
        $pattern = str_ireplace('{' . $i . '}', $args[$i], $pattern);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return $pattern;
 | 
			
		||||
}
 | 
			
		||||
@@ -40,19 +40,19 @@ function isPHPVersionSupported() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if (!isPHPVersionSupported()) {
 | 
			
		||||
    $title = 'Niewspierana wersja PHP';
 | 
			
		||||
    $title = 'Unsupported PHP version';
 | 
			
		||||
 | 
			
		||||
    $text = '<p>Posiadasz starą, niewspieraną wersję PHP.</p><p>Twoja wersja PHP: <b>' . phpversion() . '</b>, minimalna wymagana wersja PHP: <b>5.3.0</b>.</p><p>Zaktualizuj PHP i spróbuj ponownie.</p>';
 | 
			
		||||
    $text = '<p>You are using old, unsupported PHP version.</p><p>Your PHP version: <b>' . phpversion() . '</b>, required PHP version: <b>5.3.0</b>.</p><p>Please update your PHP installation and try again.</p>';
 | 
			
		||||
 | 
			
		||||
    die(showError($title, $text));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if(!file_exists(__DIR__ . "/../config/config.php")) {
 | 
			
		||||
 | 
			
		||||
    $title = 'Brak pliku config.php';
 | 
			
		||||
    $title = 'config.php does not exists';
 | 
			
		||||
 | 
			
		||||
    $text = '<p>Przejdź do folderu <code>config</code> i zmień nazwę pliku z <code>config.template.php</code> na <code>config.php</code>.</p>
 | 
			
		||||
            <p>Skonfiguruj stronę według własnych potrzeb.</p>';
 | 
			
		||||
    $text = '<p>Please go into the directory <code>config</code> and rename <code>config.template.php</code> to <code>config.php</code>.</p>
 | 
			
		||||
            <p>Edit the new file and tweak it to suite your needs.</p>';
 | 
			
		||||
 | 
			
		||||
    die(showError($title, $text));
 | 
			
		||||
}
 | 
			
		||||
@@ -101,7 +101,7 @@ function showError($title, $text) { ?>
 | 
			
		||||
            <?php echo $text; ?>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="panel-footer">
 | 
			
		||||
            Strona © <a href="http://wruczek.top">Wruczek</a> 2016 | <a href="https://github.com/Wruczek/ts-website">ts-website</a> v 1.2.4 | MIT License
 | 
			
		||||
            Strona © <a href="http://wruczek.top">Wruczek</a> 2016 | <a href="https://github.com/Wruczek/ts-website">ts-website</a> v 1.3.0 | MIT License
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ $(document).ready(function () {
 | 
			
		||||
    $('#banlist').dataTable({
 | 
			
		||||
        "order": [],
 | 
			
		||||
        "language": {
 | 
			
		||||
            "url": "//cdn.datatables.net/plug-ins/1.10.12/i18n/Polish.json"
 | 
			
		||||
            "url": datatablesUrl
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,6 @@ $(function () {
 | 
			
		||||
$('.news-body').readmore({
 | 
			
		||||
    speed: 500,
 | 
			
		||||
    collapsedHeight: 300,
 | 
			
		||||
    moreLink: '<button type="button" class="btn btn-dark">Pokaż wiecej</button>',
 | 
			
		||||
    lessLink: '<button type="button" class="btn btn-dark">Pokaż mniej</button>'
 | 
			
		||||
    moreLink: '<button type="button" class="btn btn-dark"><i class="fa fa-plus-circle" aria-hidden="true"></i> ' + textShowMore + '</button>',
 | 
			
		||||
    lessLink: '<button type="button" class="btn btn-dark"><i class="fa fa-minus-circle" aria-hidden="true"></i> ' + textShowLess + '</button>'
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								js/status.js
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								js/status.js
									
									
									
									
									
								
							@@ -28,19 +28,19 @@ function checkStatus() {
 | 
			
		||||
                var averagePing = Math.round(json.averagePing * 100) / 100;
 | 
			
		||||
 | 
			
		||||
                result =
 | 
			
		||||
                    '<p><i class="fa fa-power-off" aria-hidden="true"></i> Online: <span class="label label-success">' + clientsonline + ' / ' + maxclients + ' (' + clientsprecent + '%)</span></p>' +
 | 
			
		||||
                    '<p><i class="fa fa-clock-o" aria-hidden="true"></i> Uptime: <span class="label label-success">' + uptime + '</span></p>' +
 | 
			
		||||
                    '<p><i class="fa fa-info-circle" aria-hidden="true"></i> Wersja: <span class="label label-success">' + version + ' @ ' + platform + '</span></p>' +
 | 
			
		||||
                    '<p><i class="fa fa-signal" aria-hidden="true"></i> Średni ping: <span class="label label-success">' + averagePing + ' ms</span></p>' +
 | 
			
		||||
                    '<p><i class="fa fa-bolt" aria-hidden="true"></i> Średni packet loss: <span class="label label-success">' + averagePacketloss + '%</span></p>';
 | 
			
		||||
                    '<p><i class="fa fa-power-off" aria-hidden="true"></i> ' + statusOnline + ': <span class="label label-success">' + clientsonline + ' / ' + maxclients + ' (' + clientsprecent + '%)</span></p>' +
 | 
			
		||||
                    '<p><i class="fa fa-clock-o" aria-hidden="true"></i> ' + statusUptime + ': <span class="label label-success">' + uptime + '</span></p>' +
 | 
			
		||||
                    '<p><i class="fa fa-info-circle" aria-hidden="true"></i> ' + statusVersion + ': <span class="label label-success">' + version + ' @ ' + platform + '</span></p>' +
 | 
			
		||||
                    '<p><i class="fa fa-signal" aria-hidden="true"></i> ' + statusAvgping + ': <span class="label label-success">' + averagePing + ' ms</span></p>' +
 | 
			
		||||
                    '<p><i class="fa fa-bolt" aria-hidden="true"></i> ' + statusAvgpl + ': <span class="label label-success">' + averagePacketloss + '%</span></p>';
 | 
			
		||||
            } else {
 | 
			
		||||
                result = '<p><i class="fa fa-power-off" aria-hidden="true"></i> Online: <span class="label label-danger">Offline</span></p>';
 | 
			
		||||
                result = '<p><i class="fa fa-power-off" aria-hidden="true"></i> Online: <span class="label label-danger">' + statusOffline + '</span></p>';
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            $("#serverstatus").html(result);
 | 
			
		||||
        },
 | 
			
		||||
        error: function (result) {
 | 
			
		||||
            $("#serverstatus").html('<p><i class="fa fa-power-off" aria-hidden="true"></i> Online: <span class="label label-danger">ERROR</span></p>');
 | 
			
		||||
            $("#serverstatus").html('<p><i class="fa fa-power-off" aria-hidden="true"></i> ' + statusOnline + ': <span class="label label-danger">ERROR</span></p>');
 | 
			
		||||
        }
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -7,17 +7,17 @@ $parsedown = new Parsedown();
 | 
			
		||||
$path = __DIR__ . "/config/rules.md";
 | 
			
		||||
 | 
			
		||||
if(!file_exists($path)) {
 | 
			
		||||
    echo '<div class="alert alert-danger"><p class="text-center">Wystąpił błąd: plik z regulaminem nie został odnaleziony</div>';
 | 
			
		||||
    echo '<div class="alert alert-danger"><p class="text-center">' . translate($lang["rules"]["filenotfound"]) . '</div>';
 | 
			
		||||
} else {
 | 
			
		||||
    $file = readFileContent($path);
 | 
			
		||||
 | 
			
		||||
    if(!$file) {
 | 
			
		||||
        echo '<div class="alert alert-danger"><p class="text-center">Wystąpił błąd: nie można odczytać pliku z regulaminem</div>';
 | 
			
		||||
        echo '<div class="alert alert-danger"><p class="text-center">' . translate($lang["rules"]["readerror"]) . '</div>';
 | 
			
		||||
    } else {
 | 
			
		||||
?>
 | 
			
		||||
<div class="panel panel-default">
 | 
			
		||||
    <div class="panel-heading">
 | 
			
		||||
        <h3 class="panel-title"><i class="fa fa-book" aria-hidden="true"></i> Regulamin serwera</h3>
 | 
			
		||||
        <h3 class="panel-title"><i class="fa fa-book" aria-hidden="true"></i> <?php tl($lang["rules"]["title"]); ?></h3>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="panel-body">
 | 
			
		||||
        <?php echo $parsedown->text($file); ?>
 | 
			
		||||
 
 | 
			
		||||
@@ -22,11 +22,13 @@ if (is_null($tsviewer)) {
 | 
			
		||||
// print_r ($tsviewer);
 | 
			
		||||
 | 
			
		||||
function getViewer() {
 | 
			
		||||
    global $lang;
 | 
			
		||||
 | 
			
		||||
    try {
 | 
			
		||||
        $tsAdmin = TeamSpeak3::factory(getTeamspeakURI(). "#no_query_clients");
 | 
			
		||||
        return $tsAdmin->getViewer(new TeamSpeak3_Viewer_Html("lib/ts3phpframework/images/viewer/", "lib/ts3phpframework/images/flags/", "data:image"));
 | 
			
		||||
    } catch(TeamSpeak3_Exception $e) {
 | 
			
		||||
        return '<div class="alert alert-danger"><p class="text-center">Wystąpił błąd ' . $e->getCode() . ': ' . $e->getMessage() . '</p></div>';
 | 
			
		||||
        return '<div class="alert alert-danger"><p class="text-center">' . translate($lang["general"]["scripterror"], [$e->getCode(), $e->getMessage()]) . '</p></div>';
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -34,13 +36,13 @@ function getViewer() {
 | 
			
		||||
 | 
			
		||||
<div class="panel panel-default">
 | 
			
		||||
    <div class="panel-heading">
 | 
			
		||||
        <h3 class="panel-title"><i class="fa fa-eye" aria-hidden="true"></i> Podgląd serwera</h3>
 | 
			
		||||
        <h3 class="panel-title"><i class="fa fa-eye" aria-hidden="true"></i> <?php tl($lang["viewer"]["title"]); ?></h3>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="panel-body">
 | 
			
		||||
        <?php echo $tsviewer[0]; ?>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="panel-footer">
 | 
			
		||||
        Stan na <?php echo $tsviewer[1]; ?><!-- <span style="float: right">Podgląd odświerza się co 30 sekund</span> -->
 | 
			
		||||
        <?php tl($lang["viewer"]["lastupdate"], [$tsviewer[1]]); ?><!-- <span style="float: right">Podgląd odświerza się co 30 sekund</span> -->
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user