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


PHP AJXP_Utils::userAgentIsMobile方法代码示例

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


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

示例1: loadMinisite

 public static function loadMinisite($data, $hash = '', $error = null)
 {
     if (isset($data["SECURITY_MODIFIED"]) && $data["SECURITY_MODIFIED"] === true) {
         $mess = ConfService::getMessages();
         $error = $mess['share_center.164'];
     }
     $repository = $data["REPOSITORY"];
     AJXP_PluginsService::getInstance()->initActivePlugins();
     $shareCenter = AJXP_PluginsService::findPlugin("action", "share");
     $confs = $shareCenter->getConfigs();
     $minisiteLogo = "plugins/gui.ajax/PydioLogo250.png";
     if (!empty($confs["CUSTOM_MINISITE_LOGO"])) {
         $logoPath = $confs["CUSTOM_MINISITE_LOGO"];
         if (strpos($logoPath, "plugins/") === 0 && is_file(AJXP_INSTALL_PATH . "/" . $logoPath)) {
             $minisiteLogo = $logoPath;
         } else {
             $minisiteLogo = "index_shared.php?get_action=get_global_binary_param&binary_id=" . $logoPath;
         }
     }
     // Default value
     if (isset($data["AJXP_TEMPLATE_NAME"])) {
         $templateName = $data["AJXP_TEMPLATE_NAME"];
         if ($templateName == "ajxp_film_strip" && AJXP_Utils::userAgentIsMobile()) {
             $templateName = "ajxp_shared_folder";
         }
     }
     if (!isset($templateName)) {
         $repoObject = ConfService::getRepositoryById($repository);
         if (!is_object($repoObject)) {
             $mess = ConfService::getMessages();
             $error = $mess["share_center.166"];
             $templateName = "ajxp_unique_strip";
         } else {
             $filter = $repoObject->getContentFilter();
             if (!empty($filter) && count($filter->virtualPaths) == 1) {
                 $templateName = "ajxp_unique_strip";
             } else {
                 $templateName = "ajxp_shared_folder";
             }
         }
     }
     // UPDATE TEMPLATE
     $html = file_get_contents(AJXP_INSTALL_PATH . "/" . AJXP_PLUGINS_FOLDER . "/action.share/res/minisite.php");
     AJXP_Controller::applyHook("tpl.filter_html", array(&$html));
     $html = AJXP_XMLWriter::replaceAjxpXmlKeywords($html);
     $html = str_replace("AJXP_MINISITE_LOGO", $minisiteLogo, $html);
     $html = str_replace("AJXP_APPLICATION_TITLE", ConfService::getCoreConf("APPLICATION_TITLE"), $html);
     $html = str_replace("PYDIO_APP_TITLE", ConfService::getCoreConf("APPLICATION_TITLE"), $html);
     if (isset($repository)) {
         $html = str_replace("AJXP_START_REPOSITORY", $repository, $html);
         $html = str_replace("AJXP_REPOSITORY_LABEL", ConfService::getRepositoryById($repository)->getDisplay(), $html);
     }
     $html = str_replace('AJXP_HASH_LOAD_ERROR', isset($error) ? $error : '', $html);
     $html = str_replace("AJXP_TEMPLATE_NAME", $templateName, $html);
     $html = str_replace("AJXP_LINK_HASH", $hash, $html);
     $guiConfigs = AJXP_PluginsService::findPluginById("gui.ajax")->getConfigs();
     $html = str_replace("AJXP_THEME", $guiConfigs["GUI_THEME"], $html);
     if (isset($_GET["dl"]) && isset($_GET["file"])) {
         AuthService::$useSession = false;
     } else {
         session_name("AjaXplorer_Shared" . str_replace(".", "_", $hash));
         session_start();
         AuthService::disconnect();
     }
     if (!empty($data["PRELOG_USER"])) {
         AuthService::logUser($data["PRELOG_USER"], "", true);
         $html = str_replace("AJXP_PRELOGED_USER", "ajxp_preloged_user", $html);
     } else {
         if (isset($data["PRESET_LOGIN"])) {
             $_SESSION["PENDING_REPOSITORY_ID"] = $repository;
             $_SESSION["PENDING_FOLDER"] = "/";
             $html = str_replace("AJXP_PRELOGED_USER", $data["PRESET_LOGIN"], $html);
         } else {
             $html = str_replace("AJXP_PRELOGED_USER", "ajxp_legacy_minisite", $html);
         }
     }
     if (isset($hash)) {
         $_SESSION["CURRENT_MINISITE"] = $hash;
     }
     if (isset($_GET["dl"]) && isset($_GET["file"]) && (!isset($data["DOWNLOAD_DISABLED"]) || $data["DOWNLOAD_DISABLED"] === false)) {
         ConfService::switchRootDir($repository);
         ConfService::loadRepositoryDriver();
         AJXP_PluginsService::deferBuildingRegistry();
         AJXP_PluginsService::getInstance()->initActivePlugins();
         AJXP_PluginsService::flushDeferredRegistryBuilding();
         $errMessage = null;
         try {
             $params = $_GET;
             $ACTION = "download";
             if (isset($_GET["ct"])) {
                 $mime = pathinfo($params["file"], PATHINFO_EXTENSION);
                 $editors = AJXP_PluginsService::searchAllManifests("//editor[contains(@mimes,'{$mime}') and @previewProvider='true']", "node", true, true, false);
                 if (count($editors)) {
                     foreach ($editors as $editor) {
                         $xPath = new DOMXPath($editor->ownerDocument);
                         $callbacks = $xPath->query("//action[@contentTypedProvider]", $editor);
                         if ($callbacks->length) {
                             $ACTION = $callbacks->item(0)->getAttribute("name");
                             if ($ACTION == "audio_proxy") {
                                 $params["file"] = "base64encoded:" . base64_encode($params["file"]);
//.........这里部分代码省略.........
开发者ID:saydulk,项目名称:pydio-core,代码行数:101,代码来源:class.ShareCenter.php

示例2: performChecks

 public function performChecks()
 {
     if (!AJXP_Utils::userAgentIsMobile()) {
         throw new Exception("no");
     }
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:6,代码来源:class.MobileGuiPlugin.php

示例3: array

/* PLUGINS DEFINITIONS
/* Drivers will define how the application will work. For 
/* each type of operation, there are multiple implementation
/* possible. Check the content of the plugins folder.
/* CONF = users and repositories definition, 
/* AUTH = users authentification mechanism,
/* LOG = logs of the application.
/*
/* By default, the three are all based on files.
/*
/* ACTIVE_PLUGINS adds other type of plugins to the application.
/* If you are developping your own plugin, do not forget to declare
/* it here.
/*********************************************************/
$PLUGINS = array("CONF_DRIVER" => array("NAME" => "serial", "OPTIONS" => array("REPOSITORIES_FILEPATH" => "AJXP_INSTALL_PATH/server/conf/repo.ser", "ROLES_FILEPATH" => "AJXP_INSTALL_PATH/server/users/roles.ser", "USERS_DIRPATH" => "AJXP_INSTALL_PATH/server/users")), "AUTH_DRIVER" => array("NAME" => "serial", "OPTIONS" => array("LOGIN_REDIRECT" => false, "USERS_FILEPATH" => "AJXP_INSTALL_PATH/server/users/users.ser", "AUTOCREATE_AJXPUSER" => false, "TRANSMIT_CLEAR_PASS" => false)), "LOG_DRIVER" => array("NAME" => "text", "OPTIONS" => array("LOG_PATH" => "AJXP_INSTALL_PATH/server/logs/", "LOG_FILE_NAME" => 'log_' . date('m-d-y') . '.txt', "LOG_CHMOD" => 0770)), "ACTIVE_PLUGINS" => array("editor.*", "uploader.flex", "uploader.html", "gui.ajax", "hook.*"));
if (AJXP_Utils::userAgentIsMobile()) {
    $PLUGINS["ACTIVE_PLUGINS"][] = "gui.mobile";
}
/*********************************************************/
/* BASIC REPOSITORY CONFIGURATION.
/* Use the GUI to add new repositories to explore!
/*   + Log in as "admin" and open the "Settings" Repository
/*********************************************************/
$REPOSITORIES[0] = array("DISPLAY" => "Default Files", "DRIVER" => "fs", "DRIVER_OPTIONS" => array("PATH" => realpath(dirname(__FILE__) . "/../../../../../public"), "CREATE" => true, "RECYCLE_BIN" => 'recycle_bin', "CHMOD_VALUE" => '0755', "DEFAULT_RIGHTS" => "", "PAGINATION_THRESHOLD" => 500, "PAGINATION_NUMBER" => 200, "META_SOURCES" => array()));
// DO NOT REMOVE THIS!
// SHARE ELEMENTS
$REPOSITORIES["ajxp_shared"] = array("DISPLAY" => "Shared Elements", "DISPLAY_ID" => "363", "DRIVER" => "ajxp_shared", "DRIVER_OPTIONS" => array("DEFAULT_RIGHTS" => "rw"));
// ADMIN REPOSITORY
$REPOSITORIES[1] = array("DISPLAY" => "Settings", "DISPLAY_ID" => "165", "DRIVER" => "ajxp_conf", "DRIVER_OPTIONS" => array());
/*********************************************/
/*	DEFAULT LANGUAGE
开发者ID:pussbb,项目名称:CI_DEV_CMS,代码行数:31,代码来源:conf.php


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