release 1.2.12
This commit is contained in:
@@ -16,7 +16,7 @@ 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);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if($addons_config['assign_groups_active']['value'] != '1') {
|
||||
echo "addon is disabled";
|
||||
@@ -24,7 +24,7 @@ if($addons_config['assign_groups_active']['value'] != '1') {
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if(isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
|
||||
@@ -15,34 +15,36 @@ 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);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if($language == "ar") {
|
||||
if($cfg['default_language'] == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "cz") {
|
||||
} elseif($cfg['default_language'] == "cz") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
} elseif($cfg['default_language'] == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
} elseif($cfg['default_language'] == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "fr") {
|
||||
} elseif($cfg['default_language'] == "es") {
|
||||
require_once('../languages/nations_es.php');
|
||||
} elseif($cfg['default_language'] == "fr") {
|
||||
require_once('../languages/nations_fr.php');
|
||||
} elseif($language == "it") {
|
||||
} elseif($cfg['default_language'] == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "nl") {
|
||||
} elseif($cfg['default_language'] == "nl") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "pl") {
|
||||
} elseif($cfg['default_language'] == "pl") {
|
||||
require_once('../languages/nations_pl.php');
|
||||
} elseif($language == "ro") {
|
||||
} elseif($cfg['default_language'] == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
} elseif($cfg['default_language'] == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
} elseif($language == "pt") {
|
||||
} elseif($cfg['default_language'] == "pt") {
|
||||
require_once('../languages/nations_pt.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
function human_readable_size($bytes,$lang) {
|
||||
@@ -371,7 +373,7 @@ require_once('nav.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0031']; ?></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>
|
||||
<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($cfg['default_date_format']).')</i>'; } else { echo $lang['stix0033']; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0034']; ?></td>
|
||||
@@ -396,23 +398,23 @@ require_once('nav.php');
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0037']; ?></td>
|
||||
<td><a href="ts3server://<?PHP
|
||||
if (($ts['host']=='localhost' || $ts['host']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
if (($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
echo preg_replace('/www\./','',$_SERVER['HTTP_HOST']);
|
||||
} elseif ($ts['host']=='localhost' || $ts['host']=='127.0.0.1') {
|
||||
} elseif ($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') {
|
||||
echo $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
echo $ts['host'];
|
||||
echo $cfg['teamspeak_host_address'];
|
||||
}
|
||||
echo ':'.$ts['voice']; ?>">
|
||||
echo ':'.$cfg['teamspeak_voice_port']; ?>">
|
||||
<?PHP
|
||||
if (($ts['host']=='localhost' || $ts['host']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
if (($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
echo preg_replace('/www\./','',$_SERVER['HTTP_HOST']);
|
||||
} elseif ($ts['host']=='localhost' || $ts['host']=='127.0.0.1') {
|
||||
} elseif ($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') {
|
||||
echo $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
echo $ts['host'];
|
||||
echo $cfg['teamspeak_host_address'];
|
||||
}
|
||||
echo ':'.$ts['voice']; ?></a></td>
|
||||
echo ':'.$cfg['teamspeak_voice_port']; ?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0038']; ?></td>
|
||||
@@ -436,7 +438,7 @@ require_once('nav.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?PHP echo $lang['stix0045']; ?></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" rel="noopener noreferrer">'.$lang['stix0046'].'</a>'; } else { echo $lang['stix0047']; } ?></td>
|
||||
<td><?PHP if ($sql_res['server_weblist'] == 1) { echo $lang['stix0046']; } else { echo $lang['stix0047']; } ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -17,10 +17,10 @@ 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);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
require_once('nav.php');
|
||||
?>
|
||||
@@ -94,6 +94,7 @@ require_once('nav.php');
|
||||
<p><?PHP echo $lang['stri0020']; ?></p>
|
||||
<p><?PHP echo $lang['stri0024']; ?></p>
|
||||
<p><?PHP echo $lang['stri0025']; ?></p>
|
||||
<p><?PHP echo $lang['stri0026']; ?></p>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@ 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);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
function getclientip() {
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP']))
|
||||
@@ -36,15 +36,14 @@ function getclientip() {
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if(isset($_POST['username'])) {
|
||||
$_GET["search"] = $_POST['usersuche'];
|
||||
$_GET["seite"] = 1;
|
||||
}
|
||||
$filter='';
|
||||
$searchstring='';
|
||||
$filter = $searchstring = NULL;
|
||||
if(isset($_GET["search"]) && $_GET["search"] != '') {
|
||||
$getstring = htmlspecialchars($_GET['search']);
|
||||
}
|
||||
@@ -64,7 +63,7 @@ if(isset($getstring) && strstr($getstring, 'filter:excepted:')) {
|
||||
} else {
|
||||
$searchstring = '';
|
||||
}
|
||||
if($showexcld == 0) {
|
||||
if($cfg['stats_show_excepted_clients_switch'] == 0) {
|
||||
$filter .= " AND `except` IN ('0','1')";
|
||||
}
|
||||
}
|
||||
@@ -145,7 +144,7 @@ if(isset($_GET['order']) && $_GET['order'] == 'desc') {
|
||||
}
|
||||
|
||||
if(isset($_GET['admin'])) {
|
||||
if($_SESSION[$rspathhex.'username'] == $webuser && $_SESSION[$rspathhex.'password'] == $webpass && $_SESSION[$rspathhex.'clientip'] == getclientip()) {
|
||||
if($_SESSION[$rspathhex.'username'] == $cfg['webinterface_user'] && $_SESSION[$rspathhex.'password'] == $cfg['webinterface_pass'] && $_SESSION[$rspathhex.'clientip'] == getclientip()) {
|
||||
$adminlogin = 1;
|
||||
}
|
||||
}
|
||||
@@ -247,6 +246,7 @@ if($adminlogin == 1) {
|
||||
case "desc":
|
||||
$keyorder2 = "asc&admin=true";
|
||||
}
|
||||
$keyorder .= "&admin=true";
|
||||
} else {
|
||||
switch ($keyorder) {
|
||||
case "asc":
|
||||
@@ -261,7 +261,7 @@ if($adminlogin == 1) {
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<?PHP
|
||||
if($user_pro_seite == "all" || $shownav == 0) {
|
||||
if($user_pro_seite == "all" || $cfg['stats_show_site_navigation_switch'] == 0) {
|
||||
} else {
|
||||
pagination($keysort,$keyorder,$user_pro_seite,$seiten_anzahl_gerundet,$seite,$getstring);
|
||||
}
|
||||
@@ -270,48 +270,48 @@ if($adminlogin == 1) {
|
||||
<thead data-spy="affix" data-offset-top="100">
|
||||
<tr>
|
||||
<?PHP
|
||||
if ($showcolrg == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_rank_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=rank&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listrank'] , '</span></a></th>';
|
||||
if ($showcolcld == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_client_name_switch'] == 1 || $adminlogin == 1)
|
||||
echo ($keysort == 'name') ? '<th class="text-center"><a href="?sort=name&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnick'] . '</span></a></th>' : '<th class="text-center"><a href="?sort=name&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnick'] . '</span></a></th>';
|
||||
if ($showcoluuid == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_unique_id_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=uuid&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listuid'] , '</span></a></th>';
|
||||
if ($showcoldbid == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_client_db_id_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=cldbid&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listcldbid'] , '</span></a></th>';
|
||||
if ($showcolls == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_last_seen_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=lastseen&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listseen'] , '</span></a></th>';
|
||||
if ($showcolot == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_online_time_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=count&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listsumo'] , '</span></a></th>';
|
||||
if ($showcolit == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_idle_time_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=idle&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listsumi'] , '</span></a></th>';
|
||||
if ($showcolat == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_active_time_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=active&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listsuma'] , '</span></a></th>';
|
||||
if ($showcolas == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_current_server_group_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=grpid&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listacsg'] , '</span></a></th>';
|
||||
if ($showgrpsince == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_current_group_since_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<th class="text-center"><a href="?sort=grpsince&order=' , $keyorder2 , '&seite=' , $seite , '&user=' , $user_pro_seite , '&search=' , $getstring , '"><span class="hdcolor">' , $lang['listgrps'] , '</span></a></th>';
|
||||
if ($showcolnx == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_next_rankup_switch'] == 1 || $adminlogin == 1)
|
||||
echo ($keysort == 'nextup') ? '<th class="text-center"><a href="?sort=nextup&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnxup'] . '</span></a></th>' : '<th class="text-center"><a href="?sort=nextup&order=' . $keyorder2 . '&seite=' . $seite . '&user=' . $user_pro_seite . '&search=' . $getstring . '"><span class="hdcolor">' . $lang['listnxup'] . '</span></a></th>';
|
||||
if (($showcolsg == 1 || $adminlogin == 1) && $substridle == 1) {
|
||||
if (($cfg['stats_column_next_server_group_switch'] == 1 || $adminlogin == 1) && $cfg['rankup_time_assess_mode'] == 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) {
|
||||
} elseif (($cfg['stats_column_next_server_group_switch'] == 1 || $adminlogin == 1) && $cfg['rankup_time_assess_mode'] != 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);
|
||||
ksort($cfg['rankup_definition']);
|
||||
if (count($sqlhis) > 0) {
|
||||
foreach ($sqlhis as $uuid => $value) {
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$activetime = $value['count'] - $value['idle'];
|
||||
} else {
|
||||
$activetime = $value['count'];
|
||||
}
|
||||
$grpcount=0;
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
foreach ($cfg['rankup_definition'] as $time => $groupid) {
|
||||
$grpcount++;
|
||||
if ($activetime < $time || $grpcount == count($grouptime) && $value['nextup'] <= 0 && $showhighest == 1 || $grpcount == count($grouptime) && $value['nextup'] == 0 && $adminlogin == 1) {
|
||||
if ($activetime < $time || $grpcount == count($cfg['rankup_definition']) && $value['nextup'] <= 0 && $cfg['stats_show_clients_in_highest_rank_switch'] == 1 || $grpcount == count($cfg['rankup_definition']) && $value['nextup'] == 0 && $adminlogin == 1) {
|
||||
echo '<tr>';
|
||||
if ($showcolrg == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_rank_switch'] == 1 || $adminlogin == 1) {
|
||||
if($value['except'] == 2 || $value['except'] == 3) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} else {
|
||||
@@ -320,42 +320,42 @@ if($adminlogin == 1) {
|
||||
}
|
||||
if ($adminlogin == 1) {
|
||||
echo '<td class="text-center"><a href="//tsviewer.com/index.php?page=search&action=ausgabe_user&nickname=' , htmlspecialchars($value['name']) , '" target="_blank">' , htmlspecialchars($value['name']) , '</a></td>';
|
||||
} elseif ($showcolcld == 1) {
|
||||
} elseif ($cfg['stats_column_client_name_switch'] == 1) {
|
||||
echo '<td class="text-center">' , htmlspecialchars($value['name']) , '</td>';
|
||||
}
|
||||
if ($adminlogin == 1) {
|
||||
echo '<td class="text-center"><a href="//ts3index.com/?page=searchclient&uid=' , $uuid , '" target="_blank">' , $uuid , '</a></td>';
|
||||
} elseif ($showcoluuid == 1) {
|
||||
} elseif ($cfg['stats_column_unique_id_switch'] == 1) {
|
||||
echo '<td class="text-center">' , $uuid , '</td>';
|
||||
}
|
||||
if ($showcoldbid == 1 || $adminlogin == 1)
|
||||
if ($cfg['stats_column_client_db_id_switch'] == 1 || $adminlogin == 1)
|
||||
echo '<td class="text-center">' , $value['cldbid'] , '</td>';
|
||||
if ($showcolls == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_last_seen_switch'] == 1 || $adminlogin == 1) {
|
||||
if ($value['online'] == 1) {
|
||||
echo '<td class="text-center text-success">online</td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , date('Y-m-d H:i:s',$value['lastseen']), '</td>';
|
||||
}
|
||||
}
|
||||
if ($showcolot == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_online_time_switch'] == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".$value['count']);
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
echo $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
}
|
||||
if ($showcolit == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_idle_time_switch'] == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".$value['idle']);
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
echo $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
}
|
||||
if ($showcolat == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_active_time_switch'] == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".($value['count']-$value['idle']));
|
||||
echo $dtF->diff($dtT)->format($timeformat);
|
||||
echo $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
}
|
||||
if ($showcolas == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_current_server_group_switch'] == 1 || $adminlogin == 1) {
|
||||
if ($value['grpid'] == 0) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} elseif ($sqlhisgroup[$value['grpid']]['iconfile'] == 1) {
|
||||
@@ -364,19 +364,19 @@ if($adminlogin == 1) {
|
||||
echo '<td class="text-center">' , $sqlhisgroup[$value['grpid']]['sgidname'] , '</td>';
|
||||
}
|
||||
}
|
||||
if ($showgrpsince == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_current_group_since_switch'] == 1 || $adminlogin == 1) {
|
||||
if ($value['grpsince'] == 0) {
|
||||
echo '<td class="text-center"></td>';
|
||||
} else {
|
||||
echo '<td class="text-center">' , date('Y-m-d H:i:s',$value['grpsince']), '</td>';
|
||||
}
|
||||
}
|
||||
if ($showcolnx == 1 || $adminlogin == 1) {
|
||||
if ($cfg['stats_column_next_rankup_switch'] == 1 || $adminlogin == 1) {
|
||||
echo '<td class="text-center">';
|
||||
if (($value['except'] == 0 || $value['except'] == 1) && $value['nextup'] > 0) {
|
||||
$dtF = new DateTime("@0");
|
||||
$dtT = new DateTime("@".$value['nextup']);
|
||||
echo $dtF->diff($dtT)->format($timeformat) , '</td>';
|
||||
echo $dtF->diff($dtT)->format($cfg['default_date_format']) , '</td>';
|
||||
} elseif ($value['except'] == 0 || $value['except'] == 1) {
|
||||
echo '0</td>';
|
||||
} elseif ($value['except'] == 2 || $value['except'] == 3) {
|
||||
@@ -385,8 +385,8 @@ if($adminlogin == 1) {
|
||||
echo $lang['errukwn'], '</td>';
|
||||
}
|
||||
}
|
||||
if ($showcolsg == 1 || $adminlogin == 1) {
|
||||
if ($grpcount == count($grouptime) && $value['nextup'] == 0 && $showhighest == 1 || $grpcount == count($grouptime) && $value['nextup'] == 0 && $adminlogin == 1) {
|
||||
if ($cfg['stats_column_next_server_group_switch'] == 1 || $adminlogin == 1) {
|
||||
if ($grpcount == count($cfg['rankup_definition']) && $value['nextup'] == 0 && $cfg['stats_show_clients_in_highest_rank_switch'] == 1 || $grpcount == count($cfg['rankup_definition']) && $value['nextup'] == 0 && $adminlogin == 1) {
|
||||
echo '<td class="text-center"><em>',$lang['highest'],'</em></td>';
|
||||
} elseif ($value['except'] == 2 || $value['except'] == 3) {
|
||||
echo '<td class="text-center"><em>',$lang['listexcept'],'</em></td>';
|
||||
|
||||
@@ -16,10 +16,10 @@ 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);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if(count($_SESSION[$rspathhex.'multiple']) > 1 && !isset($_SESSION[$rspathhex.'uuid_verified'])) {
|
||||
@@ -31,17 +31,17 @@ if(count($_SESSION[$rspathhex.'multiple']) > 1 && !isset($_SESSION[$rspathhex.'u
|
||||
$count_hours = round($dbdata_fetched['count']/3600);
|
||||
$idle_hours = round($dbdata_fetched['idle']/3600);
|
||||
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$activetime = $dbdata_fetched['count'] - $dbdata_fetched['idle'];
|
||||
} else {
|
||||
$activetime = $dbdata_fetched['count'];
|
||||
}
|
||||
$active_count = $dbdata_fetched['count'] - $dbdata_fetched['idle'];
|
||||
|
||||
krsort($grouptime);
|
||||
krsort($cfg['rankup_definition']);
|
||||
$nextgrp = '';
|
||||
|
||||
foreach ($grouptime as $time => $groupid) {
|
||||
foreach ($cfg['rankup_definition'] as $time => $groupid) {
|
||||
$actualgrp = $time;
|
||||
if ($activetime > $time) {
|
||||
break;
|
||||
@@ -63,16 +63,16 @@ if(count($_SESSION[$rspathhex.'multiple']) > 1 && !isset($_SESSION[$rspathhex.'u
|
||||
$stats_user = $mysqlcon->query("SELECT `count_week`,`active_week`,`count_month`,`active_month` FROM `$dbname`.`stats_user` WHERE `uuid`='".$_SESSION[$rspathhex.'tsuid']."'")->fetch();
|
||||
|
||||
if (isset($stats_user['count_week'])) $count_week = $stats_user['count_week']; else $count_week = 0;
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_week"); $count_week = $dtF->diff($dtT)->format($timeformat);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_week"); $count_week = $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
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);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_week"); $active_week = $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
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);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_month"); $count_month = $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
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);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_month"); $active_month = $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
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);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_total"); $count_total = $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_count"); $active_count = $dtF->diff($dtT)->format($cfg['default_date_format']);
|
||||
|
||||
$time_for_bronze = 50;
|
||||
$time_for_silver = 100;
|
||||
|
||||
@@ -15,34 +15,36 @@ 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);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if($language == "ar") {
|
||||
if($cfg['default_language'] == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "cz") {
|
||||
} elseif($cfg['default_language'] == "cz") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
} elseif($cfg['default_language'] == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
} elseif($cfg['default_language'] == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "fr") {
|
||||
} elseif($cfg['default_language'] == "es") {
|
||||
require_once('../languages/nations_es.php');
|
||||
} elseif($cfg['default_language'] == "fr") {
|
||||
require_once('../languages/nations_fr.php');
|
||||
} elseif($language == "it") {
|
||||
} elseif($cfg['default_language'] == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "nl") {
|
||||
} elseif($cfg['default_language'] == "nl") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "pl") {
|
||||
} elseif($cfg['default_language'] == "pl") {
|
||||
require_once('../languages/nations_pl.php');
|
||||
} elseif($language == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
} elseif($language == "pt") {
|
||||
} elseif($cfg['default_language'] == "pt") {
|
||||
require_once('../languages/nations_pt.php');
|
||||
} elseif($cfg['default_language'] == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($cfg['default_language'] == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
}
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
$sql_res = $mysqlcon->query("SELECT * FROM `$dbname`.`stats_nations` ORDER BY `count` DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
|
||||
@@ -8,15 +8,15 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?PHP echo $language; ?>">
|
||||
<html lang="<?PHP echo $cfg['default_language']; ?>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="version" content="<?PHP echo $currvers; ?>">
|
||||
<meta name="version" content="<?PHP echo $cfg['version_current_using']; ?>">
|
||||
<link rel="icon" href="../tsicons/rs.png">
|
||||
<title>TS-N.NET Ranksystem</title>
|
||||
<link href="../libs/combined_st.css?v=<?PHP echo $currvers; ?>" rel="stylesheet">
|
||||
<link href="../libs/combined_st.css?v=<?PHP echo $cfg['version_current_using']; ?>" rel="stylesheet">
|
||||
<?PHP
|
||||
$sitescript = basename($_SERVER['SCRIPT_NAME']);
|
||||
switch($sitescript) {
|
||||
@@ -44,7 +44,7 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
default:
|
||||
?><script src="../libs/qb.js"></script><?PHP
|
||||
}
|
||||
if(isset($shownav) && $shownav == 0) { ?>
|
||||
if(isset($cfg['stats_show_site_navigation_switch']) && $cfg['stats_show_site_navigation_switch'] == 0) { ?>
|
||||
<style>
|
||||
body{margin-top:0px!important}
|
||||
.affix{top:0px!important;width:calc(100% - 50px)!important;position:fixed;color:#000;background-color:#fff!important;}
|
||||
@@ -60,7 +60,7 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
<h4 class="modal-title"><?PHP echo $lang['stnv0001']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?PHP echo $servernews; ?></p>
|
||||
<p><?PHP echo $cfg['stats_server_news']; ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
@@ -162,7 +162,7 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
</div>
|
||||
</div>
|
||||
<?PHP
|
||||
if($shownav == 1) {
|
||||
if($cfg['stats_show_site_navigation_switch'] == 1) {
|
||||
?>
|
||||
<div id="wrapper">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
@@ -184,12 +184,12 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=50&lang=$language&search=$getstring"; ?>">50</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=100&lang=$language&search=$getstring"; ?>">100</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=250&lang=$language&search=$getstring"; ?>">250</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=500&lang=$language&search=$getstring"; ?>">500</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=50&lang={$cfg['default_language']}&search=$getstring"; ?>">50</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=100&lang={$cfg['default_language']}&search=$getstring"; ?>">100</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=250&lang={$cfg['default_language']}&search=$getstring"; ?>">250</a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=500&lang={$cfg['default_language']}&search=$getstring"; ?>">500</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=all&lang=$language&search=$getstring"; ?>"><?PHP echo $lang['stnv0026']; ?></a></li>
|
||||
<li role="presentation"><a role="menuitem" href="<?PHP echo "?sort=$keysort&order=$keyorder&user=all&lang={$cfg['default_language']}&search=$getstring"; ?>"><?PHP echo $lang['stnv0026']; ?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="navbar-form navbar-right">
|
||||
@@ -224,14 +224,14 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
}
|
||||
} 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) {
|
||||
if (($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') && strpos($_SERVER['HTTP_HOST'], 'www.') == 0) {
|
||||
echo preg_replace('/www\./','',$_SERVER['HTTP_HOST']);
|
||||
} elseif ($ts['host']=='localhost' || $ts['host']=='127.0.0.1') {
|
||||
} elseif ($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') {
|
||||
echo $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
echo $ts['host'];
|
||||
echo $cfg['teamspeak_host_address'];
|
||||
}
|
||||
echo ':'.$ts['voice'];
|
||||
echo ':'.$cfg['teamspeak_voice_port'];
|
||||
echo '"><i class="fa fa-fw fa-headphones"></i> '.$lang['stnv0043'].'</a></li>';
|
||||
}
|
||||
?>
|
||||
@@ -267,6 +267,9 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
<li>
|
||||
<a href="?lang=en"><span class="flag-icon flag-icon-gb"></span> EN - english</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=es"><span class="flag-icon flag-icon-es"></span> ES - español</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?lang=fr"><span class="flag-icon flag-icon-fr"></span> FR - français</a>
|
||||
</li>
|
||||
|
||||
@@ -15,27 +15,12 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if($language == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
}
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
|
||||
$sql_res = $mysqlcon->query("SELECT * FROM `$dbname`.`stats_platforms` ORDER BY `count` DESC")->fetchALL(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
|
||||
require_once('nav.php');
|
||||
|
||||
@@ -16,13 +16,13 @@ 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);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$db_arr = $mysqlcon->query("SELECT `uuid`,`name`,`count`,`idle`,`cldgroup`,`online` FROM `$dbname`.`user` ORDER BY (`count` - `idle`) DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0013'];
|
||||
} else {
|
||||
@@ -37,9 +37,9 @@ $top10_idle_sum = 0;
|
||||
|
||||
foreach ($db_arr as $uuid => $client) {
|
||||
$sgroups = array_flip(explode(",", $client['cldgroup']));
|
||||
if (!isset($exceptuuid[$uuid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
if (!isset($cfg['rankup_excepted_unique_client_id_list'][$uuid]) && !array_intersect_key($sgroups, $cfg['rankup_excepted_group_id_list'])) {
|
||||
if ($count10 == 10) break;
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$hours = $client['count'] - $client['idle'];
|
||||
} else {
|
||||
$hours = $client['count'];
|
||||
|
||||
@@ -16,13 +16,13 @@ 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);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$db_arr = $mysqlcon->query("SELECT `s`.`uuid`,`s`.`count_month`,`s`.`idle_month`,`u`.`name`,`u`.`online`,`u`.`cldgroup` FROM `$dbname`.`stats_user` AS `s` INNER JOIN `$dbname`.`user` AS `u` ON `s`.`uuid`=`u`.`uuid` WHERE `s`.`removed`='0' ORDER BY (`s`.`count_month` - `s`.`idle_month`) DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0013'];
|
||||
} else {
|
||||
@@ -39,9 +39,9 @@ $top10_idle_sum = 0;
|
||||
|
||||
foreach ($db_arr as $uuid => $client) {
|
||||
$sgroups = array_flip(explode(",", $client['cldgroup']));
|
||||
if (!isset($exceptuuid[$uuid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
if (!isset($cfg['rankup_excepted_unique_client_id_list'][$uuid]) && !array_intersect_key($sgroups, $cfg['rankup_excepted_group_id_list'])) {
|
||||
if ($count10 == 10) break;
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$hours = $client['count_month'] - $client['idle_month'];
|
||||
} else {
|
||||
$hours = $client['count_month'];
|
||||
|
||||
@@ -16,13 +16,13 @@ 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);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$db_arr = $mysqlcon->query("SELECT `s`.`uuid`,`s`.`count_week`,`s`.`idle_week`,`u`.`name`,`u`.`online`,`u`.`cldgroup` FROM `$dbname`.`stats_user` AS `s` INNER JOIN `$dbname`.`user` AS `u` ON `s`.`uuid`=`u`.`uuid` WHERE `s`.`removed`='0' ORDER BY (`s`.`count_week` - `s`.`idle_week`) DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
$texttime = $lang['sttw0013'];
|
||||
} else {
|
||||
@@ -39,9 +39,9 @@ $top10_idle_sum = 0;
|
||||
|
||||
foreach ($db_arr as $uuid => $client) {
|
||||
$sgroups = array_flip(explode(",", $client['cldgroup']));
|
||||
if (!isset($exceptuuid[$uuid]) && !array_intersect_key($sgroups, $exceptgroup)) {
|
||||
if (!isset($cfg['rankup_excepted_unique_client_id_list'][$uuid]) && !array_intersect_key($sgroups, $cfg['rankup_excepted_group_id_list'])) {
|
||||
if ($count10 == 10) break;
|
||||
if ($substridle == 1) {
|
||||
if ($cfg['rankup_time_assess_mode'] == 1) {
|
||||
$hours = $client['count_week'] - $client['idle_week'];
|
||||
} else {
|
||||
$hours = $client['count_week'];
|
||||
|
||||
@@ -17,10 +17,10 @@ require_once('../other/phpcommand.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['token']) && isset($_SESSION[$rspathhex.'temp_uuid'])) {
|
||||
@@ -30,14 +30,14 @@ if(isset($_REQUEST['token']) && isset($_SESSION[$rspathhex.'temp_uuid'])) {
|
||||
$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.'serverport'] = $cfg['teamspeak_voice_port'];
|
||||
$_SESSION[$rspathhex.'uuid_verified'] = $_SESSION[$rspathhex.'temp_uuid'];
|
||||
$_SESSION[$rspathhex.'tsuid'] = $_SESSION[$rspathhex.'temp_uuid'];
|
||||
$_SESSION[$rspathhex.'multiple'] = array();
|
||||
$_SESSION[$rspathhex.'connected'] = 1;
|
||||
$_SESSION[$rspathhex.'tscldbid'] = $_SESSION[$rspathhex.'temp_cldbid'];
|
||||
$_SESSION[$rspathhex.'tsname'] = $_SESSION[$rspathhex.'temp_name'];
|
||||
foreach ($adminuuid as $auuid) {
|
||||
foreach ($cfg['webinterface_admin_client_unique_id_list'] as $auuid) {
|
||||
if ($_SESSION[$rspathhex.'uuid_verified'] == $auuid) {
|
||||
$_SESSION[$rspathhex.'admin'] = TRUE;
|
||||
}
|
||||
@@ -68,18 +68,18 @@ if(isset($_REQUEST['token']) && isset($_SESSION[$rspathhex.'temp_uuid'])) {
|
||||
} else {
|
||||
$_SESSION[$rspathhex.'tsavatar'] = "none";
|
||||
}
|
||||
$_SESSION[$rspathhex.'language'] = $language;
|
||||
$_SESSION[$rspathhex.'language'] = $cfg['default_language'];
|
||||
} else {
|
||||
$err_msg = $lang['stve0006']; $err_lvl = 3;
|
||||
}
|
||||
}
|
||||
|
||||
if((!isset($_SESSION[$rspathhex.'multiple']) || count($_SESSION[$rspathhex.'multiple']) == 0) && ($registercid == NULL || $registercid == 0)) {
|
||||
if((!isset($_SESSION[$rspathhex.'multiple']) || count($_SESSION[$rspathhex.'multiple']) == 0) && ($cfg['teamspeak_verification_channel_id'] == NULL || $cfg['teamspeak_verification_channel_id'] == 0)) {
|
||||
$err_msg = $lang['verify0001']."<br><br>".$lang['verify0003'];
|
||||
$err_lvl = 3;
|
||||
} elseif($_SESSION[$rspathhex.'connected'] == 0 && $registercid != NULL && $registercid != 0) {
|
||||
} elseif($_SESSION[$rspathhex.'connected'] == 0 && $cfg['teamspeak_verification_channel_id'] != NULL && $cfg['teamspeak_verification_channel_id'] != 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();
|
||||
$uuids = $mysqlcon->query("SELECT `name`,`uuid` FROM `$dbname`.`user` WHERE `online`='1' AND `cid`='{$cfg['teamspeak_verification_channel_id']}' ORDER BY `name` ASC")->fetchAll();
|
||||
foreach($uuids as $entry) {
|
||||
$_SESSION[$rspathhex.'multiple'][$entry['uuid']] = $entry['name'];
|
||||
}
|
||||
@@ -90,21 +90,21 @@ if((!isset($_SESSION[$rspathhex.'multiple']) || count($_SESSION[$rspathhex.'mult
|
||||
if(isset($_POST['uuid']) && !isset($_SESSION[$rspathhex.'temp_uuid'])) {
|
||||
require_once('../libs/ts3_lib/TeamSpeak3.php');
|
||||
try {
|
||||
if($ts['tsencrypt'] == 1) {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&ssh=1");
|
||||
if($cfg['teamspeak_query_encrypt_switch'] == 1) {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($cfg['teamspeak_query_user']).":".rawurlencode($cfg['teamspeak_query_pass'])."@".$cfg['teamspeak_host_address'].":".$cfg['teamspeak_query_port']."/?server_port=".$cfg['teamspeak_voice_port']."&ssh=1");
|
||||
} else {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&blocking=0");
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($cfg['teamspeak_query_user']).":".rawurlencode($cfg['teamspeak_query_pass'])."@".$cfg['teamspeak_host_address'].":".$cfg['teamspeak_query_port']."/?server_port=".$cfg['teamspeak_voice_port']."&blocking=0");
|
||||
}
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$ts3->selfUpdate(array('client_nickname' => "Ranksystem - Verification"));
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$allclients = $ts3->clientList();
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
@@ -138,7 +138,7 @@ require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl);
|
||||
if(count($_SESSION[$rspathhex.'multiple']) > 1 || ($_SESSION[$rspathhex.'connected'] == 0 && $registercid != NULL && $registercid != 0)) {
|
||||
if(count($_SESSION[$rspathhex.'multiple']) > 1 || ($_SESSION[$rspathhex.'connected'] == 0 && $cfg['teamspeak_verification_channel_id'] != NULL && $cfg['teamspeak_verification_channel_id'] != 0)) {
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
<div id="login-overlay" class="modal-dialog">
|
||||
@@ -153,14 +153,14 @@ require_once('nav.php');
|
||||
<?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) {
|
||||
if (($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='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') {
|
||||
} elseif ($cfg['teamspeak_host_address']=='localhost' || $cfg['teamspeak_host_address']=='127.0.0.1') {
|
||||
$ts3link .= $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
$ts3link .= $ts['host'];
|
||||
$ts3link .= $cfg['teamspeak_host_address'];
|
||||
}
|
||||
$ts3link .= ':'.$ts['voice'].'?cid='.$registercid.'">';
|
||||
$ts3link .= ':'.$cfg['teamspeak_voice_port'].'?cid='.$cfg['teamspeak_verification_channel_id'].'">';
|
||||
echo '<p>1. ',sprintf($lang['verify0002'], $ts3link, '</a>'),'</p>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -15,27 +15,12 @@ require_once('../other/config.php');
|
||||
require_once('../other/session.php');
|
||||
require_once('../other/load_addons_config.php');
|
||||
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$dbname,$timezone,$logpath);
|
||||
|
||||
if($language == "ar") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "de") {
|
||||
require_once('../languages/nations_de.php');
|
||||
} elseif($language == "en") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "it") {
|
||||
require_once('../languages/nations_it.php');
|
||||
} elseif($language == "ro") {
|
||||
require_once('../languages/nations_en.php');
|
||||
} elseif($language == "ru") {
|
||||
require_once('../languages/nations_ru.php');
|
||||
}
|
||||
$addons_config = load_addons_config($mysqlcon,$lang,$cfg,$dbname);
|
||||
|
||||
if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
set_session_ts3($mysqlcon,$cfg,$lang,$dbname);
|
||||
}
|
||||
|
||||
|
||||
$sql_res = $mysqlcon->query("SELECT * FROM `$dbname`.`stats_versions` ORDER BY `count` DESC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC);
|
||||
|
||||
require_once('nav.php');
|
||||
|
||||
Reference in New Issue
Block a user