Файл: newstats.ru/newstats.ru/system/view/site/index.tpl
Строк: 25
<?
if(isset($user)){
if($user['t']==0){
	include_once
'system/view/site/web.php';
	}elseif($user['t']==1){
	include_once
'system/view/site/wap.php';
	}elseif($user['t']==2){
	include_once
'system/view/site/pda.php';
	}
	}else{	
if(isset($_COOKIE['wap_t']) ||
isset($_COOKIE['web_t']) ||
isset($_COOKIE['pda_t'])){
	if(isset($_COOKIE['wap_t'])){
	include_once
'system/view/site/wap.php';
	}elseif(isset($_COOKIE['web_t'])){
	include_once
'system/view/site/web.php';
	}elseif(isset($_COOKIE['pda_t'])){
	include_once
'system/view/site/pda.php';
	}
}else{
if
(isset($_SERVER["HTTP_USER_AGENT"]) &&
preg_match('#up-browser|blackberry|windows
ce|symbian|palm|android|nokia#i',
$_SERVER["HTTP_USER_AGENT"]))
$webbrowser=false;
elseif
(isset($_SERVER["HTTP_USER_AGENT"]) &&
(preg_match('#windows#i', $_SERVER["HTTP_USER_AGENT"])
||preg_match('#linux#i', $_SERVER["HTTP_USER_AGENT"])
||preg_match('#bsd#i', $_SERVER["HTTP_USER_AGENT"])
||preg_match('#x11#i', $_SERVER["HTTP_USER_AGENT"])
||preg_match('#unix#i', $_SERVER["HTTP_USER_AGENT"])
||preg_match('#macos#i', $_SERVER["HTTP_USER_AGENT"])
||preg_match('#macintosh#i',
$_SERVER["HTTP_USER_AGENT"])))
$webbrowser=true;else
$webbrowser=false;
if($webbrowser){
if(isset($_COOKIE['wap_t']))echo
$_COOKIE['wap_t'];
	include_once
'system/view/site/web.php';
	}else{
	include_once
'system/view/site/wap.php';
	}
	}
	
	
	
	
	}
	?>