View file system/inc/classes/detection_browser.class.php

File size: 1.4Kb
<?
/*
 * @ Class: Определение браузера
 * @ Author: Shamsik
 * @ CMS: SHCMS Engine
*/
    
class detection {

    public function __construct() {
    }
		//WAP Тема
        public function wap_browser() {

                if (isset($_SERVER["HTTP_USER_AGENT"])  && (eregi('(up-browser)|(blackberry)|(windows ce)|symbian|palm|nokia', $_SERVER["HTTP_USER_AGENT"])))
                    $brodilka_wap = 'wap';
	            return $brodilka_wap;
        }
		//WEB Тема
        public function web_browser() {

            if (isset($_SERVER["HTTP_USER_AGENT"]) 
                && (eregi('windows', $_SERVER["HTTP_USER_AGENT"]) 
	            || eregi('linux', $_SERVER["HTTP_USER_AGENT"]) 
	            || eregi('bsd', $_SERVER["HTTP_USER_AGENT"]) 
	            || eregi('x11', $_SERVER["HTTP_USER_AGENT"]) 
	            || eregi('unix', $_SERVER["HTTP_USER_AGENT"]) 
	            || eregi('macos', $_SERVER["HTTP_USER_AGENT"]) 
	            || eregi('macintosh', $_SERVER["HTTP_USER_AGENT"])))
            $brodilka_web = 'web';	   
	    return $brodilka_web;
        }
		//iTOUCH Тема
        public function itouch_browser() {
                if (isset($_SERVER["HTTP_USER_AGENT"])  && (eregi('(iPhone)|(iPod)|(iPad)|Samsung Bada|Android', $_SERVER["HTTP_USER_AGENT"])))
                    $brodilka_itouch = 'itouch';
			return $brodilka_itouch;
        }
}

?>