Display a warning about the Mobile Web Services being disabled.

@param boolean $mobileconfigured true if mobile web services are enabled
@return string HTML to output.
978589
protected function mobile_configuration_warning($mobileconfigured) {
        $output = '';
        if (!$mobileconfigured) {
            $settingslink = new moodle_url('/admin/settings.php', ['section' => 'mobilesettings']);
            $configurebutton = $this->single_button($settingslink, get_string('enablemobilewebservice', 'admin'));
            $output .= $this->warning(get_string('mobilenotconfiguredwarning', 'admin') . '&nbsp;' . $configurebutton);
        }

        return $output;
    }
920398
public static function isEnabled($config)
    {
        $value = self::getConfigValue('cache.enabled', $config);
        return empty($value) ? false : ((trim($value) == true || trim($value) == 'true') ? true : false);
    }
638494
public function setDisabled(bool $disabled = true)
    {
        if ($disabled) {
            $this->field->addProp('disabled');
        } else {
            $this->field->removeProp('disabled');
        }

        return $this;
    }
294632
static public function isMobile()
    {
        if (isset($_SERVER['HTTP_VIA'])
            || isset($_SERVER['HTTP_X_NOKIA_CONNECTION_MODE'])
            || isset($_SERVER['HTTP_X_UP_CALLING_LINE_ID'])
            // Check whether the browser/gateway says it accepts WML.
            || isset($_SERVER['HTTP_ACCEPT']) && strpos(strtoupper($_SERVER['HTTP_ACCEPT']), "VND.WAP.WML") > 0 )
        {
            return true;
        }
        
        $browser = isset($_SERVER['HTTP_USER_AGENT']) ? trim($_SERVER['HTTP_USER_AGENT']) : '';
        $clientkeywords = array(
            'nokia', 'sony', 'ericsson', 'mot', 'samsung', 'htc', 'sgh', 'lg', 'sharp', 'sie-'
            , 'philips', 'panasonic', 'alcatel', 'lenovo', 'iphone', 'ipod', 'blackberry', 'meizu',
            'android', 'netfront', 'symbian', 'ucweb', 'windowsce', 'palm', 'operamini',
            'operamobi', 'opera mobi', 'openwave', 'nexusone', 'cldc', 'midp', 'wap', 'mobile'
        );
        if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", $browser) && strpos($browser, 'ipad') === false) {
            return TRUE;
        } else {
            return FALSE;
        }
    }
974925
public function setMobile() {
		if ($this->isMobile === null) {
			$this->isMobile();
		}
		$forceMobile = $this->Controller->getRequest()->getSession()->read('User.mobile');

		if ($forceMobile !== null && !$forceMobile) {
			$this->setMobile = false;
		} elseif ($forceMobile !== null && $forceMobile || $this->isMobile()) {
			$this->setMobile = true;
		} else {
			$this->setMobile = false;
		}

		//$urlParams = Router::getParams(true);
		$urlParams = [];
		if (!isset($urlParams['pass'])) {
			$urlParams['pass'] = [];
		}
		$urlParams = array_merge($urlParams, $urlParams['pass']);
		unset($urlParams['pass']);
		if (isset($urlParams['prefix'])) {
			unset($urlParams['prefix']);
		}

		if ($this->setMobile) {
			$urlParams['?']['mobile'] = 0;
			$url = Router::url($urlParams);
			$this->Controller->set('desktopUrl', $url);
		} else {
			$urlParams['?']['mobile'] = 1;
			$url = Router::url($urlParams);
			$this->Controller->set('mobileUrl', $url);
		}

		Configure::write('User.setMobile', (int)$this->setMobile);

		if (!$this->setMobile) {
			return;
		}

		$this->Controller->viewBuilder()->setClassName('Theme');
		$this->Controller->viewBuilder()->setTheme('Mobile');
	}
958651
public function status($html = false) {
		$msg = $this->run("status");
		if ($html == true) {
			$msg = str_replace("\n", "<br />", $msg);
		}
		return $msg;
	}
1328688
public static function isMobileBrowser($userAgent)
    {
        $userAgent_lower = strtolower($userAgent);
        if (self::$isMobileBrowser === null) {
            if (self::isDesktopBrowser($userAgent)) {
                self::$isMobileBrowser = false;
            } elseif (self::checkIfContainsAnyOf($userAgent_lower, self::$mobileBrowsers)) {
                self::$isMobileBrowser = true;
            } elseif (self::regexContains($userAgent, '/[^\d]\d{3}x\d{3}/')) {
                self::$isMobileBrowser = true;
            } else {
                self::$isMobileBrowser = false;
            }
        }

        return self::$isMobileBrowser;
    }
1239299
public function escape($enabled = true)
    {
        if (!is_bool($enabled)) {
            return false;
        }
        $this->setConfig('escape', $enabled);
        Configure::write('Altair.escape', $this->getConfig('escape'));
        return true;
    }
