#18947649 : add mobile class (in progress)

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7512 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2010-06-15 07:42:44 +00:00
parent 286edea1a2
commit 5ba8a5ed76

View file

@ -0,0 +1,14 @@
<?php
class Mobile {
function isFromMobilePhone() {
if(Context::get('full_browse') || $_COOKIE["FullBrowse"])
{
return false;
}
return Context::get('mobile') || preg_match('/(iPod|iPhone|Android|SCH\-M[0-9]+)/',$_SERVER['HTTP_USER_AGENT']);
}
}
?>