release 1.2.4
This commit is contained in:
@@ -1,39 +1,48 @@
|
||||
<?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['tsuid']) || isset($_SESSION['uuid_verified'])) {
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
$uuid = $_SESSION['tsuid'];
|
||||
$dbdata = $mysqlcon->query("SELECT * FROM $dbname.user WHERE uuid='$uuid'");
|
||||
$dbdata_fetched = $dbdata->fetchAll();
|
||||
$cld_groups = explode(',', $dbdata_fetched[0]['cldgroup']);
|
||||
$multiple_uuid = explode(',', substr($_SESSION['multiple'], 0, -1));
|
||||
$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['uuid_verified'])) {
|
||||
|
||||
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 {
|
||||
$dbgroups = $mysqlcon->query("SELECT * FROM $dbname.groups");
|
||||
$servergroups = $dbgroups->fetchAll(PDO::FETCH_ASSOC);
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
123
stats/index.php
123
stats/index.php
@@ -26,7 +26,7 @@ if($language == "ar") {
|
||||
require_once('../languages/nations_pt.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION['tsuid'])) {
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
@@ -36,11 +36,9 @@ function human_readable_size($bytes,$lang) {
|
||||
return sprintf("%.2f", $bytes / pow(1024, $factor)) . ' ' . @$size[$factor];
|
||||
}
|
||||
|
||||
$sql = $mysqlcon->query("SELECT * FROM $dbname.stats_server");
|
||||
$sql_res = $sql->fetchAll();
|
||||
|
||||
$server_usage_sql = $mysqlcon->query("SELECT * FROM $dbname.server_usage ORDER BY(timestamp) DESC LIMIT 0, 47");
|
||||
$server_usage_sql_res = $server_usage_sql->fetchAll();
|
||||
if(($sql_res = $mysqlcon->query("SELECT * FROM $dbname.stats_server; SET @a:=0")->fetch()) === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
}
|
||||
|
||||
if(isset($_GET['usage'])) {
|
||||
if ($_GET["usage"] == 'week') {
|
||||
@@ -58,7 +56,7 @@ if(isset($_GET['usage'])) {
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, 3); ?>
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@@ -79,7 +77,7 @@ require_once('nav.php');
|
||||
<i class="fa fa-users fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?PHP echo $sql_res[0]['total_user'] ?></div>
|
||||
<div class="huge"><?PHP echo $sql_res['total_user'] ?></div>
|
||||
<div><?PHP echo $lang['stix0002']; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -101,7 +99,7 @@ require_once('nav.php');
|
||||
<i class="fa fa-clock-o fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?PHP echo sprintf($lang['days'], round(($sql_res[0]['total_online_time'] / 86400))); ?></div>
|
||||
<div class="huge"><?PHP echo sprintf($lang['days'], round(($sql_res['total_online_time'] / 86400))); ?></div>
|
||||
<div><?PHP echo $lang['stix0004']; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,8 +121,8 @@ require_once('nav.php');
|
||||
<i class="fa fa-clock-o fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?PHP echo sprintf($lang['days'], round(($sql_res[0]['total_online_month'] / 86400))) ?></div>
|
||||
<div><?PHP if($sql_res[0]['total_online_month'] == 0) { echo $lang['stix0048']; } else { echo $lang['stix0049']; } ?></div>
|
||||
<div class="huge"><?PHP echo sprintf($lang['days'], round(($sql_res['total_online_month'] / 86400))) ?></div>
|
||||
<div><?PHP if($sql_res['total_online_month'] == 0) { echo $lang['stix0048']; } else { echo $lang['stix0049']; } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -145,8 +143,8 @@ require_once('nav.php');
|
||||
<i class="fa fa-clock-o fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?PHP echo sprintf($lang['days'], round(($sql_res[0]['total_online_week'] / 86400))) ?></div>
|
||||
<div><?PHP if ($sql_res[0]['total_online_week'] == 0) { echo $lang['stix0048']; } else { echo $lang['stix0050']; } ?></div>
|
||||
<div class="huge"><?PHP echo sprintf($lang['days'], round(($sql_res['total_online_week'] / 86400))) ?></div>
|
||||
<div><?PHP if ($sql_res['total_online_week'] == 0) { echo $lang['stix0048']; } else { echo $lang['stix0050']; } ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -260,7 +258,7 @@ require_once('nav.php');
|
||||
<i class="fa fa-users fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?PHP echo $sql_res[0]['user_today']; ?></div>
|
||||
<div class="huge"><?PHP echo $sql_res['user_today']; ?></div>
|
||||
<div><?PHP echo $lang['stix0060'],' ',$lang['stix0055']; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -282,7 +280,7 @@ require_once('nav.php');
|
||||
<i class="fa fa-users fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?PHP echo $sql_res[0]['user_week']; ?></div>
|
||||
<div class="huge"><?PHP echo $sql_res['user_week']; ?></div>
|
||||
<div><?PHP echo $lang['stix0060'],' ',sprintf($lang['stix0056'], '7'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -304,7 +302,7 @@ require_once('nav.php');
|
||||
<i class="fa fa-users fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?PHP echo $sql_res[0]['user_month']; ?></div>
|
||||
<div class="huge"><?PHP echo $sql_res['user_month']; ?></div>
|
||||
<div><?PHP echo $lang['stix0060'],' ',sprintf($lang['stix0056'], '30'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -326,7 +324,7 @@ require_once('nav.php');
|
||||
<i class="fa fa-users fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?PHP echo $sql_res[0]['user_quarter']; ?></div>
|
||||
<div class="huge"><?PHP echo $sql_res['user_quarter']; ?></div>
|
||||
<div><?PHP echo $lang['stix0060'],' ',sprintf($lang['stix0056'], '90'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -349,35 +347,35 @@ require_once('nav.php');
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0023']; ?></td>
|
||||
<td><?PHP if($sql_res[0]['server_status'] == 1 || $sql_res[0]['server_status'] == 3) { echo '<span class="text-success">'.$lang['stix0024'].'</span>'; } else { echo '<span class="text-danger">'.$lang['stix0025'].'</span>'; } ?></td>
|
||||
<td><?PHP if($sql_res['server_status'] == 1 || $sql_res['server_status'] == 3) { echo '<span class="text-success">'.$lang['stix0024'].'</span>'; } else { echo '<span class="text-danger">'.$lang['stix0025'].'</span>'; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0026']; ?></td>
|
||||
<td><?PHP if($sql_res[0]['server_status'] == 0) { echo '0'; } else { echo $sql_res[0]['server_used_slots'] , ' / ' ,($sql_res[0]['server_used_slots'] + $sql_res[0]['server_free_slots']); } ?></td>
|
||||
<td><?PHP if($sql_res['server_status'] == 0) { echo '0'; } else { echo $sql_res['server_used_slots'] , ' / ' ,($sql_res['server_used_slots'] + $sql_res['server_free_slots']); } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0027']; ?></td>
|
||||
<td><?PHP echo $sql_res[0]['server_channel_amount']; ?></td>
|
||||
<td><?PHP echo $sql_res['server_channel_amount']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0028']; ?></td>
|
||||
<td><?PHP if($sql_res[0]['server_status'] == 0) { echo '-';} else { echo $sql_res[0]['server_ping'] . ' ' . $lang['time_ms'];} ?></td>
|
||||
<td><?PHP if($sql_res['server_status'] == 0) { echo '-';} else { echo $sql_res['server_ping'] . ' ' . $lang['time_ms'];} ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0029']; ?></td>
|
||||
<td><?PHP echo human_readable_size($sql_res[0]['server_bytes_down'],$lang); ?></td>
|
||||
<td><?PHP echo human_readable_size($sql_res['server_bytes_down'],$lang); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0030']; ?></td>
|
||||
<td><?PHP echo human_readable_size($sql_res[0]['server_bytes_up'],$lang); ?></td>
|
||||
<td><?PHP echo human_readable_size($sql_res['server_bytes_up'],$lang); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0031']; ?></td>
|
||||
<td><?PHP $serveruptime = new DateTime("@".$sql_res[0]['server_uptime']); if ($sql_res[0]['server_status'] == 0) { echo '- (<i>'.$lang['stix0032'].' '.(new DateTime("@0"))->diff($serveruptime)->format($timeformat).')</i>'; } else { echo $lang['stix0033']; } ?></td>
|
||||
<td><?PHP $serveruptime = new DateTime("@".$sql_res['server_uptime']); if ($sql_res['server_status'] == 0) { echo '- (<i>'.$lang['stix0032'].' '.(new DateTime("@0"))->diff($serveruptime)->format($timeformat).')</i>'; } else { echo $lang['stix0033']; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0034']; ?></td>
|
||||
<td><?PHP if($sql_res[0]['server_status'] == 0) { echo '-'; } else { echo $sql_res[0]['server_packet_loss'] * 100 ,' %';} ?></td>
|
||||
<td><?PHP if($sql_res['server_status'] == 0) { echo '-'; } else { echo $sql_res['server_packet_loss'] * 100 ,' %';} ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -392,8 +390,8 @@ require_once('nav.php');
|
||||
<td><?PHP echo $lang['stix0036']; ?></td>
|
||||
<td><?PHP if(file_exists("../tsicons/servericon.png")) {
|
||||
$img_content = file_get_contents("../tsicons/servericon.png");
|
||||
echo $sql_res[0]['server_name'] .'<div class="pull-right"><img src="data:image;',mime_content_type("../tsicons/servericon.png"),';base64,'.base64_encode($img_content).'" alt="servericon"></div>';
|
||||
} else { echo $sql_res[0]['server_name']; } ?></td>
|
||||
echo $sql_res['server_name'] .'<div class="pull-right"><img src="data:image;',mime_content_type("../tsicons/servericon.png"),';base64,'.base64_encode($img_content).'" alt="servericon"></div>';
|
||||
} else { echo $sql_res['server_name']; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0037']; ?></td>
|
||||
@@ -418,27 +416,27 @@ require_once('nav.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0038']; ?></td>
|
||||
<td><?PHP if($sql_res[0]['server_pass'] == '0') {echo $lang['stix0039']; } else { echo $lang['stix0040']; } ?></td>
|
||||
<td><?PHP if($sql_res['server_pass'] == '0') {echo $lang['stix0039']; } else { echo $lang['stix0040']; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0041']; ?></td>
|
||||
<td><?PHP echo $sql_res[0]['server_id'] ?></td>
|
||||
<td><?PHP echo $sql_res['server_id'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0042']; ?></td>
|
||||
<td><?PHP echo $sql_res[0]['server_platform'] ?></td>
|
||||
<td><?PHP echo $sql_res['server_platform'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0043']; ?></td>
|
||||
<td><?PHP echo substr($sql_res[0]['server_version'], 0, strpos($sql_res[0]['server_version'], ' ')); ?></td>
|
||||
<td><?PHP echo substr($sql_res['server_version'], 0, strpos($sql_res['server_version'], ' ')); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0044']; ?></td>
|
||||
<td><?PHP if($sql_res[0]['server_creation_date']==0) { echo $lang['stix0051']; } else { echo date('d/m/Y', $sql_res[0]['server_creation_date']);} ?></td>
|
||||
<td><?PHP if($sql_res['server_creation_date']==0) { echo $lang['stix0051']; } else { echo date('d/m/Y', $sql_res['server_creation_date']);} ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0045']; ?></td>
|
||||
<td><?PHP if ($sql_res[0]['server_weblist'] == 1) { echo '<a href="https://www.planetteamspeak.com/serverlist/result/server/ip/'; if($ts['host']=='localhost' || $ts['host']=='127.0.0.1') { echo $_SERVER['HTTP_HOST'];} else { echo $ts['host']; } echo ':'.$ts['voice'] .'" target="_blank">'.$lang['stix0046'].'</a>'; } else { echo $lang['stix0047']; } ?></td>
|
||||
<td><?PHP if ($sql_res['server_weblist'] == 1) { echo '<a href="https://www.planetteamspeak.com/serverlist/result/server/ip/'; if($ts['host']=='localhost' || $ts['host']=='127.0.0.1') { echo $_SERVER['HTTP_HOST'];} else { echo $ts['host']; } echo ':'.$ts['voice'] .'" target="_blank">'.$lang['stix0046'].'</a>'; } else { echo $lang['stix0047']; } ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -459,7 +457,7 @@ require_once('nav.php');
|
||||
var hoursLabel = document.getElementById("hours");
|
||||
var minutesLabel = document.getElementById("minutes");
|
||||
var secondsLabel = document.getElementById("seconds");
|
||||
var totalSeconds = <?PHP echo $sql_res[0]['server_uptime'] ?>;
|
||||
var totalSeconds = <?PHP echo $sql_res['server_uptime'] ?>;
|
||||
setInterval(setTime, 1000);
|
||||
function setTime()
|
||||
{
|
||||
@@ -486,19 +484,19 @@ require_once('nav.php');
|
||||
Morris.Donut({
|
||||
element: 'time-gap-donut',
|
||||
data: [
|
||||
{label: "<?PHP echo $lang['stix0053']?>", value: <?PHP echo round(($sql_res[0]['total_active_time'] / 86400)); ?>},
|
||||
{label: "<?PHP echo $lang['stix0054']?>", value: <?PHP echo round(($sql_res[0]['total_inactive_time'] / 86400)); ?>},
|
||||
{label: "<?PHP echo $lang['stix0053']?>", value: <?PHP echo round(($sql_res['total_active_time'] / 86400)); ?>},
|
||||
{label: "<?PHP echo $lang['stix0054']?>", value: <?PHP echo round(($sql_res['total_inactive_time'] / 86400)); ?>},
|
||||
]
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'client-version-donut',
|
||||
data: [
|
||||
{label: "<?PHP echo $sql_res[0]['version_name_1'] ?>", value: <?PHP echo $sql_res[0]['version_1'] ?>},
|
||||
{label: "<?PHP echo $sql_res[0]['version_name_2'] ?>", value: <?PHP echo $sql_res[0]['version_2'] ?>},
|
||||
{label: "<?PHP echo $sql_res[0]['version_name_3'] ?>", value: <?PHP echo $sql_res[0]['version_3'] ?>},
|
||||
{label: "<?PHP echo $sql_res[0]['version_name_4'] ?>", value: <?PHP echo $sql_res[0]['version_4'] ?>},
|
||||
{label: "<?PHP echo $sql_res[0]['version_name_5'] ?>", value: <?PHP echo $sql_res[0]['version_5'] ?>},
|
||||
{label: "<?PHP echo $lang['stix0052']?>", value: <?PHP echo $sql_res[0]['version_other'] ?>},
|
||||
{label: "<?PHP echo $sql_res['version_name_1'] ?>", value: <?PHP echo $sql_res['version_1'] ?>},
|
||||
{label: "<?PHP echo $sql_res['version_name_2'] ?>", value: <?PHP echo $sql_res['version_2'] ?>},
|
||||
{label: "<?PHP echo $sql_res['version_name_3'] ?>", value: <?PHP echo $sql_res['version_3'] ?>},
|
||||
{label: "<?PHP echo $sql_res['version_name_4'] ?>", value: <?PHP echo $sql_res['version_4'] ?>},
|
||||
{label: "<?PHP echo $sql_res['version_name_5'] ?>", value: <?PHP echo $sql_res['version_5'] ?>},
|
||||
{label: "<?PHP echo $lang['stix0052']?>", value: <?PHP echo $sql_res['version_other'] ?>},
|
||||
],
|
||||
colors: [
|
||||
'#5cb85c',
|
||||
@@ -511,12 +509,12 @@ require_once('nav.php');
|
||||
});
|
||||
Morris.Donut({
|
||||
element: 'user-descent-donut', data: [
|
||||
{label: "<?PHP if (isset($nation[$sql_res[0]['country_nation_name_1']])) { echo $nation[$sql_res[0]['country_nation_name_1']]; } else { echo "unkown";} ?>", value: <?PHP if ( isset($sql_res[0]['country_nation_1'])) { echo $sql_res[0]['country_nation_1']; } else { echo "0";} ?>},
|
||||
{label: "<?PHP if (isset($nation[$sql_res[0]['country_nation_name_2']])) { echo $nation[$sql_res[0]['country_nation_name_2']]; } else { echo "unkown";} ?>", value: <?PHP if ( isset($sql_res[0]['country_nation_2'])) { echo $sql_res[0]['country_nation_2']; } else { echo "0";} ?>},
|
||||
{label: "<?PHP if (isset($nation[$sql_res[0]['country_nation_name_3']])) { echo $nation[$sql_res[0]['country_nation_name_3']]; } else { echo "unkown";} ?>", value: <?PHP if ( isset($sql_res[0]['country_nation_3'])) { echo $sql_res[0]['country_nation_3']; } else { echo "0";} ?>},
|
||||
{label: "<?PHP if (isset($nation[$sql_res[0]['country_nation_name_4']])) { echo $nation[$sql_res[0]['country_nation_name_4']]; } else { echo "unkown";} ?>", value: <?PHP if ( isset($sql_res[0]['country_nation_4'])) { echo $sql_res[0]['country_nation_4']; } else { echo "0";} ?>},
|
||||
{label: "<?PHP if (isset($nation[$sql_res[0]['country_nation_name_5']])) { echo $nation[$sql_res[0]['country_nation_name_5']]; } else { echo "unkown";} ?>", value: <?PHP if ( isset($sql_res[0]['country_nation_5'])) { echo $sql_res[0]['country_nation_5']; } else { echo "0";} ?>},
|
||||
{label: "<?PHP echo $lang['stix0052']?>", value: <?PHP echo $sql_res[0]['country_nation_other'] ?>}
|
||||
{label: "<?PHP if (isset($nation[$sql_res['country_nation_name_1']])) { echo $nation[$sql_res['country_nation_name_1']]; } else { echo "unkown";} ?>", value: <?PHP if ( isset($sql_res['country_nation_1'])) { echo $sql_res['country_nation_1']; } else { echo "0";} ?>},
|
||||
{label: "<?PHP if (isset($nation[$sql_res['country_nation_name_2']])) { echo $nation[$sql_res['country_nation_name_2']]; } else { echo "unkown";} ?>", value: <?PHP if ( isset($sql_res['country_nation_2'])) { echo $sql_res['country_nation_2']; } else { echo "0";} ?>},
|
||||
{label: "<?PHP if (isset($nation[$sql_res['country_nation_name_3']])) { echo $nation[$sql_res['country_nation_name_3']]; } else { echo "unkown";} ?>", value: <?PHP if ( isset($sql_res['country_nation_3'])) { echo $sql_res['country_nation_3']; } else { echo "0";} ?>},
|
||||
{label: "<?PHP if (isset($nation[$sql_res['country_nation_name_4']])) { echo $nation[$sql_res['country_nation_name_4']]; } else { echo "unkown";} ?>", value: <?PHP if ( isset($sql_res['country_nation_4'])) { echo $sql_res['country_nation_4']; } else { echo "0";} ?>},
|
||||
{label: "<?PHP if (isset($nation[$sql_res['country_nation_name_5']])) { echo $nation[$sql_res['country_nation_name_5']]; } else { echo "unkown";} ?>", value: <?PHP if ( isset($sql_res['country_nation_5'])) { echo $sql_res['country_nation_5']; } else { echo "0";} ?>},
|
||||
{label: "<?PHP echo $lang['stix0052']?>", value: <?PHP echo $sql_res['country_nation_other'] ?>}
|
||||
],
|
||||
colors: [
|
||||
'#f0ad4e',
|
||||
@@ -530,12 +528,12 @@ require_once('nav.php');
|
||||
Morris.Donut({
|
||||
element: 'user-platform-donut',
|
||||
data: [
|
||||
{label: "Windows", value: <?PHP echo $sql_res[0]['platform_1'] ?>},
|
||||
{label: "Linux", value: <?PHP echo $sql_res[0]['platform_3'] ?>},
|
||||
{label: "Android", value: <?PHP echo $sql_res[0]['platform_4'] ?>},
|
||||
{label: "iOS", value: <?PHP echo $sql_res[0]['platform_2'] ?>},
|
||||
{label: "OS X", value: <?PHP echo $sql_res[0]['platform_5'] ?>},
|
||||
{label: "<?PHP echo $lang['stix0052']?>", value: <?PHP echo $sql_res[0]['platform_other'] ?>},
|
||||
{label: "Windows", value: <?PHP echo $sql_res['platform_1'] ?>},
|
||||
{label: "Linux", value: <?PHP echo $sql_res['platform_3'] ?>},
|
||||
{label: "Android", value: <?PHP echo $sql_res['platform_4'] ?>},
|
||||
{label: "iOS", value: <?PHP echo $sql_res['platform_2'] ?>},
|
||||
{label: "OS X", value: <?PHP echo $sql_res['platform_5'] ?>},
|
||||
{label: "<?PHP echo $lang['stix0052']?>", value: <?PHP echo $sql_res['platform_other'] ?>},
|
||||
],
|
||||
colors: [
|
||||
'#d9534f',
|
||||
@@ -551,24 +549,19 @@ require_once('nav.php');
|
||||
data: [
|
||||
<?PHP
|
||||
$chart_data = '';
|
||||
$trash_string = $mysqlcon->query("SET @a:=0");
|
||||
if($usage == 'week') {
|
||||
$server_usage = $mysqlcon->query("SELECT u1.timestamp, u1.clients, u1.channel FROM (SELECT @a:=@a+1,mod(@a,2) AS test,timestamp,clients,channel FROM $dbname.server_usage) AS u2, $dbname.server_usage AS u1 WHERE u1.timestamp=u2.timestamp AND u2.test='1' ORDER BY u2.timestamp DESC LIMIT 336");
|
||||
$server_usage = $mysqlcon->query("SELECT u1.timestamp, u1.clients, u1.channel FROM (SELECT @a:=@a+1,mod(@a,2) AS test,timestamp,clients,channel FROM $dbname.server_usage) AS u2, $dbname.server_usage AS u1 WHERE u1.timestamp=u2.timestamp AND u2.test='1' ORDER BY u2.timestamp DESC LIMIT 336")->fetchAll(PDO::FETCH_ASSOC);
|
||||
} elseif ($usage == 'month') {
|
||||
$server_usage = $mysqlcon->query("SELECT u1.timestamp, u1.clients, u1.channel FROM (SELECT @a:=@a+1,mod(@a,4) AS test,timestamp,clients,channel FROM $dbname.server_usage) AS u2, $dbname.server_usage AS u1 WHERE u1.timestamp=u2.timestamp AND u2.test='1' ORDER BY u2.timestamp DESC LIMIT 720");
|
||||
$server_usage = $mysqlcon->query("SELECT u1.timestamp, u1.clients, u1.channel FROM (SELECT @a:=@a+1,mod(@a,4) AS test,timestamp,clients,channel FROM $dbname.server_usage) AS u2, $dbname.server_usage AS u1 WHERE u1.timestamp=u2.timestamp AND u2.test='1' ORDER BY u2.timestamp DESC LIMIT 720")->fetchAll(PDO::FETCH_ASSOC);
|
||||
} elseif ($usage == 'year') {
|
||||
$server_usage = $mysqlcon->query("SELECT u1.timestamp, u1.clients, u1.channel FROM (SELECT @a:=@a+1,mod(@a,64) AS test,timestamp,clients,channel FROM $dbname.server_usage) AS u2, $dbname.server_usage AS u1 WHERE u1.timestamp=u2.timestamp AND u2.test='1' ORDER BY u2.timestamp DESC LIMIT 548");
|
||||
$server_usage = $mysqlcon->query("SELECT u1.timestamp, u1.clients, u1.channel FROM (SELECT @a:=@a+1,mod(@a,64) AS test,timestamp,clients,channel FROM $dbname.server_usage) AS u2, $dbname.server_usage AS u1 WHERE u1.timestamp=u2.timestamp AND u2.test='1' ORDER BY u2.timestamp DESC LIMIT 548")->fetchAll(PDO::FETCH_ASSOC);
|
||||
} else {
|
||||
$server_usage = $mysqlcon->query("SELECT timestamp, clients, channel FROM $dbname.server_usage ORDER BY timestamp DESC LIMIT 96");
|
||||
$server_usage = $mysqlcon->query("SELECT timestamp, clients, channel FROM $dbname.server_usage ORDER BY timestamp DESC LIMIT 96")->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
$server_usage = $server_usage->fetchAll(PDO::FETCH_ASSOC);
|
||||
foreach($server_usage as $chart_value) {
|
||||
$chart_time = date('Y-m-d H:i',$chart_value['timestamp']);
|
||||
$channel = $chart_value['channel'] - $chart_value['clients'];
|
||||
$chart_data = $chart_data . '{ y: \''.$chart_time.'\', a: '.$chart_value['clients'].', b: '.$channel.', c: '. $chart_value['channel'].' }, ';
|
||||
$chart_data .= '{ y: \''.date('Y-m-d H:i',$chart_value['timestamp']).'\', a: '.$chart_value['clients'].', b: '.($chart_value['channel'] - $chart_value['clients']).', c: '. $chart_value['channel'].' }, ';
|
||||
}
|
||||
$chart_data = substr($chart_data, 0, -2);
|
||||
echo $chart_data;
|
||||
echo substr($chart_data, 0, -2);
|
||||
?>
|
||||
],
|
||||
xkey: 'y',
|
||||
|
||||
@@ -8,13 +8,13 @@ require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION['tsuid'])) {
|
||||
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, 3); ?>
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@@ -33,7 +33,7 @@ require_once('nav.php');
|
||||
<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-2017 <a href="//ts-n.net/" target="_blank">TeamSpeak Sponsoring TS-N.NET</a></p>
|
||||
<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>
|
||||
@@ -42,13 +42,14 @@ require_once('nav.php');
|
||||
<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>
|
||||
<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>
|
||||
@@ -70,6 +71,8 @@ require_once('nav.php');
|
||||
<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>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
$starttime = microtime(true);
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
@@ -25,7 +24,7 @@ function getclientip() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isset($_SESSION['tsuid'])) {
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
@@ -102,10 +101,12 @@ 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 = '';
|
||||
$dbdata_full = $mysqlcon->query("SELECT COUNT(*) FROM $dbname.user");
|
||||
$sumentries = $mysqlcon->query("SELECT COUNT(*) FROM $dbname.user")->fetch(PDO::FETCH_NUM);
|
||||
}
|
||||
|
||||
if(!isset($_GET["seite"])) {
|
||||
$seite = 1;
|
||||
} else {
|
||||
@@ -126,14 +127,14 @@ if (isset($_GET['order'])) {
|
||||
}
|
||||
$keyorder = ($keyorder == 'desc' ? 'desc' : 'asc');
|
||||
if (isset($_GET['admin'])) {
|
||||
if($_SESSION['username'] == $webuser && $_SESSION['password'] == $webpass && $_SESSION['clientip'] == getclientip()) {
|
||||
if($_SESSION[$rspathhex.'username'] == $webuser && $_SESSION[$rspathhex.'password'] == $webpass && $_SESSION[$rspathhex.'clientip'] == getclientip()) {
|
||||
$adminlogin = 1;
|
||||
}
|
||||
}
|
||||
require_once('nav.php');
|
||||
|
||||
$countentries = 0;
|
||||
$sumentries = $dbdata_full->fetch(PDO::FETCH_NUM);
|
||||
|
||||
|
||||
if(!isset($_GET["user"])) {
|
||||
$user_pro_seite = 25;
|
||||
@@ -202,42 +203,14 @@ function pagination($keysort,$keyorder,$user_pro_seite,$seiten_anzahl_gerundet,$
|
||||
</nav>
|
||||
<?PHP
|
||||
}
|
||||
$uuids = $dbdata->fetchAll();
|
||||
$sqlhis = $dbdata->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE);
|
||||
|
||||
foreach($uuids as $uuid) {
|
||||
$sqlhis[$uuid['uuid']] = array(
|
||||
"cldbid" => $uuid['cldbid'],
|
||||
"rank" => $uuid['rank'],
|
||||
"count" => $uuid['count'],
|
||||
"name" => $uuid['name'],
|
||||
"idle" => $uuid['idle'],
|
||||
"cldgroup" => $uuid['cldgroup'],
|
||||
"online" => $uuid['online'],
|
||||
"nextup" => $uuid['nextup'],
|
||||
"lastseen" => $uuid['lastseen'],
|
||||
"ip" => $uuid['ip'],
|
||||
"grpid" => $uuid['grpid'],
|
||||
"except" => $uuid['except'],
|
||||
"grpsince" => $uuid['grpsince']
|
||||
);
|
||||
$uidarr[] = $uuid['uuid'];
|
||||
$countentries = $countentries + 1;
|
||||
}
|
||||
if(!$dbdata = $mysqlcon->query("SELECT * FROM $dbname.job_check WHERE job_name='calc_user_lastscan'")) {
|
||||
$err_msg = '<span class="wncolor">'.$mysqlcon->errorCode().'</span><br>';
|
||||
}
|
||||
|
||||
$lastscan = $dbdata->fetchAll();
|
||||
$scantime = $lastscan[0]['timestamp'];
|
||||
$livetime = time() - $scantime;
|
||||
$dbgroups = $mysqlcon->query("SELECT * FROM $dbname.groups");
|
||||
$servergroups = $dbgroups->fetchAll(PDO::FETCH_ASSOC);
|
||||
foreach($servergroups as $servergroup) {
|
||||
$sqlhisgroup[$servergroup['sgid']] = $servergroup['sgidname'];
|
||||
if(file_exists('../tsicons/'.$servergroup['sgid'].'.png')) {
|
||||
$sqlhisgroup_file[$servergroup['sgid']] = true;
|
||||
$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_file[$servergroup['sgid']] = false;
|
||||
$sqlhisgroup[$sgid]['iconfile'] = 0;
|
||||
}
|
||||
}
|
||||
if($adminlogin == 1) {
|
||||
@@ -259,12 +232,12 @@ if($adminlogin == 1) {
|
||||
}
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, 3); ?>
|
||||
<?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);
|
||||
pagination($keysort,$keyorder2,$user_pro_seite,$seiten_anzahl_gerundet,$seite,$getstring);
|
||||
}
|
||||
?>
|
||||
<table class="table table-striped">
|
||||
@@ -295,134 +268,110 @@ if($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)
|
||||
echo '<th class="text-center"><a href="?sort=nextsgrp&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listnxsg'] , '</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);
|
||||
$countgrp = count($grouptime);
|
||||
if ($countentries > 0) {
|
||||
$exceptgrp=0;
|
||||
$exceptcld=0;
|
||||
$countallsum=0;
|
||||
foreach ($uidarr as $uid) {
|
||||
$cldgroup = $sqlhis[$uid]['cldgroup'];
|
||||
$lastseen = $sqlhis[$uid]['lastseen'];
|
||||
$count = $sqlhis[$uid]['count'];
|
||||
$idle = $sqlhis[$uid]['idle'];
|
||||
$status = $sqlhis[$uid]['online'];
|
||||
$nextup = $sqlhis[$uid]['nextup'];
|
||||
$except = $sqlhis[$uid]['except'];
|
||||
$sgroups = explode(",", $cldgroup);
|
||||
$active = $count - $idle;
|
||||
if (count($sqlhis) > 0) {
|
||||
foreach ($sqlhis as $uuid => $value) {
|
||||
if ($substridle == 1) {
|
||||
$activetime = $count - $idle;
|
||||
$activetime = $value['count'] - $value['idle'];
|
||||
} else {
|
||||
$activetime = $count;
|
||||
$activetime = $value['count'];
|
||||
}
|
||||
$grpcount=0;
|
||||
$countallsum++;
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
$grpcount++;
|
||||
if ($activetime < $time || $grpcount == $countgrp && $nextup <= 0 && $showhighest == 1 || $grpcount == $countgrp && $nextup == 0 && $adminlogin == 1) {
|
||||
if($nextup == 0 && $grpcount == $countgrp) {
|
||||
$neededtime = 0;
|
||||
} elseif ($status == 1) {
|
||||
$neededtime = $time - $activetime - $livetime;
|
||||
} else {
|
||||
$neededtime = $time - $activetime;
|
||||
}
|
||||
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($except == 2 || $except == 3) {
|
||||
if($value['except'] == 2 || $value['except'] == 3) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , $sqlhis[$uid]['rank'] , '</td>';
|
||||
echo '<td class="text-center">' , $value['rank'] , '</td>';
|
||||
}
|
||||
}
|
||||
if ($adminlogin == 1) {
|
||||
echo '<td class="text-center"><a href="http://www.tsviewer.com/index.php?page=search&action=ausgabe_user&nickname=' , $sqlhis[$uid]['name'] , '" target="_blank">' , $sqlhis[$uid]['name'] , '</a></td>';
|
||||
echo '<td class="text-center"><a href="//tsviewer.com/index.php?page=search&action=ausgabe_user&nickname=' , $value['name'] , '" target="_blank">' , $value['name'] , '</a></td>';
|
||||
} elseif ($showcolcld == 1) {
|
||||
echo '<td class="text-center">' , $sqlhis[$uid]['name'] , '</td>';
|
||||
echo '<td class="text-center">' , $value['name'] , '</td>';
|
||||
}
|
||||
if ($adminlogin == 1) {
|
||||
echo '<td class="text-center"><a href="http://ts3index.com/?page=searchclient&uid=' , $uid , '" target="_blank">' , $uid , '</a></td>';
|
||||
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">' , $uid , '</td>';
|
||||
echo '<td class="text-center">' , $uuid , '</td>';
|
||||
}
|
||||
if ($showcoldbid == 1 || $adminlogin == 1)
|
||||
echo '<td class="text-center">' , $sqlhis[$uid]['cldbid'] , '</td>';
|
||||
echo '<td class="text-center">' , $value['cldbid'] , '</td>';
|
||||
if ($adminlogin == 1)
|
||||
echo '<td class="center"><a href="http://myip.ms/info/whois/' , inet_ntop($sqlhis[$uid]['ip']) , '" target="_blank">' , inet_ntop($sqlhis[$uid]['ip']) , '</a></td>';
|
||||
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 ($status == 1) {
|
||||
echo '<td class="text-center text-success">' , date('Y-m-d H:i:s',$lastseen), '</td>';
|
||||
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',$lastseen), '</td>';
|
||||
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("@$count");
|
||||
$timecount = $dtF->diff($dtT)->format($timeformat);
|
||||
echo $timecount;
|
||||
$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("@$idle");
|
||||
$timecount = $dtF->diff($dtT)->format($timeformat);
|
||||
echo $timecount;
|
||||
$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("@$active");
|
||||
$timecount = $dtF->diff($dtT)->format($timeformat);
|
||||
echo $timecount;
|
||||
$dtT = new DateTime("@".($value['count']-$value['idle']));
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
}
|
||||
if ($showcolas == 1 || $adminlogin == 1) {
|
||||
$usergroupid = $sqlhis[$uid]['grpid'];
|
||||
if ($sqlhis[$uid]['grpid'] == 0) {
|
||||
if ($value['grpid'] == 0) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} elseif ($sqlhisgroup_file[$sqlhis[$uid]['grpid']]===true) {
|
||||
echo '<td class="text-center"><img src="../tsicons/'.$sqlhis[$uid]['grpid'].'.png" alt="groupicon"> ' , $sqlhisgroup[$usergroupid] , '</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[$usergroupid] , '</td>';
|
||||
echo '<td class="text-center">' , $sqlhisgroup[$value['grpid']]['sgidname'] , '</td>';
|
||||
}
|
||||
}
|
||||
if ($showgrpsince == 1 || $adminlogin == 1) {
|
||||
if ($sqlhis[$uid]['grpsince'] == 0) {
|
||||
if ($value['grpsince'] == 0) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , date('Y-m-d H:i:s',$sqlhis[$uid]['grpsince']), '</td>';
|
||||
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">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@$neededtime");
|
||||
$timecount = $dtF->diff($dtT)->format($timeformat);
|
||||
if (($except == 0 || $except == 1) && $neededtime > 0) {
|
||||
echo $timecount , '</td>';
|
||||
} elseif ($except == 0 || $except == 1) {
|
||||
$timecount = 0;
|
||||
echo $timecount , '</td>';
|
||||
} elseif ($except == 2 || $except == 3) {
|
||||
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 == $countgrp && $nextup == 0 && $showhighest == 1 || $grpcount == $countgrp && $nextup == 0 && $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 ($except == 2 || $except == 3) {
|
||||
} elseif ($value['except'] == 2 || $value['except'] == 3) {
|
||||
echo '<td class="text-center"><em>',$lang['listexcept'],'</em></td>';
|
||||
} elseif (isset($sqlhisgroup_file[$groupid]) && $sqlhisgroup_file[$groupid]===true) {
|
||||
echo '<td class="text-center"><img src="../tsicons/'.$groupid.'.png" alt="groupicon"> ' , $sqlhisgroup[$groupid] , '</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] , '</td>';
|
||||
echo '<td class="text-center">' , $sqlhisgroup[$groupid]['sgidname'] , '</td>';
|
||||
} else {
|
||||
echo '<td class="text-center"></td>';
|
||||
}
|
||||
|
||||
@@ -1,49 +1,42 @@
|
||||
<?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['tsuid']) || isset($_SESSION['uuid_verified'])) {
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
$multiple_uuid = explode(',', substr($_SESSION['multiple'], 0, -1));
|
||||
$multiple_uuid = explode(',', substr($_SESSION[$rspathhex.'multiple'], 0, -1));
|
||||
|
||||
if(count($multiple_uuid) > 1 and !isset($_SESSION['uuid_verified'])) {
|
||||
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 {
|
||||
|
||||
$getstring = $_SESSION['tsuid'];
|
||||
$searchmysql = 'WHERE uuid LIKE \'%'.$getstring.'%\'';
|
||||
|
||||
$dbdata = $mysqlcon->query("SELECT * FROM $dbname.user $searchmysql");
|
||||
$dbdata_fetched = $dbdata->fetchAll();
|
||||
$count_hours = round($dbdata_fetched[0]['count']/3600);
|
||||
$idle_hours = round($dbdata_fetched[0]['idle']/3600);
|
||||
$except = $dbdata_fetched[0]['except'];
|
||||
$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[0]['count'] - $dbdata_fetched[0]['idle'];
|
||||
$activetime = $dbdata_fetched['count'] - $dbdata_fetched['idle'];
|
||||
} else {
|
||||
$activetime = $dbdata_fetched[0]['count'];
|
||||
$activetime = $dbdata_fetched['count'];
|
||||
}
|
||||
$active_count = $dbdata_fetched[0]['count'] - $dbdata_fetched[0]['idle'];
|
||||
$active_count = $dbdata_fetched['count'] - $dbdata_fetched['idle'];
|
||||
|
||||
krsort($grouptime);
|
||||
$grpcount = 0;
|
||||
$nextgrp = '';
|
||||
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
$grpcount++;
|
||||
$actualgrp = $time;
|
||||
if ($activetime > $time) {
|
||||
break;
|
||||
} else {
|
||||
$nextup = $time - $activetime;
|
||||
$nextgrp = $time;
|
||||
}
|
||||
}
|
||||
@@ -58,18 +51,17 @@ if(count($multiple_uuid) > 1 and !isset($_SESSION['uuid_verified'])) {
|
||||
$percentage_rankup = round($takedtime/$neededtime*100);
|
||||
}
|
||||
|
||||
$stats_user = $mysqlcon->query("SELECT * FROM $dbname.stats_user WHERE uuid='$getstring'");
|
||||
$stats_user = $stats_user->fetchAll();
|
||||
$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[0]['count_week'])) $count_week = $stats_user[0]['count_week']; else $count_week = 0;
|
||||
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[0]['active_week'])) $active_week = $stats_user[0]['active_week']; else $active_week = 0;
|
||||
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[0]['count_month'])) $count_month = $stats_user[0]['count_month']; else $count_month = 0;
|
||||
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[0]['active_month'])) $active_month = $stats_user[0]['active_month']; else $active_month = 0;
|
||||
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[0]['count'])) $count_total = $dbdata_fetched[0]['count']; else $count_total = 0;
|
||||
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);
|
||||
|
||||
@@ -94,11 +86,11 @@ if(count($multiple_uuid) > 1 and !isset($_SESSION['uuid_verified'])) {
|
||||
} else {
|
||||
$achievements_done = $achievements_done + 1;
|
||||
}
|
||||
if($_SESSION['tsconnections'] >= $connects_for_legendary) {
|
||||
if($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_legendary) {
|
||||
$achievements_done = $achievements_done + 4;
|
||||
} elseif($_SESSION['tsconnections'] >= $connects_for_gold) {
|
||||
} elseif($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_gold) {
|
||||
$achievements_done = $achievements_done + 3;
|
||||
} elseif($_SESSION['tsconnections'] >= $connects_for_silver) {
|
||||
} elseif($_SESSION[$rspathhex.'tsconnections'] >= $connects_for_silver) {
|
||||
$achievements_done = $achievements_done + 2;
|
||||
} else {
|
||||
$achievements_done = $achievements_done + 1;
|
||||
@@ -111,11 +103,9 @@ function get_percentage($max_value, $value) {
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, 3);
|
||||
if(count($multiple_uuid) > 1) { echo "</div></div></body></html>"; exit; } ?>
|
||||
<?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">
|
||||
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
@@ -132,15 +122,15 @@ require_once('nav.php');
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-9 text-left">
|
||||
<div class="huge"><?PHP echo $_SESSION['tsname'] ?></div>
|
||||
<div><?PHP if ($except == 0 || $except == 1) {
|
||||
echo $lang['stmy0002'],' #',$dbdata_fetched[0]['rank'];
|
||||
<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['tsavatar']) && $_SESSION['tsavatar'] != "none") {
|
||||
echo '<img src="../avatars/'.$_SESSION['tsavatar'].'" class="img-rounded pull-right" alt="avatar" height="70">';
|
||||
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>';
|
||||
}
|
||||
@@ -163,10 +153,10 @@ require_once('nav.php');
|
||||
<p><strong><?PHP echo $lang['stmy0010']; ?></strong></p>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<p class="text-right"><?PHP echo $dbdata_fetched[0]['cldbid']; ?></p>
|
||||
<p class="text-right"><?PHP echo $dbdata_fetched[0]['uuid']; ?></p>
|
||||
<p class="text-right"><?PHP echo $_SESSION['tsconnections']; ?></p>
|
||||
<p class="text-right"><?PHP echo $_SESSION['tscreated']; ?></p>
|
||||
<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>
|
||||
@@ -179,7 +169,7 @@ require_once('nav.php');
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP if($except == 0 || $except == 1) { ?>
|
||||
<?PHP if($dbdata_fetched['except'] == 0 || $dbdata_fetched['except'] == 1) { ?>
|
||||
<div class="col-lg-6">
|
||||
<h3><?PHP echo $lang['stmy0030']; ?></h3>
|
||||
<div class="progress">
|
||||
@@ -285,14 +275,14 @@ require_once('nav.php');
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<h3><?PHP echo $lang['stmy0023']; ?></h3>
|
||||
<?PHP if($_SESSION['tsconnections'] >= $connects_for_legendary) { ?>
|
||||
<?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['tsconnections']); ?></div>
|
||||
<div><?PHP echo sprintf($lang['stmy0025'], $_SESSION[$rspathhex.'tsconnections']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -302,55 +292,55 @@ require_once('nav.php');
|
||||
<?PHP echo $lang['stmy0014']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } elseif($_SESSION['tsconnections'] >= $connects_for_gold) { ?>
|
||||
<?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['tsconnections']); ?></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['tsconnections']); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width:<?PHP echo get_percentage($connects_for_legendary, $_SESSION['tsconnections']); ?>%;">
|
||||
<?PHP echo get_percentage($connects_for_legendary, $_SESSION['tsconnections']),$lang['stmy0016']; ?>
|
||||
<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['tsconnections'] >= $connects_for_silver) { ?>
|
||||
<?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['tsconnections']); ?></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['tsconnections']); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width:<?PHP echo get_percentage($connects_for_gold, $_SESSION['tsconnections']); ?>%;">
|
||||
<?PHP echo get_percentage($connects_for_gold, $_SESSION['tsconnections']),$lang['stmy0018']; ?>
|
||||
<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['tsconnections'] >= $connects_for_bronze) { ?>
|
||||
<?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['tsconnections']); ?></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['tsconnections']); ?>" aria-valuemin="0" aria-valuemax="100" style="min-width: 15em; width:<?PHP echo get_percentage($connects_for_silver, $_SESSION['tsconnections']); ?>%;">
|
||||
<?PHP echo get_percentage($connects_for_silver, $_SESSION['tsconnections']),$lang['stmy0020']; ?>
|
||||
<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 { ?>
|
||||
@@ -360,26 +350,21 @@ require_once('nav.php');
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="huge"><small><?PHP echo $lang['stmy0029']; ?></small>
|
||||
</div>
|
||||
<div><?PHP echo sprintf($lang['stmy0025'], $_SESSION['tsconnections']); ?></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['tsconnections']); ?>%;">
|
||||
<?PHP echo get_percentage($connects_for_bronze, $_SESSION['tsconnections']),$lang['stmy0022']; ?>
|
||||
<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>
|
||||
<!-- /.container-fluid -->
|
||||
|
||||
</div>
|
||||
<!-- /#page-wrapper -->
|
||||
|
||||
</div>
|
||||
<!-- /#wrapper -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -12,26 +12,30 @@ if($language == "ar") {
|
||||
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');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION['tsuid'])) {
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
|
||||
$sql = $mysqlcon->query("SELECT * FROM $dbname.stats_nations ORDER BY count DESC");
|
||||
$sql_res = $sql->fetchAll();
|
||||
$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, 3); ?>
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@@ -50,17 +54,23 @@ require_once('nav.php');
|
||||
<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;
|
||||
foreach ($sql_res as $line) {
|
||||
$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($line['nation']),'"></span> ',$line['nation'],'</td>
|
||||
<td><a href="list_rankup.php?sort=rank&order=desc&search=filter:country:',$line['nation'],':">',$nation[$line['nation']],'</td>
|
||||
<td>',$line['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>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
<?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>
|
||||
@@ -193,20 +202,25 @@
|
||||
<?PHP } ?>
|
||||
<ul class="nav navbar-right top-nav">
|
||||
<?PHP
|
||||
$lastscan = $mysqlcon->query("SELECT * FROM $dbname.job_check WHERE job_name='calc_user_lastscan'");
|
||||
$lastscan = $lastscan->fetchAll();
|
||||
if((time() - $lastscan[0]['timestamp']) > 600) { ?>
|
||||
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['connected'] == 0 ? $lang['stnv0028'] : $_SESSION['tsname']); ?> <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<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(isset($_SESSION['admin'])) {
|
||||
echo '<li><a href="http',(!empty($_SERVER['HTTPS'])?'s':''),'://',$_SERVER['SERVER_NAME'],substr(dirname($_SERVER['SCRIPT_NAME']),0,-5),'webinterface/ts.php"><i class="fa fa-fw fa-wrench"></i> ',$lang['wi'],'</a></li>';
|
||||
} elseif ($_SESSION['connected'] == 0) {
|
||||
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']);
|
||||
@@ -218,8 +232,10 @@
|
||||
echo ':'.$ts['voice'];
|
||||
echo '"><i class="fa fa-fw fa-headphones"></i> '.$lang['stnv0043'].'</a></li>';
|
||||
}
|
||||
echo (!isset($_SESSION['tsname']) ? ' ' : '<li><a href="my_stats.php"><i class="fa fa-fw fa-user"></i> '.$lang['stmy0001'].'</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>
|
||||
@@ -273,21 +289,12 @@
|
||||
<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">' : '>'); ?>
|
||||
<?PHP if($_SESSION['connected'] == 0) {
|
||||
echo '<a href="#myStatsModal" data-toggle="modal"><i class="fa fa-fw fa-exclamation-triangle"></i> *',$lang['stmy0001'],'</a>';
|
||||
} else {
|
||||
echo '<a href="my_stats.php"><i class="fa fa-fw fa-bar-chart-o"></i> ',$lang['stmy0001'],'</a>';
|
||||
}?>
|
||||
<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">' : '>'); ?>
|
||||
<?PHP if($_SESSION['connected'] == 0) {
|
||||
echo '<a href="#myStatsModal" data-toggle="modal"><i class="fa fa-fw fa-address-card-o"></i> *',$lang['stag0001'],'</a>';
|
||||
} else {
|
||||
echo '<a href="assign_groups.php"><i class="fa fa-fw fa-address-card-o"></i> ',$lang['stag0001'],'</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<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>
|
||||
|
||||
@@ -20,18 +20,17 @@ if($language == "ar") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION['tsuid'])) {
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
|
||||
$sql = $mysqlcon->query("SELECT * FROM $dbname.stats_platforms ORDER BY count DESC");
|
||||
$sql_res = $sql->fetchAll();
|
||||
$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, 3); ?>
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@@ -49,16 +48,22 @@ require_once('nav.php');
|
||||
<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;
|
||||
foreach ($sql_res as $line) {
|
||||
$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>',$line['platform'],'</td>
|
||||
<td>',$line['count'],'</td>
|
||||
<td>',$platform,'</td>
|
||||
<td>',$value['count'],'</td>
|
||||
<td>',number_format(round(($value['count'] * 100 / $sum_of_all), 1), 1),' %</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
$starttime = microtime(true);
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
@@ -8,27 +7,26 @@ require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION['tsuid'])) {
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
$dbdata = $mysqlcon->query("SELECT uuid,name,count,idle,cldgroup,online FROM $dbname.user ORDER BY (count - idle) DESC");
|
||||
$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 {
|
||||
$dbdata = $mysqlcon->query("SELECT uuid,name,count,idle,cldgroup,online FROM $dbname.user ORDER BY count DESC");
|
||||
$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 = $dbdata->rowCount() - 10;
|
||||
$db_arr = $dbdata->fetchAll();
|
||||
$sumentries = count($db_arr) - 10;
|
||||
$count10 = 0;
|
||||
$top10_sum = 0;
|
||||
$top10_idle_sum = 0;
|
||||
|
||||
|
||||
foreach ($db_arr as $client) {
|
||||
$sgroups = explode(",", $client['cldgroup']);
|
||||
if (!in_array($client['uuid'], $exceptuuid) && !array_intersect($sgroups, $exceptgroup)) {
|
||||
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'];
|
||||
@@ -54,13 +52,9 @@ for($count10 = $count10; $count10 <= 10; $count10++) {
|
||||
);
|
||||
}
|
||||
|
||||
$all_sum_data = $mysqlcon->query("SELECT SUM(count) FROM $dbname.user");
|
||||
$all_sum_data_res = $all_sum_data->fetchAll();
|
||||
$others_sum = round(($all_sum_data_res[0][0]/3600)) - $top10_sum;
|
||||
|
||||
$all_idle_sum_data = $mysqlcon->query("SELECT SUM(idle) FROM $dbname.user");
|
||||
$all_idle_sum_data_res = $all_idle_sum_data->fetchAll();
|
||||
$others_idle_sum = round(($all_idle_sum_data_res[0][0]/3600)) - $top10_idle_sum;
|
||||
$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));
|
||||
@@ -68,10 +62,8 @@ function get_percentage($max_value, $value) {
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, 3); ?>
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
@@ -80,7 +72,6 @@ require_once('nav.php');
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-4">
|
||||
<div class="panel panel-primary">
|
||||
@@ -93,7 +84,7 @@ require_once('nav.php');
|
||||
<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 echo sprintf($texttime, round(($client_data[0]['count']/3600))); ?></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>
|
||||
@@ -112,7 +103,7 @@ require_once('nav.php');
|
||||
<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 echo sprintf($texttime, round(($client_data[1]['count']/3600))); ?></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>
|
||||
@@ -129,7 +120,7 @@ require_once('nav.php');
|
||||
<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 echo sprintf($texttime, round(($client_data[2]['count']/3600))); ?></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>
|
||||
@@ -146,7 +137,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[3]['count']/3600))); ?></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>
|
||||
@@ -161,7 +152,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[4]['count']/3600))); ?></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>
|
||||
@@ -176,7 +167,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[5]['count']/3600))); ?></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>
|
||||
@@ -196,7 +187,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[6]['count']/3600))); ?></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>
|
||||
@@ -214,7 +205,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[7]['count']/3600))); ?></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>
|
||||
@@ -232,7 +223,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[8]['count']/3600))); ?></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>
|
||||
@@ -250,14 +241,13 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[9]['count']/3600))); ?></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>
|
||||
<!-- /.row -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0004']; ?></h2>
|
||||
@@ -351,14 +341,8 @@ require_once('nav.php');
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
|
||||
</div>
|
||||
<!-- /#page-wrapper -->
|
||||
|
||||
</div>
|
||||
<!-- /#wrapper -->
|
||||
<!-- /Scripts -->
|
||||
<?PHP
|
||||
|
||||
?>
|
||||
@@ -394,5 +378,4 @@ require_once('nav.php');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,6 +1,5 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
$starttime = microtime(true);
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
@@ -8,27 +7,28 @@ require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION['tsuid'])) {
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
$dbdata = $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");
|
||||
$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 {
|
||||
$dbdata = $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");
|
||||
$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'];
|
||||
}
|
||||
$sumentries = $dbdata->rowCount() - 10;
|
||||
$db_arr = $dbdata->fetchAll();
|
||||
|
||||
$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 $client) {
|
||||
$sgroups = explode(",", $client['cldgroup']);
|
||||
if (!in_array($client['uuid'], $exceptuuid) && !array_intersect($sgroups, $exceptgroup)) {
|
||||
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'];
|
||||
@@ -54,13 +54,9 @@ for($count10 = $count10; $count10 <= 10; $count10++) {
|
||||
);
|
||||
}
|
||||
|
||||
$all_sum_data = $mysqlcon->query("SELECT SUM(count_month) FROM $dbname.stats_user");
|
||||
$all_sum_data_res = $all_sum_data->fetchAll();
|
||||
$others_sum = round(($all_sum_data_res[0][0]/3600)) - $top10_sum;
|
||||
|
||||
$all_idle_sum_data = $mysqlcon->query("SELECT SUM(idle_month) FROM $dbname.stats_user");
|
||||
$all_idle_sum_data_res = $all_idle_sum_data->fetchAll();
|
||||
$others_idle_sum = round(($all_idle_sum_data_res[0][0]/3600)) - $top10_idle_sum;
|
||||
$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));
|
||||
@@ -68,10 +64,8 @@ function get_percentage($max_value, $value) {
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, 3); ?>
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
@@ -80,7 +74,7 @@ require_once('nav.php');
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
<?PHP if($count_timestamps['count'] < 120) { echo $lang['stix0048']; } else { ?>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-4">
|
||||
<div class="panel panel-primary">
|
||||
@@ -93,7 +87,7 @@ require_once('nav.php');
|
||||
<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 echo sprintf($texttime, round(($client_data[0]['count']/3600))); ?></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>
|
||||
@@ -112,7 +106,7 @@ require_once('nav.php');
|
||||
<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 echo sprintf($texttime, round(($client_data[1]['count']/3600))); ?></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>
|
||||
@@ -129,7 +123,7 @@ require_once('nav.php');
|
||||
<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 echo sprintf($texttime, round(($client_data[2]['count']/3600))); ?></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>
|
||||
@@ -146,7 +140,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[3]['count']/3600))); ?></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>
|
||||
@@ -161,7 +155,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[4]['count']/3600))); ?></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>
|
||||
@@ -176,7 +170,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[5]['count']/3600))); ?></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>
|
||||
@@ -196,7 +190,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[6]['count']/3600))); ?></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>
|
||||
@@ -214,7 +208,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[7]['count']/3600))); ?></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>
|
||||
@@ -232,7 +226,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[8]['count']/3600))); ?></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>
|
||||
@@ -250,14 +244,13 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[9]['count']/3600))); ?></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>
|
||||
<!-- /.row -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0004']; ?></h2>
|
||||
@@ -350,15 +343,10 @@ require_once('nav.php');
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
|
||||
</div>
|
||||
<!-- /#page-wrapper -->
|
||||
|
||||
</div>
|
||||
<!-- /#wrapper -->
|
||||
<!-- /Scripts -->
|
||||
<?PHP
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?PHP
|
||||
session_start();
|
||||
$starttime = microtime(true);
|
||||
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
@@ -8,27 +7,28 @@ require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION['tsuid'])) {
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
$dbdata = $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");
|
||||
$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 {
|
||||
$dbdata = $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");
|
||||
$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'];
|
||||
}
|
||||
$sumentries = $dbdata->rowCount() - 10;
|
||||
$db_arr = $dbdata->fetchAll();
|
||||
|
||||
$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 $client) {
|
||||
$sgroups = explode(",", $client['cldgroup']);
|
||||
if (!in_array($client['uuid'], $exceptuuid) && !array_intersect($sgroups, $exceptgroup)) {
|
||||
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'];
|
||||
@@ -46,21 +46,17 @@ foreach ($db_arr as $client) {
|
||||
}
|
||||
}
|
||||
|
||||
for($count10 = $count10; $count10 <= 10; $count10++) {
|
||||
$client_data[$count10] = array(
|
||||
for($count = $count10; $count10 < 10; $count10++) {
|
||||
$client_data[$count] = array(
|
||||
'name' => "<i>unkown</i>",
|
||||
'count' => "0",
|
||||
'online' => "0"
|
||||
);
|
||||
}
|
||||
|
||||
$all_sum_data = $mysqlcon->query("SELECT SUM(count_week) FROM $dbname.stats_user");
|
||||
$all_sum_data_res = $all_sum_data->fetchAll();
|
||||
$others_sum = round(($all_sum_data_res[0][0]/3600)) - $top10_sum;
|
||||
|
||||
$all_idle_sum_data = $mysqlcon->query("SELECT SUM(idle_week) FROM $dbname.stats_user");
|
||||
$all_idle_sum_data_res = $all_idle_sum_data->fetchAll();
|
||||
$others_idle_sum = round(($all_idle_sum_data_res[0][0]/3600)) - $top10_idle_sum;
|
||||
$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));
|
||||
@@ -68,10 +64,8 @@ function get_percentage($max_value, $value) {
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, 3); ?>
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- Page Heading -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
@@ -80,7 +74,7 @@ require_once('nav.php');
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
<?PHP if($count_timestamps['count'] < 28) { echo $lang['stix0048']; } else { ?>
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-4">
|
||||
<div class="panel panel-primary">
|
||||
@@ -93,7 +87,7 @@ require_once('nav.php');
|
||||
<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 echo sprintf($texttime, round(($client_data[0]['count']/3600))); ?></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>
|
||||
@@ -112,7 +106,7 @@ require_once('nav.php');
|
||||
<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 echo sprintf($texttime, round(($client_data[1]['count']/3600))); ?></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>
|
||||
@@ -129,7 +123,7 @@ require_once('nav.php');
|
||||
<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 echo sprintf($texttime, round(($client_data[2]['count']/3600))); ?></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>
|
||||
@@ -146,7 +140,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[3]['count']/3600))); ?></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>
|
||||
@@ -161,7 +155,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[4]['count']/3600))); ?></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>
|
||||
@@ -176,7 +170,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[5]['count']/3600))); ?></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>
|
||||
@@ -196,7 +190,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[6]['count']/3600))); ?></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>
|
||||
@@ -214,7 +208,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[7]['count']/3600))); ?></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>
|
||||
@@ -232,7 +226,7 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[8]['count']/3600))); ?></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>
|
||||
@@ -250,14 +244,13 @@ require_once('nav.php');
|
||||
</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 echo sprintf($texttime, round(($client_data[9]['count']/3600))); ?></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>
|
||||
<!-- /.row -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2><?PHP echo $lang['sttw0004']; ?></h2>
|
||||
@@ -350,15 +343,10 @@ require_once('nav.php');
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
|
||||
</div>
|
||||
<!-- /#page-wrapper -->
|
||||
|
||||
</div>
|
||||
<!-- /#wrapper -->
|
||||
<!-- /Scripts -->
|
||||
<?PHP
|
||||
|
||||
?>
|
||||
@@ -394,5 +382,4 @@ require_once('nav.php');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
145
stats/verify.php
145
stats/verify.php
@@ -8,17 +8,86 @@ require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if(!isset($_SESSION['tsuid']) || isset($_SESSION['uuid_verified'])) {
|
||||
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);
|
||||
}
|
||||
|
||||
$multi_uuid = explode(',', substr($_SESSION['multiple'], 0, -1));
|
||||
foreach ($multi_uuid as $entry) {
|
||||
list($key, $value) = explode('=>', $entry);
|
||||
$multiple_uuid[$key] = $value;
|
||||
if(isset($_SESSION[$rspathhex.'multiple'])) {
|
||||
$multi_uuid = explode(',', substr($_SESSION[$rspathhex.'multiple'], 0, -1));
|
||||
}
|
||||
|
||||
if(isset($_POST['uuid']) && !isset($_SESSION['temp_uuid'])) {
|
||||
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");
|
||||
@@ -27,55 +96,46 @@ if(isset($_POST['uuid']) && !isset($_SESSION['temp_uuid'])) {
|
||||
usleep($slowmode);
|
||||
$ts3->selfUpdate(array('client_nickname' => "Ranksystem - Verification"));
|
||||
} catch (Exception $e) {
|
||||
$err_msg = 'TeamSpeak '.$lang['error'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
$allclients = $ts3->clientList();
|
||||
} catch (Exception $e) {
|
||||
$err_msg = 'TeamSpeak '.$lang['error'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
$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['temp_uuid'] = htmlspecialchars($client['client_unique_identifier'], 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['token'] = $pwd;
|
||||
$_SESSION[$rspathhex.'token'] = $pwd;
|
||||
$tokenlink = '[URL]http'.(!empty($_SERVER['HTTPS'])?'s':'').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'?token='.$pwd.'[/URL]';
|
||||
try {
|
||||
$ts3->clientGetByUid($_SESSION['temp_uuid'])->message(sprintf($lang['stve0001'], $nickname, $pwd));
|
||||
$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 = 'TeamSpeak '.$lang['error'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$err_msg = 'TeamSpeak '.$lang['error'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST['token']) && isset($_SESSION['temp_uuid'])) {
|
||||
if($_POST['token'] == NULL) {
|
||||
$err_msg = $lang['stve0003']; $err_lvl = 1;
|
||||
} elseif($_POST['token'] != $_SESSION['token']) {
|
||||
$err_msg = $lang['stve0004']; $err_lvl = 3;
|
||||
} elseif($_POST['token'] == $_SESSION['token']) {
|
||||
$err_msg = $lang['stve0005']; $err_lvl = NULL;
|
||||
$_SESSION['uuid_verified'] = $_SESSION['temp_uuid'];
|
||||
$_SESSION['multiple'] = '';
|
||||
} else {
|
||||
$err_msg = $lang['stve0006']; $err_lvl = 3;
|
||||
$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); ?>
|
||||
<?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">
|
||||
@@ -86,20 +146,40 @@ require_once('nav.php');
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form name="verify" method="POST">
|
||||
<p><?PHP echo $lang['stve0008']; ?></p>
|
||||
<?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();">
|
||||
<option disabled value=""<?PHP if(!isset($_SESSION['temp_uuid'])) echo ' selected','>',$lang['stve0009']; ?></option>
|
||||
<?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['temp_uuid']) && $_SESSION['temp_uuid'] == $uuid) echo ' selected'; echo '>',$nickname,'</option>';
|
||||
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 $lang['stve0010']; ?></p>
|
||||
<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>
|
||||
@@ -117,6 +197,7 @@ require_once('nav.php');
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -20,18 +20,17 @@ if($language == "ar") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION['tsuid'])) {
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
|
||||
$sql = $mysqlcon->query("SELECT * FROM $dbname.stats_versions ORDER BY count DESC");
|
||||
$sql_res = $sql->fetchAll();
|
||||
$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, 3); ?>
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@@ -49,16 +48,22 @@ require_once('nav.php');
|
||||
<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;
|
||||
foreach ($sql_res as $line) {
|
||||
$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>',$line['version'],'</td>
|
||||
<td>',$line['count'],'</td>
|
||||
<td>',$version,'</td>
|
||||
<td>',$value['count'],'</td>
|
||||
<td>',number_format(round(($value['count'] * 100 / $sum_of_all), 1), 1),' %</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user