on = 'playstation'; var $deviceNintendoDs = 'nitro'; var $deviceNintendo = 'nintendo'; var $deviceWii = 'wii'; var $deviceXbox = 'xbox'; var $deviceArchos = 'archos'; var $engineOpera = 'opera'; //Popular browser var $engineNetfront = 'netfront'; //Common embedded OS browser var $engineUpBrowser = 'up.browser'; //common on some phones var $engineOpenWeb = 'openweb'; //Transcoding by OpenWave server var $deviceMidp = 'midp'; //a mobile Java technology var $uplink = 'up.link'; var $engineTelecaQ = 'teleca q'; //a modern feature phone browser var $devicePda = 'pda'; //some devices report themselves as PDAs var $mini = 'mini'; //Some mobile browsers put 'mini' in their names. var $mobile = 'mobile'; //Some mobile browsers put 'mobile' in their user agent strings. var $mobi = 'mobi'; //Some mobile browsers put 'mobi' in their user agent strings. //Use Maemo, Tablet, and Linux to test for Nokia's Internet Tablets. var $maemo = 'maemo'; var $linux = 'linux'; var $qtembedded = 'qt embedded'; //for Sony Mylo and others var $mylocom2 = 'com2'; //for Sony Mylo also //In some UserAgents, the only clue is the manufacturer. var $manuSonyEricsson = "sonyericsson"; var $manuericsson = "ericsson"; var $manuSamsung1 = "sec-sgh"; var $manuSony = "sony"; var $manuHtc = "htc"; //Popular Android and WinMo manufacturer //In some UserAgents, the only clue is the operator. var $svcDocomo = "docomo"; var $svcKddi = "kddi"; var $svcVodafone = "vodafone"; //Disambiguation strings. var $disUpdate = "update"; //pda vs. update //************************** //The constructor. Allows the latest PHP (5.0+) to locate a constructor object and initialize the object. function __construct() { $this->uagent_info(); } //************************** //The object initializer. Initializes several default variables. function uagent_info() { $this->useragent = isset($_SERVER['HTTP_USER_AGENT'])?strtolower($_SERVER['HTTP_USER_AGENT']):''; $this->httpaccept = isset($_SERVER['HTTP_ACCEPT'])?strtolower($_SERVER['HTTP_ACCEPT']):''; //Let's initialize some values to save cycles later. $this->InitDeviceScan(); } //************************** // Initialize Key Stored Values. function InitDeviceScan() { global $isIphone, $isAndroidPhone, $isTierTablet, $isTierIphone; //We'll use these 4 variables to speed other processing. They're super common. $this->isIphone = $this->DetectIphoneOrIpod(); $this->isAndroidPhone = $this->DetectAndroidPhone(); $this->isTierIphone = $this->DetectTierIphone(); $this->isTierTablet = $this->DetectTierTablet(); //Optional: Comment these out if you don't need them. global $isTierRichCss, $isTierGenericMobile; $this->isTierRichCss = $this->DetectTierRichCss(); $this->isTierGenericMobile = $this->DetectTierOtherPhones(); } //************************** //Returns the contents of the User Agent value, in lower case. function Get_Uagent() { return $this->useragent; } //************************** //Returns the contents of the HTTP Accept value, in lower case. function Get_HttpAccept() { return $this->httpaccept; } //************************** // Detects if the current device is an iPhone. function DetectIphone() { if (stripos($this->useragent, $this->deviceIphone) > -1) { //The iPad and iPod Touch say they're an iPhone. So let's disambiguate. if ($this->DetectIpad() == $this->true || $this->DetectIpod() == $this->true) return $this->false; //Yay! It's an iPhone! else return $this->true; } else return $this->false; } //************************** // Detects if the current device is an iPod Touch. function DetectIpod() { if (stripos($this->useragent, $this->deviceIpod) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current device is an iPad tablet. function DetectIpad() { if (stripos($this->useragent, $this->deviceIpad) > -1 && $this->DetectWebkit() == $this->true) return $this->true; else return $this->false; } //************************** // Detects if the current device is an iPhone or iPod Touch. function DetectIphoneOrIpod() { //We repeat the searches here because some iPods may report themselves as an iPhone, which would be okay. if (stripos($this->useragent, $this->deviceIphone) > -1 || stripos($this->useragent, $this->deviceIpod) > -1) return $this->true; else return $this->false; } //************************** // Detects *any* iOS device: iPhone, iPod Touch, iPad. function DetectIos() { if (($this->DetectIphoneOrIpod() == $this->true) || ($this->DetectIpad() == $this->true)) return $this->true; else return $this->false; } //************************** // Detects *any* Android OS-based device: phone, tablet, and multi-media player. // Also detects Google TV. function DetectAndroid() { if ((stripos($this->useragent, $this->deviceAndroid) > -1) || ($this->DetectGoogleTV() == $this->true)) return $this->true; //Special check for the HTC Flyer 7" tablet if ((stripos($this->useragent, $this->deviceHtcFlyer) > -1)) return $this->true; else return $this->false; } //************************** // Detects if the current device is a (small-ish) Android OS-based device // used for calling and/or multi-media (like a Samsung Galaxy Player). // Google says these devices will have 'Android' AND 'mobile' in user agent. // Ignores tablets (Honeycomb and later). function DetectAndroidPhone() { if (($this->DetectAndroid() == $this->true) && (stripos($this->useragent, $this->mobile) > -1)) return $this->true; //Special check for Android phones with Opera Mobile. They should report here. if (($this->DetectOperaAndroidPhone() == $this->true)) return $this->true; //Special check for the HTC Flyer 7" tablet. It should report here. if ((stripos($this->useragent, $this->deviceHtcFlyer) > -1)) return $this->true; else return $this->false; } //************************** // Detects if the current device is a (self-reported) Android tablet. // Google says these devices will have 'Android' and NOT 'mobile' in their user agent. function DetectAndroidTablet() { //First, let's make sure we're on an Android device. if ($this->DetectAndroid() == $this->false) return $this->false; //Special check for Opera Android Phones. They should NOT report here. if ($this->DetectOperaMobile() == $this->true) return $this->false; //Special check for the HTC Flyer 7" tablet. It should NOT report here. if ((stripos($this->useragent, $this->deviceHtcFlyer) > -1)) return $this->false; //Otherwise, if it's Android and does NOT have 'mobile' in it, Google says it's a tablet. if (stripos($this->useragent, $this->mobile) > -1) return $this->false; else return $this->true; } //************************** // Detects if the current device is an Android OS-based device and // the browser is based on WebKit. function DetectAndroidWebKit() { if (($this->DetectAndroid() == $this->true) && ($this->DetectWebkit() == $this->true)) return $this->true; else return $this->false; } //************************** // Detects if the current device is a GoogleTV. function DetectGoogleTV() { if (stripos($this->useragent, $this->deviceGoogleTV) > -1) return $this->true; else return $this- Pszczynska.pl – Pszczyński Dziennik Internetowy

Art. spons. Co wyróżnia najpopularniejsze odżywki do rzęs

Na rynku dostępnych jest wiele odżywek do rzęs. Wśród nich są liderzy, którzy cieszą się największym zainteresowaniem wśród Pań. Sprawdźmy więc,...
Art. spons. Dlaczego warto zamontować panele fotowoltaiczne w domu?

Art. spons. Dlaczego warto zamontować panele fotowoltaiczne w domu?

Fotowoltaika z roku na rok zdobywa coraz więcej miłośników. Dowiedz się, dlaczego warto postawić na panele słoneczne!

Art. spons. Szanowni Moi Kochani Ślązacy!

Art. spons. Sprawdź jak skuteczne pozycjonowanie stron zapewnia zyski ze sprzedaży w sieci

W dzisiejszych czasach niemal każdy słyszał już o pozycjonowaniu stron. Jest to najlepszy dowód przekonujący niedowiarków o skuteczności tej metody...

35 lat Muzeum Prasy Śląskiej

Muzeum Prasy Śląskiej im. Wojciecha Korfantego w Pszczynie obchodzi 35-lecie istnienia. Z okazji jubileuszu zastępca burmistrza Barbara Sopot-Zembok...

Uhonorowani przez Sybiraków

Sybiracy w podziękowaniu za wieloletnią współpracę wręczyli odznaki władzom powiatu i pracownicom pszczyńskiego starostwa

Pszczyna: Budżet na 2021 rok przyjęty

Przyszłoroczne wydatki gminy Pszczyna wyniosą niemal 324 mln zł. Taką decyzję podjęli radni, którzy opowiedzieli się za przyjęciem uchwały...

Apel w sprawie trudnej sytuacji Uzdrowiska

15 grudnia Rada Gminy Goczałkowice-Zdrój przyjęła uchwałę w sprawie wystąpienia z apelem do premiera dotyczącym uzdrowiska

Konkurs "Pierwsze zdjęcie na Instagramie"

Już wkrótce Gmina Pawłowice będzie miała swój profil na Instagramie. Z tej okazji ogłoszony został konkurs „Pierwsze zdjęcie na Instagramie”

Budżet powiatu na trudne czasy uchwalony

Remonty dróg, wsparcie szpitala, finansowanie powiatowej oświaty i komunikacji - to najważniejsze wydatki w budżecie na 2021 rok. Na 21 zadań...

12 wzruszających historii pszczyńskich Sybiraków spisanych w książce

W piątek, 18 grudnia zapraszamy na internetową promocję książki Martyny Chodykin-Wnęczak „Stukot kół. 12 historii Zesłańców Sybiru”

W czwartek i piątek utrudnienia na ul. Bielskiej w Pszczynie

Trwa remont Drogi Wojewódzkiej nr 933 w rejonie skrzyżowania z ul. Wojska Polskiego w Pszczynie

Pszczyna pozyskała 4 mln zł na fotowoltaikę

Prawie 4 mln zł pozyskała gmina Pszczyna na fotowoltaikę w ramach programu „Słoneczna Gmina Pszczyna - etap I”. Dzięki pozyskanym środkom...

Burmistrz spotkał się z ministrem klimatu

O etapach przygotowań pilotażowego programu dla Pszczyny związanego z likwidacją niskiej emisji rozmawiał burmistrz Dariusz Skrobol z ministrem klimatu...