-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 1.8 트리와 동기화
- Loading branch information
Showing
54 changed files
with
3,276 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
/// Copyright (c) 2004-2010, Needlworks / Tatter Network Foundation | ||
/// All rights reserved. Licensed under the GPL. | ||
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) | ||
|
||
final class Utils_Browser extends Singleton | ||
{ | ||
private static $browserName; | ||
public static function getInstance() { | ||
return self::_getInstance(__CLASS__); | ||
} | ||
|
||
function __construct() { | ||
$this->browserName = null; | ||
} | ||
|
||
public function getBrowserName() { | ||
if(!is_null($this->browserName)) return $this->browserName; | ||
if(isset($_SERVER['HTTP_USER_AGENT'])) { | ||
if(strpos($_SERVER['HTTP_USER_AGENT'],'iPhone') || | ||
strpos($_SERVER['HTTP_USER_AGENT'],'iPod')) { | ||
$this->browserName = 'mSafari'; | ||
} else if(strpos($_SERVER['HTTP_USER_AGENT'],'Firefox') || | ||
strpos($_SERVER['HTTP_USER_AGENT'],'iceweasel') || | ||
strpos($_SERVER['HTTP_USER_AGENT'],'Minefield')) { | ||
$this->browserName = 'firefox'; | ||
} else if(strpos($_SERVER['HTTP_USER_AGENT'],'Safari')) { | ||
$this->browserName = 'Safari'; | ||
} else if(strpos($_SERVER['HTTP_USER_AGENT'],'Chrome')) { | ||
$this->browserName = 'Chrome'; | ||
} else if (strpos($_SERVER['HTTP_USER_AGENT'],'Webkit')) { | ||
$this->browserName = 'Webkit'; | ||
} else if (strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')) { | ||
$this->browserName = 'IE'; | ||
} else if (strpos($_SERVER['HTTP_USER_AGENT'],'Opera')) { | ||
$this->browserName = 'Opera'; | ||
} else { | ||
$this->browserName = 'unknown'; | ||
} | ||
} | ||
return $this->browserName; | ||
} | ||
public function getVersion() { | ||
} | ||
|
||
public function isMobile() { | ||
} | ||
public function isSafari() { | ||
} | ||
public function isIE() { | ||
} | ||
public function isOpera() { | ||
} | ||
|
||
function __destruct() { | ||
// Nothing to do: destruction of this class means the end of execution | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.