release 1.2.7
This commit is contained in:
@@ -1,155 +1,171 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if($addons_config['assign_groups_active']['value'] != '1') {
|
||||
echo "addon is disabled";
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
$uuid = $_SESSION[$rspathhex.'tsuid'];
|
||||
if(($dbdata = $mysqlcon->query("SELECT cldgroup FROM $dbname.user WHERE uuid='$uuid'")->fetch()) === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
}
|
||||
$cld_groups = explode(',', $dbdata['cldgroup']);
|
||||
$multiple_uuid = explode(',', substr($_SESSION[$rspathhex.'multiple'], 0, -1));
|
||||
$disabled = '';
|
||||
$allowed_groups_arr = array();
|
||||
|
||||
|
||||
if(count($multiple_uuid) > 1 and !isset($_SESSION[$rspathhex.'uuid_verified'])) {
|
||||
$disabled = 1;
|
||||
$err_msg = sprintf($lang['stag0006'], '<a href="verify.php">', '</a>'); $err_lvl = 3;
|
||||
} elseif ($_SESSION[$rspathhex.'connected'] == 0) {
|
||||
$err_msg = sprintf($lang['stag0015'], '<a href="verify.php">', '</a>'); $err_lvl = 3;
|
||||
$disabled = 1;
|
||||
} else {
|
||||
if(($servergroups = $mysqlcon->query("SELECT * FROM $dbname.groups")->fetchAll(PDO::FETCH_ASSOC)) === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
} else {
|
||||
foreach($servergroups as $servergroup) {
|
||||
$sqlhisgroup[$servergroup['sgid']] = $servergroup['sgidname'];
|
||||
if(file_exists('../tsicons/'.$servergroup['sgid'].'.png')) {
|
||||
$sqlhisgroup_file[$servergroup['sgid']] = true;
|
||||
} else {
|
||||
$sqlhisgroup_file[$servergroup['sgid']] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$allowed_groups_arr = explode(',', $addons_config['assign_groups_groupids']['value']);
|
||||
|
||||
if(isset($_POST['update'])) {
|
||||
if(($sumentries = $mysqlcon->query("SELECT COUNT(*) FROM $dbname.addon_assign_groups WHERE uuid='$uuid'")->fetch(PDO::FETCH_NUM)) === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
} else {
|
||||
if($sumentries[0] > 0) {
|
||||
$err_msg = $lang['stag0007']; $err_lvl = 3;
|
||||
} else {
|
||||
$set_groups = '';
|
||||
$count_limit = 0;
|
||||
foreach($allowed_groups_arr as $allowed_group) {
|
||||
if(in_array($allowed_group, $cld_groups)) {
|
||||
$count_limit++;
|
||||
}
|
||||
if(isset($_POST[$allowed_group]) && $_POST[$allowed_group] == 1 && !in_array($allowed_group, $cld_groups)) {
|
||||
$set_groups .= $allowed_group.',';
|
||||
array_push($cld_groups, $allowed_group);
|
||||
$count_limit++;
|
||||
}
|
||||
if(!isset($_POST[$allowed_group]) && in_array($allowed_group, $cld_groups)) {
|
||||
$set_groups .= '-'.$allowed_group.',';
|
||||
$position = array_search($allowed_group, $cld_groups);
|
||||
array_splice($cld_groups, $position, 1);
|
||||
$count_limit--;
|
||||
}
|
||||
}
|
||||
$set_groups = substr($set_groups, 0, -1);
|
||||
if($set_groups != '' && $count_limit <= $addons_config['assign_groups_limit']['value']) {
|
||||
if ($mysqlcon->exec("INSERT INTO $dbname.addon_assign_groups SET uuid='$uuid', grpids='$set_groups'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
} else {
|
||||
$err_msg = $lang['stag0008']; $err_lvl = NULL;
|
||||
}
|
||||
} elseif($count_limit > $addons_config['assign_groups_limit']['value']) {
|
||||
$err_msg = sprintf($lang['stag0009'], $addons_config['assign_groups_limit']['value']); $err_lvl = 3;
|
||||
} else {
|
||||
$err_msg = $lang['stag0010']; $err_lvl = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['stag0001']; ?>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-horizontal" name="update" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<p class="text-right"><strong><?PHP echo $lang['stag0011'].$addons_config['assign_groups_limit']['value']; ?></strong></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<?PHP foreach($allowed_groups_arr as $allowed_group) { ?>
|
||||
<div class="form-group">
|
||||
<?PHP if (isset($sqlhisgroup_file[$allowed_group]) && $sqlhisgroup_file[$allowed_group]===true) { ?>
|
||||
<label class="col-sm-5 control-label"><?php echo $sqlhisgroup[$allowed_group]; ?></label>
|
||||
<label class="col-sm-1 control-label"><img src="../tsicons/<?PHP echo $allowed_group; ?>.png" alt="groupicon"></label>
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<?PHP } else { ?>
|
||||
<label class="col-sm-5 control-label"><?php echo $sqlhisgroup[$allowed_group]; ?></label>
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<?PHP } ?>
|
||||
<div class="col-sm-2">
|
||||
<?PHP if(in_array($allowed_group, $cld_groups)) {
|
||||
echo '<input type="checkbox" checked data-size="mini" name="',$allowed_group,'" value="1">';
|
||||
} else {
|
||||
echo '<input type="checkbox" data-size="mini" name="',$allowed_group,'" value="1">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" name="update" class="btn btn-primary"<?PHP if($disabled == 1) echo " disabled"; ?>><?PHP echo $lang['stag0012']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if($addons_config['assign_groups_active']['value'] != '1') {
|
||||
echo "addon is disabled";
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
$uuid = $_SESSION[$rspathhex.'tsuid'];
|
||||
if(($dbdata = $mysqlcon->query("SELECT `cldgroup` FROM `$dbname`.`user` WHERE `uuid`='$uuid'")->fetch()) === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
}
|
||||
$cld_groups = explode(',', $dbdata['cldgroup']);
|
||||
$multiple_uuid = explode(',', substr($_SESSION[$rspathhex.'multiple'], 0, -1));
|
||||
$disabled = '';
|
||||
$allowed_groups_arr = array();
|
||||
|
||||
if (isset($_POST['update']) && $_POST['csrf_token'] != $_SESSION[$rspathhex.'csrf_token']) {
|
||||
echo $lang['errcsrf'];
|
||||
rem_session_ts3($rspathhex);
|
||||
exit;
|
||||
}
|
||||
|
||||
if(count($multiple_uuid) > 1 and !isset($_SESSION[$rspathhex.'uuid_verified'])) {
|
||||
$disabled = 1;
|
||||
$err_msg = sprintf($lang['stag0006'], '<a href="verify.php">', '</a>'); $err_lvl = 3;
|
||||
} elseif ($_SESSION[$rspathhex.'connected'] == 0) {
|
||||
$err_msg = sprintf($lang['stag0015'], '<a href="verify.php">', '</a>'); $err_lvl = 3;
|
||||
$disabled = 1;
|
||||
} else {
|
||||
if(($servergroups = $mysqlcon->query("SELECT * FROM `$dbname`.`groups`")->fetchAll(PDO::FETCH_ASSOC)) === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
} else {
|
||||
foreach($servergroups as $servergroup) {
|
||||
$sqlhisgroup[$servergroup['sgid']] = $servergroup['sgidname'];
|
||||
if(file_exists('../tsicons/'.$servergroup['sgid'].'.png')) {
|
||||
$sqlhisgroup_file[$servergroup['sgid']] = true;
|
||||
} else {
|
||||
$sqlhisgroup_file[$servergroup['sgid']] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$allowed_groups_arr = explode(',', $addons_config['assign_groups_groupids']['value']);
|
||||
|
||||
if(isset($_POST['update']) && $_POST['csrf_token'] == $_SESSION[$rspathhex.'csrf_token']) {
|
||||
if(($sumentries = $mysqlcon->query("SELECT COUNT(*) FROM `$dbname`.`addon_assign_groups` WHERE `uuid`='$uuid'")->fetch(PDO::FETCH_NUM)) === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
} else {
|
||||
if($sumentries[0] > 0) {
|
||||
$err_msg = $lang['stag0007']; $err_lvl = 3;
|
||||
} else {
|
||||
$set_groups = '';
|
||||
$count_limit = 0;
|
||||
foreach($allowed_groups_arr as $allowed_group) {
|
||||
if(in_array($allowed_group, $cld_groups)) {
|
||||
$count_limit++;
|
||||
}
|
||||
if(isset($_POST[$allowed_group]) && $_POST[$allowed_group] == 1 && !in_array($allowed_group, $cld_groups)) {
|
||||
$set_groups .= $allowed_group.',';
|
||||
array_push($cld_groups, $allowed_group);
|
||||
$count_limit++;
|
||||
}
|
||||
if(!isset($_POST[$allowed_group]) && in_array($allowed_group, $cld_groups)) {
|
||||
$set_groups .= '-'.$allowed_group.',';
|
||||
$position = array_search($allowed_group, $cld_groups);
|
||||
array_splice($cld_groups, $position, 1);
|
||||
$count_limit--;
|
||||
}
|
||||
}
|
||||
$set_groups = substr($set_groups, 0, -1);
|
||||
if($set_groups != '' && $count_limit <= $addons_config['assign_groups_limit']['value']) {
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`addon_assign_groups` SET `uuid`='$uuid',`grpids`='$set_groups'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
} else {
|
||||
$err_msg = $lang['stag0008']; $err_lvl = NULL;
|
||||
}
|
||||
} elseif($count_limit > $addons_config['assign_groups_limit']['value']) {
|
||||
$err_msg = sprintf($lang['stag0009'], $addons_config['assign_groups_limit']['value']); $err_lvl = 3;
|
||||
} else {
|
||||
$err_msg = $lang['stag0010']; $err_lvl = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION[$rspathhex.'csrf_token'] = bin2hex(openssl_random_pseudo_bytes(32));
|
||||
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['stag0001']; ?>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-horizontal" name="update" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $_SESSION[$rspathhex.'csrf_token']; ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<p class="text-right"><strong><?PHP echo $lang['stag0011'].$addons_config['assign_groups_limit']['value']; ?></strong></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<?PHP foreach($allowed_groups_arr as $allowed_group) { ?>
|
||||
<div class="form-group">
|
||||
<?PHP if (isset($sqlhisgroup_file[$allowed_group]) && $sqlhisgroup_file[$allowed_group]===true) { ?>
|
||||
<label class="col-sm-5 control-label"><?php echo $sqlhisgroup[$allowed_group]; ?></label>
|
||||
<label class="col-sm-1 control-label"><img src="../tsicons/<?PHP echo $allowed_group; ?>.png" alt="groupicon"></label>
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<?PHP } else { ?>
|
||||
<label class="col-sm-5 control-label"><?php echo $sqlhisgroup[$allowed_group]; ?></label>
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<?PHP } ?>
|
||||
<div class="col-sm-2">
|
||||
<?PHP if(in_array($allowed_group, $cld_groups)) {
|
||||
echo '<input type="checkbox" checked data-size="mini" name="',$allowed_group,'" value="1">';
|
||||
} else {
|
||||
echo '<input type="checkbox" data-size="mini" name="',$allowed_group,'" value="1">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" name="update" class="btn btn-primary"<?PHP if($disabled == 1) echo " disabled"; ?>><?PHP echo $lang['stag0012']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1079
stats/index.php
1079
stats/index.php
File diff suppressed because it is too large
Load Diff
191
stats/info.php
191
stats/info.php
@@ -1,92 +1,101 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
$starttime = microtime(true);
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['stri0001']; ?>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4><strong><span class="text-info"><?PHP echo $lang['stri0002']; ?></span></strong></h4>
|
||||
<p><?PHP echo $lang['stri0003']; ?></p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4><strong><span class="text-success"><?PHP echo $lang['stri0004']; ?></span></strong></h4>
|
||||
<p>The <a href="//ts-n.net/ranksystem.php" target="_blank">Ranksystem</a> was coded by <strong>Newcomer1989</strong> Copyright © 2009-2018 <a href="//ts-n.net/" target="_blank">TeamSpeak Sponsoring TS-N.NET</a></p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4><strong><span class="text-warning"><?PHP echo $lang['stri0005']; ?></span></strong></h4>
|
||||
<p><?PHP echo $lang['stri0006']; ?></p>
|
||||
<p><?PHP echo $lang['stri0007']; ?></p>
|
||||
<p><?PHP echo $lang['stri0023']; ?></p>
|
||||
<p><?PHP echo $lang['stri0008']; ?></p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4><strong><span class="text-danger"><?PHP echo $lang['stri0009'];?></span></strong></h4>
|
||||
<p><?PHP echo $lang['stri0010']; ?></p>
|
||||
<p><a href="//php.net/" target="_blank">PHP</a> - Copyright © 2001-2016 the <a href="//secure.php.net/credits.php" target="_blank">PHP Group</a></p><br>
|
||||
<p><?PHP echo $lang['stri0011']; ?></p>
|
||||
<p><a href="//jquery.com/" target="_blank">jQuery v3.1.1</a> - Copyright © 2016 The jQuery Foundation</p>
|
||||
<p><a href="//fontawesome.io" target="_blank">Font Awesome 4.7.0</a> - Copyright © davegandy</p>
|
||||
<p><a href="//flag-icon-css.lip.is/" target="_blank">flag-icon-css 2.8.0</a> - Copyright © 2016 lipis</p>
|
||||
<p><a href="//planetteamspeak.com/" target="_blank">TeamSpeak 3 PHP Framework 1.1.24</a> - Copyright © 2010 Planet TeamSpeak</p>
|
||||
<p><a href="//getbootstrap.com/" target="_blank">Bootstrap 3.3.7</a> - Copyright © 2011-2016 Twitter, Inc.</p>
|
||||
<p><a href="//morrisjs.github.io/morris.js/" target="_blank">morris.js 0.5.0</a> - Copyright © 2013 Olly Smith</p>
|
||||
<p><a href="//raphaeljs.com" target="_blank">Raphaël 2.2.1 - JavaScript Vector Library</a> - Copyright © 2008-2012 Dmitry Baranovskiy</p>
|
||||
<p><a href="//startbootstrap.com" target="_blank">SB Admin Bootstrap Admin Template</a> - Copyright © 2013-2016 Blackrock Digital LLC.</p>
|
||||
<p><a href="//www.bootstrap-switch.org" target="_blank">Bootstrap Switch 3.3.2</a> - Copyright © 2013-2015 Mattia Larentis</p>
|
||||
<p><a href="//www.virtuosoft.eu/code/bootstrap-touchspin" target="_blank">Bootstrap TouchSpin 3.1.2</a> - Copyright © 2013-2016 István Ujj-Mészáros</p>
|
||||
<p><a href="//developer.snapappointments.com/bootstrap-select" target="_blank">bootstrap-select v1.13.0-beta</a> - Copyright © 2012-2018 SnapAppointments, LLC</p>
|
||||
<p><a href="//wenzhixin.net.cn/" target="_blank">Bootstrap Show Password 1.0.3</a> - Copyright © 2014 zhixin wen</p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4><strong><span class="text-info"><?PHP echo $lang['stri0012']; ?></span></strong></h4>
|
||||
<p><?PHP echo $lang['stri0021']; ?></p>
|
||||
<p><?PHP echo $lang['stri0022']; ?></p>
|
||||
<p><?PHP echo $lang['stri0013']; ?></p>
|
||||
<p><?PHP echo $lang['stri0014']; ?></p>
|
||||
<p><?PHP echo $lang['stri0015']; ?></p>
|
||||
<p><?PHP echo $lang['stri0016']; ?></p>
|
||||
<p><?PHP echo $lang['stri0017']; ?></p>
|
||||
<p><?PHP echo $lang['stri0018']; ?></p>
|
||||
<p><?PHP echo $lang['stri0019']; ?></p>
|
||||
<p><?PHP echo $lang['stri0020']; ?></p>
|
||||
<p><?PHP echo $lang['stri0024']; ?></p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
session_start();
|
||||
$starttime = microtime(true);
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['stri0001']; ?>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4><strong><span class="text-info"><?PHP echo $lang['stri0002']; ?></span></strong></h4>
|
||||
<p><?PHP echo $lang['stri0003']; ?></p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4><strong><span class="text-success"><?PHP echo $lang['stri0004']; ?></span></strong></h4>
|
||||
<p>The <a href="//ts-n.net/ranksystem.php" target="_blank">Ranksystem</a> was coded by <strong>Newcomer1989</strong> Copyright © 2009-2018 <a href="//ts-n.net/" target="_blank">TeamSpeak Sponsoring TS-N.NET</a></p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4><strong><span class="text-warning"><?PHP echo $lang['stri0005']; ?></span></strong></h4>
|
||||
<p><?PHP echo $lang['stri0006']; ?></p>
|
||||
<p><?PHP echo $lang['stri0007']; ?></p>
|
||||
<p><?PHP echo $lang['stri0023']; ?></p>
|
||||
<p><?PHP echo $lang['stri0008']; ?></p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4><strong><span class="text-danger"><?PHP echo $lang['stri0009'];?></span></strong></h4>
|
||||
<p><?PHP echo $lang['stri0010']; ?></p>
|
||||
<p><a href="//php.net/" target="_blank">PHP</a> - Copyright © 2001-2016 the <a href="//secure.php.net/credits.php" target="_blank">PHP Group</a></p><br>
|
||||
<p><?PHP echo $lang['stri0011']; ?></p>
|
||||
<p><a href="//jquery.com/" target="_blank">jQuery v3.1.1</a> - Copyright © 2016 The jQuery Foundation</p>
|
||||
<p><a href="//fontawesome.io" target="_blank">Font Awesome 4.7.0</a> - Copyright © davegandy</p>
|
||||
<p><a href="//flag-icon-css.lip.is/" target="_blank">flag-icon-css 2.8.0</a> - Copyright © 2016 lipis</p>
|
||||
<p><a href="//planetteamspeak.com/" target="_blank">TeamSpeak 3 PHP Framework 1.1.33</a> - Copyright © 2010 Planet TeamSpeak</p>
|
||||
<p><a href="//getbootstrap.com/" target="_blank">Bootstrap 3.3.7</a> - Copyright © 2011-2016 Twitter, Inc.</p>
|
||||
<p><a href="//morrisjs.github.io/morris.js/" target="_blank">morris.js 0.5.0</a> - Copyright © 2013 Olly Smith</p>
|
||||
<p><a href="//raphaeljs.com" target="_blank">Raphaël 2.2.1 - JavaScript Vector Library</a> - Copyright © 2008-2012 Dmitry Baranovskiy</p>
|
||||
<p><a href="//startbootstrap.com" target="_blank">SB Admin Bootstrap Admin Template</a> - Copyright © 2013-2016 Blackrock Digital LLC.</p>
|
||||
<p><a href="//www.bootstrap-switch.org" target="_blank">Bootstrap Switch 3.3.2</a> - Copyright © 2013-2015 Mattia Larentis</p>
|
||||
<p><a href="//www.virtuosoft.eu/code/bootstrap-touchspin" target="_blank">Bootstrap TouchSpin 3.1.2</a> - Copyright © 2013-2016 István Ujj-Mészáros</p>
|
||||
<p><a href="//developer.snapappointments.com/bootstrap-select" target="_blank">bootstrap-select v1.13.0-beta</a> - Copyright © 2012-2018 SnapAppointments, LLC</p>
|
||||
<p><a href="//wenzhixin.net.cn/" target="_blank">Bootstrap Show Password 1.0.3</a> - Copyright © 2014 zhixin wen</p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h4><strong><span class="text-info"><?PHP echo $lang['stri0012']; ?></span></strong></h4>
|
||||
<p><?PHP echo $lang['stri0021']; ?></p>
|
||||
<p><?PHP echo $lang['stri0022']; ?></p>
|
||||
<p><?PHP echo $lang['stri0013']; ?></p>
|
||||
<p><?PHP echo $lang['stri0014']; ?></p>
|
||||
<p><?PHP echo $lang['stri0015']; ?></p>
|
||||
<p><?PHP echo $lang['stri0016']; ?></p>
|
||||
<p><?PHP echo $lang['stri0017']; ?></p>
|
||||
<p><?PHP echo $lang['stri0018']; ?></p>
|
||||
<p><?PHP echo $lang['stri0019']; ?></p>
|
||||
<p><?PHP echo $lang['stri0020']; ?></p>
|
||||
<p><?PHP echo $lang['stri0024']; ?></p>
|
||||
<p><?PHP echo $lang['stri0025']; ?></p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,404 +1,401 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
function getclientip() {
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP']))
|
||||
return $_SERVER['HTTP_CLIENT_IP'];
|
||||
elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||
return $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
elseif(!empty($_SERVER['HTTP_X_FORWARDED']))
|
||||
return $_SERVER['HTTP_X_FORWARDED'];
|
||||
elseif(!empty($_SERVER['HTTP_FORWARDED_FOR']))
|
||||
return $_SERVER['HTTP_FORWARDED_FOR'];
|
||||
elseif(!empty($_SERVER['HTTP_FORWARDED']))
|
||||
return $_SERVER['HTTP_FORWARDED'];
|
||||
elseif(!empty($_SERVER['REMOTE_ADDR']))
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if(isset($_POST['username'])) {
|
||||
$_GET["seite"] = 1;
|
||||
$_GET["search"] = $_POST['usersuche'];
|
||||
}
|
||||
$filter='';
|
||||
$searchstring='';
|
||||
if(isset($_GET["search"]) && $_GET["search"] != '') {
|
||||
$getstring = htmlspecialchars($_GET['search']);
|
||||
}
|
||||
if(isset($getstring) && strstr($getstring, 'filter:excepted:')) {
|
||||
if(str_replace('filter:excepted:','',$getstring)!='') {
|
||||
$searchstring = str_replace('filter:excepted:','',$getstring);
|
||||
}
|
||||
$filter .= " AND except IN ('2','3')";
|
||||
} elseif(isset($getstring) && strstr($getstring, 'filter:nonexcepted:')) {
|
||||
if(str_replace('filter:nonexcepted:','',$getstring)!='') {
|
||||
$searchstring = str_replace('filter:nonexcepted:','',$getstring);
|
||||
}
|
||||
$filter .= " AND except IN ('0','1')";
|
||||
} else {
|
||||
if(isset($getstring)) {
|
||||
$searchstring = $getstring;
|
||||
} else {
|
||||
$searchstring = '';
|
||||
}
|
||||
if($showexcld == 0) {
|
||||
$filter .= " AND except IN ('0','1')";
|
||||
}
|
||||
}
|
||||
if(isset($getstring) && strstr($getstring, 'filter:online:')) {
|
||||
$searchstring = preg_replace('/filter\:online\:/','',$searchstring);
|
||||
$filter .= " AND online='1'";
|
||||
} elseif(isset($getstring) && strstr($getstring, 'filter:nononline:')) {
|
||||
$searchstring = preg_replace('/filter\:nononline\:/','',$searchstring);
|
||||
$filter .= " AND online='0'";
|
||||
}
|
||||
if(isset($getstring) && strstr($getstring, 'filter:actualgroup:')) {
|
||||
preg_match('/filter\:actualgroup\:(.*)\:/',$searchstring,$grpvalue);
|
||||
$searchstring = preg_replace('/filter\:actualgroup\:(.*)\:/','',$searchstring);
|
||||
$filter .= " AND grpid='".$grpvalue[1]."'";
|
||||
}
|
||||
if(isset($getstring) && strstr($getstring, 'filter:country:')) {
|
||||
preg_match('/filter\:country\:(.*)\:/',$searchstring,$grpvalue);
|
||||
$searchstring = preg_replace('/filter\:country\:(.*)\:/','',$searchstring);
|
||||
$filter .= " AND nation='".$grpvalue[1]."'";
|
||||
}
|
||||
if(isset($getstring) && strstr($getstring, 'filter:lastseen:')) {
|
||||
preg_match('/filter\:lastseen\:(.*)\:(.*)\:/',$searchstring,$seenvalue);
|
||||
$searchstring = preg_replace('/filter\:lastseen\:(.*)\:(.*)\:/','',$searchstring);
|
||||
if(isset($seenvalue[2]) && is_numeric($seenvalue[2])) {
|
||||
$lastseen = $seenvalue[2];
|
||||
} elseif(isset($seenvalue[2])) {
|
||||
$r = date_parse_from_format("Y-m-d H-i",$seenvalue[2]);
|
||||
$lastseen = mktime($r['hour'], $r['minute'], $r['second'], $r['month'], $r['day'], $r['year']);
|
||||
} else {
|
||||
$lastseen = 0;
|
||||
}
|
||||
if(isset($seenvalue[1]) && ($seenvalue[1] == '<' || $seenvalue[1] == '<')) {
|
||||
$operator = '<';
|
||||
} elseif(isset($seenvalue[1]) && ($seenvalue[1] == '>' || $seenvalue[1] == '>')) {
|
||||
$operator = '>';
|
||||
} elseif(isset($seenvalue[1]) && $seenvalue[1] == '!=') {
|
||||
$operator = '!=';
|
||||
} else {
|
||||
$operator = '=';
|
||||
}
|
||||
$filter .= " AND lastseen".$operator."'".$lastseen."'";
|
||||
}
|
||||
|
||||
if(isset($getstring)) {
|
||||
$dbdata_full = $mysqlcon->prepare("SELECT COUNT(*) FROM $dbname.user WHERE (uuid LIKE :searchvalue OR cldbid LIKE :searchvalue OR name LIKE :searchvalue)$filter");
|
||||
$dbdata_full->bindValue(':searchvalue', '%'.$searchstring.'%', PDO::PARAM_STR);
|
||||
$dbdata_full->execute();
|
||||
$sumentries = $dbdata_full->fetch(PDO::FETCH_NUM);
|
||||
} else {
|
||||
$getstring = '';
|
||||
$sumentries = $mysqlcon->query("SELECT COUNT(*) FROM $dbname.user")->fetch(PDO::FETCH_NUM);
|
||||
}
|
||||
|
||||
if(!isset($_GET["seite"])) {
|
||||
$seite = 1;
|
||||
} else {
|
||||
$seite = preg_replace('/\D/', '', $_GET["seite"]);
|
||||
}
|
||||
$adminlogin = 0;
|
||||
|
||||
$keysort = '';
|
||||
$keyorder = '';
|
||||
if (isset($_GET['sort'])) {
|
||||
$keysort = strip_tags(htmlspecialchars($_GET['sort']));
|
||||
}
|
||||
if ($keysort != 'name' && $keysort != 'uuid' && $keysort != 'cldbid' && $keysort != 'rank' && $keysort != 'lastseen' && $keysort != 'count' && $keysort != 'idle' && $keysort != 'active' && $keysort != 'grpid' && $keysort != 'grpsince') {
|
||||
$keysort = 'nextup';
|
||||
}
|
||||
if (isset($_GET['order'])) {
|
||||
$keyorder = strip_tags(htmlspecialchars($_GET['order']));
|
||||
}
|
||||
$keyorder = ($keyorder == 'desc' ? 'desc' : 'asc');
|
||||
if (isset($_GET['admin'])) {
|
||||
if($_SESSION[$rspathhex.'username'] == $webuser && $_SESSION[$rspathhex.'password'] == $webpass && $_SESSION[$rspathhex.'clientip'] == getclientip()) {
|
||||
$adminlogin = 1;
|
||||
}
|
||||
}
|
||||
require_once('nav.php');
|
||||
|
||||
$countentries = 0;
|
||||
|
||||
|
||||
if(!isset($_GET["user"])) {
|
||||
$user_pro_seite = 25;
|
||||
} elseif($_GET['user'] == "all") {
|
||||
$user_pro_seite = $sumentries[0];
|
||||
} else {
|
||||
$user_pro_seite = preg_replace('/\D/', '', $_GET["user"]);
|
||||
}
|
||||
|
||||
$start = ($seite * $user_pro_seite) - $user_pro_seite;
|
||||
|
||||
if ($keysort == 'active' && $keyorder == 'asc') {
|
||||
$dbdata = $mysqlcon->prepare("SELECT uuid,cldbid,rank,count,name,idle,cldgroup,online,nextup,lastseen,ip,grpid,except,grpsince FROM $dbname.user WHERE (uuid LIKE :searchvalue OR cldbid LIKE :searchvalue OR name LIKE :searchvalue)$filter ORDER BY (count - idle) LIMIT :start, :userproseite");
|
||||
$dbdata->bindValue(':searchvalue', '%'.$searchstring.'%', PDO::PARAM_STR);
|
||||
$dbdata->bindValue(':start', (int) $start, PDO::PARAM_INT);
|
||||
$dbdata->bindValue(':userproseite', (int) $user_pro_seite, PDO::PARAM_INT);
|
||||
$dbdata->execute();
|
||||
} elseif ($keysort == 'active' && $keyorder == 'desc') {
|
||||
$dbdata = $mysqlcon->prepare("SELECT uuid,cldbid,rank,count,name,idle,cldgroup,online,nextup,lastseen,ip,grpid,except,grpsince FROM $dbname.user WHERE (uuid LIKE :searchvalue OR cldbid LIKE :searchvalue OR name LIKE :searchvalue)$filter ORDER BY (idle - count) LIMIT :start, :userproseite");
|
||||
$dbdata->bindValue(':searchvalue', '%'.$searchstring.'%', PDO::PARAM_STR);
|
||||
$dbdata->bindValue(':start', (int) $start, PDO::PARAM_INT);
|
||||
$dbdata->bindValue(':userproseite', (int) $user_pro_seite, PDO::PARAM_INT);
|
||||
$dbdata->execute();
|
||||
} elseif ($searchstring == '') {
|
||||
$dbdata = $mysqlcon->prepare("SELECT uuid,cldbid,rank,count,name,idle,cldgroup,online,nextup,lastseen,ip,grpid,except,grpsince FROM $dbname.user WHERE 1=1$filter ORDER BY $keysort $keyorder LIMIT :start, :userproseite");
|
||||
$dbdata->bindValue(':start', (int) $start, PDO::PARAM_INT);
|
||||
$dbdata->bindValue(':userproseite', (int) $user_pro_seite, PDO::PARAM_INT);
|
||||
$dbdata->execute();
|
||||
} else {
|
||||
$dbdata = $mysqlcon->prepare("SELECT uuid,cldbid,rank,count,name,idle,cldgroup,online,nextup,lastseen,ip,grpid,except,grpsince FROM $dbname.user WHERE (uuid LIKE :searchvalue OR cldbid LIKE :searchvalue OR name LIKE :searchvalue)$filter ORDER BY $keysort $keyorder LIMIT :start, :userproseite");
|
||||
$dbdata->bindValue(':searchvalue', '%'.$searchstring.'%', PDO::PARAM_STR);
|
||||
$dbdata->bindValue(':start', (int) $start, PDO::PARAM_INT);
|
||||
$dbdata->bindValue(':userproseite', (int) $user_pro_seite, PDO::PARAM_INT);
|
||||
$dbdata->execute();
|
||||
}
|
||||
|
||||
$seiten_anzahl_gerundet = ceil($sumentries[0] / $user_pro_seite);
|
||||
|
||||
function pagination($keysort,$keyorder,$user_pro_seite,$seiten_anzahl_gerundet,$seite,$getstring) {
|
||||
?>
|
||||
<nav>
|
||||
<div class="text-center">
|
||||
<ul class="pagination">
|
||||
<li>
|
||||
<a href="<?PHP echo '?sort='.$keysort.'&order='.$keyorder.'&seite=1&user='.$user_pro_seite.'&search='.$getstring; ?>" aria-label="backward">
|
||||
<span aria-hidden="true"><span class="glyphicon glyphicon-step-backward" aria-hidden="true"></span> </span>
|
||||
</a>
|
||||
</li>
|
||||
<?PHP
|
||||
for($a=0; $a < $seiten_anzahl_gerundet; $a++) {
|
||||
$b = $a + 1;
|
||||
if($seite == $b) {
|
||||
echo '<li class="active"><a href="">'.$b.'</a></li>';
|
||||
} elseif ($b > $seite - 5 && $b < $seite + 5) {
|
||||
echo '<li><a href="?sort='.$keysort.'&order='.$keyorder.'&seite='.$b.'&user='.$user_pro_seite.'&search='.$getstring.'">'.$b.'</a></li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<a href="<?PHP echo '?sort='.$keysort.'&order='.$keyorder.'&seite='.$seiten_anzahl_gerundet.'&user='.$user_pro_seite.'&search='.$getstring; ?>" aria-label="forward">
|
||||
<span aria-hidden="true"> <span class="glyphicon glyphicon-step-forward" aria-hidden="true"></span></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<?PHP
|
||||
}
|
||||
$sqlhis = $dbdata->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE);
|
||||
|
||||
$sqlhisgroup = $mysqlcon->query("SELECT sgid,sgidname FROM $dbname.groups")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE);
|
||||
foreach($sqlhisgroup as $sgid => $servergroup) {
|
||||
if(file_exists('../tsicons/'.$sgid.'.png')) {
|
||||
$sqlhisgroup[$sgid]['iconfile'] = 1;
|
||||
} else {
|
||||
$sqlhisgroup[$sgid]['iconfile'] = 0;
|
||||
}
|
||||
}
|
||||
if($adminlogin == 1) {
|
||||
switch ($keyorder) {
|
||||
case "asc":
|
||||
$keyorder2 = "desc&admin=true";
|
||||
break;
|
||||
case "desc":
|
||||
$keyorder2 = "asc&admin=true";
|
||||
}
|
||||
} else {
|
||||
switch ($keyorder) {
|
||||
case "asc":
|
||||
$keyorder2 = "desc";
|
||||
break;
|
||||
case "desc":
|
||||
$keyorder2 = "asc";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<?PHP
|
||||
if($user_pro_seite == "all" || $shownav == 0) {
|
||||
} else {
|
||||
pagination($keysort,$keyorder,$user_pro_seite,$seiten_anzahl_gerundet,$seite,$getstring);
|
||||
}
|
||||
?>
|
||||
<table class="table table-striped">
|
||||
<thead data-spy="affix" data-offset-top="100">
|
||||
<tr>
|
||||
<?PHP
|
||||
if ($showcolrg == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=rank&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listrank'] , '</span></a></th>';
|
||||
if ($showcolcld == 1 || $adminlogin == 1)
|
||||
echo ($keysort == 'name') ? '<th class="text-center"><a href="?sort=name&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnick'] . '</span></a></th>' : '<th class="text-center"><a href="?sort=name&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnick'] . '</span></a></th>';
|
||||
if ($showcoluuid == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=uuid&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listuid'] , '</span></a></th>';
|
||||
if ($showcoldbid == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=cldbid&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listcldbid'] , '</span></a></th>';
|
||||
if ($adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=ip&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listip'] , '</span></a></th>';
|
||||
if ($showcolls == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=lastseen&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listseen'] , '</span></a></th>';
|
||||
if ($showcolot == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=count&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listsumo'] , '</span></a></th>';
|
||||
if ($showcolit == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=idle&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listsumi'] , '</span></a></th>';
|
||||
if ($showcolat == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=active&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listsuma'] , '</span></a></th>';
|
||||
if ($showcolas == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=grpid&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listacsg'] , '</span></a></th>';
|
||||
if ($showgrpsince == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=grpsince&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listgrps'] , '</span></a></th>';
|
||||
if ($showcolnx == 1 || $adminlogin == 1)
|
||||
echo ($keysort == 'nextup') ? '<th class="text-center"><a href="?sort=nextup&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnxup'] . '</span></a></th>' : '<th class="text-center"><a href="?sort=nextup&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnxup'] . '</span></a></th>';
|
||||
if (($showcolsg == 1 || $adminlogin == 1) && $substridle == 1) {
|
||||
echo '<th class="text-center"><a href="?sort=active&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listnxsg'] , '</span></a></th>';
|
||||
} elseif (($showcolsg == 1 || $adminlogin == 1) && $substridle != 1) {
|
||||
echo '<th class="text-center"><a href="?sort=count&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listnxsg'] , '</span></a></th>';
|
||||
}
|
||||
echo '</tr></thead><tbody>';
|
||||
ksort($grouptime);
|
||||
if (count($sqlhis) > 0) {
|
||||
foreach ($sqlhis as $uuid => $value) {
|
||||
if ($substridle == 1) {
|
||||
$activetime = $value['count'] - $value['idle'];
|
||||
} else {
|
||||
$activetime = $value['count'];
|
||||
}
|
||||
$grpcount=0;
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
$grpcount++;
|
||||
if ($activetime < $time || $grpcount == count($grouptime) && $value['nextup'] <= 0 && $showhighest == 1 || $grpcount == count($grouptime) && $value['nextup'] == 0 && $adminlogin == 1) {
|
||||
echo '<tr>';
|
||||
if ($showcolrg == 1 || $adminlogin == 1) {
|
||||
if($value['except'] == 2 || $value['except'] == 3) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , $value['rank'] , '</td>';
|
||||
}
|
||||
}
|
||||
if ($adminlogin == 1) {
|
||||
echo '<td class="text-center"><a href="//tsviewer.com/index.php?page=search&action=ausgabe_user&nickname=' , htmlspecialchars($value['name']) , '" target="_blank">' , htmlspecialchars($value['name']) , '</a></td>';
|
||||
} elseif ($showcolcld == 1) {
|
||||
echo '<td class="text-center">' , htmlspecialchars($value['name']) , '</td>';
|
||||
}
|
||||
if ($adminlogin == 1) {
|
||||
echo '<td class="text-center"><a href="//ts3index.com/?page=searchclient&uid=' , $uuid , '" target="_blank">' , $uuid , '</a></td>';
|
||||
} elseif ($showcoluuid == 1) {
|
||||
echo '<td class="text-center">' , $uuid , '</td>';
|
||||
}
|
||||
if ($showcoldbid == 1 || $adminlogin == 1)
|
||||
echo '<td class="text-center">' , $value['cldbid'] , '</td>';
|
||||
if ($adminlogin == 1)
|
||||
echo '<td class="center"><a href="//myip.ms/info/whois/' , inet_ntop($value['ip']) , '" target="_blank">' , inet_ntop($value['ip']) , '</a></td>';
|
||||
if ($showcolls == 1 || $adminlogin == 1) {
|
||||
if ($value['online'] == 1) {
|
||||
echo '<td class="text-center text-success">online</td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , date('Y-m-d H:i:s',$value['lastseen']), '</td>';
|
||||
}
|
||||
}
|
||||
if ($showcolot == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".$value['count']);
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
}
|
||||
if ($showcolit == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".$value['idle']);
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
}
|
||||
if ($showcolat == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".($value['count']-$value['idle']));
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
}
|
||||
if ($showcolas == 1 || $adminlogin == 1) {
|
||||
if ($value['grpid'] == 0) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} elseif ($sqlhisgroup[$value['grpid']]['iconfile'] == 1) {
|
||||
echo '<td class="text-center"><img src="../tsicons/'.$value['grpid'].'.png" alt="groupicon"> ' , $sqlhisgroup[$value['grpid']]['sgidname'] , '</td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , $sqlhisgroup[$value['grpid']]['sgidname'] , '</td>';
|
||||
}
|
||||
}
|
||||
if ($showgrpsince == 1 || $adminlogin == 1) {
|
||||
if ($value['grpsince'] == 0) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , date('Y-m-d H:i:s',$value['grpsince']), '</td>';
|
||||
}
|
||||
}
|
||||
if ($showcolnx == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
if (($value['except'] == 0 || $value['except'] == 1) && $value['nextup'] > 0) {
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".$value['nextup']);
|
||||
echo $dtF->diff($dtT)->format($timeformat) , '</td>';
|
||||
} elseif ($value['except'] == 0 || $value['except'] == 1) {
|
||||
echo '0</td>';
|
||||
} elseif ($value['except'] == 2 || $value['except'] == 3) {
|
||||
echo '0</td>';
|
||||
} else {
|
||||
echo $lang['errukwn'], '</td>';
|
||||
}
|
||||
}
|
||||
if ($showcolsg == 1 || $adminlogin == 1) {
|
||||
if ($grpcount == count($grouptime) && $value['nextup'] == 0 && $showhighest == 1 || $grpcount == count($grouptime) && $value['nextup'] == 0 && $adminlogin == 1) {
|
||||
echo '<td class="text-center"><em>',$lang['highest'],'</em></td>';
|
||||
} elseif ($value['except'] == 2 || $value['except'] == 3) {
|
||||
echo '<td class="text-center"><em>',$lang['listexcept'],'</em></td>';
|
||||
} elseif (isset($sqlhisgroup[$groupid]) && $sqlhisgroup[$groupid]['iconfile'] == 1) {
|
||||
echo '<td class="text-center"><img src="../tsicons/'.$groupid.'.png" alt="groupicon"> ' , $sqlhisgroup[$groupid]['sgidname'] , '</td>';
|
||||
} elseif (isset($sqlhisgroup[$groupid])) {
|
||||
echo '<td class="text-center">' , $sqlhisgroup[$groupid]['sgidname'] , '</td>';
|
||||
} else {
|
||||
echo '<td class="text-center"></td>';
|
||||
}
|
||||
}
|
||||
echo '</tr>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="6">' , $lang['noentry'] , '</td></tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
if($user_pro_seite != "all") {
|
||||
pagination($keysort,$keyorder,$user_pro_seite,$seiten_anzahl_gerundet,$seite,$getstring);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$("th").each(function() {
|
||||
$(this).width($(this).width());
|
||||
});
|
||||
$("td").each(function() {
|
||||
$(this).width($(this).width());
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
function getclientip() {
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP']))
|
||||
return $_SERVER['HTTP_CLIENT_IP'];
|
||||
elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||
return $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
elseif(!empty($_SERVER['HTTP_X_FORWARDED']))
|
||||
return $_SERVER['HTTP_X_FORWARDED'];
|
||||
elseif(!empty($_SERVER['HTTP_FORWARDED_FOR']))
|
||||
return $_SERVER['HTTP_FORWARDED_FOR'];
|
||||
elseif(!empty($_SERVER['HTTP_FORWARDED']))
|
||||
return $_SERVER['HTTP_FORWARDED'];
|
||||
elseif(!empty($_SERVER['REMOTE_ADDR']))
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if(isset($_POST['username'])) {
|
||||
$_GET["search"] = $_POST['usersuche'];
|
||||
$_GET["seite"] = 1;
|
||||
}
|
||||
$filter='';
|
||||
$searchstring='';
|
||||
if(isset($_GET["search"]) && $_GET["search"] != '') {
|
||||
$getstring = htmlspecialchars($_GET['search']);
|
||||
}
|
||||
if(isset($getstring) && strstr($getstring, 'filter:excepted:')) {
|
||||
if(str_replace('filter:excepted:','',$getstring)!='') {
|
||||
$searchstring = str_replace('filter:excepted:','',$getstring);
|
||||
}
|
||||
$filter .= " AND `except` IN ('2','3')";
|
||||
} elseif(isset($getstring) && strstr($getstring, 'filter:nonexcepted:')) {
|
||||
if(str_replace('filter:nonexcepted:','',$getstring)!='') {
|
||||
$searchstring = str_replace('filter:nonexcepted:','',$getstring);
|
||||
}
|
||||
$filter .= " AND `except` IN ('0','1')";
|
||||
} else {
|
||||
if(isset($getstring)) {
|
||||
$searchstring = $getstring;
|
||||
} else {
|
||||
$searchstring = '';
|
||||
}
|
||||
if($showexcld == 0) {
|
||||
$filter .= " AND `except` IN ('0','1')";
|
||||
}
|
||||
}
|
||||
if(isset($getstring) && strstr($getstring, 'filter:online:')) {
|
||||
$searchstring = preg_replace('/filter\:online\:/','',$searchstring);
|
||||
$filter .= " AND `online`='1'";
|
||||
} elseif(isset($getstring) && strstr($getstring, 'filter:nononline:')) {
|
||||
$searchstring = preg_replace('/filter\:nononline\:/','',$searchstring);
|
||||
$filter .= " AND `online`='0'";
|
||||
}
|
||||
if(isset($getstring) && strstr($getstring, 'filter:actualgroup:')) {
|
||||
preg_match('/filter\:actualgroup\:(.*)\:/',$searchstring,$grpvalue);
|
||||
$searchstring = preg_replace('/filter\:actualgroup\:(.*)\:/','',$searchstring);
|
||||
$filter .= " AND `grpid`='".$grpvalue[1]."'";
|
||||
}
|
||||
if(isset($getstring) && strstr($getstring, 'filter:country:')) {
|
||||
preg_match('/filter\:country\:(.*)\:/',$searchstring,$grpvalue);
|
||||
$searchstring = preg_replace('/filter\:country\:(.*)\:/','',$searchstring);
|
||||
$filter .= " AND `nation`='".$grpvalue[1]."'";
|
||||
}
|
||||
if(isset($getstring) && strstr($getstring, 'filter:lastseen:')) {
|
||||
preg_match('/filter\:lastseen\:(.*)\:(.*)\:/',$searchstring,$seenvalue);
|
||||
$searchstring = preg_replace('/filter\:lastseen\:(.*)\:(.*)\:/','',$searchstring);
|
||||
if(isset($seenvalue[2]) && is_numeric($seenvalue[2])) {
|
||||
$lastseen = $seenvalue[2];
|
||||
} elseif(isset($seenvalue[2])) {
|
||||
$r = date_parse_from_format("Y-m-d H-i",$seenvalue[2]);
|
||||
$lastseen = mktime($r['hour'], $r['minute'], $r['second'], $r['month'], $r['day'], $r['year']);
|
||||
} else {
|
||||
$lastseen = 0;
|
||||
}
|
||||
if(isset($seenvalue[1]) && ($seenvalue[1] == '<' || $seenvalue[1] == '<')) {
|
||||
$operator = '<';
|
||||
} elseif(isset($seenvalue[1]) && ($seenvalue[1] == '>' || $seenvalue[1] == '>')) {
|
||||
$operator = '>';
|
||||
} elseif(isset($seenvalue[1]) && $seenvalue[1] == '!=') {
|
||||
$operator = '!=';
|
||||
} else {
|
||||
$operator = '=';
|
||||
}
|
||||
$filter .= " AND `lastseen`".$operator."'".$lastseen."'";
|
||||
}
|
||||
$searchstring = htmlspecialchars_decode($searchstring);
|
||||
|
||||
if(isset($getstring)) {
|
||||
$dbdata_full = $mysqlcon->prepare("SELECT COUNT(*) FROM `$dbname`.`user` WHERE (`uuid` LIKE :searchvalue OR `cldbid` LIKE :searchvalue OR `name` LIKE :searchvalue)$filter");
|
||||
$dbdata_full->bindValue(':searchvalue', '%'.$searchstring.'%', PDO::PARAM_STR);
|
||||
$dbdata_full->execute();
|
||||
$sumentries = $dbdata_full->fetch(PDO::FETCH_NUM);
|
||||
} else {
|
||||
$getstring = '';
|
||||
$sumentries = $mysqlcon->query("SELECT COUNT(*) FROM `$dbname`.`user`")->fetch(PDO::FETCH_NUM);
|
||||
}
|
||||
|
||||
if(!isset($_GET["seite"])) {
|
||||
$seite = 1;
|
||||
} else {
|
||||
$seite = preg_replace('/\D/', '', $_GET["seite"]);
|
||||
}
|
||||
$adminlogin = 0;
|
||||
|
||||
$keysort = '';
|
||||
$keyorder = '';
|
||||
if (isset($_GET['sort'])) {
|
||||
$keysort = htmlspecialchars($_GET['sort']);
|
||||
}
|
||||
if ($keysort != 'name' && $keysort != 'uuid' && $keysort != 'cldbid' && $keysort != 'rank' && $keysort != 'lastseen' && $keysort != 'count' && $keysort != 'idle' && $keysort != 'active' && $keysort != 'grpid' && $keysort != 'grpsince') {
|
||||
$keysort = 'nextup';
|
||||
}
|
||||
if (isset($_GET['order'])) {
|
||||
$keyorder = htmlspecialchars($_GET['order']);
|
||||
}
|
||||
$keyorder = ($keyorder == 'desc' ? 'desc' : 'asc');
|
||||
if (isset($_GET['admin'])) {
|
||||
if($_SESSION[$rspathhex.'username'] == $webuser && $_SESSION[$rspathhex.'password'] == $webpass && $_SESSION[$rspathhex.'clientip'] == getclientip()) {
|
||||
$adminlogin = 1;
|
||||
}
|
||||
}
|
||||
require_once('nav.php');
|
||||
|
||||
$countentries = 0;
|
||||
|
||||
|
||||
if(!isset($_GET["user"])) {
|
||||
$user_pro_seite = 25;
|
||||
} elseif($_GET['user'] == "all") {
|
||||
$user_pro_seite = $sumentries[0];
|
||||
} else {
|
||||
$user_pro_seite = preg_replace('/\D/', '', $_GET["user"]);
|
||||
}
|
||||
|
||||
$start = ($seite * $user_pro_seite) - $user_pro_seite;
|
||||
|
||||
if ($keysort == 'active' && $keyorder == 'asc') {
|
||||
$dbdata = $mysqlcon->prepare("SELECT `uuid`,`cldbid`,`rank`,`count`,`name`,`idle`,`cldgroup`,`online`,`nextup`,`lastseen`,`grpid`,`except`,`grpsince` FROM `$dbname`.`user` WHERE (`uuid` LIKE :searchvalue OR `cldbid` LIKE :searchvalue OR `name` LIKE :searchvalue)$filter ORDER BY (`count` - `idle`) LIMIT :start, :userproseite");
|
||||
$dbdata->bindValue(':searchvalue', '%'.$searchstring.'%', PDO::PARAM_STR);
|
||||
$dbdata->bindValue(':start', (int) $start, PDO::PARAM_INT);
|
||||
$dbdata->bindValue(':userproseite', (int) $user_pro_seite, PDO::PARAM_INT);
|
||||
$dbdata->execute();
|
||||
} elseif ($keysort == 'active' && $keyorder == 'desc') {
|
||||
$dbdata = $mysqlcon->prepare("SELECT `uuid`,`cldbid`,`rank`,`count`,`name`,`idle`,`cldgroup`,`online`,`nextup`,`lastseen`,`grpid`,`except`,`grpsince` FROM `$dbname`.`user` WHERE (`uuid` LIKE :searchvalue OR `cldbid` LIKE :searchvalue OR `name` LIKE :searchvalue)$filter ORDER BY (`idle` - `count`) LIMIT :start, :userproseite");
|
||||
$dbdata->bindValue(':searchvalue', '%'.$searchstring.'%', PDO::PARAM_STR);
|
||||
$dbdata->bindValue(':start', (int) $start, PDO::PARAM_INT);
|
||||
$dbdata->bindValue(':userproseite', (int) $user_pro_seite, PDO::PARAM_INT);
|
||||
$dbdata->execute();
|
||||
} elseif ($searchstring == '') {
|
||||
$dbdata = $mysqlcon->prepare("SELECT `uuid`,`cldbid`,`rank`,`count`,`name`,`idle`,`cldgroup`,`online`,`nextup`,`lastseen`,`grpid`,`except`,`grpsince` FROM `$dbname`.`user` WHERE 1=1$filter ORDER BY `$keysort` $keyorder LIMIT :start, :userproseite");
|
||||
$dbdata->bindValue(':start', (int) $start, PDO::PARAM_INT);
|
||||
$dbdata->bindValue(':userproseite', (int) $user_pro_seite, PDO::PARAM_INT);
|
||||
$dbdata->execute();
|
||||
} else {
|
||||
$dbdata = $mysqlcon->prepare("SELECT `uuid`,`cldbid`,`rank`,`count`,`name`,`idle`,`cldgroup`,`online`,`nextup`,`lastseen`,`grpid`,`except`,`grpsince` FROM `$dbname`.`user` WHERE (`uuid` LIKE :searchvalue OR `cldbid` LIKE :searchvalue OR `name` LIKE :searchvalue)$filter ORDER BY `$keysort` $keyorder LIMIT :start, :userproseite");
|
||||
$dbdata->bindValue(':searchvalue', '%'.$searchstring.'%', PDO::PARAM_STR);
|
||||
$dbdata->bindValue(':start', (int) $start, PDO::PARAM_INT);
|
||||
$dbdata->bindValue(':userproseite', (int) $user_pro_seite, PDO::PARAM_INT);
|
||||
$dbdata->execute();
|
||||
}
|
||||
|
||||
$seiten_anzahl_gerundet = ceil($sumentries[0] / $user_pro_seite);
|
||||
|
||||
function pagination($keysort,$keyorder,$user_pro_seite,$seiten_anzahl_gerundet,$seite,$getstring) {
|
||||
?>
|
||||
<nav>
|
||||
<div class="text-center">
|
||||
<ul class="pagination">
|
||||
<li>
|
||||
<a href="<?PHP echo '?sort='.$keysort.'&order='.$keyorder.'&seite=1&user='.$user_pro_seite.'&search='.$getstring; ?>" aria-label="backward">
|
||||
<span aria-hidden="true"><span class="glyphicon glyphicon-step-backward" aria-hidden="true"></span> </span>
|
||||
</a>
|
||||
</li>
|
||||
<?PHP
|
||||
for($a=0; $a < $seiten_anzahl_gerundet; $a++) {
|
||||
$b = $a + 1;
|
||||
if($seite == $b) {
|
||||
echo '<li class="active"><a href="">'.$b.'</a></li>';
|
||||
} elseif ($b > $seite - 5 && $b < $seite + 5) {
|
||||
echo '<li><a href="?sort='.$keysort.'&order='.$keyorder.'&seite='.$b.'&user='.$user_pro_seite.'&search='.$getstring.'">'.$b.'</a></li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<a href="<?PHP echo '?sort='.$keysort.'&order='.$keyorder.'&seite='.$seiten_anzahl_gerundet.'&user='.$user_pro_seite.'&search='.$getstring; ?>" aria-label="forward">
|
||||
<span aria-hidden="true"> <span class="glyphicon glyphicon-step-forward" aria-hidden="true"></span></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<?PHP
|
||||
}
|
||||
$sqlhis = $dbdata->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE);
|
||||
|
||||
$sqlhisgroup = $mysqlcon->query("SELECT `sgid`,`sgidname` FROM `$dbname`.`groups`")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE);
|
||||
foreach($sqlhisgroup as $sgid => $servergroup) {
|
||||
if(file_exists('../tsicons/'.$sgid.'.png')) {
|
||||
$sqlhisgroup[$sgid]['iconfile'] = 1;
|
||||
} else {
|
||||
$sqlhisgroup[$sgid]['iconfile'] = 0;
|
||||
}
|
||||
}
|
||||
if($adminlogin == 1) {
|
||||
switch ($keyorder) {
|
||||
case "asc":
|
||||
$keyorder2 = "desc&admin=true";
|
||||
break;
|
||||
case "desc":
|
||||
$keyorder2 = "asc&admin=true";
|
||||
}
|
||||
} else {
|
||||
switch ($keyorder) {
|
||||
case "asc":
|
||||
$keyorder2 = "desc";
|
||||
break;
|
||||
case "desc":
|
||||
$keyorder2 = "asc";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<?PHP
|
||||
if($user_pro_seite == "all" || $shownav == 0) {
|
||||
} else {
|
||||
pagination($keysort,$keyorder,$user_pro_seite,$seiten_anzahl_gerundet,$seite,$getstring);
|
||||
}
|
||||
?>
|
||||
<table class="table table-striped">
|
||||
<thead data-spy="affix" data-offset-top="100">
|
||||
<tr>
|
||||
<?PHP
|
||||
if ($showcolrg == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=rank&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listrank'] , '</span></a></th>';
|
||||
if ($showcolcld == 1 || $adminlogin == 1)
|
||||
echo ($keysort == 'name') ? '<th class="text-center"><a href="?sort=name&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnick'] . '</span></a></th>' : '<th class="text-center"><a href="?sort=name&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnick'] . '</span></a></th>';
|
||||
if ($showcoluuid == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=uuid&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listuid'] , '</span></a></th>';
|
||||
if ($showcoldbid == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=cldbid&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listcldbid'] , '</span></a></th>';
|
||||
if ($showcolls == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=lastseen&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listseen'] , '</span></a></th>';
|
||||
if ($showcolot == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=count&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listsumo'] , '</span></a></th>';
|
||||
if ($showcolit == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=idle&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listsumi'] , '</span></a></th>';
|
||||
if ($showcolat == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=active&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listsuma'] , '</span></a></th>';
|
||||
if ($showcolas == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=grpid&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listacsg'] , '</span></a></th>';
|
||||
if ($showgrpsince == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=grpsince&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listgrps'] , '</span></a></th>';
|
||||
if ($showcolnx == 1 || $adminlogin == 1)
|
||||
echo ($keysort == 'nextup') ? '<th class="text-center"><a href="?sort=nextup&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnxup'] . '</span></a></th>' : '<th class="text-center"><a href="?sort=nextup&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnxup'] . '</span></a></th>';
|
||||
if (($showcolsg == 1 || $adminlogin == 1) && $substridle == 1) {
|
||||
echo '<th class="text-center"><a href="?sort=active&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listnxsg'] , '</span></a></th>';
|
||||
} elseif (($showcolsg == 1 || $adminlogin == 1) && $substridle != 1) {
|
||||
echo '<th class="text-center"><a href="?sort=count&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listnxsg'] , '</span></a></th>';
|
||||
}
|
||||
echo '</tr></thead><tbody>';
|
||||
ksort($grouptime);
|
||||
if (count($sqlhis) > 0) {
|
||||
foreach ($sqlhis as $uuid => $value) {
|
||||
if ($substridle == 1) {
|
||||
$activetime = $value['count'] - $value['idle'];
|
||||
} else {
|
||||
$activetime = $value['count'];
|
||||
}
|
||||
$grpcount=0;
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
$grpcount++;
|
||||
if ($activetime < $time || $grpcount == count($grouptime) && $value['nextup'] <= 0 && $showhighest == 1 || $grpcount == count($grouptime) && $value['nextup'] == 0 && $adminlogin == 1) {
|
||||
echo '<tr>';
|
||||
if ($showcolrg == 1 || $adminlogin == 1) {
|
||||
if($value['except'] == 2 || $value['except'] == 3) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , $value['rank'] , '</td>';
|
||||
}
|
||||
}
|
||||
if ($adminlogin == 1) {
|
||||
echo '<td class="text-center"><a href="//tsviewer.com/index.php?page=search&action=ausgabe_user&nickname=' , htmlspecialchars($value['name']) , '" target="_blank">' , htmlspecialchars($value['name']) , '</a></td>';
|
||||
} elseif ($showcolcld == 1) {
|
||||
echo '<td class="text-center">' , htmlspecialchars($value['name']) , '</td>';
|
||||
}
|
||||
if ($adminlogin == 1) {
|
||||
echo '<td class="text-center"><a href="//ts3index.com/?page=searchclient&uid=' , $uuid , '" target="_blank">' , $uuid , '</a></td>';
|
||||
} elseif ($showcoluuid == 1) {
|
||||
echo '<td class="text-center">' , $uuid , '</td>';
|
||||
}
|
||||
if ($showcoldbid == 1 || $adminlogin == 1)
|
||||
echo '<td class="text-center">' , $value['cldbid'] , '</td>';
|
||||
if ($showcolls == 1 || $adminlogin == 1) {
|
||||
if ($value['online'] == 1) {
|
||||
echo '<td class="text-center text-success">online</td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , date('Y-m-d H:i:s',$value['lastseen']), '</td>';
|
||||
}
|
||||
}
|
||||
if ($showcolot == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".$value['count']);
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
}
|
||||
if ($showcolit == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".$value['idle']);
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
}
|
||||
if ($showcolat == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".($value['count']-$value['idle']));
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
}
|
||||
if ($showcolas == 1 || $adminlogin == 1) {
|
||||
if ($value['grpid'] == 0) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} elseif ($sqlhisgroup[$value['grpid']]['iconfile'] == 1) {
|
||||
echo '<td class="text-center"><img src="../tsicons/'.$value['grpid'].'.png" alt="groupicon"> ' , $sqlhisgroup[$value['grpid']]['sgidname'] , '</td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , $sqlhisgroup[$value['grpid']]['sgidname'] , '</td>';
|
||||
}
|
||||
}
|
||||
if ($showgrpsince == 1 || $adminlogin == 1) {
|
||||
if ($value['grpsince'] == 0) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , date('Y-m-d H:i:s',$value['grpsince']), '</td>';
|
||||
}
|
||||
}
|
||||
if ($showcolnx == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
if (($value['except'] == 0 || $value['except'] == 1) && $value['nextup'] > 0) {
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".$value['nextup']);
|
||||
echo $dtF->diff($dtT)->format($timeformat) , '</td>';
|
||||
} elseif ($value['except'] == 0 || $value['except'] == 1) {
|
||||
echo '0</td>';
|
||||
} elseif ($value['except'] == 2 || $value['except'] == 3) {
|
||||
echo '0</td>';
|
||||
} else {
|
||||
echo $lang['errukwn'], '</td>';
|
||||
}
|
||||
}
|
||||
if ($showcolsg == 1 || $adminlogin == 1) {
|
||||
if ($grpcount == count($grouptime) && $value['nextup'] == 0 && $showhighest == 1 || $grpcount == count($grouptime) && $value['nextup'] == 0 && $adminlogin == 1) {
|
||||
echo '<td class="text-center"><em>',$lang['highest'],'</em></td>';
|
||||
} elseif ($value['except'] == 2 || $value['except'] == 3) {
|
||||
echo '<td class="text-center"><em>',$lang['listexcept'],'</em></td>';
|
||||
} elseif (isset($sqlhisgroup[$groupid]) && $sqlhisgroup[$groupid]['iconfile'] == 1) {
|
||||
echo '<td class="text-center"><img src="../tsicons/'.$groupid.'.png" alt="groupicon"> ' , $sqlhisgroup[$groupid]['sgidname'] , '</td>';
|
||||
} elseif (isset($sqlhisgroup[$groupid])) {
|
||||
echo '<td class="text-center">' , $sqlhisgroup[$groupid]['sgidname'] , '</td>';
|
||||
} else {
|
||||
echo '<td class="text-center"></td>';
|
||||
}
|
||||
}
|
||||
echo '</tr>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="6">' , $lang['noentry'] , '</td></tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
if($user_pro_seite != "all") {
|
||||
pagination($keysort,$keyorder,$user_pro_seite,$seiten_anzahl_gerundet,$seite,$getstring);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,370 +1,378 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
$multiple_uuid = explode(',', substr($_SESSION[$rspathhex.'multiple'], 0, -1));
|
||||
|
||||
if(count($multiple_uuid) > 1 && !isset($_SESSION[$rspathhex.'uuid_verified'])) {
|
||||
$err_msg = sprintf($lang['stag0006'], '<a href="verify.php">', '</a>'); $err_lvl = 3;
|
||||
} elseif ($_SESSION[$rspathhex.'connected'] == 0) {
|
||||
$err_msg = sprintf("Du konntest nicht auf dem TeamSpeak gefunden werden. Bitte %sklicke hier%s um dich zunächst zu verifizieren.", '<a href="verify.php">', '</a>'); $err_lvl = 3;
|
||||
} else {
|
||||
$dbdata_fetched = $mysqlcon->query("SELECT * FROM $dbname.user WHERE uuid LIKE '%".$_SESSION[$rspathhex.'tsuid']."%'")->fetch();
|
||||
$count_hours = round($dbdata_fetched['count']/3600);
|
||||
$idle_hours = round($dbdata_fetched['idle']/3600);
|
||||
|
||||
if ($substridle == 1) {
|
||||
$activetime = $dbdata_fetched['count'] - $dbdata_fetched['idle'];
|
||||
} else {
|
||||
$activetime = $dbdata_fetched['count'];
|
||||
}
|
||||
$active_count = $dbdata_fetched['count'] - $dbdata_fetched['idle'];
|
||||
|
||||
krsort($grouptime);
|
||||
$nextgrp = '';
|
||||
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
$actualgrp = $time;
|
||||
if ($activetime > $time) {
|
||||
break;
|
||||
} else {
|
||||
$nextgrp = $time;
|
||||
}
|
||||
}
|
||||
if($actualgrp==$nextgrp) {
|
||||
$actualgrp = 0;
|
||||
}
|
||||
if($activetime>$nextgrp) {
|
||||
$percentage_rankup = 100;
|
||||
} else {
|
||||
$takedtime = $activetime - $actualgrp;
|
||||
$neededtime = $nextgrp - $actualgrp;
|
||||
$percentage_rankup = round($takedtime/$neededtime*100);
|
||||
}
|
||||
|
||||
$stats_user = $mysqlcon->query("SELECT count_week,active_week,count_month,active_month FROM $dbname.stats_user WHERE uuid='".$_SESSION[$rspathhex.'tsuid']."'")->fetch();
|
||||
|
||||
if (isset($stats_user['count_week'])) $count_week = $stats_user['count_week']; else $count_week = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_week"); $count_week = $dtF->diff($dtT)->format($timeformat);
|
||||
if (isset($stats_user['active_week'])) $active_week = $stats_user['active_week']; else $active_week = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_week"); $active_week = $dtF->diff($dtT)->format($timeformat);
|
||||
if (isset($stats_user['count_month'])) $count_month = $stats_user['count_month']; else $count_month = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_month"); $count_month = $dtF->diff($dtT)->format($timeformat);
|
||||
if (isset($stats_user['active_month'])) $active_month = $stats_user['active_month']; else $active_month = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_month"); $active_month = $dtF->diff($dtT)->format($timeformat);
|
||||
if (isset($dbdata_fetched['count'])) $count_total = $dbdata_fetched['count']; else $count_total = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_total"); $count_total = $dtF->diff($dtT)->format($timeformat);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_count"); $active_count = $dtF->diff($dtT)->format($timeformat);
|
||||
|
||||
$time_for_bronze = 50;
|
||||
$time_for_silver = 100;
|
||||
$time_for_gold = 250;
|
||||
$time_for_legendary = 500;
|
||||
|
||||
$connects_for_bronze = 50;
|
||||
$connects_for_silver = 100;
|
||||
$connects_for_gold = 250;
|
||||
$connects_for_legendary = 500;
|
||||
|
||||
$achievements_done = 0;
|
||||
|
||||
if($count_hours >= $time_for_legendary) {
|
||||
$achievements_done = $achievements_done + 4;
|
||||
} elseif($count_hours >= $time_for_gold) {
|
||||
$achievements_done = $achievements_done + 3;
|
||||
} elseif($count_hours >= $time_for_silver) {
|
||||
$achievements_done = $achievements_done + 2;
|
||||
} else {
|
||||
$achievements_done = $achievements_done + 1;
|
||||
}
|
||||
if($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_legendary) {
|
||||
$achievements_done = $achievements_done + 4;
|
||||
} elseif($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_gold) {
|
||||
$achievements_done = $achievements_done + 3;
|
||||
} elseif($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_silver) {
|
||||
$achievements_done = $achievements_done + 2;
|
||||
} else {
|
||||
$achievements_done = $achievements_done + 1;
|
||||
}
|
||||
}
|
||||
|
||||
function get_percentage($max_value, $value) {
|
||||
return (round(($value/$max_value)*100));
|
||||
}
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl);
|
||||
if(count($multiple_uuid) > 1 || $_SESSION[$rspathhex.'connected'] == 0) { echo "</div></div></body></html>"; exit; } ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['stmy0001']; ?>
|
||||
<a href="#infoModal" data-toggle="modal" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-9 text-left">
|
||||
<div class="huge"><?PHP echo $_SESSION[$rspathhex.'tsname'] ?></div>
|
||||
<div><?PHP if ($dbdata_fetched['except'] == 0 || $dbdata_fetched['except'] == 1) {
|
||||
echo $lang['stmy0002'],' #',$dbdata_fetched['rank'];
|
||||
} ?></div>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<?PHP
|
||||
if(isset($_SESSION[$rspathhex.'tsavatar']) && $_SESSION[$rspathhex.'tsavatar'] != "none") {
|
||||
echo '<img src="../avatars/'.$_SESSION[$rspathhex.'tsavatar'].'" class="img-rounded pull-right" alt="avatar" height="70">';
|
||||
} else {
|
||||
echo '<span class="fa fa-user fa-5x"></span>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<div class="pull-left">
|
||||
<p><strong><?PHP echo $lang['stmy0003']; ?></strong></p>
|
||||
<p><strong><?PHP echo $lang['stmy0004']; ?></strong></p>
|
||||
<p><strong><?PHP echo $lang['stmy0005']; ?></strong></p>
|
||||
<p><strong><?PHP echo $lang['stmy0006']; ?></strong></p>
|
||||
<p><strong><?PHP echo $lang['stmy0007']; ?></strong></p>
|
||||
<p><strong><?PHP echo $lang['stmy0031']; ?></strong></p>
|
||||
<p><strong><?PHP echo sprintf($lang['stmy0008'], '7'); ?></strong></p>
|
||||
<p><strong><?PHP echo sprintf($lang['stmy0009'], '7'); ?></strong></p>
|
||||
<p><strong><?PHP echo sprintf($lang['stmy0008'], '30'); ?></strong></p>
|
||||
<p><strong><?PHP echo sprintf($lang['stmy0009'], '30'); ?></strong></p>
|
||||
<p><strong><?PHP echo $lang['stmy0010']; ?></strong></p>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<p class="text-right"><?PHP echo $dbdata_fetched['cldbid']; ?></p>
|
||||
<p class="text-right"><?PHP echo $dbdata_fetched['uuid']; ?></p>
|
||||
<p class="text-right"><?PHP echo $_SESSION[$rspathhex.'tsconnections']; ?></p>
|
||||
<p class="text-right"><?PHP echo $_SESSION[$rspathhex.'tscreated']; ?></p>
|
||||
<p class="text-right"><?PHP echo $count_total; ?></p>
|
||||
<p class="text-right"><?PHP echo $active_count; ?></p>
|
||||
<p class="text-right"><?PHP echo $count_week; ?></p>
|
||||
<p class="text-right"><?PHP echo $active_week; ?></p>
|
||||
<p class="text-right"><?PHP echo $count_month; ?></p>
|
||||
<p class="text-right"><?PHP echo $active_month; ?></p>
|
||||
<p class="text-right"><?PHP echo $achievements_done .' / 8'; ?></p>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP if($dbdata_fetched['except'] == 0 || $dbdata_fetched['except'] == 1) { ?>
|
||||
<div class="col-lg-6">
|
||||
<h3><?PHP echo $lang['stmy0030']; ?></h3>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-primary progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo $percentage_rankup; ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: <?PHP echo $percentage_rankup; ?>%;">
|
||||
<?PHP echo $percentage_rankup," %"; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
<div class="col-lg-6">
|
||||
<h3><?PHP echo $lang['stmy0011']; ?></h3>
|
||||
<?PHP if($count_hours >= $time_for_legendary) { ?>
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge">
|
||||
<small><?PHP echo $lang['stmy0012']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0013'], $count_hours); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;">
|
||||
<?PHP echo $lang['stmy0014']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($count_hours >= $time_for_gold) { ?>
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge">
|
||||
<small><?PHP echo $lang['stmy0015']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0013'], $count_hours);; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($time_for_legendary, $count_hours); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width: <?PHP echo get_percentage($time_for_legendary, $count_hours); ?>%;">
|
||||
<?PHP echo get_percentage($time_for_legendary, $count_hours), $lang['stmy0016']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($count_hours >= $time_for_silver) { ?>
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge">
|
||||
<small><?PHP echo $lang['stmy0017']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0013'], $count_hours); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($time_for_gold, $count_hours); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width: <?PHP echo get_percentage($time_for_gold, $count_hours); ?>%;">
|
||||
<?PHP echo get_percentage($time_for_gold, $count_hours), $lang['stmy0018']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($count_hours >= $time_for_bronze) { ?>
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge">
|
||||
<small><?PHP echo $lang['stmy0019']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0013'], $count_hours); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($time_for_silver, $count_hours); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width: <?PHP echo get_percentage($time_for_silver, $count_hours); ?>%;">
|
||||
<?PHP echo get_percentage($time_for_silver, $count_hours), $lang['stmy0020']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } else { ?>
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge">
|
||||
<small><?PHP echo $lang['stmy0021']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0013'], $count_hours); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($time_for_bronze, $count_hours); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width: <?PHP echo get_percentage($time_for_bronze, $count_hours); ?>%;">
|
||||
<?PHP echo get_percentage($time_for_bronze, $count_hours), $lang['stmy0022']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<h3><?PHP echo $lang['stmy0023']; ?></h3>
|
||||
<?PHP if($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_legendary) { ?>
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge"><small><?PHP echo $lang['stmy0024']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0025'], $_SESSION[$rspathhex.'tsconnections']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width:100%;">
|
||||
<?PHP echo $lang['stmy0014']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_gold) { ?>
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge"><small><?PHP echo $lang['stmy0026']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0025'], $_SESSION[$rspathhex.'tsconnections']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($connects_for_legendary, $_SESSION[$rspathhex.'tsconnections']); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width:<?PHP echo get_percentage($connects_for_legendary, $_SESSION[$rspathhex.'tsconnections']); ?>%;">
|
||||
<?PHP echo get_percentage($connects_for_legendary, $_SESSION[$rspathhex.'tsconnections']),$lang['stmy0016']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_silver) { ?>
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge"><small><?PHP echo $lang['stmy0027']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0025'], $_SESSION[$rspathhex.'tsconnections']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($connects_for_gold, $_SESSION[$rspathhex.'tsconnections']); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width:<?PHP echo get_percentage($connects_for_gold, $_SESSION[$rspathhex.'tsconnections']); ?>%;">
|
||||
<?PHP echo get_percentage($connects_for_gold, $_SESSION[$rspathhex.'tsconnections']),$lang['stmy0018']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_bronze) { ?>
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge"><small><?PHP echo $lang['stmy0028']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0025'], $_SESSION[$rspathhex.'tsconnections']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($connects_for_silver, $_SESSION[$rspathhex.'tsconnections']); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width:<?PHP echo get_percentage($connects_for_silver, $_SESSION[$rspathhex.'tsconnections']); ?>%;">
|
||||
<?PHP echo get_percentage($connects_for_silver, $_SESSION[$rspathhex.'tsconnections']),$lang['stmy0020']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } else { ?>
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge"><small><?PHP echo $lang['stmy0029']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0025'], $_SESSION[$rspathhex.'tsconnections']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width:<?PHP echo get_percentage($connects_for_bronze, $_SESSION[$rspathhex.'tsconnections']); ?>%;">
|
||||
<?PHP echo get_percentage($connects_for_bronze, $_SESSION[$rspathhex.'tsconnections']),$lang['stmy0022']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
$multiple_uuid = explode(',', substr($_SESSION[$rspathhex.'multiple'], 0, -1));
|
||||
|
||||
if(count($multiple_uuid) > 1 && !isset($_SESSION[$rspathhex.'uuid_verified'])) {
|
||||
$err_msg = sprintf($lang['stag0006'], '<a href="verify.php">', '</a>'); $err_lvl = 3;
|
||||
} elseif ($_SESSION[$rspathhex.'connected'] == 0) {
|
||||
$err_msg = sprintf("Du konntest nicht auf dem TeamSpeak gefunden werden. Bitte %sklicke hier%s um dich zunächst zu verifizieren.", '<a href="verify.php">', '</a>'); $err_lvl = 3;
|
||||
} else {
|
||||
$dbdata_fetched = $mysqlcon->query("SELECT * FROM `$dbname`.`user` WHERE `uuid` LIKE '%".$_SESSION[$rspathhex.'tsuid']."%'")->fetch();
|
||||
$count_hours = round($dbdata_fetched['count']/3600);
|
||||
$idle_hours = round($dbdata_fetched['idle']/3600);
|
||||
|
||||
if ($substridle == 1) {
|
||||
$activetime = $dbdata_fetched['count'] - $dbdata_fetched['idle'];
|
||||
} else {
|
||||
$activetime = $dbdata_fetched['count'];
|
||||
}
|
||||
$active_count = $dbdata_fetched['count'] - $dbdata_fetched['idle'];
|
||||
|
||||
krsort($grouptime);
|
||||
$nextgrp = '';
|
||||
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
$actualgrp = $time;
|
||||
if ($activetime > $time) {
|
||||
break;
|
||||
} else {
|
||||
$nextgrp = $time;
|
||||
}
|
||||
}
|
||||
if($actualgrp==$nextgrp) {
|
||||
$actualgrp = 0;
|
||||
}
|
||||
if($activetime>$nextgrp) {
|
||||
$percentage_rankup = 100;
|
||||
} else {
|
||||
$takedtime = $activetime - $actualgrp;
|
||||
$neededtime = $nextgrp - $actualgrp;
|
||||
$percentage_rankup = round($takedtime/$neededtime*100);
|
||||
}
|
||||
|
||||
$stats_user = $mysqlcon->query("SELECT `count_week`,`active_week`,`count_month`,`active_month` FROM `$dbname`.`stats_user` WHERE `uuid`='".$_SESSION[$rspathhex.'tsuid']."'")->fetch();
|
||||
|
||||
if (isset($stats_user['count_week'])) $count_week = $stats_user['count_week']; else $count_week = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_week"); $count_week = $dtF->diff($dtT)->format($timeformat);
|
||||
if (isset($stats_user['active_week'])) $active_week = $stats_user['active_week']; else $active_week = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_week"); $active_week = $dtF->diff($dtT)->format($timeformat);
|
||||
if (isset($stats_user['count_month'])) $count_month = $stats_user['count_month']; else $count_month = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_month"); $count_month = $dtF->diff($dtT)->format($timeformat);
|
||||
if (isset($stats_user['active_month'])) $active_month = $stats_user['active_month']; else $active_month = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_month"); $active_month = $dtF->diff($dtT)->format($timeformat);
|
||||
if (isset($dbdata_fetched['count'])) $count_total = $dbdata_fetched['count']; else $count_total = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_total"); $count_total = $dtF->diff($dtT)->format($timeformat);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_count"); $active_count = $dtF->diff($dtT)->format($timeformat);
|
||||
|
||||
$time_for_bronze = 50;
|
||||
$time_for_silver = 100;
|
||||
$time_for_gold = 250;
|
||||
$time_for_legendary = 500;
|
||||
|
||||
$connects_for_bronze = 50;
|
||||
$connects_for_silver = 100;
|
||||
$connects_for_gold = 250;
|
||||
$connects_for_legendary = 500;
|
||||
|
||||
$achievements_done = 0;
|
||||
|
||||
if($count_hours >= $time_for_legendary) {
|
||||
$achievements_done = $achievements_done + 4;
|
||||
} elseif($count_hours >= $time_for_gold) {
|
||||
$achievements_done = $achievements_done + 3;
|
||||
} elseif($count_hours >= $time_for_silver) {
|
||||
$achievements_done = $achievements_done + 2;
|
||||
} else {
|
||||
$achievements_done = $achievements_done + 1;
|
||||
}
|
||||
if($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_legendary) {
|
||||
$achievements_done = $achievements_done + 4;
|
||||
} elseif($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_gold) {
|
||||
$achievements_done = $achievements_done + 3;
|
||||
} elseif($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_silver) {
|
||||
$achievements_done = $achievements_done + 2;
|
||||
} else {
|
||||
$achievements_done = $achievements_done + 1;
|
||||
}
|
||||
}
|
||||
|
||||
function get_percentage($max_value, $value) {
|
||||
return (round(($value/$max_value)*100));
|
||||
}
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl);
|
||||
if(count($multiple_uuid) > 1 || $_SESSION[$rspathhex.'connected'] == 0) { echo "</div></div></body></html>"; exit; } ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['stmy0001']; ?>
|
||||
<a href="#infoModal" data-toggle="modal" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-9 text-left">
|
||||
<div class="huge"><?PHP echo $_SESSION[$rspathhex.'tsname'] ?></div>
|
||||
<div><?PHP if ($dbdata_fetched['except'] == 0 || $dbdata_fetched['except'] == 1) {
|
||||
echo $lang['stmy0002'],' #',$dbdata_fetched['rank'];
|
||||
} ?></div>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<?PHP
|
||||
if(isset($_SESSION[$rspathhex.'tsavatar']) && $_SESSION[$rspathhex.'tsavatar'] != "none") {
|
||||
echo '<img src="../avatars/'.$_SESSION[$rspathhex.'tsavatar'].'" class="img-rounded pull-right" alt="avatar" height="70">';
|
||||
} else {
|
||||
echo '<span class="fa fa-user fa-5x"></span>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<div class="pull-left">
|
||||
<p><strong><?PHP echo $lang['stmy0003']; ?></strong></p>
|
||||
<p><strong><?PHP echo $lang['stmy0004']; ?></strong></p>
|
||||
<p><strong><?PHP echo $lang['stmy0005']; ?></strong></p>
|
||||
<p><strong><?PHP echo $lang['stmy0006']; ?></strong></p>
|
||||
<p><strong><?PHP echo $lang['stmy0007']; ?></strong></p>
|
||||
<p><strong><?PHP echo $lang['stmy0031']; ?></strong></p>
|
||||
<p><strong><?PHP echo sprintf($lang['stmy0008'], '7'); ?></strong></p>
|
||||
<p><strong><?PHP echo sprintf($lang['stmy0009'], '7'); ?></strong></p>
|
||||
<p><strong><?PHP echo sprintf($lang['stmy0008'], '30'); ?></strong></p>
|
||||
<p><strong><?PHP echo sprintf($lang['stmy0009'], '30'); ?></strong></p>
|
||||
<p><strong><?PHP echo $lang['stmy0010']; ?></strong></p>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<p class="text-right"><?PHP echo $dbdata_fetched['cldbid']; ?></p>
|
||||
<p class="text-right"><?PHP echo $dbdata_fetched['uuid']; ?></p>
|
||||
<p class="text-right"><?PHP echo $_SESSION[$rspathhex.'tsconnections']; ?></p>
|
||||
<p class="text-right"><?PHP echo $_SESSION[$rspathhex.'tscreated']; ?></p>
|
||||
<p class="text-right"><?PHP echo $count_total; ?></p>
|
||||
<p class="text-right"><?PHP echo $active_count; ?></p>
|
||||
<p class="text-right"><?PHP echo $count_week; ?></p>
|
||||
<p class="text-right"><?PHP echo $active_week; ?></p>
|
||||
<p class="text-right"><?PHP echo $count_month; ?></p>
|
||||
<p class="text-right"><?PHP echo $active_month; ?></p>
|
||||
<p class="text-right"><?PHP echo $achievements_done .' / 8'; ?></p>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP if($dbdata_fetched['except'] == 0 || $dbdata_fetched['except'] == 1) { ?>
|
||||
<div class="col-lg-6">
|
||||
<h3><?PHP echo $lang['stmy0030']; ?></h3>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-primary progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo $percentage_rankup; ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: <?PHP echo $percentage_rankup; ?>%;">
|
||||
<?PHP echo $percentage_rankup," %"; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
<div class="col-lg-6">
|
||||
<h3><?PHP echo $lang['stmy0011']; ?></h3>
|
||||
<?PHP if($count_hours >= $time_for_legendary) { ?>
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge">
|
||||
<small><?PHP echo $lang['stmy0012']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0013'], $count_hours); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;">
|
||||
<?PHP echo $lang['stmy0014']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($count_hours >= $time_for_gold) { ?>
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge">
|
||||
<small><?PHP echo $lang['stmy0015']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0013'], $count_hours);; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($time_for_legendary, $count_hours); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width: <?PHP echo get_percentage($time_for_legendary, $count_hours); ?>%;">
|
||||
<?PHP echo get_percentage($time_for_legendary, $count_hours), $lang['stmy0016']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($count_hours >= $time_for_silver) { ?>
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge">
|
||||
<small><?PHP echo $lang['stmy0017']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0013'], $count_hours); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($time_for_gold, $count_hours); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width: <?PHP echo get_percentage($time_for_gold, $count_hours); ?>%;">
|
||||
<?PHP echo get_percentage($time_for_gold, $count_hours), $lang['stmy0018']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($count_hours >= $time_for_bronze) { ?>
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge">
|
||||
<small><?PHP echo $lang['stmy0019']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0013'], $count_hours); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($time_for_silver, $count_hours); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width: <?PHP echo get_percentage($time_for_silver, $count_hours); ?>%;">
|
||||
<?PHP echo get_percentage($time_for_silver, $count_hours), $lang['stmy0020']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } else { ?>
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge">
|
||||
<small><?PHP echo $lang['stmy0021']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0013'], $count_hours); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($time_for_bronze, $count_hours); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width: <?PHP echo get_percentage($time_for_bronze, $count_hours); ?>%;">
|
||||
<?PHP echo get_percentage($time_for_bronze, $count_hours), $lang['stmy0022']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<h3><?PHP echo $lang['stmy0023']; ?></h3>
|
||||
<?PHP if($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_legendary) { ?>
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge"><small><?PHP echo $lang['stmy0024']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0025'], $_SESSION[$rspathhex.'tsconnections']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width:100%;">
|
||||
<?PHP echo $lang['stmy0014']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_gold) { ?>
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge"><small><?PHP echo $lang['stmy0026']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0025'], $_SESSION[$rspathhex.'tsconnections']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($connects_for_legendary, $_SESSION[$rspathhex.'tsconnections']); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width:<?PHP echo get_percentage($connects_for_legendary, $_SESSION[$rspathhex.'tsconnections']); ?>%;">
|
||||
<?PHP echo get_percentage($connects_for_legendary, $_SESSION[$rspathhex.'tsconnections']),$lang['stmy0016']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_silver) { ?>
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge"><small><?PHP echo $lang['stmy0027']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0025'], $_SESSION[$rspathhex.'tsconnections']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($connects_for_gold, $_SESSION[$rspathhex.'tsconnections']); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width:<?PHP echo get_percentage($connects_for_gold, $_SESSION[$rspathhex.'tsconnections']); ?>%;">
|
||||
<?PHP echo get_percentage($connects_for_gold, $_SESSION[$rspathhex.'tsconnections']),$lang['stmy0018']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_bronze) { ?>
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge"><small><?PHP echo $lang['stmy0028']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0025'], $_SESSION[$rspathhex.'tsconnections']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped active" role="progressbar" aria-valuenow="<?PHP echo get_percentage($connects_for_silver, $_SESSION[$rspathhex.'tsconnections']); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width:<?PHP echo get_percentage($connects_for_silver, $_SESSION[$rspathhex.'tsconnections']); ?>%;">
|
||||
<?PHP echo get_percentage($connects_for_silver, $_SESSION[$rspathhex.'tsconnections']),$lang['stmy0020']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } else { ?>
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge"><small><?PHP echo $lang['stmy0029']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0025'], $_SESSION[$rspathhex.'tsconnections']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width:<?PHP echo get_percentage($connects_for_bronze, $_SESSION[$rspathhex.'tsconnections']); ?>%;">
|
||||
<?PHP echo get_percentage($connects_for_bronze, $_SESSION[$rspathhex.'tsconnections']),$lang['stmy0022']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,90 +1,98 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if($language == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "cz") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "fr") {
|
||||
require_once('../languages/nations_fr.php');
|
||||
} elseif($language == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "nl") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
} elseif($language == "pt") {
|
||||
require_once('../languages/nations_pt.php');
|
||||
} elseif($language == "pl") {
|
||||
require_once('../languages/nations_pl.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
$sql_res = $mysqlcon->query("SELECT * FROM $dbname.stats_nations ORDER BY count DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['stna0001'],' - ',$lang['stna0002']; ?>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><?PHP echo $lang['stna0003']; ?></th>
|
||||
<th><?PHP echo $lang['stna0001']; ?></th>
|
||||
<th><?PHP echo $lang['stix0060'],' ',$lang['stna0004']; ?></th>
|
||||
<th><?PHP echo $lang['stna0007']; ?></th>
|
||||
</tr>
|
||||
<?PHP
|
||||
$count = 0;
|
||||
$sum_of_all = 0;
|
||||
foreach ($sql_res as $country => $value) {
|
||||
$sum_of_all = $sum_of_all + $value['count'];
|
||||
}
|
||||
foreach ($sql_res as $country => $value) {
|
||||
$count++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>',$count,'</td>
|
||||
<td><span class="flag-icon flag-icon-',strtolower($country),'"></span> ',$country,'</td>
|
||||
<td><a href="list_rankup.php?sort=rank&order=desc&search=filter:country:',$country,':">',$nation[$country],'</td>
|
||||
<td>',$value['count'],'</td>
|
||||
<td>',number_format(round(($value['count'] * 100 / $sum_of_all), 1), 1),' %</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
session_start();
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if($language == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "cz") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "fr") {
|
||||
require_once('../languages/nations_fr.php');
|
||||
} elseif($language == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "nl") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "pl") {
|
||||
require_once('../languages/nations_pl.php');
|
||||
} elseif($language == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
} elseif($language == "pt") {
|
||||
require_once('../languages/nations_pt.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
$sql_res = $mysqlcon->query("SELECT * FROM `$dbname`.`stats_nations` ORDER BY `count` DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['stna0001'],' - ',$lang['stna0002']; ?>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><?PHP echo $lang['stna0003']; ?></th>
|
||||
<th><?PHP echo $lang['stna0001']; ?></th>
|
||||
<th><?PHP echo $lang['stix0060'],' ',$lang['stna0004']; ?></th>
|
||||
<th><?PHP echo $lang['stna0007']; ?></th>
|
||||
</tr>
|
||||
<?PHP
|
||||
$count = 0;
|
||||
$sum_of_all = 0;
|
||||
foreach ($sql_res as $country => $value) {
|
||||
$sum_of_all = $sum_of_all + $value['count'];
|
||||
}
|
||||
foreach ($sql_res as $country => $value) {
|
||||
$count++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>',$count,'</td>
|
||||
<td><span class="flag-icon flag-icon-',strtolower($country),'"></span> ',$country,'</td>
|
||||
<td><a href="list_rankup.php?sort=rank&order=desc&search=filter:country:',$country,':">',$nation[$country],'</td>
|
||||
<td>',$value['count'],'</td>
|
||||
<td>',number_format(round(($value['count'] * 100 / $sum_of_all), 1), 1),' %</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
711
stats/nav.php
711
stats/nav.php
@@ -1,343 +1,368 @@
|
||||
<?PHP
|
||||
$job_check = $mysqlcon->query("SELECT * FROM $dbname.job_check")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSION[$rspathhex.'upinfomsg'])) {
|
||||
if(!isset($err_msg)) {
|
||||
$err_msg = '<i class="fa fa-fw fa-info-circle"></i> '.sprintf($lang['upinf2'], date("Y-m-d H:i",$job_check['last_update']['timestamp']), '<a href="//ts-n.net/ranksystem.php?changelog" target="_blank"><i class="fa fa-fw fa-book"></i> ', '</a>'); $err_lvl = 1;
|
||||
$_SESSION[$rspathhex.'upinfomsg'] = 1;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?PHP echo $language; ?>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="version" content="<?PHP echo $currvers; ?>">
|
||||
<link rel="icon" href="../tsicons/rs.png">
|
||||
<title>TS-N.NET Ranksystem</title>
|
||||
<link href="../libs/combined_st.css?v=<?PHP echo $currvers; ?>" rel="stylesheet">
|
||||
<script src="../libs/combined_st.js?v=<?PHP echo $currvers; ?>"></script>
|
||||
<?PHP
|
||||
if(isset($shownav) && $shownav == 0) { ?>
|
||||
<style>
|
||||
body{margin-top:0px!important}
|
||||
.affix{top:0px!important;width:calc(100% - 50px)!important;position:fixed;color:#000;background-color:#fff!important;}
|
||||
</style>
|
||||
<?PHP } ?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="myModal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?PHP echo $lang['stnv0001']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $servernews; ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="myModal2" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?PHP echo $lang['stnv0003']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $lang['stnv0004']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0005']; ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<form method="post">
|
||||
<button class="btn btn-primary" type="submit" name="refresh"><?PHP echo $lang['stnv0006']; ?></button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="battlesystem" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?PHP echo $lang['stnv0007']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $lang['stnv0008']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0009']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0010']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0011']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0012']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0013']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0014']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0015']; ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="myStatsModal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?PHP echo $lang['stnv0016']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $lang['stnv0017']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0018']; ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="infoModal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?PHP echo $lang['stnv0019']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $lang['stnv0020']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0021']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0022']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0023']; ?></p>
|
||||
<br>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="filteroptions" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Filter options - Search function</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $lang['stnv0031']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0032']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0033']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0034']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0035']; ?></p>
|
||||
<p><br></p>
|
||||
<p><b>filter:excepted:</b></p>
|
||||
<p><?PHP echo $lang['stnv0036']; ?></p>
|
||||
<p><b>filter:nonexcepted:</b></p>
|
||||
<p><?PHP echo $lang['stnv0037']; ?></p>
|
||||
<p><b>filter:online:</b></p>
|
||||
<p><?PHP echo $lang['stnv0038']; ?></p>
|
||||
<p><b>filter:nononline:</b></p>
|
||||
<p><?PHP echo $lang['stnv0039']; ?></p>
|
||||
<p><b>filter:actualgroup:<i>GROUPID</i>:</b></p>
|
||||
<p><?PHP echo $lang['stnv0040']; ?></p>
|
||||
<p><b>filter:country:<i>TS3-COUNTRY-CODE</i>:</b></p>
|
||||
<p><?PHP echo $lang['stnv0042']; ?></p>
|
||||
<p><b>filter:lastseen:<i>OPERATOR</i>:<i>TIME</i>:</b></p>
|
||||
<p><?PHP echo $lang['stnv0041']; ?></p>
|
||||
<br>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP
|
||||
if($shownav == 1) {
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="index.php"><?PHP echo $lang['stnv0024']; ?></a>
|
||||
</div>
|
||||
<?PHP if(basename($_SERVER['SCRIPT_NAME']) == "list_rankup.php") { ?>
|
||||
<ul class="nav navbar-left top-nav">
|
||||
<li class="navbar-form navbar-left dropdown">
|
||||
<div class="btn-group">
|
||||
<a href="#filteroptions" data-toggle="modal" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="navbar-form navbar-right dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<?PHP echo $lang['stnv0025']; ?>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=50&lang=$language&search=$getstring"; ?>">50</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=100&lang=$language&search=$getstring"; ?>">100</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=250&lang=$language&search=$getstring"; ?>">250</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=500&lang=$language&search=$getstring"; ?>">500</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=all&lang=$language&search=$getstring"; ?>"><?PHP echo $lang['stnv0026']; ?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="navbar-form navbar-right">
|
||||
<form method="post">
|
||||
<div class="form-group">
|
||||
<input class="form-control" type="text" name="usersuche" placeholder="Search"<?PHP if(isset($getstring)) echo ' value="'.$getstring.'"'; ?>>
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit" name="username"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
<?PHP } ?>
|
||||
<ul class="nav navbar-right top-nav">
|
||||
<?PHP
|
||||
if((time() - $job_check['calc_user_lastscan']['timestamp']) > 600) { ?>
|
||||
<li class="navbar-form navbar-left">
|
||||
<span class="label label-warning"><?PHP echo $lang['stnv0027']; ?></span>
|
||||
</li>
|
||||
<?PHP } ?>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i><?PHP echo ' ' . $_SESSION[$rspathhex.'tsname'] ?>
|
||||
<b class="caret"></b></a><ul class="dropdown-menu">
|
||||
<?PHP
|
||||
if($_SESSION[$rspathhex.'tsname'] == "verification needed!" || $_SESSION[$rspathhex.'connected'] == 0) {
|
||||
echo '<li><a href="verify.php"><i class="fa fa-fw fa-key"></i> verificate here..</a></li>';
|
||||
}
|
||||
if(isset($_SESSION[$rspathhex.'admin']) && $_SESSION[$rspathhex.'admin'] == TRUE) {
|
||||
if($_SERVER['SERVER_PORT'] == 443 || $_SERVER['SERVER_PORT'] == 80) {
|
||||
echo '<li><a href="//',$_SERVER['SERVER_NAME'],':',substr(dirname($_SERVER['SCRIPT_NAME']),0,-5),'webinterface/bot.php"><i class="fa fa-fw fa-wrench"></i> ',$lang['wi'],'</a></li>';
|
||||
} else {
|
||||
echo '<li><a href="//',$_SERVER['SERVER_NAME'],':',$_SERVER['SERVER_PORT'],substr(dirname($_SERVER['SCRIPT_NAME']),0,-5),'webinterface/bot.php"><i class="fa fa-fw fa-wrench"></i> ',$lang['wi'],'</a></li>';
|
||||
}
|
||||
} elseif ($_SESSION[$rspathhex.'connected'] == 0) {
|
||||
echo '<li><a href="ts3server://';
|
||||
if (($ts['host']=='localhost' || $ts['host']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
echo preg_replace('/www\./','',$_SERVER['HTTP_HOST']);
|
||||
} elseif ($ts['host']=='localhost' || $ts['host']=='127.0.0.1') {
|
||||
echo $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
echo $ts['host'];
|
||||
}
|
||||
echo ':'.$ts['voice'];
|
||||
echo '"><i class="fa fa-fw fa-headphones"></i> '.$lang['stnv0043'].'</a></li>';
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<a href="my_stats.php"><i class="fa fa-fw fa-user"></i> <?PHP echo $lang['stmy0001']; ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#myModal" data-toggle="modal"><i class="fa fa-fw fa-envelope"></i> <?PHP echo $lang['stnv0001']; ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<div class="navbar-form navbar-center">
|
||||
<div class="btn-group">
|
||||
<a href="#myModal2" data-toggle="modal" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-globe"></i> <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="?lang=ar"><span class="flag-icon flag-icon-arab"></span> AR - العربية</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=cz"><span class="flag-icon flag-icon-cz"></span> CZ - čeština</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=de"><span class="flag-icon flag-icon-de"></span> DE - Deutsch</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=en"><span class="flag-icon flag-icon-gb"></span> EN - english</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=fr"><span class="flag-icon flag-icon-fr"></span> FR - français</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=it"><span class="flag-icon flag-icon-it"></span> IT - Italiano</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=nl"><span class="flag-icon flag-icon-nl"></span> NL - Nederlands</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=pl"><span class="flag-icon flag-icon-pl"></span> PL - polski</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=pt"><span class="flag-icon flag-icon-ptbr"></span> PT - Português</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=ro"><span class="flag-icon flag-icon-ro"></span> RO - Română</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=ru"><span class="flag-icon flag-icon-ru"></span> RU - Pусский</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="collapse navbar-collapse navbar-ex1-collapse">
|
||||
<ul class="nav navbar-nav side-nav">
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "index.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="index.php"><i class="fa fa-fw fa-area-chart"></i> <?PHP echo $lang['stix0001']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "my_stats.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="my_stats.php"><i class="fa fa-fw fa-bar-chart-o"></i> <?PHP echo $lang['stmy0001']; ?></a>
|
||||
</li>
|
||||
<?PHP if($addons_config['assign_groups_active']['value'] == '1') {
|
||||
echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "assign_groups.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="assign_groups.php"><i class="fa fa-fw fa-address-card-o"></i> <?PHP echo $lang['stag0001']; ?></a>
|
||||
<?PHP } ?>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "top_all.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#demo"><i class="fa fa-fw fa-trophy"></i> <?PHP echo $lang['sttw0001']; ?> <i class="fa fa-fw fa-caret-down"></i></a>
|
||||
<ul id="demo" class="collapse">
|
||||
<li>
|
||||
<a href="top_week.php"><?PHP echo $lang['sttw0002']; ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="top_month.php"><?PHP echo $lang['sttm0001']; ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="top_all.php"><?PHP echo $lang['stta0001']; ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "list_rankup.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="list_rankup.php"><i class="fa fa-fw fa-list-ul"></i> <?PHP echo $lang['stnv0029']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "info.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="info.php"><i class="fa fa-fw fa-info-circle"></i> <?PHP echo $lang['stnv0030']; ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<?PHP
|
||||
} else {
|
||||
echo '<div id="container">';
|
||||
}
|
||||
|
||||
|
||||
function error_handling($msg,$type = NULL) {
|
||||
switch ($type) {
|
||||
case NULL: echo '<div class="alert alert-success alert-dismissible">'; break;
|
||||
case 1: echo '<div class="alert alert-info alert-dismissible">'; break;
|
||||
case 2: echo '<div class="alert alert-warning alert-dismissible">'; break;
|
||||
case 3: echo '<div class="alert alert-danger alert-dismissible">'; break;
|
||||
}
|
||||
echo '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>',$msg,'</div>';
|
||||
}
|
||||
?>
|
||||
<?PHP
|
||||
$job_check = $mysqlcon->query("SELECT * FROM `$dbname`.`job_check`")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSION[$rspathhex.'upinfomsg'])) {
|
||||
if(!isset($err_msg)) {
|
||||
$err_msg = '<i class="fa fa-fw fa-info-circle"></i> '.sprintf($lang['upinf2'], date("Y-m-d H:i",$job_check['last_update']['timestamp']), '<a href="//ts-n.net/ranksystem.php?changelog" target="_blank"><i class="fa fa-fw fa-book"></i> ', '</a>'); $err_lvl = 1;
|
||||
$_SESSION[$rspathhex.'upinfomsg'] = 1;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?PHP echo $language; ?>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="version" content="<?PHP echo $currvers; ?>">
|
||||
<link rel="icon" href="../tsicons/rs.png">
|
||||
<title>TS-N.NET Ranksystem</title>
|
||||
<link href="../libs/combined_st.css?v=<?PHP echo $currvers; ?>" rel="stylesheet">
|
||||
<?PHP
|
||||
$sitescript = basename($_SERVER['SCRIPT_NAME']);
|
||||
switch($sitescript) {
|
||||
case "index.php":
|
||||
?><script>!function(e,t,r){function n(){for(;d[0]&&"loaded"==d[0][f];)c=d.shift(),c[o]=!i.parentNode.insertBefore(c,i)}for(var s,a,c,d=[],i=e.scripts[0],o="onreadystatechange",f="readyState";s=r.shift();)a=e.createElement(t),"async"in i?(a.async=!1,e.head.appendChild(a)):i[f]?(d.push(a),a[o]=n):e.write("<"+t+' src="'+s+'" defer></'+t+">"),a.src=s}(document,"script",['../libs/qbrm.js','../libs/statsindex.js'])</script><?PHP
|
||||
break;
|
||||
case "assign_groups.php":
|
||||
?><script src="../libs/qbh_bsw.js"></script><?PHP
|
||||
break;
|
||||
case "top_all.php":
|
||||
?><script src="../libs/qbrm.js"></script><?PHP
|
||||
break;
|
||||
case "top_month.php":
|
||||
?><script src="../libs/qbrm.js"></script><?PHP
|
||||
break;
|
||||
case "top_week.php":
|
||||
?><script src="../libs/qbrm.js"></script><?PHP
|
||||
break;
|
||||
case "verify.php":
|
||||
?><script src="../libs/qbh_bse.js"></script><?PHP
|
||||
break;
|
||||
case "list_rankup.php":
|
||||
?><script>!function(e,t,r){function n(){for(;d[0]&&"loaded"==d[0][f];)c=d.shift(),c[o]=!i.parentNode.insertBefore(c,i)}for(var s,a,c,d=[],i=e.scripts[0],o="onreadystatechange",f="readyState";s=r.shift();)a=e.createElement(t),"defer"in i?(a.async=!1,e.head.appendChild(a)):i[f]?(d.push(a),a[o]=n):e.write("<"+t+' src="'+s+'" defer></'+t+">"),a.src=s}(document,"script",['../libs/qb.js'])</script><?PHP
|
||||
break;
|
||||
default:
|
||||
?><script src="../libs/qb.js"></script><?PHP
|
||||
}
|
||||
if(isset($shownav) && $shownav == 0) { ?>
|
||||
<style>
|
||||
body{margin-top:0px!important}
|
||||
.affix{top:0px!important;width:calc(100% - 50px)!important;position:fixed;color:#000;background-color:#fff!important;}
|
||||
</style>
|
||||
<?PHP } ?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="myModal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?PHP echo $lang['stnv0001']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $servernews; ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="myModal2" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?PHP echo $lang['stnv0003']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $lang['stnv0004']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0005']; ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<form method="post">
|
||||
<button class="btn btn-primary" type="submit" name="refresh"><?PHP echo $lang['stnv0006']; ?></button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="battlesystem" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?PHP echo $lang['stnv0007']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $lang['stnv0008']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0009']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0010']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0011']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0012']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0013']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0014']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0015']; ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="myStatsModal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?PHP echo $lang['stnv0016']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $lang['stnv0017']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0018']; ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="infoModal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><?PHP echo $lang['stnv0019']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $lang['stnv0020']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0021']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0022']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0023']; ?></p>
|
||||
<br>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="filteroptions" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Filter options - Search function</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $lang['stnv0031']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0032']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0033']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0034']; ?></p>
|
||||
<p><?PHP echo $lang['stnv0035']; ?></p>
|
||||
<p><br></p>
|
||||
<p><b>filter:excepted:</b></p>
|
||||
<p><?PHP echo $lang['stnv0036']; ?></p>
|
||||
<p><b>filter:nonexcepted:</b></p>
|
||||
<p><?PHP echo $lang['stnv0037']; ?></p>
|
||||
<p><b>filter:online:</b></p>
|
||||
<p><?PHP echo $lang['stnv0038']; ?></p>
|
||||
<p><b>filter:nononline:</b></p>
|
||||
<p><?PHP echo $lang['stnv0039']; ?></p>
|
||||
<p><b>filter:actualgroup:<i>GROUPID</i>:</b></p>
|
||||
<p><?PHP echo $lang['stnv0040']; ?></p>
|
||||
<p><b>filter:country:<i>TS3-COUNTRY-CODE</i>:</b></p>
|
||||
<p><?PHP echo $lang['stnv0042']; ?></p>
|
||||
<p><b>filter:lastseen:<i>OPERATOR</i>:<i>TIME</i>:</b></p>
|
||||
<p><?PHP echo $lang['stnv0041']; ?></p>
|
||||
<br>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP
|
||||
if($shownav == 1) {
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="index.php"><?PHP echo $lang['stnv0024']; ?></a>
|
||||
</div>
|
||||
<?PHP if(basename($_SERVER['SCRIPT_NAME']) == "list_rankup.php") { ?>
|
||||
<ul class="nav navbar-left top-nav">
|
||||
<li class="navbar-form navbar-left dropdown">
|
||||
<div class="btn-group">
|
||||
<a href="#filteroptions" data-toggle="modal" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="navbar-form navbar-right dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<?PHP echo $lang['stnv0025']; ?>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=50&lang=$language&search=$getstring"; ?>">50</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=100&lang=$language&search=$getstring"; ?>">100</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=250&lang=$language&search=$getstring"; ?>">250</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=500&lang=$language&search=$getstring"; ?>">500</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=all&lang=$language&search=$getstring"; ?>"><?PHP echo $lang['stnv0026']; ?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="navbar-form navbar-right">
|
||||
<form method="post">
|
||||
<div class="form-group">
|
||||
<input class="form-control" type="text" name="usersuche" placeholder="Search"<?PHP if(isset($getstring)) echo ' value="'.$getstring.'"'; ?>>
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit" name="username"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
<?PHP } ?>
|
||||
<ul class="nav navbar-right top-nav">
|
||||
<?PHP
|
||||
if((time() - $job_check['calc_user_lastscan']['timestamp']) > 600) { ?>
|
||||
<li class="navbar-form navbar-left">
|
||||
<span class="label label-warning"><?PHP echo $lang['stnv0027']; ?></span>
|
||||
</li>
|
||||
<?PHP } ?>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i><?PHP echo ' ' . $_SESSION[$rspathhex.'tsname'] ?>
|
||||
<b class="caret"></b></a><ul class="dropdown-menu">
|
||||
<?PHP
|
||||
if($_SESSION[$rspathhex.'tsname'] == "verification needed!" || $_SESSION[$rspathhex.'connected'] == 0) {
|
||||
echo '<li><a href="verify.php"><i class="fa fa-fw fa-key"></i> verificate here..</a></li>';
|
||||
}
|
||||
if(isset($_SESSION[$rspathhex.'admin']) && $_SESSION[$rspathhex.'admin'] == TRUE) {
|
||||
if($_SERVER['SERVER_PORT'] == 443 || $_SERVER['SERVER_PORT'] == 80) {
|
||||
echo '<li><a href="//',$_SERVER['SERVER_NAME'],':',substr(dirname($_SERVER['SCRIPT_NAME']),0,-5),'webinterface/bot.php"><i class="fa fa-fw fa-wrench"></i> ',$lang['wi'],'</a></li>';
|
||||
} else {
|
||||
echo '<li><a href="//',$_SERVER['SERVER_NAME'],':',$_SERVER['SERVER_PORT'],substr(dirname($_SERVER['SCRIPT_NAME']),0,-5),'webinterface/bot.php"><i class="fa fa-fw fa-wrench"></i> ',$lang['wi'],'</a></li>';
|
||||
}
|
||||
} elseif ($_SESSION[$rspathhex.'connected'] == 0) {
|
||||
echo '<li><a href="ts3server://';
|
||||
if (($ts['host']=='localhost' || $ts['host']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
echo preg_replace('/www\./','',$_SERVER['HTTP_HOST']);
|
||||
} elseif ($ts['host']=='localhost' || $ts['host']=='127.0.0.1') {
|
||||
echo $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
echo $ts['host'];
|
||||
}
|
||||
echo ':'.$ts['voice'];
|
||||
echo '"><i class="fa fa-fw fa-headphones"></i> '.$lang['stnv0043'].'</a></li>';
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<a href="my_stats.php"><i class="fa fa-fw fa-user"></i> <?PHP echo $lang['stmy0001']; ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#myModal" data-toggle="modal"><i class="fa fa-fw fa-envelope"></i> <?PHP echo $lang['stnv0001']; ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<div class="navbar-form navbar-center">
|
||||
<div class="btn-group">
|
||||
<a href="#myModal2" data-toggle="modal" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-globe"></i> <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="?lang=ar"><span class="flag-icon flag-icon-arab"></span> AR - العربية</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=cz"><span class="flag-icon flag-icon-cz"></span> CZ - čeština</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=de"><span class="flag-icon flag-icon-de"></span> DE - Deutsch</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=en"><span class="flag-icon flag-icon-gb"></span> EN - english</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=fr"><span class="flag-icon flag-icon-fr"></span> FR - français</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=it"><span class="flag-icon flag-icon-it"></span> IT - Italiano</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=nl"><span class="flag-icon flag-icon-nl"></span> NL - Nederlands</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=pl"><span class="flag-icon flag-icon-pl"></span> PL - polski</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=ro"><span class="flag-icon flag-icon-ro"></span> RO - Română</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=ru"><span class="flag-icon flag-icon-ru"></span> RU - Pусский</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=pt"><span class="flag-icon flag-icon-ptbr"></span> PT - Português</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="collapse navbar-collapse navbar-ex1-collapse">
|
||||
<ul class="nav navbar-nav side-nav">
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "index.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="index.php"><i class="fa fa-fw fa-area-chart"></i> <?PHP echo $lang['stix0001']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "my_stats.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="my_stats.php"><i class="fa fa-fw fa-bar-chart-o"></i> <?PHP echo $lang['stmy0001']; ?></a>
|
||||
</li>
|
||||
<?PHP if($addons_config['assign_groups_active']['value'] == '1') {
|
||||
echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "assign_groups.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="assign_groups.php"><i class="fa fa-fw fa-address-card-o"></i> <?PHP echo $lang['stag0001']; ?></a>
|
||||
<?PHP } ?>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "top_all.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#demo"><i class="fa fa-fw fa-trophy"></i> <?PHP echo $lang['sttw0001']; ?> <i class="fa fa-fw fa-caret-down"></i></a>
|
||||
<ul id="demo" class="collapse">
|
||||
<li>
|
||||
<a href="top_week.php"><?PHP echo $lang['sttw0002']; ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="top_month.php"><?PHP echo $lang['sttm0001']; ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="top_all.php"><?PHP echo $lang['stta0001']; ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "list_rankup.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="list_rankup.php"><i class="fa fa-fw fa-list-ul"></i> <?PHP echo $lang['stnv0029']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "info.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="info.php"><i class="fa fa-fw fa-info-circle"></i> <?PHP echo $lang['stnv0030']; ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<?PHP
|
||||
} else {
|
||||
echo '<div id="container">';
|
||||
}
|
||||
|
||||
|
||||
function error_handling($msg,$type = NULL) {
|
||||
switch ($type) {
|
||||
case NULL: echo '<div class="alert alert-success alert-dismissible">'; break;
|
||||
case 1: echo '<div class="alert alert-info alert-dismissible">'; break;
|
||||
case 2: echo '<div class="alert alert-warning alert-dismissible">'; break;
|
||||
case 3: echo '<div class="alert alert-danger alert-dismissible">'; break;
|
||||
}
|
||||
echo '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>',$msg,'</div>';
|
||||
}
|
||||
?>
|
||||
@@ -1,87 +1,87 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if($language == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "fr") {
|
||||
require_once('../languages/nations_fr.php');
|
||||
} elseif($language == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "nl") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
} elseif($language == "pt") {
|
||||
require_once('../languages/nations_pt.php');
|
||||
} elseif($language == "pl") {
|
||||
require_once('../languages/nations_pl.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
|
||||
$sql_res = $mysqlcon->query("SELECT * FROM $dbname.stats_platforms ORDER BY count DESC")->fetchALL(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['stna0006'],' - ',$lang['stna0002']; ?>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><?PHP echo $lang['stna0006']; ?></th>
|
||||
<th><?PHP echo $lang['stix0060'],' ',$lang['stna0004']; ?></th>
|
||||
<th><?PHP echo $lang['stna0007']; ?></th>
|
||||
</tr>
|
||||
<?PHP
|
||||
$count = 0;
|
||||
$sum_of_all = 0;
|
||||
foreach ($sql_res as $country => $value) {
|
||||
$sum_of_all = $sum_of_all + $value['count'];
|
||||
}
|
||||
foreach ($sql_res as $platform => $value) {
|
||||
$count++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>',$count,'</td>
|
||||
<td>',$platform,'</td>
|
||||
<td>',$value['count'],'</td>
|
||||
<td>',number_format(round(($value['count'] * 100 / $sum_of_all), 1), 1),' %</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
session_start();
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if($language == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
|
||||
$sql_res = $mysqlcon->query("SELECT * FROM `$dbname`.`stats_platforms` ORDER BY `count` DESC")->fetchALL(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['stna0006'],' - ',$lang['stna0002']; ?>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><?PHP echo $lang['stna0006']; ?></th>
|
||||
<th><?PHP echo $lang['stix0060'],' ',$lang['stna0004']; ?></th>
|
||||
<th><?PHP echo $lang['stna0007']; ?></th>
|
||||
</tr>
|
||||
<?PHP
|
||||
$count = 0;
|
||||
$sum_of_all = 0;
|
||||
foreach ($sql_res as $country => $value) {
|
||||
$sum_of_all = $sum_of_all + $value['count'];
|
||||
}
|
||||
foreach ($sql_res as $platform => $value) {
|
||||
$count++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>',$count,'</td>
|
||||
<td>',$platform,'</td>
|
||||
<td>',$value['count'],'</td>
|
||||
<td>',number_format(round(($value['count'] * 100 / $sum_of_all), 1), 1),' %</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,381 +1,386 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
$db_arr = $mysqlcon->query("SELECT uuid,name,count,idle,cldgroup,online FROM $dbname.user ORDER BY (count - idle) DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0013'];
|
||||
} else {
|
||||
$db_arr = $mysqlcon->query("SELECT uuid,name,count,idle,cldgroup,online FROM $dbname.user ORDER BY count DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0003'];
|
||||
}
|
||||
$sumentries = count($db_arr) - 10;
|
||||
$count10 = 0;
|
||||
$top10_sum = 0;
|
||||
$top10_idle_sum = 0;
|
||||
|
||||
|
||||
foreach ($db_arr as $uuid => $client) {
|
||||
$sgroups = array_flip(explode(",", $client['cldgroup']));
|
||||
if (!isset($exceptuuid[$uuid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
if ($count10 == 10) break;
|
||||
if ($substridle == 1) {
|
||||
$hours = $client['count'] - $client['idle'];
|
||||
} else {
|
||||
$hours = $client['count'];
|
||||
}
|
||||
$top10_sum = round(($client['count']/3600)) + $top10_sum;
|
||||
$top10_idle_sum = round(($client['idle']/3600)) + $top10_idle_sum;
|
||||
$client_data[$count10] = array(
|
||||
'name' => $client['name'],
|
||||
'count' => $hours,
|
||||
'online' => $client['online']
|
||||
);
|
||||
$count10++;
|
||||
}
|
||||
}
|
||||
|
||||
for($count10 = $count10; $count10 <= 10; $count10++) {
|
||||
$client_data[$count10] = array(
|
||||
'name' => "<i>unkown</i>",
|
||||
'count' => "0",
|
||||
'online' => "0"
|
||||
);
|
||||
}
|
||||
|
||||
$sum = $mysqlcon->query("SELECT SUM(count) AS count, SUM(idle) AS idle FROM $dbname.user")->fetch();
|
||||
$others_sum = round(($sum['count']/3600)) - $top10_sum;
|
||||
$others_idle_sum = round(($sum['idle']/3600)) - $top10_idle_sum;
|
||||
|
||||
function get_percentage($max_value, $value) {
|
||||
return (round(($value/$max_value)*100));
|
||||
}
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['sttw0001']; ?>
|
||||
<small><?PHP echo $lang['stta0001']; ?></small>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-4">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#1st</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[0]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[0]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[0]['count']<3600) { echo sprintf($texttime, round(($client_data[0]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[0]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-2">
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#2nd</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[1]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[1]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[1]['count']<3600) { echo sprintf($texttime, round(($client_data[1]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[1]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#3rd</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[2]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[2]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[2]['count']<3600) { echo sprintf($texttime, round(($client_data[2]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[2]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#4th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[3]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[3]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[3]['count']<3600) { echo sprintf($texttime, round(($client_data[3]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[3]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#5th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[4]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[4]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[4]['count']<3600) { echo sprintf($texttime, round(($client_data[4]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[4]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#6th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[5]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[5]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[5]['count']<3600) { echo sprintf($texttime, round(($client_data[5]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[5]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#7th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[6]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[6]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[6]['count']<3600) { echo sprintf($texttime, round(($client_data[6]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[6]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#8th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[7]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[7]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[7]['count']<3600) { echo sprintf($texttime, round(($client_data[7]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[7]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#9th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[8]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[8]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[8]['count']<3600) { echo sprintf($texttime, round(($client_data[8]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[8]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#10th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[9]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[9]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[9]['count']<3600) { echo sprintf($texttime, round(($client_data[9]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[9]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0004']; ?></h2>
|
||||
<h4>#1 <?PHP echo $client_data[0]['name'] ?><?PHP echo ($client_data[0]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[0]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: 100%;"><?PHP echo round(($client_data[0]['count']/3600)) .' '.$lang['sttw0005']?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#2 <?PHP echo $client_data[1]['name'] ?><?PHP echo ($client_data[1]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped <?PHP echo ($client_data[1]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[1]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[1]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[1]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[1]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#3 <?PHP echo $client_data[2]['name'] ?><?PHP echo ($client_data[2]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped <?PHP echo ($client_data[2]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[2]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[2]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[2]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[2]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#4 <?PHP echo $client_data[3]['name'] ?><?PHP echo ($client_data[3]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger progress-bar-striped <?PHP echo ($client_data[3]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[3]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[3]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[3]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[3]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#5 <?PHP echo $client_data[4]['name'] ?><?PHP echo ($client_data[4]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[4]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[4]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[4]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[4]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[4]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#6 <?PHP echo $client_data[5]['name'] ?><?PHP echo ($client_data[5]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped <?PHP echo ($client_data[5]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[5]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[5]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[5]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[5]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#7 <?PHP echo $client_data[6]['name'] ?><?PHP echo ($client_data[6]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped <?PHP echo ($client_data[6]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[6]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[6]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[6]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[6]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#8 <?PHP echo $client_data[7]['name'] ?><?PHP echo ($client_data[7]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger progress-bar-striped <?PHP echo ($client_data[7]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[7]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[7]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[7]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[7]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#9 <?PHP echo $client_data[8]['name'] ?><?PHP echo ($client_data[8]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[8]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[8]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[8]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[8]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[8]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#10 <?PHP echo $client_data[9]['name'] ?><?PHP echo ($client_data[9]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[9]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[9]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[9]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[9]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[9]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0007']; ?></h2>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0008']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0009']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0010']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP
|
||||
|
||||
?>
|
||||
<script>
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut1',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_sum ?>},
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut2',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_sum - $top10_idle_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_sum - $others_idle_sum ?>},
|
||||
],
|
||||
colors: [
|
||||
'#5cb85c',
|
||||
'#80ce80'
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut3',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_idle_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_idle_sum ?>},
|
||||
],
|
||||
colors: [
|
||||
'#f0ad4e',
|
||||
'#ffc675'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
$db_arr = $mysqlcon->query("SELECT `uuid`,`name`,`count`,`idle`,`cldgroup`,`online` FROM `$dbname`.`user` ORDER BY (`count` - `idle`) DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0013'];
|
||||
} else {
|
||||
$db_arr = $mysqlcon->query("SELECT `uuid`,`name`,`count`,`idle`,`cldgroup`,`online` FROM `$dbname`.`user` ORDER BY `count` DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0003'];
|
||||
}
|
||||
$sumentries = count($db_arr) - 10;
|
||||
$count10 = 0;
|
||||
$top10_sum = 0;
|
||||
$top10_idle_sum = 0;
|
||||
|
||||
|
||||
foreach ($db_arr as $uuid => $client) {
|
||||
$sgroups = array_flip(explode(",", $client['cldgroup']));
|
||||
if (!isset($exceptuuid[$uuid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
if ($count10 == 10) break;
|
||||
if ($substridle == 1) {
|
||||
$hours = $client['count'] - $client['idle'];
|
||||
} else {
|
||||
$hours = $client['count'];
|
||||
}
|
||||
$top10_sum = round(($client['count']/3600)) + $top10_sum;
|
||||
$top10_idle_sum = round(($client['idle']/3600)) + $top10_idle_sum;
|
||||
$client_data[$count10] = array(
|
||||
'name' => $client['name'],
|
||||
'count' => $hours,
|
||||
'online' => $client['online']
|
||||
);
|
||||
$count10++;
|
||||
}
|
||||
}
|
||||
|
||||
for($count10 = $count10; $count10 <= 10; $count10++) {
|
||||
$client_data[$count10] = array(
|
||||
'name' => "<i>unkown</i>",
|
||||
'count' => "0",
|
||||
'online' => "0"
|
||||
);
|
||||
}
|
||||
|
||||
$sum = $mysqlcon->query("SELECT SUM(`count`) AS `count`, SUM(`idle`) AS `idle` FROM `$dbname`.`user`")->fetch();
|
||||
$others_sum = round(($sum['count']/3600)) - $top10_sum;
|
||||
$others_idle_sum = round(($sum['idle']/3600)) - $top10_idle_sum;
|
||||
|
||||
function get_percentage($max_value, $value) {
|
||||
return (round(($value/$max_value)*100));
|
||||
}
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['sttw0001']; ?>
|
||||
<small><?PHP echo $lang['stta0001']; ?></small>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-4">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#1st</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[0]['name'],'">',$client_data[0]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[0]['count']<3600) { echo sprintf($texttime, round(($client_data[0]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[0]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-2">
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#2nd</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[1]['name'],'">',$client_data[1]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[1]['count']<3600) { echo sprintf($texttime, round(($client_data[1]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[1]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#3rd</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[2]['name'],'">',$client_data[2]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[2]['count']<3600) { echo sprintf($texttime, round(($client_data[2]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[2]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#4th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[3]['name'],'">',$client_data[3]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[3]['count']<3600) { echo sprintf($texttime, round(($client_data[3]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[3]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#5th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[4]['name'],'">',$client_data[4]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[4]['count']<3600) { echo sprintf($texttime, round(($client_data[4]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[4]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#6th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[5]['name'],'">',$client_data[5]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[5]['count']<3600) { echo sprintf($texttime, round(($client_data[5]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[5]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#7th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[6]['name'],'">',$client_data[6]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[6]['count']<3600) { echo sprintf($texttime, round(($client_data[6]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[6]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#8th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[7]['name'],'">',$client_data[7]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[7]['count']<3600) { echo sprintf($texttime, round(($client_data[7]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[7]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#9th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[8]['name'],'">',$client_data[8]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[8]['count']<3600) { echo sprintf($texttime, round(($client_data[8]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[8]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#10th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[9]['name'],'">',$client_data[9]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[9]['count']<3600) { echo sprintf($texttime, round(($client_data[9]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[9]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0004']; ?></h2>
|
||||
<h4>#1 <?PHP echo $client_data[0]['name'] ?><?PHP echo ($client_data[0]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[0]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: 100%;"><?PHP echo round(($client_data[0]['count']/3600)) .' '.$lang['sttw0005']?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#2 <?PHP echo $client_data[1]['name'] ?><?PHP echo ($client_data[1]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped <?PHP echo ($client_data[1]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[1]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[1]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[1]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[1]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#3 <?PHP echo $client_data[2]['name'] ?><?PHP echo ($client_data[2]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped <?PHP echo ($client_data[2]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[2]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[2]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[2]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[2]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#4 <?PHP echo $client_data[3]['name'] ?><?PHP echo ($client_data[3]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger progress-bar-striped <?PHP echo ($client_data[3]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[3]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[3]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[3]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[3]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#5 <?PHP echo $client_data[4]['name'] ?><?PHP echo ($client_data[4]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[4]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[4]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[4]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[4]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[4]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#6 <?PHP echo $client_data[5]['name'] ?><?PHP echo ($client_data[5]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped <?PHP echo ($client_data[5]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[5]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[5]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[5]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[5]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#7 <?PHP echo $client_data[6]['name'] ?><?PHP echo ($client_data[6]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped <?PHP echo ($client_data[6]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[6]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[6]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[6]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[6]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#8 <?PHP echo $client_data[7]['name'] ?><?PHP echo ($client_data[7]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger progress-bar-striped <?PHP echo ($client_data[7]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[7]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[7]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[7]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[7]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#9 <?PHP echo $client_data[8]['name'] ?><?PHP echo ($client_data[8]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[8]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[8]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[8]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[8]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[8]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#10 <?PHP echo $client_data[9]['name'] ?><?PHP echo ($client_data[9]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[9]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[9]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[9]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[9]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[9]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0007']; ?></h2>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0008']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0009']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0010']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut1',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_sum ?>},
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut2',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_sum - $top10_idle_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_sum - $others_idle_sum ?>},
|
||||
],
|
||||
colors: [
|
||||
'#5cb85c',
|
||||
'#80ce80'
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut3',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_idle_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_idle_sum ?>},
|
||||
],
|
||||
colors: [
|
||||
'#f0ad4e',
|
||||
'#ffc675'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,385 +1,390 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
$db_arr = $mysqlcon->query("SELECT s.uuid,s.count_month,s.idle_month,u.name,u.online,u.cldgroup FROM $dbname.stats_user AS s INNER JOIN $dbname.user AS u ON s.uuid = u.uuid WHERE s.removed='0' ORDER BY (s.count_month - s.idle_month) DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0013'];
|
||||
} else {
|
||||
$db_arr = $mysqlcon->query("SELECT s.uuid,s.count_month,s.idle_month,u.name,u.online,u.cldgroup FROM $dbname.stats_user AS s INNER JOIN $dbname.user AS u ON s.uuid = u.uuid WHERE s.removed='0' ORDER BY s.count_month DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0003'];
|
||||
}
|
||||
|
||||
$count_timestamps = $mysqlcon->query("SELECT COUNT(DISTINCT(timestamp)) as count from $dbname.user_snapshot;")->fetch();
|
||||
|
||||
$sumentries = count($db_arr) - 10;
|
||||
$count10 = 0;
|
||||
$top10_sum = 0;
|
||||
$top10_idle_sum = 0;
|
||||
|
||||
foreach ($db_arr as $uuid => $client) {
|
||||
$sgroups = array_flip(explode(",", $client['cldgroup']));
|
||||
if (!isset($exceptuuid[$uuid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
if ($count10 == 10) break;
|
||||
if ($substridle == 1) {
|
||||
$hours = $client['count_month'] - $client['idle_month'];
|
||||
} else {
|
||||
$hours = $client['count_month'];
|
||||
}
|
||||
$top10_sum = round(($client['count_month']/3600)) + $top10_sum;
|
||||
$top10_idle_sum = round(($client['idle_month']/3600)) + $top10_idle_sum;
|
||||
$client_data[$count10] = array(
|
||||
'name' => $client['name'],
|
||||
'count' => $hours,
|
||||
'online' => $client['online']
|
||||
);
|
||||
$count10++;
|
||||
}
|
||||
}
|
||||
|
||||
for($count10 = $count10; $count10 <= 10; $count10++) {
|
||||
$client_data[$count10] = array(
|
||||
'name' => "<i>unkown</i>",
|
||||
'count' => "0",
|
||||
'online' => "0"
|
||||
);
|
||||
}
|
||||
|
||||
$sum = $mysqlcon->query("SELECT SUM(count_month) AS count, SUM(idle_month) AS idle FROM $dbname.stats_user")->fetch();
|
||||
$others_sum = round(($sum['count']/3600)) - $top10_sum;
|
||||
$others_idle_sum = round(($sum['idle']/3600)) - $top10_idle_sum;
|
||||
|
||||
function get_percentage($max_value, $value) {
|
||||
return (round(($value/$max_value)*100));
|
||||
}
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['sttw0001']; ?>
|
||||
<small><?PHP echo $lang['sttm0001']; ?></small>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP if($count_timestamps['count'] < 120) { echo $lang['stix0048'],' (',$count_timestamps['count'],'/120)'; } else { ?>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-4">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#1st</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[0]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[0]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[0]['count']<3600) { echo sprintf($texttime, round(($client_data[0]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[0]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-2">
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#2nd</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[1]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[1]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[1]['count']<3600) { echo sprintf($texttime, round(($client_data[1]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[1]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#3rd</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[2]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[2]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[2]['count']<3600) { echo sprintf($texttime, round(($client_data[2]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[2]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#4th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[3]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[3]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[3]['count']<3600) { echo sprintf($texttime, round(($client_data[3]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[3]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#5th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[4]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[4]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[4]['count']<3600) { echo sprintf($texttime, round(($client_data[4]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[4]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#6th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[5]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[5]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[5]['count']<3600) { echo sprintf($texttime, round(($client_data[5]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[5]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#7th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[6]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[6]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[6]['count']<3600) { echo sprintf($texttime, round(($client_data[6]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[6]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#8th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[7]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[7]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[7]['count']<3600) { echo sprintf($texttime, round(($client_data[7]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[7]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#9th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[8]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[8]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[8]['count']<3600) { echo sprintf($texttime, round(($client_data[8]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[8]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#10th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[9]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[9]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[9]['count']<3600) { echo sprintf($texttime, round(($client_data[9]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[9]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0004']; ?></h2>
|
||||
<h4>#1 <?PHP echo $client_data[0]['name'] ?><?PHP echo ($client_data[0]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[0]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: 100%;"><?PHP echo round(($client_data[0]['count']/3600)) .' '.$lang['sttw0005']?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#2 <?PHP echo $client_data[1]['name'] ?><?PHP echo ($client_data[1]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped <?PHP echo ($client_data[1]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[1]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[1]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[1]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[1]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#3 <?PHP echo $client_data[2]['name'] ?><?PHP echo ($client_data[2]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped <?PHP echo ($client_data[2]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[2]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[2]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[2]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[2]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#4 <?PHP echo $client_data[3]['name'] ?><?PHP echo ($client_data[3]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger progress-bar-striped <?PHP echo ($client_data[3]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[3]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[3]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[3]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[3]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#5 <?PHP echo $client_data[4]['name'] ?><?PHP echo ($client_data[4]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[4]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[4]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[4]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[4]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[4]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#6 <?PHP echo $client_data[5]['name'] ?><?PHP echo ($client_data[5]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped <?PHP echo ($client_data[5]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[5]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[5]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[5]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[5]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#7 <?PHP echo $client_data[6]['name'] ?><?PHP echo ($client_data[6]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped <?PHP echo ($client_data[6]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[6]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[6]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[6]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[6]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#8 <?PHP echo $client_data[7]['name'] ?><?PHP echo ($client_data[7]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger progress-bar-striped <?PHP echo ($client_data[7]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[7]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[7]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[7]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[7]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#9 <?PHP echo $client_data[8]['name'] ?><?PHP echo ($client_data[8]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[8]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[8]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[8]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[8]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[8]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#10 <?PHP echo $client_data[9]['name'] ?><?PHP echo ($client_data[9]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[9]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[9]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[9]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[9]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[9]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0007']; ?></h2>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0008']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0009']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0010']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP
|
||||
|
||||
?>
|
||||
<<script>
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut1',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_sum ?>},
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut2',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_sum - $top10_idle_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_sum - $others_idle_sum ?>},
|
||||
],
|
||||
colors: [
|
||||
'#5cb85c',
|
||||
'#80ce80'
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut3',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_idle_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_idle_sum ?>},
|
||||
],
|
||||
colors: [
|
||||
'#f0ad4e',
|
||||
'#ffc675'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
$db_arr = $mysqlcon->query("SELECT `s`.`uuid`,`s`.`count_month`,`s`.`idle_month`,`u`.`name`,`u`.`online`,`u`.`cldgroup` FROM `$dbname`.`stats_user` AS `s` INNER JOIN `$dbname`.`user` AS `u` ON `s`.`uuid`=`u`.`uuid` WHERE `s`.`removed`='0' ORDER BY (`s`.`count_month` - `s`.`idle_month`) DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0013'];
|
||||
} else {
|
||||
$db_arr = $mysqlcon->query("SELECT `s`.`uuid`,`s`.`count_month`,`s`.`idle_month`,`u`.`name`,`u`.`online`,`u`.`cldgroup` FROM `$dbname`.`stats_user` AS `s` INNER JOIN `$dbname`.`user` AS `u` ON `s`.`uuid`=`u`.`uuid` WHERE `s`.`removed`='0' ORDER BY `s`.`count_month` DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0003'];
|
||||
}
|
||||
|
||||
$count_timestamps = $mysqlcon->query("SELECT COUNT(DISTINCT(`timestamp`)) AS `count` from `$dbname`.`user_snapshot`")->fetch();
|
||||
|
||||
$sumentries = count($db_arr) - 10;
|
||||
$count10 = 0;
|
||||
$top10_sum = 0;
|
||||
$top10_idle_sum = 0;
|
||||
|
||||
foreach ($db_arr as $uuid => $client) {
|
||||
$sgroups = array_flip(explode(",", $client['cldgroup']));
|
||||
if (!isset($exceptuuid[$uuid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
if ($count10 == 10) break;
|
||||
if ($substridle == 1) {
|
||||
$hours = $client['count_month'] - $client['idle_month'];
|
||||
} else {
|
||||
$hours = $client['count_month'];
|
||||
}
|
||||
$top10_sum = round(($client['count_month']/3600)) + $top10_sum;
|
||||
$top10_idle_sum = round(($client['idle_month']/3600)) + $top10_idle_sum;
|
||||
$client_data[$count10] = array(
|
||||
'name' => $client['name'],
|
||||
'count' => $hours,
|
||||
'online' => $client['online']
|
||||
);
|
||||
$count10++;
|
||||
}
|
||||
}
|
||||
|
||||
for($count10 = $count10; $count10 <= 10; $count10++) {
|
||||
$client_data[$count10] = array(
|
||||
'name' => "<i>unkown</i>",
|
||||
'count' => "0",
|
||||
'online' => "0"
|
||||
);
|
||||
}
|
||||
|
||||
$sum = $mysqlcon->query("SELECT SUM(`count_month`) AS `count`, SUM(`idle_month`) AS `idle` FROM `$dbname`.`stats_user`")->fetch();
|
||||
$others_sum = round(($sum['count']/3600)) - $top10_sum;
|
||||
$others_idle_sum = round(($sum['idle']/3600)) - $top10_idle_sum;
|
||||
|
||||
function get_percentage($max_value, $value) {
|
||||
return (round(($value/$max_value)*100));
|
||||
}
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['sttw0001']; ?>
|
||||
<small><?PHP echo $lang['sttm0001']; ?></small>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP if($count_timestamps['count'] < 120) { echo $lang['stix0048'],' (',$count_timestamps['count'],'/120)'; } else { ?>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-4">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#1st</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[0]['name'],'">',$client_data[0]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[0]['count']<3600) { echo sprintf($texttime, round(($client_data[0]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[0]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-2">
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#2nd</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[1]['name'],'">',$client_data[1]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[1]['count']<3600) { echo sprintf($texttime, round(($client_data[1]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[1]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#3rd</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[2]['name'],'">',$client_data[2]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[2]['count']<3600) { echo sprintf($texttime, round(($client_data[2]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[2]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#4th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[3]['name'],'">',$client_data[3]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[3]['count']<3600) { echo sprintf($texttime, round(($client_data[3]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[3]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#5th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[4]['name'],'">',$client_data[4]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[4]['count']<3600) { echo sprintf($texttime, round(($client_data[4]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[4]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#6th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[5]['name'],'">',$client_data[5]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[5]['count']<3600) { echo sprintf($texttime, round(($client_data[5]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[5]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#7th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[6]['name'],'">',$client_data[6]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[6]['count']<3600) { echo sprintf($texttime, round(($client_data[6]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[6]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#8th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[7]['name'],'">',$client_data[7]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[7]['count']<3600) { echo sprintf($texttime, round(($client_data[7]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[7]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#9th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[8]['name'],'">',$client_data[8]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[8]['count']<3600) { echo sprintf($texttime, round(($client_data[8]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[8]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#10th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[9]['name'],'">',$client_data[9]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[9]['count']<3600) { echo sprintf($texttime, round(($client_data[9]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[9]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0004']; ?></h2>
|
||||
<h4>#1 <?PHP echo $client_data[0]['name'] ?><?PHP echo ($client_data[0]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[0]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: 100%;"><?PHP echo round(($client_data[0]['count']/3600)) .' '.$lang['sttw0005']?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#2 <?PHP echo $client_data[1]['name'] ?><?PHP echo ($client_data[1]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped <?PHP echo ($client_data[1]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[1]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[1]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[1]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[1]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#3 <?PHP echo $client_data[2]['name'] ?><?PHP echo ($client_data[2]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped <?PHP echo ($client_data[2]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[2]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[2]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[2]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[2]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#4 <?PHP echo $client_data[3]['name'] ?><?PHP echo ($client_data[3]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger progress-bar-striped <?PHP echo ($client_data[3]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[3]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[3]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[3]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[3]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#5 <?PHP echo $client_data[4]['name'] ?><?PHP echo ($client_data[4]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[4]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[4]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[4]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[4]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[4]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#6 <?PHP echo $client_data[5]['name'] ?><?PHP echo ($client_data[5]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped <?PHP echo ($client_data[5]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[5]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[5]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[5]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[5]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#7 <?PHP echo $client_data[6]['name'] ?><?PHP echo ($client_data[6]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped <?PHP echo ($client_data[6]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[6]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[6]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[6]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[6]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#8 <?PHP echo $client_data[7]['name'] ?><?PHP echo ($client_data[7]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger progress-bar-striped <?PHP echo ($client_data[7]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[7]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[7]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[7]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[7]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#9 <?PHP echo $client_data[8]['name'] ?><?PHP echo ($client_data[8]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[8]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[8]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[8]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[8]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[8]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#10 <?PHP echo $client_data[9]['name'] ?><?PHP echo ($client_data[9]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[9]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[9]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[9]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[9]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[9]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0007']; ?></h2>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0008']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0009']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0010']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<<script>
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut1',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_sum ?>},
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut2',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_sum - $top10_idle_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_sum - $others_idle_sum ?>},
|
||||
],
|
||||
colors: [
|
||||
'#5cb85c',
|
||||
'#80ce80'
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut3',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_idle_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_idle_sum ?>},
|
||||
],
|
||||
colors: [
|
||||
'#f0ad4e',
|
||||
'#ffc675'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,385 +1,390 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
$db_arr = $mysqlcon->query("SELECT s.uuid,s.count_week,s.idle_week,u.name,u.online,u.cldgroup FROM $dbname.stats_user AS s INNER JOIN $dbname.user AS u ON s.uuid = u.uuid WHERE s.removed='0' ORDER BY (s.count_week - s.idle_week) DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0013'];
|
||||
} else {
|
||||
$db_arr = $mysqlcon->query("SELECT s.uuid,s.count_week,s.idle_week,u.name,u.online,u.cldgroup FROM $dbname.stats_user AS s INNER JOIN $dbname.user AS u ON s.uuid = u.uuid WHERE s.removed='0' ORDER BY s.count_week DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0003'];
|
||||
}
|
||||
|
||||
$count_timestamps = $mysqlcon->query("SELECT COUNT(DISTINCT(timestamp)) as count from $dbname.user_snapshot;")->fetch();
|
||||
|
||||
$sumentries = count($db_arr) - 10;
|
||||
$count10 = 0;
|
||||
$top10_sum = 0;
|
||||
$top10_idle_sum = 0;
|
||||
|
||||
foreach ($db_arr as $uuid => $client) {
|
||||
$sgroups = array_flip(explode(",", $client['cldgroup']));
|
||||
if (!isset($exceptuuid[$uuid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
if ($count10 == 10) break;
|
||||
if ($substridle == 1) {
|
||||
$hours = $client['count_week'] - $client['idle_week'];
|
||||
} else {
|
||||
$hours = $client['count_week'];
|
||||
}
|
||||
$top10_sum = round(($client['count_week']/3600)) + $top10_sum;
|
||||
$top10_idle_sum = round(($client['idle_week']/3600)) + $top10_idle_sum;
|
||||
$client_data[$count10] = array(
|
||||
'name' => $client['name'],
|
||||
'count' => $hours,
|
||||
'online' => $client['online']
|
||||
);
|
||||
$count10++;
|
||||
}
|
||||
}
|
||||
|
||||
for($count = $count10; $count10 < 10; $count10++) {
|
||||
$client_data[$count] = array(
|
||||
'name' => "<i>unkown</i>",
|
||||
'count' => "0",
|
||||
'online' => "0"
|
||||
);
|
||||
}
|
||||
|
||||
$sum = $mysqlcon->query("SELECT SUM(count_week) AS count, SUM(idle_week) AS idle FROM $dbname.stats_user")->fetch();
|
||||
$others_sum = round(($sum['count']/3600)) - $top10_sum;
|
||||
$others_idle_sum = round(($sum['idle']/3600)) - $top10_idle_sum;
|
||||
|
||||
function get_percentage($max_value, $value) {
|
||||
return (round(($value/$max_value)*100));
|
||||
}
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['sttw0001']; ?>
|
||||
<small><?PHP echo $lang['sttw0002']; ?></small>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP if($count_timestamps['count'] < 28) { echo $lang['stix0048'],' (',$count_timestamps['count'],'/28)'; } else { ?>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-4">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#1st</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[0]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[0]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[0]['count']<3600) { echo sprintf($texttime, round(($client_data[0]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[0]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-2">
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#2nd</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[1]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[1]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[1]['count']<3600) { echo sprintf($texttime, round(($client_data[1]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[1]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#3rd</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[2]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[2]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[2]['count']<3600) { echo sprintf($texttime, round(($client_data[2]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[2]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#4th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[3]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[3]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[3]['count']<3600) { echo sprintf($texttime, round(($client_data[3]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[3]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#5th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[4]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[4]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[4]['count']<3600) { echo sprintf($texttime, round(($client_data[4]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[4]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#6th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[5]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[5]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[5]['count']<3600) { echo sprintf($texttime, round(($client_data[5]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[5]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#7th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[6]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[6]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[6]['count']<3600) { echo sprintf($texttime, round(($client_data[6]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[6]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#8th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[7]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[7]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[7]['count']<3600) { echo sprintf($texttime, round(($client_data[7]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[7]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#9th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[8]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[8]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[8]['count']<3600) { echo sprintf($texttime, round(($client_data[8]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[8]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#10th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"' .$client_data[9]['name'] .'"'?>><?PHP echo str_replace(' ', '', $client_data[9]['name']) ?></span></div>
|
||||
<div><?PHP if($client_data[9]['count']<3600) { echo sprintf($texttime, round(($client_data[9]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[9]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0004']; ?></h2>
|
||||
<h4>#1 <?PHP echo $client_data[0]['name'] ?><?PHP echo ($client_data[0]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[0]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: 100%;"><?PHP echo round(($client_data[0]['count']/3600)) .' '.$lang['sttw0005']?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#2 <?PHP echo $client_data[1]['name'] ?><?PHP echo ($client_data[1]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped <?PHP echo ($client_data[1]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[1]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[1]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[1]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[1]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#3 <?PHP echo $client_data[2]['name'] ?><?PHP echo ($client_data[2]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped <?PHP echo ($client_data[2]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[2]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[2]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[2]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[2]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#4 <?PHP echo $client_data[3]['name'] ?><?PHP echo ($client_data[3]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger progress-bar-striped <?PHP echo ($client_data[3]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[3]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[3]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[3]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[3]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#5 <?PHP echo $client_data[4]['name'] ?><?PHP echo ($client_data[4]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[4]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[4]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[4]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[4]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[4]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#6 <?PHP echo $client_data[5]['name'] ?><?PHP echo ($client_data[5]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped <?PHP echo ($client_data[5]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[5]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[5]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[5]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[5]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#7 <?PHP echo $client_data[6]['name'] ?><?PHP echo ($client_data[6]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped <?PHP echo ($client_data[6]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[6]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[6]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[6]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[6]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#8 <?PHP echo $client_data[7]['name'] ?><?PHP echo ($client_data[7]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger progress-bar-striped <?PHP echo ($client_data[7]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[7]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[7]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[7]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[7]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#9 <?PHP echo $client_data[8]['name'] ?><?PHP echo ($client_data[8]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[8]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[8]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[8]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[8]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[8]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#10 <?PHP echo $client_data[9]['name'] ?><?PHP echo ($client_data[9]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[9]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[9]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[9]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[9]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[9]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0007']; ?></h2>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0008']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0009']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0010']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP
|
||||
|
||||
?>
|
||||
<script>
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut1',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_sum ?>},
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut2',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_sum - $top10_idle_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_sum - $others_idle_sum ?>},
|
||||
],
|
||||
colors: [
|
||||
'#5cb85c',
|
||||
'#80ce80'
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut3',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_idle_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_idle_sum ?>},
|
||||
],
|
||||
colors: [
|
||||
'#f0ad4e',
|
||||
'#ffc675'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
$db_arr = $mysqlcon->query("SELECT `s`.`uuid`,`s`.`count_week`,`s`.`idle_week`,`u`.`name`,`u`.`online`,`u`.`cldgroup` FROM `$dbname`.`stats_user` AS `s` INNER JOIN `$dbname`.`user` AS `u` ON `s`.`uuid`=`u`.`uuid` WHERE `s`.`removed`='0' ORDER BY (`s`.`count_week` - `s`.`idle_week`) DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0013'];
|
||||
} else {
|
||||
$db_arr = $mysqlcon->query("SELECT `s`.`uuid`,`s`.`count_week`,`s`.`idle_week`,`u`.`name`,`u`.`online`,`u`.`cldgroup` FROM `$dbname`.`stats_user` AS `s` INNER JOIN `$dbname`.`user` AS `u` ON `s`.`uuid`=`u`.`uuid` WHERE `s`.`removed`='0' ORDER BY `s`.`count_week` DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0003'];
|
||||
}
|
||||
|
||||
$count_timestamps = $mysqlcon->query("SELECT COUNT(DISTINCT(`timestamp`)) AS `count` from `$dbname`.`user_snapshot`")->fetch();
|
||||
|
||||
$sumentries = count($db_arr) - 10;
|
||||
$count10 = 0;
|
||||
$top10_sum = 0;
|
||||
$top10_idle_sum = 0;
|
||||
|
||||
foreach ($db_arr as $uuid => $client) {
|
||||
$sgroups = array_flip(explode(",", $client['cldgroup']));
|
||||
if (!isset($exceptuuid[$uuid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
if ($count10 == 10) break;
|
||||
if ($substridle == 1) {
|
||||
$hours = $client['count_week'] - $client['idle_week'];
|
||||
} else {
|
||||
$hours = $client['count_week'];
|
||||
}
|
||||
$top10_sum = round(($client['count_week']/3600)) + $top10_sum;
|
||||
$top10_idle_sum = round(($client['idle_week']/3600)) + $top10_idle_sum;
|
||||
$client_data[$count10] = array(
|
||||
'name' => $client['name'],
|
||||
'count' => $hours,
|
||||
'online' => $client['online']
|
||||
);
|
||||
$count10++;
|
||||
}
|
||||
}
|
||||
|
||||
for($count = $count10; $count10 < 10; $count10++) {
|
||||
$client_data[$count] = array(
|
||||
'name' => "<i>unkown</i>",
|
||||
'count' => "0",
|
||||
'online' => "0"
|
||||
);
|
||||
}
|
||||
|
||||
$sum = $mysqlcon->query("SELECT SUM(`count_week`) AS `count`, SUM(`idle_week`) AS `idle` FROM `$dbname`.`stats_user`")->fetch();
|
||||
$others_sum = round(($sum['count']/3600)) - $top10_sum;
|
||||
$others_idle_sum = round(($sum['idle']/3600)) - $top10_idle_sum;
|
||||
|
||||
function get_percentage($max_value, $value) {
|
||||
return (round(($value/$max_value)*100));
|
||||
}
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['sttw0001']; ?>
|
||||
<small><?PHP echo $lang['sttw0002']; ?></small>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP if($count_timestamps['count'] < 28) { echo $lang['stix0048'],' (',$count_timestamps['count'],'/28)'; } else { ?>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-4">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#1st</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[0]['name'],'">',$client_data[0]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[0]['count']<3600) { echo sprintf($texttime, round(($client_data[0]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[0]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-2">
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#2nd</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[1]['name'],'">',$client_data[1]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[1]['count']<3600) { echo sprintf($texttime, round(($client_data[1]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[1]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<p class="text-center"><i>#3rd</i></p>
|
||||
<p class="text-center"><i class="fa fa-trophy fa-5x"></i></p>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div> </div>
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[2]['name'],'">',$client_data[2]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[2]['count']<3600) { echo sprintf($texttime, round(($client_data[2]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[2]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#4th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[3]['name'],'">',$client_data[3]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[3]['count']<3600) { echo sprintf($texttime, round(($client_data[3]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[3]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#5th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[4]['name'],'">',$client_data[4]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[4]['count']<3600) { echo sprintf($texttime, round(($client_data[4]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[4]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa-2x">#6th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[5]['name'],'">',$client_data[5]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[5]['count']<3600) { echo sprintf($texttime, round(($client_data[5]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[5]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#7th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[6]['name'],'">',$client_data[6]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[6]['count']<3600) { echo sprintf($texttime, round(($client_data[6]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[6]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#8th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[7]['name'],'">',$client_data[7]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[7]['count']<3600) { echo sprintf($texttime, round(($client_data[7]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[7]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#9th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[8]['name'],'">',$client_data[8]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[8]['count']<3600) { echo sprintf($texttime, round(($client_data[8]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[8]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-red">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div style="line-height:90%;">
|
||||
<br>
|
||||
</div>
|
||||
<i class="fa-2x">#10th</i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="tophuge"><span title=<?PHP echo '"',$client_data[9]['name'],'">',$client_data[9]['name']; ?></span></div>
|
||||
<div><?PHP if($client_data[9]['count']<3600) { echo sprintf($texttime, round(($client_data[9]['count']/60)), $lang['sttw0015']); } else { echo sprintf($texttime, round(($client_data[9]['count']/3600)), $lang['sttw0014']); } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0004']; ?></h2>
|
||||
<h4>#1 <?PHP echo $client_data[0]['name'] ?><?PHP echo ($client_data[0]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[0]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: 100%;"><?PHP echo round(($client_data[0]['count']/3600)) .' '.$lang['sttw0005']?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#2 <?PHP echo $client_data[1]['name'] ?><?PHP echo ($client_data[1]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped <?PHP echo ($client_data[1]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[1]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[1]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[1]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[1]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#3 <?PHP echo $client_data[2]['name'] ?><?PHP echo ($client_data[2]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped <?PHP echo ($client_data[2]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[2]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[2]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[2]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[2]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#4 <?PHP echo $client_data[3]['name'] ?><?PHP echo ($client_data[3]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger progress-bar-striped <?PHP echo ($client_data[3]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[3]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[3]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[3]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[3]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#5 <?PHP echo $client_data[4]['name'] ?><?PHP echo ($client_data[4]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[4]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[4]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[4]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[4]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[4]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#6 <?PHP echo $client_data[5]['name'] ?><?PHP echo ($client_data[5]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success progress-bar-striped <?PHP echo ($client_data[5]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[5]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[5]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[5]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[5]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#7 <?PHP echo $client_data[6]['name'] ?><?PHP echo ($client_data[6]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning progress-bar-striped <?PHP echo ($client_data[6]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[6]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[6]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[6]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[6]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#8 <?PHP echo $client_data[7]['name'] ?><?PHP echo ($client_data[7]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger progress-bar-striped <?PHP echo ($client_data[7]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[7]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[7]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[7]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[7]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#9 <?PHP echo $client_data[8]['name'] ?><?PHP echo ($client_data[8]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[8]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[8]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[8]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[8]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[8]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
<h4>#10 <?PHP echo $client_data[9]['name'] ?><?PHP echo ($client_data[9]['online'] == '1') ? ' (Status: <span class="text-success">'.$lang['stix0024'].'</span>)' : ' (Status: <span class="text-danger">'.$lang['stix0025'].'</span>)' ?></h4>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped <?PHP echo ($client_data[9]['online'] == '1') ? 'active' : '' ?>" role="progressbar" aria-valuenow="<?PHP echo get_percentage($client_data[0]['count'], $client_data[9]['count']) ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 20em;width: <?PHP echo get_percentage($client_data[0]['count'], $client_data[9]['count']) ?>%"><?PHP echo sprintf($lang['sttw0006'], round(($client_data[9]['count']/3600)), get_percentage($client_data[0]['count'], $client_data[9]['count'])); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0007']; ?></h2>
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0008']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
|
||||
<div class="panel panel-green">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0009']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <?PHP echo $lang['sttw0010']; ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="top10vs_donut3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut1',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_sum ?>},
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut2',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_sum - $top10_idle_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_sum - $others_idle_sum ?>},
|
||||
],
|
||||
colors: [
|
||||
'#5cb85c',
|
||||
'#80ce80'
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'top10vs_donut3',
|
||||
data: [
|
||||
{label: <?PHP echo '"',$lang['sttw0011'],'"'; ?>, value: <?PHP echo $top10_idle_sum ?>},
|
||||
{label: <?PHP echo '"'.sprintf($lang['sttw0012'].'"', $sumentries); ?>, value: <?PHP echo $others_idle_sum ?>},
|
||||
],
|
||||
colors: [
|
||||
'#f0ad4e',
|
||||
'#ffc675'
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
44
stats/update_graph.php
Normal file
44
stats/update_graph.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
session_start();
|
||||
|
||||
header("Content-Type: application/json; charset=UTF-8");
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
|
||||
$mysqlcon->query("SET @a:=0");
|
||||
|
||||
switch($_GET['serverusagechart']) {
|
||||
case 'week':
|
||||
$server_usage = $mysqlcon->query("SELECT `u1`.`timestamp`,`u1`.`clients`,`u1`.`channel` FROM (SELECT @a:=@a+1,mod(@a,2) AS `row_count`,`timestamp`,`clients`,`channel` FROM `$dbname`.`server_usage`) AS `u2`, `$dbname`.`server_usage` AS `u1` WHERE `u1`.`timestamp`=`u2`.`timestamp` AND `u2`.`row_count`='1' ORDER BY `u2`.`timestamp` DESC LIMIT 336")->fetchAll(PDO::FETCH_ASSOC);
|
||||
break;
|
||||
case 'month':
|
||||
$server_usage = $mysqlcon->query("SELECT `u1`.`timestamp`,`u1`.`clients`,`u1`.`channel` FROM (SELECT @a:=@a+1,mod(@a,4) AS `row_count`,`timestamp`,`clients`,`channel` FROM `$dbname`.`server_usage`) AS `u2`, `$dbname`.`server_usage` AS `u1` WHERE `u1`.`timestamp`=`u2`.`timestamp` AND `u2`.`row_count`='1' ORDER BY `u2`.`timestamp` DESC LIMIT 720")->fetchAll(PDO::FETCH_ASSOC);
|
||||
break;
|
||||
case '3month':
|
||||
$server_usage = $mysqlcon->query("SELECT `u1`.`timestamp`,`u1`.`clients`,`u1`.`channel` FROM (SELECT @a:=@a+1,mod(@a,16) AS `row_count`,`timestamp`,`clients`,`channel` FROM `$dbname`.`server_usage`) AS `u2`, `$dbname`.`server_usage` AS `u1` WHERE `u1`.`timestamp`=`u2`.`timestamp` AND `u2`.`row_count`='1' ORDER BY `u2`.`timestamp` DESC LIMIT 548")->fetchAll(PDO::FETCH_ASSOC);
|
||||
break;
|
||||
default:
|
||||
$server_usage = $mysqlcon->query("SELECT `timestamp`,`clients`,`channel` FROM `$dbname`.`server_usage` ORDER BY `timestamp` DESC LIMIT 96")->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
$chart_data = array();
|
||||
|
||||
foreach($server_usage as $chart_value) {
|
||||
$chart_data[] = array(
|
||||
"y" => date('Y-m-d H:i',$chart_value['timestamp']),
|
||||
"a" => $chart_value['clients'],
|
||||
"b" => $chart_value['channel']
|
||||
);
|
||||
}
|
||||
|
||||
echo json_encode($chart_data);
|
||||
?>
|
||||
415
stats/verify.php
415
stats/verify.php
@@ -1,204 +1,213 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/phpcommand.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(isset($_REQUEST['token']) && isset($_SESSION[$rspathhex.'temp_uuid'])) {
|
||||
if($_REQUEST['token'] == NULL) {
|
||||
$err_msg = $lang['stve0003']; $err_lvl = 1;
|
||||
} elseif($_REQUEST['token'] != $_SESSION[$rspathhex.'token']) {
|
||||
$err_msg = $lang['stve0004']; $err_lvl = 3;
|
||||
} elseif($_REQUEST['token'] == $_SESSION[$rspathhex.'token']) {
|
||||
$err_msg = $lang['stve0005']; $err_lvl = NULL;
|
||||
$_SESSION[$rspathhex.'serverport'] = $ts['voice'];
|
||||
$_SESSION[$rspathhex.'uuid_verified'] = $_SESSION[$rspathhex.'temp_uuid'];
|
||||
$_SESSION[$rspathhex.'tsuid'] = $_SESSION[$rspathhex.'temp_uuid'];
|
||||
$_SESSION[$rspathhex.'multiple'] = '';
|
||||
$_SESSION[$rspathhex.'connected'] = 1;
|
||||
$_SESSION[$rspathhex.'tscldbid'] = $_SESSION[$rspathhex.'temp_cldbid'];
|
||||
$_SESSION[$rspathhex.'tsname'] = $_SESSION[$rspathhex.'temp_name'];
|
||||
foreach ($adminuuid as $auuid) {
|
||||
if ($_SESSION[$rspathhex.'uuid_verified'] == $auuid) {
|
||||
$_SESSION[$rspathhex.'admin'] = TRUE;
|
||||
}
|
||||
}
|
||||
$dbdata = $mysqlcon->prepare("SELECT a.firstcon AS firstcon, b.total_connections AS total_connections FROM $dbname.user a INNER JOIN $dbname.stats_user b ON a.uuid = b.uuid WHERE b.uuid = :uuid");
|
||||
$dbdata->bindValue(':uuid', $_SESSION[$rspathhex.'tsuid'], PDO::PARAM_STR);
|
||||
$dbdata->execute();
|
||||
$clientinfo = $dbdata->fetchAll();
|
||||
if ($clientinfo[0]['total_connections'] != NULL) {
|
||||
$_SESSION[$rspathhex.'tsconnections'] = $clientinfo[0]['total_connections'];
|
||||
} else {
|
||||
$_SESSION[$rspathhex.'tsconnections'] = 0;
|
||||
}
|
||||
if ($clientinfo[0]['firstcon'] == 0) {
|
||||
$_SESSION[$rspathhex.'tscreated'] = "unkown";
|
||||
} else {
|
||||
$_SESSION[$rspathhex.'tscreated'] = date('d-m-Y', $clientinfo[0]['firstcon']);
|
||||
}
|
||||
$uuidasbase16 = '';
|
||||
for ($i = 0; $i < 20; $i++) {
|
||||
$char = ord(substr(base64_decode($_SESSION[$rspathhex.'tsuid']), $i, 1));
|
||||
$uuidasbase16 .= $convert[($char & 0xF0) >> 4];
|
||||
$uuidasbase16 .= $convert[$char & 0x0F];
|
||||
}
|
||||
if (is_file('../avatars/' . $uuidasbase16 . '.png')) {
|
||||
$_SESSION[$rspathhex.'tsavatar'] = $uuidasbase16 . '.png';
|
||||
} else {
|
||||
$_SESSION[$rspathhex.'tsavatar'] = "none";
|
||||
}
|
||||
$_SESSION[$rspathhex.'language'] = $language;
|
||||
} else {
|
||||
$err_msg = $lang['stve0006']; $err_lvl = 3;
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if(isset($_SESSION[$rspathhex.'multiple'])) {
|
||||
$multi_uuid = explode(',', substr($_SESSION[$rspathhex.'multiple'], 0, -1));
|
||||
}
|
||||
|
||||
if($_SESSION[$rspathhex.'multiple'] == NULL && count($multi_uuid) < 2 && ($registercid == NULL || $registercid == 0)) {
|
||||
$err_msg = $lang['verify0001']."<br><br>".$lang['verify0003'];
|
||||
$err_lvl = 3;
|
||||
} elseif($_SESSION[$rspathhex.'connected'] == 0 && $registercid != NULL && $registercid != 0) {
|
||||
$err_msg = $lang['verify0001']; $err_lvl = 1;
|
||||
$uuids = $mysqlcon->query("SELECT name,uuid FROM $dbname.user WHERE online='1' and cid='$registercid' ORDER BY name ASC")->fetchAll();
|
||||
foreach($uuids as $entry) {
|
||||
$multiple_uuid[$entry['uuid']] = $entry['name'];
|
||||
}
|
||||
} elseif(count($multi_uuid) == 1 && $_SESSION[$rspathhex.'connected'] == 1) {
|
||||
$err_msg = $lang['stve0005']; $err_lvl = 1;
|
||||
} elseif(count($multi_uuid) > 1) {
|
||||
$multi_uuid = explode(',', substr($_SESSION[$rspathhex.'multiple'], 0, -1));
|
||||
foreach ($multi_uuid as $entry) {
|
||||
list($key, $value) = explode('=>', $entry);
|
||||
$multiple_uuid[$key] = $value;
|
||||
}
|
||||
} else {
|
||||
$err_msg = $lang['stve0006']; $err_lvl = 3;
|
||||
}
|
||||
|
||||
if(isset($_POST['uuid']) && !isset($_SESSION[$rspathhex.'temp_uuid'])) {
|
||||
require_once('../libs/ts3_lib/TeamSpeak3.php');
|
||||
try {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".$ts['user'].":".$ts['pass']."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&blocking=0");
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
$ts3->selfUpdate(array('client_nickname' => "Ranksystem - Verification"));
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
$allclients = $ts3->clientList();
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
|
||||
foreach ($allclients as $client) {
|
||||
if($client['client_unique_identifier'] == $_POST['uuid']) {
|
||||
$cldbid = $client['client_database_id'];
|
||||
$nickname = htmlspecialchars($client['client_nickname'], ENT_QUOTES);
|
||||
$_SESSION[$rspathhex.'temp_uuid'] = htmlspecialchars($client['client_unique_identifier'], ENT_QUOTES);
|
||||
$_SESSION[$rspathhex.'temp_cldbid'] = $cldbid;
|
||||
$_SESSION[$rspathhex.'temp_name'] = $nickname;
|
||||
$pwd = substr(str_shuffle("abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789"),0,6);
|
||||
$_SESSION[$rspathhex.'token'] = $pwd;
|
||||
$tokenlink = '[URL]http'.(!empty($_SERVER['HTTPS'])?'s':'').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'?token='.$pwd.'[/URL]';
|
||||
try {
|
||||
$ts3->clientGetByUid($_SESSION[$rspathhex.'temp_uuid'])->message(sprintf($lang['stve0001'], $nickname, $tokenlink, $pwd));
|
||||
$err_msg = $lang['stve0002']; $err_lvl = 1;
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
}
|
||||
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl);
|
||||
if(count($multi_uuid) > 1 || ($_SESSION[$rspathhex.'connected'] == 0 && $registercid != NULL && $registercid != 0)) {
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
<div id="login-overlay" class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myModalLabel"><?PHP echo $lang['stve0007']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form name="verify" method="POST">
|
||||
<?PHP
|
||||
if($_SESSION[$rspathhex.'connected'] == 0) {
|
||||
$ts3link = '<a href="ts3server://';
|
||||
if (($ts['host']=='localhost' || $ts['host']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
$ts3link .= preg_replace('/www\./','',$_SERVER['HTTP_HOST']);
|
||||
} elseif ($ts['host']=='localhost' || $ts['host']=='127.0.0.1') {
|
||||
$ts3link .= $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
$ts3link .= $ts['host'];
|
||||
}
|
||||
$ts3link .= ':'.$ts['voice'].'?cid='.$registercid.'">';
|
||||
echo '<p>1. ',sprintf($lang['verify0002'], $ts3link, '</a>'),'</p>';
|
||||
}
|
||||
?>
|
||||
<p><?PHP echo ($_SESSION[$rspathhex.'connected'] == 0) ? '2. '.$lang['stve0008'] : '1. '.$lang['stve0008']; ?></p>
|
||||
<div class="form-group">
|
||||
<div class="input-group col-sm-12">
|
||||
<select class="selectpicker show-tick form-control" name="uuid" id="uuid" onchange="this.form.submit();">
|
||||
<?PHP
|
||||
if(count($multiple_uuid) == 0) {
|
||||
echo '<option disabled value="" selected>'.$lang['verify0004'].'</option>';
|
||||
} else {
|
||||
echo '<option disabled value=""';
|
||||
if(!isset($_SESSION[$rspathhex.'temp_uuid'])) echo ' selected','>',$lang['stve0009'];
|
||||
echo '</option>';
|
||||
}
|
||||
foreach($multiple_uuid as $uuid => $nickname) {
|
||||
echo '<option data-subtext="',$uuid,'" value="',$uuid,'"'; if(isset($_SESSION[$rspathhex.'temp_uuid']) && $_SESSION[$rspathhex.'temp_uuid'] == $uuid) echo ' selected'; echo '>',$nickname,'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<p><?PHP echo ($_SESSION[$rspathhex.'connected'] == 0) ? '3. '.$lang['stve0010'] : '2. '.$lang['stve0010']; ?></p>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><?PHP echo $lang['stve0011']; ?></span>
|
||||
<input type="text" class="form-control" name="token" placeholder="" maxlength="64">
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<p>
|
||||
<button type="submit" class="btn btn-success btn-block" name="verify"><?PHP echo $lang['stve0012']; ?></button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<?PHP
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/phpcommand.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if (isset($_POST['verify']) && $_POST['csrf_token'] != $_SESSION[$rspathhex.'csrf_token']) {
|
||||
echo $lang['errcsrf'];
|
||||
rem_session_ts3($rspathhex);
|
||||
exit;
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['token']) && isset($_SESSION[$rspathhex.'temp_uuid']) && $_POST['csrf_token'] == $_SESSION[$rspathhex.'csrf_token']) {
|
||||
if($_REQUEST['token'] == NULL) {
|
||||
$err_msg = $lang['stve0003']; $err_lvl = 1;
|
||||
} elseif($_REQUEST['token'] != $_SESSION[$rspathhex.'token']) {
|
||||
$err_msg = $lang['stve0004']; $err_lvl = 3;
|
||||
} elseif($_REQUEST['token'] == $_SESSION[$rspathhex.'token']) {
|
||||
$err_msg = $lang['stve0005']; $err_lvl = NULL;
|
||||
$_SESSION[$rspathhex.'serverport'] = $ts['voice'];
|
||||
$_SESSION[$rspathhex.'uuid_verified'] = $_SESSION[$rspathhex.'temp_uuid'];
|
||||
$_SESSION[$rspathhex.'tsuid'] = $_SESSION[$rspathhex.'temp_uuid'];
|
||||
$_SESSION[$rspathhex.'multiple'] = '';
|
||||
$_SESSION[$rspathhex.'connected'] = 1;
|
||||
$_SESSION[$rspathhex.'tscldbid'] = $_SESSION[$rspathhex.'temp_cldbid'];
|
||||
$_SESSION[$rspathhex.'tsname'] = $_SESSION[$rspathhex.'temp_name'];
|
||||
foreach ($adminuuid as $auuid) {
|
||||
if ($_SESSION[$rspathhex.'uuid_verified'] == $auuid) {
|
||||
$_SESSION[$rspathhex.'admin'] = TRUE;
|
||||
}
|
||||
}
|
||||
$dbdata = $mysqlcon->prepare("SELECT `a`.`firstcon` AS `firstcon`, `b`.`total_connections` AS `total_connections` FROM `$dbname`.`user` `a` INNER JOIN `$dbname`.`stats_user` `b` ON `a`.`uuid`=`b`.`uuid` WHERE `b`.`uuid` = :uuid");
|
||||
$dbdata->bindValue(':uuid', $_SESSION[$rspathhex.'tsuid'], PDO::PARAM_STR);
|
||||
$dbdata->execute();
|
||||
$clientinfo = $dbdata->fetchAll();
|
||||
if ($clientinfo[0]['total_connections'] != NULL) {
|
||||
$_SESSION[$rspathhex.'tsconnections'] = $clientinfo[0]['total_connections'];
|
||||
} else {
|
||||
$_SESSION[$rspathhex.'tsconnections'] = 0;
|
||||
}
|
||||
if ($clientinfo[0]['firstcon'] == 0) {
|
||||
$_SESSION[$rspathhex.'tscreated'] = "unkown";
|
||||
} else {
|
||||
$_SESSION[$rspathhex.'tscreated'] = date('d-m-Y', $clientinfo[0]['firstcon']);
|
||||
}
|
||||
$uuidasbase16 = '';
|
||||
for ($i = 0; $i < 20; $i++) {
|
||||
$char = ord(substr(base64_decode($_SESSION[$rspathhex.'tsuid']), $i, 1));
|
||||
$uuidasbase16 .= $convert[($char & 0xF0) >> 4];
|
||||
$uuidasbase16 .= $convert[$char & 0x0F];
|
||||
}
|
||||
if (is_file('../avatars/' . $uuidasbase16 . '.png')) {
|
||||
$_SESSION[$rspathhex.'tsavatar'] = $uuidasbase16 . '.png';
|
||||
} else {
|
||||
$_SESSION[$rspathhex.'tsavatar'] = "none";
|
||||
}
|
||||
$_SESSION[$rspathhex.'language'] = $language;
|
||||
} else {
|
||||
$err_msg = $lang['stve0006']; $err_lvl = 3;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_SESSION[$rspathhex.'multiple'])) {
|
||||
$multi_uuid = explode(',', substr($_SESSION[$rspathhex.'multiple'], 0, -1));
|
||||
}
|
||||
|
||||
if($_SESSION[$rspathhex.'multiple'] == NULL && count($multi_uuid) < 2 && ($registercid == NULL || $registercid == 0)) {
|
||||
$err_msg = $lang['verify0001']."<br><br>".$lang['verify0003'];
|
||||
$err_lvl = 3;
|
||||
} elseif($_SESSION[$rspathhex.'connected'] == 0 && $registercid != NULL && $registercid != 0) {
|
||||
$err_msg = $lang['verify0001']; $err_lvl = 1;
|
||||
$uuids = $mysqlcon->query("SELECT `name`,`uuid` FROM `$dbname`.`user` WHERE `online`='1' AND `cid`='$registercid' ORDER BY `name` ASC")->fetchAll();
|
||||
foreach($uuids as $entry) {
|
||||
$multiple_uuid[$entry['uuid']] = $entry['name'];
|
||||
}
|
||||
} elseif(count($multi_uuid) == 1 && $_SESSION[$rspathhex.'connected'] == 1) {
|
||||
$err_msg = $lang['stve0005']; $err_lvl = 1;
|
||||
} elseif(count($multi_uuid) > 1) {
|
||||
$multi_uuid = explode(',', substr($_SESSION[$rspathhex.'multiple'], 0, -1));
|
||||
foreach ($multi_uuid as $entry) {
|
||||
list($key, $value) = explode('=>', $entry);
|
||||
$multiple_uuid[$key] = $value;
|
||||
}
|
||||
} else {
|
||||
$err_msg = $lang['stve0006']; $err_lvl = 3;
|
||||
}
|
||||
|
||||
if(isset($_POST['uuid']) && !isset($_SESSION[$rspathhex.'temp_uuid']) && $_POST['csrf_token'] == $_SESSION[$rspathhex.'csrf_token']) {
|
||||
require_once('../libs/ts3_lib/TeamSpeak3.php');
|
||||
try {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&blocking=0");
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
$ts3->selfUpdate(array('client_nickname' => "Ranksystem - Verification"));
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
$allclients = $ts3->clientList();
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
|
||||
foreach ($allclients as $client) {
|
||||
if($client['client_unique_identifier'] == $_POST['uuid']) {
|
||||
$cldbid = $client['client_database_id'];
|
||||
$nickname = htmlspecialchars($client['client_nickname'], ENT_QUOTES);
|
||||
$_SESSION[$rspathhex.'temp_uuid'] = htmlspecialchars($client['client_unique_identifier'], ENT_QUOTES);
|
||||
$_SESSION[$rspathhex.'temp_cldbid'] = $cldbid;
|
||||
$_SESSION[$rspathhex.'temp_name'] = $nickname;
|
||||
$pwd = substr(str_shuffle("abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789"),0,6);
|
||||
$_SESSION[$rspathhex.'token'] = $pwd;
|
||||
$tokenlink = '[URL]http'.(!empty($_SERVER['HTTPS'])?'s':'').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'?token='.$pwd.'[/URL]';
|
||||
try {
|
||||
$ts3->clientGetByUid($_SESSION[$rspathhex.'temp_uuid'])->message(sprintf($lang['stve0001'], $nickname, $tokenlink, $pwd));
|
||||
$err_msg = $lang['stve0002']; $err_lvl = 1;
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
$_SESSION[$rspathhex.'csrf_token'] = bin2hex(openssl_random_pseudo_bytes(32));
|
||||
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl);
|
||||
if(count($multi_uuid) > 1 || ($_SESSION[$rspathhex.'connected'] == 0 && $registercid != NULL && $registercid != 0)) {
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
<div id="login-overlay" class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myModalLabel"><?PHP echo $lang['stve0007']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form name="verify" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $_SESSION[$rspathhex.'csrf_token']; ?>">
|
||||
<?PHP
|
||||
if($_SESSION[$rspathhex.'connected'] == 0) {
|
||||
$ts3link = '<a href="ts3server://';
|
||||
if (($ts['host']=='localhost' || $ts['host']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
$ts3link .= preg_replace('/www\./','',$_SERVER['HTTP_HOST']);
|
||||
} elseif ($ts['host']=='localhost' || $ts['host']=='127.0.0.1') {
|
||||
$ts3link .= $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
$ts3link .= $ts['host'];
|
||||
}
|
||||
$ts3link .= ':'.$ts['voice'].'?cid='.$registercid.'">';
|
||||
echo '<p>1. ',sprintf($lang['verify0002'], $ts3link, '</a>'),'</p>';
|
||||
}
|
||||
?>
|
||||
<p><?PHP echo ($_SESSION[$rspathhex.'connected'] == 0) ? '2. '.$lang['stve0008'] : '1. '.$lang['stve0008']; ?></p>
|
||||
<div class="form-group">
|
||||
<div class="input-group col-sm-12">
|
||||
<select class="selectpicker show-tick form-control" name="uuid" id="uuid" onchange="this.form.submit();">
|
||||
<?PHP
|
||||
if(count($multiple_uuid) == 0) {
|
||||
echo '<option disabled value="" selected>'.$lang['verify0004'].'</option>';
|
||||
} else {
|
||||
echo '<option disabled value=""';
|
||||
if(!isset($_SESSION[$rspathhex.'temp_uuid'])) echo ' selected','>',$lang['stve0009'];
|
||||
echo '</option>';
|
||||
}
|
||||
foreach($multiple_uuid as $uuid => $nickname) {
|
||||
echo '<option data-subtext="',$uuid,'" value="',$uuid,'"'; if(isset($_SESSION[$rspathhex.'temp_uuid']) && $_SESSION[$rspathhex.'temp_uuid'] == $uuid) echo ' selected'; echo '>',$nickname,'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<p><?PHP echo ($_SESSION[$rspathhex.'connected'] == 0) ? '3. '.$lang['stve0010'] : '2. '.$lang['stve0010']; ?></p>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><?PHP echo $lang['stve0011']; ?></span>
|
||||
<input type="text" class="form-control" name="token" placeholder="" maxlength="64">
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<p>
|
||||
<button type="submit" class="btn btn-success btn-block" name="verify"><?PHP echo $lang['stve0012']; ?></button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,87 +1,87 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if($language == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "fr") {
|
||||
require_once('../languages/nations_fr.php');
|
||||
} elseif($language == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "nl") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
} elseif($language == "pt") {
|
||||
require_once('../languages/nations_pt.php');
|
||||
} elseif($language == "pl") {
|
||||
require_once('../languages/nations_pl.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
|
||||
$sql_res = $mysqlcon->query("SELECT * FROM $dbname.stats_versions ORDER BY count DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['stna0005'],' - ',$lang['stna0002']; ?>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><?PHP echo $lang['stna0005']; ?></th>
|
||||
<th><?PHP echo $lang['stix0060'],' ',$lang['stna0004']; ?></th>
|
||||
<th><?PHP echo $lang['stna0007']; ?></th>
|
||||
</tr>
|
||||
<?PHP
|
||||
$count = 0;
|
||||
$sum_of_all = 0;
|
||||
foreach ($sql_res as $country => $value) {
|
||||
$sum_of_all = $sum_of_all + $value['count'];
|
||||
}
|
||||
foreach ($sql_res as $version => $value) {
|
||||
$count++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>',$count,'</td>
|
||||
<td>',$version,'</td>
|
||||
<td>',$value['count'],'</td>
|
||||
<td>',number_format(round(($value['count'] * 100 / $sum_of_all), 1), 1),' %</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
session_start();
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if($language == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
|
||||
$sql_res = $mysqlcon->query("SELECT * FROM `$dbname`.`stats_versions` ORDER BY `count` DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?PHP echo $lang['stna0005'],' - ',$lang['stna0002']; ?>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><?PHP echo $lang['stna0005']; ?></th>
|
||||
<th><?PHP echo $lang['stix0060'],' ',$lang['stna0004']; ?></th>
|
||||
<th><?PHP echo $lang['stna0007']; ?></th>
|
||||
</tr>
|
||||
<?PHP
|
||||
$count = 0;
|
||||
$sum_of_all = 0;
|
||||
foreach ($sql_res as $country => $value) {
|
||||
$sum_of_all = $sum_of_all + $value['count'];
|
||||
}
|
||||
foreach ($sql_res as $version => $value) {
|
||||
$count++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>',$count,'</td>
|
||||
<td>',$version,'</td>
|
||||
<td>',$value['count'],'</td>
|
||||
<td>',number_format(round(($value['count'] * 100 / $sum_of_all), 1), 1),' %</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user