mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
#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:
parent
286edea1a2
commit
5ba8a5ed76
1 changed files with 14 additions and 0 deletions
14
classes/mobile/Mobile.class.php
Normal file
14
classes/mobile/Mobile.class.php
Normal 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']);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue