当前位置: 首页>>代码示例>>PHP>>正文


PHP AJXP_Utils::userAgentIsIOS方法代码示例

本文整理汇总了PHP中AJXP_Utils::userAgentIsIOS方法的典型用法代码示例。如果您正苦于以下问题:PHP AJXP_Utils::userAgentIsIOS方法的具体用法?PHP AJXP_Utils::userAgentIsIOS怎么用?PHP AJXP_Utils::userAgentIsIOS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AJXP_Utils的用法示例。


在下文中一共展示了AJXP_Utils::userAgentIsIOS方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: performChecks

 public function performChecks()
 {
     if (AJXP_Utils::userAgentIsIOS() && !isset($_GET["skipIOS"]) && !isset($_COOKIE["SKIP_IOS"])) {
         return;
     }
     if (AJXP_Utils::userAgentIsAndroid() && !isset($_GET["skipANDROID"]) && !isset($_COOKIE["SKIP_ANDROID"])) {
         return;
     }
     throw new Exception("Active only when mobile user agent detected.");
 }
开发者ID:biggtfish,项目名称:cms,代码行数:10,代码来源:class.IOSGuiPlugin.php

示例2: performChecks

 public function performChecks()
 {
     if (isset($_SESSION["CURRENT_MINISITE"])) {
         throw new Exception("Disabled for minisites");
     }
     if (AJXP_Utils::userAgentIsIOS() && !isset($_GET["skipIOS"]) && !isset($_COOKIE["SKIP_IOS"])) {
         return;
     }
     if (AJXP_Utils::userAgentIsAndroid() && !isset($_GET["skipANDROID"]) && !isset($_COOKIE["SKIP_ANDROID"])) {
         return;
     }
     throw new Exception("Active only when mobile user agent detected.");
 }
开发者ID:projectesIF,项目名称:Ateneu,代码行数:13,代码来源:class.IOSGuiPlugin.php

示例3: lsPostProcess

 public function lsPostProcess($action, $httpVars, $outputVars)
 {
     if (!EmlParser::$currentListingOnlyEmails) {
         if (isset($httpVars["playlist"])) {
             return;
         }
         header('Content-Type: text/xml; charset=UTF-8');
         header('Cache-Control: no-cache');
         print $outputVars["ob_output"];
         return;
     }
     $config = '<columns template_name="eml.list">
         <column messageId="editor.eml.1" attributeName="ajxp_label" sortType="String"/>
         <column messageId="editor.eml.2" attributeName="eml_to" sortType="String"/>
         <column messageId="editor.eml.3" attributeName="eml_subject" sortType="String"/>
         <column messageId="editor.eml.4" attributeName="ajxp_modiftime" sortType="MyDate"/>
         <column messageId="2" attributeName="filesize" sortType="NumberKo"/>
         <column messageId="editor.eml.5" attributeName="eml_attachments" sortType="Number" modifier="EmlViewer.prototype.attachmentCellRenderer" fixedWidth="30"/>
     </columns>';
     $dom = new DOMDocument("1.0", "UTF-8");
     $dom->loadXML($outputVars["ob_output"]);
     $mobileAgent = AJXP_Utils::userAgentIsIOS() || strpos($_SERVER["HTTP_USER_AGENT"], "ajaxplorer-ios-client") !== false;
     $this->logDebug("MOBILE AGENT DETECTED?" . $mobileAgent, $_SERVER["HTTP_USER_AGENT"]);
     if (EmlParser::$currentListingOnlyEmails === true) {
         // Replace all text attributes by the "from" value
         $index = 1;
         foreach ($dom->documentElement->childNodes as $child) {
             if ($mobileAgent) {
                 $from = $child->getAttribute("eml_from");
                 $ar = explode("&lt;", $from);
                 $from = trim(array_shift($ar));
                 $text = ($index < 10 ? "0" : "") . $index . ". " . $from . " &gt; " . $child->getAttribute("eml_subject");
                 if (strpos($_SERVER["HTTP_USER_AGENT"], "ajaxplorer-ios-client") !== false) {
                     $text = html_entity_decode($text, ENT_COMPAT, "UTF-8");
                 }
                 $index++;
             } else {
                 $text = $child->getAttribute("eml_from");
             }
             $child->setAttribute("text", $text);
             $child->setAttribute("ajxp_modiftime", $child->getAttribute("eml_time"));
         }
     }
     // Add the columns template definition
     $insert = new DOMDocument("1.0", "UTF-8");
     $config = "<client_configs><component_config className=\"FilesList\" local=\"true\">{$config}</component_config></client_configs>";
     $insert->loadXML($config);
     $imported = $dom->importNode($insert->documentElement, true);
     $dom->documentElement->appendChild($imported);
     header('Content-Type: text/xml; charset=UTF-8');
     header('Cache-Control: no-cache');
     print $dom->saveXML();
 }
开发者ID:biggtfish,项目名称:cms,代码行数:53,代码来源:class.EmlParser.php


注:本文中的AJXP_Utils::userAgentIsIOS方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。