<?php

	# mark core  v1.0
    # author Drk in
	# date 24.10.19 	

	# class browser

	class browser {

		public function __construct($ua){ # is  browser

		$arr = [
		'Android'  		=> strpos($ua,'Android'),
		'iPhone'   		=> strpos($ua,'iPhone'),
		'Windows'  		=> strpos($ua,'Windows'),
		'Opera'    		=> strpos($ua,'Opera'),
		'Firefox'  		=> strpos($ua,'Firefox'),
		'Chrome'   		=> strpos($ua,'Chrome'),
		'safari'  		=> strpos($ua,'safari'),
		'MSIE 6.0' 		=> strpos($ua,'MSIE 6.0'),
		'MSIE 7.0'		=> strpos($ua,'MSIE 7.0'),
		'MSIE 8.0' 		=> strpos($ua,'MSIE 8.0'),
		'WindowsPhone'  => strpos($ua,'WindowsPhone'),
		'BlackBerry' 	=> strpos($ua,'BlackBerry'),
		'iPod' 			=> strpos($ua,'iPod'),
		'Opera Mini' 	=> strpos($ua,'Opera Mini'),
		'Netscape' 		=> strpos($ua,'Netscape'),
		'Ucweb' 		=> strpos($ua,'Ucweb'),
		];	

		$this-> arr = $arr;

		}	

		public function get(){ # get browser

		$array = $this -> arr;	

		if ($array['Netscape']): 	  	 return '<img src="'.ico.'br/netscape.png"> Netscape';
		elseif ($array['Opera Mini']): 	 return '<img src="'.ico.'br/Opera_Mini.png"> Opera Mini';
		elseif ($array['Chrome']): 		 return '<img src="'.ico.'br/Chrome.png"> Chrome';
		elseif ($array['safari']): 		 return '<img src="'.ico.'br/safari.png"> Safari';
		elseif ($array['MSIE 6.0']): 	 return '<img src="'.ico.'br/Explorer.png"> MSIE 6.0';	
		elseif ($array['MSIE 7.0']): 	 return '<img src="'.ico.'br/Explorer.png"> MSIE 7.0';		
		elseif ($array['MSIE 8.0']): 	 return '<img src="'.ico.'br/Explorer.png"> MSIE 8.0';	
		elseif ($array['Firefox']): 	 return '<img src="'.ico.'br/firefox.png"> Firefox';	
		elseif ($array['Opera']): 		 return '<img src="'.ico.'br/Opera_Mini.png"> Opera';
		elseif ($array['Android']): 	 return '<img src="'.ico.'br/android.png"> Android';	
		elseif ($array['iPhone']): 		 return '<img src="'.ico.'br/iphone.png"> iPhone';
		elseif ($array['Windows']): 	 return '<img src="'.ico.'br/windows.png"> Windows';	
		elseif ($array['WindowsPhone']): return '<img src="'.ico.'br/windowsPhone.png"> windows Phone';	
		elseif ($array['iPod']): 		 return '<img src="'.ico.'br/iPod.png"> iPod';
		elseif ($array['BlackBerry']):   return '<img src="'.ico.'br/BlackBerry.png"> BlackBerry';
		elseif ($array['Ucweb']): 		 return '<img src="'.ico.'br/ucweb.ico"> Ucweb'; 
		else:                            return '<img src="'.ico.'br/null.png"> Неизвестно'; endif;				

		}	

		
	}	
?>