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

File size: 1.39Kb
<?
/*
 * @ 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('linux', $_SERVER["HTTP_USER_AGENT"])))
                    $brodilka_itouch = 'itouch';
			return $brodilka_itouch;
        }
}

?>