mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 02:01:40 +09:00
r8149 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8169 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
beea2b09d2
commit
248932fca8
1 changed files with 22 additions and 16 deletions
|
|
@ -15,7 +15,7 @@ class Mobile {
|
|||
}
|
||||
|
||||
function _isFromMobilePhone() {
|
||||
if(isset($this->ismobile)) return $this->ismobile;
|
||||
if($this->ismobile !== null) return $this->ismobile;
|
||||
$db_info = Context::getDBInfo();
|
||||
if($db_info->use_mobile_view != "Y" || Context::get('full_browse') || $_COOKIE["FullBrowse"])
|
||||
{
|
||||
|
|
@ -23,27 +23,33 @@ class Mobile {
|
|||
}
|
||||
else
|
||||
{
|
||||
$xe_web_path = Context::pathToUrl(_XE_PATH_);
|
||||
|
||||
$m = Context::get('m');
|
||||
if($m == "1") {
|
||||
$_COOKIE["mobile"] = true;
|
||||
setcookie("mobile", true);
|
||||
$this->ismobile = true;
|
||||
if(strlen($m)==1) {
|
||||
if($m == "1") {
|
||||
$_COOKIE["mobile"] = 'true';
|
||||
setcookie("mobile", 'true', 0, $xe_web_path);
|
||||
$this->ismobile = true;
|
||||
}
|
||||
else if($m == "0") {
|
||||
$_COOKIE["mobile"] = 'false';
|
||||
setcookie("mobile", 'false', 0, $xe_web_path);
|
||||
$this->ismobile = false;
|
||||
}
|
||||
}
|
||||
else if($m === "0") {
|
||||
$_COOKIE["mobile"] = false;
|
||||
setcookie("mobile", false);
|
||||
$this->ismobile = false;
|
||||
else if(isset($_COOKIE["mobile"])) {
|
||||
if($_COOKIE['mobile'] == 'true') {
|
||||
$this->ismobile = true;
|
||||
}
|
||||
else if($_COOKIE["mobile"] == 'false') {
|
||||
$this->ismobile = false;
|
||||
}
|
||||
}
|
||||
else if($_COOKIE["mobile"] == true) {
|
||||
$this->ismobile = true;
|
||||
}
|
||||
else if($_COOKIE["mobile"] == false) {
|
||||
$this->ismobile = false;
|
||||
}
|
||||
else {
|
||||
if(preg_match('/(iPod|iPhone|Android|BlackBerry|SymbianOS|SCH\-M[0-9]+)/',$_SERVER['HTTP_USER_AGENT']))
|
||||
{
|
||||
setcookie("mobile", true);
|
||||
setcookie("mobile", 'true', 0, $xe_web_path);
|
||||
$this->ismobile = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue