Файл: vkollektive2014/core/browser.php
Строк: 25
<?
if (isset($u))
{
$HTTP_B = $_SERVER['HTTP_USER_AGENT'];
$Android_if = strpos($HTTP_B,'Android');
$iPhone_if = strpos($HTTP_B,'iPhone');
$windows_if = strpos($HTTP_B,'Windows');
$Opera_if = strpos($HTTP_B,'Opera');
$Firefox_if = strpos($HTTP_B,'Firefox');
$Chrome_if = strpos($HTTP_B,'Chrome');
$safari_if = strpos($HTTP_B,'safari');
$MSIE_6_0_if = strpos($HTTP_B,'MSIE 6.0');
$MSIE_7_0_if = strpos($HTTP_B,'MSIE 7.0');
$MSIE_8_0_if = strpos($HTTP_B,'MSIE 8.0');
$WindowsPhone_if = strpos($HTTP_B,'WindowsPhone');
$BlackBerry_if = strpos($HTTP_B,'BlackBerry');
$iPod_if = strpos($HTTP_B,'iPod');
$operaMini_if = strpos($HTTP_B,'Opera Mini');
$Netscape_if = strpos($HTTP_B,'Netscape');
$Ucweb_if = strpos($HTTP_B,'Ucweb');
if ($Ucweb_if) $us_browser='Ucweb';
elseif ($Netscape_if) $us_browser='Netscape';
elseif ($operaMini_if) $us_browser='Opera Mini';
elseif ($Chrome_if) $us_browser='Chrome';
elseif ($safari_if) $us_browser='safari';
elseif ($MSIE_6_0_if) $us_browser='MSIE 6.0';
elseif ($MSIE_7_0_if) $us_browser='MSIE 7.0';
elseif ($MSIE_8_0_if) $us_browser='MSIE 8.0';
elseif ($Firefox_if) $us_browser='Firefox';
elseif ($Opera_if) $us_browser='Opera';
elseif ($Android_if) $us_browser='Android';
elseif ($iPhone_if) $us_browser='iPhone';
elseif ($windows_if) $us_browser='Windows';
elseif ($WindowsPhone_if) $us_browser='WindowsPhone';
elseif ($BlackBerry_if) $us_browser='BlackBerry';
elseif ($iPod_if) $us_browser='iPod';
else $us_browser='mobile';
mysql_query("UPDATE `users` SET `us_browser`='".$us_browser."' WHERE `id` = '".$user['id']."' LIMIT 1");
}