本文整理汇总了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.");
}
示例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.");
}
示例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("<", $from);
$from = trim(array_shift($ar));
$text = ($index < 10 ? "0" : "") . $index . ". " . $from . " > " . $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();
}