<?php
define('NTLCMS', 1);
$module = 'checked';
include ('../system/start.php');
include ('../system/function.php');
include ('../system/antidos.php');
include ('../system/head.php');
################################################################################
if (!$active){
header('Location: '.URL);
$_SESSION['fail'] = 'Вы не авторизированы!';
exit;
}
################################################################################
echo '<div class="title"><b>'.razd.' Информация о клиенте</b></div>';
################################################################################	
?><script type="text/javascript">
function client_data(info){
if (info == 'width'){
width_height_html = '';
width = (screen.width) ? screen.width:'';
height = (screen.height) ? screen.height:'';
// check for windows off standard dpi screen res
if (typeof(screen.deviceXDPI) == 'number'){
width *= screen.deviceXDPI/screen.logicalXDPI;
height *= screen.deviceYDPI/screen.logicalYDPI;
} 
width_height_html += ' ' + width + " x " + height + " px";
(width && height) ? document.write(width_height_html):'';
} else if (info == 'js'){
document.write(' JavaScript включен');
} else if (info == 'cookies'){
expires = '';
Set_Cookie('cookie_test', 'it_worked' , expires, '', '', '');
string = 'Cookies';
if (Get_Cookie('cookie_test')){
string += 'Cookies включены';
} else {
string += 'Файлы cookie отключены';
}
document.write(string);
}
}
</script><?php

?><script>
function checkFlash(){
var flashinstalled = false;
if (navigator.plugins){
if (navigator.plugins["Shockwave Flash"]){
flashinstalled = true;
} else if (navigator.plugins["Shockwave Flash 2.0"]){
flashinstalled = true;
}
} else if (navigator.mimeTypes){
var x = navigator.mimeTypes['application/x-shockwave-flash'];
if (x && x.enabledPlugin){
flashinstalled = true;
}
} else {
flashinstalled = true;
}
return flashinstalled;
}
</script><?php

$detect = new Mobile_Detect;
$detect -> setUserAgent($_USER['ua']);

$RealIP = explode(',', $_USER['real']); //Real $RealIP['0']
$ProxyIP = explode(',', $_USER['real']); //Proxy $RealIP['1']
	

$browser = 'Unknown Browser';
$found = false;
foreach($detect -> getBrowsers() as $name => $regex){
$check = $detect -> version($name);
if ($check !== false && !$found){
$browser = $name.' '.$check;
$found = true;
}
}


$devices = ($detect -> isMobile() ? ($detect -> isTablet() ? '<i class="fa fa-mobile-phone fa-fw"></i>' : '<i class="fa fa-tablet fa-fw"></i>') : '<i class="fa fa-desktop fa-fw"></i>');




	
echo '<div class="menu">'.image('online.png','16|16').' '.(empty($_USER['ua']) ? 'Нет данных' : checkout($_USER['ua'])).'</div>';
echo '<div class="menu">'.image('browser.png','16|16').' '.(empty($browser) ? 'Нет данных' : checkout($browser)).'</div>';	

echo '<div class="menu">'.$devices.' '.($detect -> isMobile() ? ($detect -> isTablet() ? 'Планшет' : 'Смартфон') : 'Компьютер').'</div>';
echo '<div class="menu">'.image('mapcheckin.png','16|16').' '.(empty($_USER['ip']) ? 'Нет данных' : checkout($_USER['ip'])).'</div>';
echo '<div class="menu">'.image('ip.png','16|16').' '.(empty($RealIP['0']) ? 'Нет данных' : checkout($RealIP['0'])).'</div>';







echo '<div class="menu">'.image('compsys.png','16|16').''; ?><script type = "text/javascript">client_data('width');</script><?php echo '</div>';	

echo '<div class="menu">'.image('cookies.png','16|16').''; ?><script type = "text/javascript">if (navigator.cookieEnabled) document.write(' Cookies включены'); else document.write(' Cookies отключены');</script><?php echo '</div>';	

echo '<div class="menu">'.image('js.png','16|16').''; ?><script type = "text/javascript">client_data('js');</script><noscript>JavaScript выключен</noscript><?php echo '</div>';	

echo '<div class="menu">'.image('java.png','16|16').''; ?><script type = "text/javascript">if (navigator.javaEnabled()){ Java = ' включена'; } else Java = ' отключена'; document.write(' Java ' + (Java));</script><?php echo '</div>';	

echo '<div class="menu">'.image('flash.png','16|16').''; ?><script type = "text/javascript">if (checkFlash()){ document.write(' Flash установлен'); } else { document.write(' Flash не установлен'); }</script><?php echo '</div>';	

echo '<div class="menu">'.image('ichecks.png','16|16').''; ?><script type = "text/javascript">if (window.ActiveXObject) document.write(' ActiveX включено'); else document.write(' ActiveX отключено');</script><?php echo '</div>';	


?><script>



</script><?php
/*var prefix;
var version;
if (window.mozRTCPeerConnection || navigator.mozGetUserMedia) {
prefix = 'moz';
version = parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1], 10);
} else if (window.webkitRTCPeerConnection || navigator.webkitGetUserMedia) {
prefix = 'webkit';
version = navigator.userAgent.match(/Chrom(e|ium)/) && parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10);
}

if(prefix == 'moz' || prefix == 'webkit' && version > 41){
document.write("Browser Support WebRTC")
} else {
document.write("This Browser Not Support WebRTC")
}*/
echo '<div class="block"><i class="fa fa-home fa-fw"></i> <a href="'.URL.'/cabinet">В кабинет</a></div>';

include ('../system/foot.php');
?>