<?php
foreach($OSList as $CurrOS=>$Match)
{
// Find a match
if (eregi($Match, $row2->clientbrowser))
{
if ($CurrOS == 'Windows')
{
if (preg_match('/Win64/i', $row2->clientbrowser))
{
$CurrOS .= " XP 64 bit";
break;
}
else
{
$CurrOS .= " Server 2003";
break;
}
}
if($CurrOS == 'Mac OS'){
$CurrOS = stristr($row2->clientbrowser, "Mac ");
$CurrOS = explode(" ",$CurrOS);
$version = preg_replace("/_/si",".",explode(";",$CurrOS[3]));
$revision = explode(":", stristr($row2->clientbrowser, "rv:"));
$revision = explode(")", $revision[1]);
if($revision[0] != ""){
$revision = "(Rv. ".$revision[0].")";}
else{
$revision = "";}
$CurrOS = $CurrOS[0]." ".$CurrOS[1]." ".$CurrOS[2]." ".$version[0]." ".$revision;
break;
}
if($CurrOS == 'iPhone'){
$CurrOS = stristr($row2->clientbrowser, "iPhone OS");
$CurrOS = explode(" ",$CurrOS);
$version = preg_replace("/_/si",".",explode(";",$CurrOS[2]));
$CurrOS = $CurrOS[0]." ".$CurrOS[1]." ".$version[0];
break;
}
if(eregi('ubuntu',$CurrOS))
{
foreach($Ubuntuarray as $version=>$sign)
{
if(eregi($sign, $row2->clientbrowser))
{
$CurrOS = $CurrOS." ".$version;
break;
}
}
}
if(eregi('debian',$CurrOS))
{
foreach($Debianarray as $version=>$sign)
{
if(eregi($sign, $row2->clientbrowser))
{
$CurrOS = $CurrOS." ".$version;
break;
}
}
}
if(eregi('BlackBerry',$CurrOS)){
$val = explode("y",$row2->clientbrowser);
$val = explode(" ",$val[1]);
$val = str_replace("/"," ",$val[0]);
$CurrOS = $CurrOS." ".$val;
break;
}
// We found the correct match
if(eregi("w64", $row2->clientbrowser) || eregi("x64", $row2->clientbrowser) || eregi("x86_64", $row2->clientbrowser)){
$CurrOS .= " <i>64 bit</i>";}
break;
}
}
foreach($OSimg as $Match=>$osimg)
{
// Find a match
if (eregi($Match, $CurrOS))
{
// We found the correct match
break;
}
} ?>