455553
protected function render()
    {
        if ($this->mobile !== null || $this->tablet !== null) {
            if (($this->mobile === false && Container::getDevice()->isMobile())
            ||  ($this->tablet === false && Container::getDevice()->isMobileOrTablet())) {
                return '';
            }
            if (($this->mobile === true && !Container::getDevice()->isMobile())
            ||  ($this->tablet === true && !Container::getDevice()->isMobileOrTablet())) {
                $this->addCssClass('visible-xs-inline');
            }
            else if (($this->mobile === false || $this->tablet === false) 
            &&  !Container::getDevice()->isMobileOrTablet()) {
                $this->addCssClass('hidden-xs');
            }
        }
        $this->content .= $this->getHtml();
        $this->lines = [];
        if ($this->mobileCrop && $this->mobileCrop !== self::CROP_AUTO) {
            $croppedContent = T::crop($this->content, $this->mobileCrop);
            if (Container::getDevice()->isMobile()) {
                $content = $this->escape ? $this->esc($croppedContent) : $croppedContent;
                unset($croppedContent);
            } else {
                $content = $this->escape ? $this->esc($this->content) : $this->content;
                $this->addCssClass('hidden-xs');
                $croppedContent = $this->escape ? $this->esc($croppedContent) : $croppedContent;
            }
        }
        if (!isset($content)) {
            $content = $this->escape ? $this->esc($this->content) : $this->content;
        }
        if ($this->mobileCrop === self::CROP_AUTO) {
            $this->addCssClass('text-overflow');
        }
        $this->setAttributes($this->getTooltipAttributes());
        $this->setAttributes($this->getPopoverAttributes());
        $this->addCssClasses($this->getMenuCssClasses());
        $this->setAttributes($this->getMenuAttributes());
        $menuOrientation = $this->menu ? ' ' . $this->menu->getOrientationClass() : '';
        if (!$this->elt && $this->getAttributes()) {
            $this->setElement('span');
        }
        $this->elt !== '' && $this->html('<' . $this->elt . $this->getEltDecorationStr() . '>');
        $this->html($content);
        $this->elt !== '' && $this->html('</' . $this->elt . '>');
        if (isset($croppedContent)) {
            $this->removeCssClass('hidden-xs');
            $this->addCssClass('visible-xs-inline');
            $this->html('<' . $this->elt . $this->getEltDecorationStr() . '>');
            $this->html($croppedContent);
            $this->html('</' . $this->elt . '>');
        }
        $html = $this->getHtml();
        if ($this->menu) {
            $html = $this
                ->html('<div class="inline dropdown clickable' . $menuOrientation . '">')
                ->html($html)
                ->html((string) $this->menu)
                ->html('</div>')
                ->getHtml();
        }
        
        return $html;
    }
480333
function(opts, fm) {
				if (fm.UA.Mobile || fm.UA.ltIE8) {
					this.disabled = true;
				}
			}
1210409
function DetectPalmWebOS()
   {
      if (stripos($this->useragent, $this->deviceWebOS) > -1)
         return $this->true; 
      else
         return $this->false; 
   }
501056
public function onMobileDomain() {
		$config = SiteConfig::current_site_config();
		$domains = explode(',', $config->MobileDomain);
		foreach($domains as $domain) {
			if(!parse_url($domain, PHP_URL_SCHEME)) $domain = Director::protocol() . $domain; // Normalize URL
			$parts = parse_url($domain);
			$compare = @$parts['host'];
			if(@$parts['port']) $compare .= ':' . $parts['port'];
			if($compare && $compare == $_SERVER['HTTP_HOST']) return true;
		}

		return false;
	}
1099419
public function isMobileClient()
    {
        $request = $this->requestStack->getCurrentRequest();
        if ($request === null) {
            return false;
        }

        return preg_match(
            '/(android|blackberry|htc|iemobile|iphone|ipad|ipaq|ipod|nokia|playbook|smartphone)/i',
            $request->headers->get('User-Agent')
        );
    }
278221
protected function checkBrowserAndroidXoomTablet()
    {
        if( stripos($this->_agent,'Android') !== false )
        {
            if( stripos($this->_agent,'Xoom Build') !== false )
            {
                $this->setVersion(self::VERSION_UNKNOWN);
                $this->setMobile(true);
                $this->setBrowser(self::BROWSER_MOTOROLA_XOOM_TABLET);
                return true;
            }
        }
        return false;
    }
31707
public function print_notice_when_no_notifiers_active() {
		if (
			'settings_page_soter' !== get_current_screen()->base
			|| $this->options->email_enabled
			|| $this->options->slack_enabled
		) {
			return;
		}

		echo $this->template->render( 'admin-notice.php', [ // WPCS: XSS OK.
			'type' => 'error',
			'message' => 'All notification channels are currently disabled. Please enable one or more below.',
		] );
	}
649119
public function isMobile($userAgent = null, $httpHeaders = null)
        {
            if ($httpHeaders) {
                $this->setHttpHeaders($httpHeaders);
            }

            if ($userAgent) {
                $this->setUserAgent($userAgent);
            }

            $this->setDetectionType(self::DETECTION_TYPE_MOBILE);

            if ($this->checkHttpHeadersForMobile()) {
                return true;
            } else {
                return $this->matchDetectionRulesAgainstUA();
            }
        }
632557
protected function htmlOptionsInput($disabled = false)
    {
        $options = ['id' => false];
        if (!empty($this->inputOptions) && is_array($this->inputOptions)) {
            $options = $this->inputOptions;
        }
        if ($disabled) {
            $options['disabled'] = true;
        }
        return $this->htmlOptionsSet('input', $options);
    }