Using Bootstrap pull right class + code format
This commit is contained in:
@ -3,7 +3,6 @@ require_once __DIR__ . "/tsutils.php";
|
||||
require_once __DIR__ . "/../lib/phpfastcache/autoload.php";
|
||||
|
||||
|
||||
|
||||
use phpFastCache\Util;
|
||||
use phpFastCache\CacheManager;
|
||||
|
||||
@ -30,27 +29,27 @@ function getAdminList() {
|
||||
$localIcons = array(100, 200, 300, 400, 500, 600);
|
||||
|
||||
try {
|
||||
$tsAdmin = TeamSpeak3::factory(getTeamspeakURI(). "#no_query_clients");
|
||||
$tsAdmin = TeamSpeak3::factory(getTeamspeakURI() . "#no_query_clients");
|
||||
|
||||
$output = "";
|
||||
|
||||
foreach ($admingroups as $group) {
|
||||
|
||||
if(!array_key_exists((string) $group, $tsAdmin->serverGroupList()))
|
||||
if (!array_key_exists((string)$group, $tsAdmin->serverGroupList()))
|
||||
continue;
|
||||
|
||||
$group = $tsAdmin->serverGroupGetById($group);
|
||||
|
||||
$icon = '';
|
||||
|
||||
if($group["iconid"]) {
|
||||
if(!$group->iconIsLocal("iconid")) {
|
||||
if ($group["iconid"]) {
|
||||
if (!$group->iconIsLocal("iconid")) {
|
||||
$groupicon = getGroupIcon($tsAdmin, $group);
|
||||
|
||||
if($groupicon) {
|
||||
if ($groupicon) {
|
||||
$icon = '<img src="data:' . TeamSpeak3_Helper_Convert::imageMimeType($groupicon) . ';base64,' . base64_encode($groupicon) . '" alt="Ikona grupy" /> ';
|
||||
}
|
||||
} elseif(in_array($group["iconid"], $localIcons)) {
|
||||
} elseif (in_array($group["iconid"], $localIcons)) {
|
||||
$icon = '<img src="lib/ts3phpframework/images/viewer/group_icon_' . $group["iconid"] . '.png" alt="Ikona grupy" /> ';
|
||||
}
|
||||
}
|
||||
@ -59,7 +58,7 @@ function getAdminList() {
|
||||
|
||||
$clients = $group->clientList();
|
||||
|
||||
if(empty($clients)) {
|
||||
if (empty($clients)) {
|
||||
$output .= '<p class="text-center"><i>' . translate($lang["adminlist"]["emptygroup"]) . '</i></p>';
|
||||
continue;
|
||||
}
|
||||
@ -67,17 +66,17 @@ function getAdminList() {
|
||||
foreach ($clients as $userInfo) {
|
||||
$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">' . translate($lang["adminlist"]["status"]["offline"]) . '</span></p>';
|
||||
if (!$user) {
|
||||
$output .= '<p><span class="label label-primary iconspacer">' . $userInfo['client_nickname'] . '</span><span class="label label-danger pull-right">' . 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">' . translate($lang["adminlist"]["status"]["away"]) . '</span>' : '<span class="label label-success pullright">' . translate($lang["adminlist"]["status"]["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 pull-right">' . translate($lang["adminlist"]["status"]["away"]) . '</span>' : '<span class="label label-success pull-right">' . translate($lang["adminlist"]["status"]["online"]) . '</span>') . '</p>';
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
} catch(TeamSpeak3_Exception $e) {
|
||||
} catch (TeamSpeak3_Exception $e) {
|
||||
return '<div class="alert alert-danger"><p class="text-center">' . translate($lang["general"]["scripterror"], [$e->getCode(), $e->getMessage()]) . '</p></div>';
|
||||
}
|
||||
|
||||
@ -86,7 +85,7 @@ function getAdminList() {
|
||||
function getClientByDbid($tsAdmin, $cldbid) {
|
||||
try {
|
||||
return $tsAdmin->clientGetByDbid($cldbid);
|
||||
} catch(TeamSpeak3_Exception $e) {
|
||||
} catch (TeamSpeak3_Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -94,7 +93,7 @@ function getClientByDbid($tsAdmin, $cldbid) {
|
||||
function getGroupIcon($tsAdmin, $group) {
|
||||
try {
|
||||
return $group->iconDownload();
|
||||
} catch(TeamSpeak3_Exception $e) {
|
||||
} catch (TeamSpeak3_Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
<!-- Readmore.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Readmore.js/2.2.0/readmore.min.js"></script>
|
||||
|
||||
<?php if(isset($bansPage)) { ?>
|
||||
<?php if (isset($bansPage)) { ?>
|
||||
<script>var datatablesUrl = "<?php tl($lang["banlist"]["datatablesurl"]); ?>";</script>
|
||||
|
||||
<!-- DataTables for Bootstrap -->
|
||||
|
@ -131,7 +131,7 @@ $htalink = $config["general"]["enablehta"] ? "" : ".php";
|
||||
|
||||
|
||||
<div class="panel panel-default">
|
||||
<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-heading"><i class="fa fa-shield" aria-hidden="true"></i> <?php tl($lang["adminlist"]["title"]); ?> <span class="pull-right"><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>
|
||||
@ -146,7 +146,7 @@ $htalink = $config["general"]["enablehta"] ? "" : ".php";
|
||||
$name = $item[0];
|
||||
$linkdesc = $item[1];
|
||||
$link = $item[2];
|
||||
echo '<li>' . $name . ' <span class="pullright"><a href="' . $link . '">' . $linkdesc . '</a></span></li>';
|
||||
echo '<li>' . $name . ' <span class="pull-right"><a href="' . $link . '">' . $linkdesc . '</a></span></li>';
|
||||
} ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -14,13 +14,13 @@ if (isset($_GET['lang'])) {
|
||||
$langcode = $_SESSION['lang'];
|
||||
} else if (isset($_COOKIE['lang'])) {
|
||||
$langcode = $_COOKIE['lang'];
|
||||
} else if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||
} else if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||
$langcode = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
|
||||
} else {
|
||||
$langcode = "en";
|
||||
}
|
||||
|
||||
if(!file_exists(getLanguagePath($langcode)))
|
||||
if (!file_exists(getLanguagePath($langcode)))
|
||||
$langcode = "en";
|
||||
|
||||
require_once getLanguagePath($langcode);
|
||||
@ -35,7 +35,7 @@ function tl($pattern, $args = null) {
|
||||
|
||||
function translate($pattern, $args = null) {
|
||||
|
||||
if(!$args) {
|
||||
if (!$args) {
|
||||
return $pattern;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ if (!extension_loaded("mbstring")) {
|
||||
|
||||
try {
|
||||
require_once __DIR__ . "/../lib/phpfastcache/autoload.php";
|
||||
\phpFastCache\CacheManager::Files();
|
||||
\phpFastCache\CacheManager::Files();
|
||||
} catch (\phpFastCache\Exceptions\phpFastCacheDriverException $e) {
|
||||
$title = 'Directory is not writable';
|
||||
|
||||
@ -38,7 +38,7 @@ try {
|
||||
die(showError($title, $text));
|
||||
}
|
||||
|
||||
if(!file_exists(__DIR__ . "/../config/config.php")) {
|
||||
if (!file_exists(__DIR__ . "/../config/config.php")) {
|
||||
$title = 'config.php does not exists';
|
||||
|
||||
$text = '<p>Please go into the directory <code>config</code> and rename <code>config.template.php</code> to <code>config.php</code>.</p>
|
||||
|
@ -11,11 +11,11 @@ function pingTeamspeakServer($uri) {
|
||||
try {
|
||||
$tsAdmin = TeamSpeak3::factory($uri);
|
||||
|
||||
if(!$tsAdmin->getProperty("virtualserver_status"))
|
||||
if (!$tsAdmin->getProperty("virtualserver_status"))
|
||||
throw new Exception("Server is offline");
|
||||
|
||||
return $tsAdmin->getInfo();
|
||||
} catch(TeamSpeak3_Exception $e) {
|
||||
} catch (TeamSpeak3_Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user