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


PHP AJXP_XMLWriter::writeRepositoriesData方法代码示例

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


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

示例1: repositoryDataAsJS

 function repositoryDataAsJS()
 {
     if (AuthService::usersEnabled()) {
         return "";
     }
     require_once INSTALL_PATH . "/server/classes/class.SystemTextEncoding.php";
     require_once INSTALL_PATH . "/server/classes/class.AJXP_XMLWriter.php";
     return str_replace("'", "\\'", AJXP_XMLWriter::writeRepositoriesData(null));
 }
开发者ID:bloveing,项目名称:openulteo,代码行数:9,代码来源:class.HTMLWriter.php

示例2: repositoryDataAsJS

 /**
  * Write repository data directly as javascript string
  * @static
  * @return mixed|string
  */
 public static function repositoryDataAsJS()
 {
     if (AuthService::usersEnabled()) {
         return "";
     }
     require_once AJXP_BIN_FOLDER . "/class.SystemTextEncoding.php";
     require_once AJXP_BIN_FOLDER . "/class.AJXP_XMLWriter.php";
     return str_replace("'", "\\'", AJXP_XMLWriter::writeRepositoriesData(null));
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:14,代码来源:class.HTMLWriter.php

示例3: getUserXML

 /**
  * Extract all the user data and put it in XML
  * @static
  * @param null $userObject * @internal param bool $details
  * @return string
  */
 public static function getUserXML($userObject = null)
 {
     $buffer = "";
     $loggedUser = AuthService::getLoggedUser();
     $confDriver = ConfService::getConfStorageImpl();
     if ($userObject != null) {
         $loggedUser = $userObject;
     }
     if (!AuthService::usersEnabled()) {
         $buffer .= "<user id=\"shared\">";
         $buffer .= "<active_repo id=\"" . ConfService::getCurrentRepositoryId() . "\" write=\"1\" read=\"1\"/>";
         $buffer .= AJXP_XMLWriter::writeRepositoriesData(null);
         $buffer .= "</user>";
     } else {
         if ($loggedUser != null) {
             $lock = $loggedUser->getLock();
             $buffer .= "<user id=\"" . $loggedUser->id . "\">";
             $buffer .= "<active_repo id=\"" . ConfService::getCurrentRepositoryId() . "\" write=\"" . ($loggedUser->canWrite(ConfService::getCurrentRepositoryId()) ? "1" : "0") . "\" read=\"" . ($loggedUser->canRead(ConfService::getCurrentRepositoryId()) ? "1" : "0") . "\"/>";
             $buffer .= AJXP_XMLWriter::writeRepositoriesData($loggedUser);
             $buffer .= "<preferences>";
             $preferences = $confDriver->getExposedPreferences($loggedUser);
             foreach ($preferences as $prefName => $prefData) {
                 $atts = "";
                 if (isset($prefData["exposed"]) && $prefData["exposed"] == true) {
                     foreach ($prefData as $k => $v) {
                         if ($k == "name") {
                             continue;
                         }
                         if ($k == "value") {
                             $k = "default";
                         }
                         $atts .= "{$k}='{$v}' ";
                     }
                 }
                 if (isset($prefData["pluginId"])) {
                     $atts .= "pluginId='" . $prefData["pluginId"] . "' ";
                 }
                 if ($prefData["type"] == "string") {
                     $buffer .= "<pref name=\"{$prefName}\" value=\"" . $prefData["value"] . "\" {$atts}/>";
                 } else {
                     if ($prefData["type"] == "json") {
                         $buffer .= "<pref name=\"{$prefName}\" {$atts}><![CDATA[" . $prefData["value"] . "]]></pref>";
                     }
                 }
             }
             $buffer .= "</preferences>";
             $buffer .= "<special_rights is_admin=\"" . ($loggedUser->isAdmin() ? "1" : "0") . "\"  " . ($lock !== false ? "lock=\"{$lock}\"" : "") . "/>";
             /*
             $bMarks = $loggedUser->getBookmarks();
             if (count($bMarks)) {
                 $buffer.= "<bookmarks>".AJXP_XMLWriter::writeBookmarks($bMarks, false)."</bookmarks>";
             }
             */
             $buffer .= "</user>";
         }
     }
     return $buffer;
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:64,代码来源:class.AJXP_XMLWriter.php

示例4: getUserXML

 function getUserXML($userObject = null, $details = false)
 {
     $buffer = "";
     $loggedUser = AuthService::getLoggedUser();
     if ($userObject != null) {
         $loggedUser = $userObject;
     }
     if (!AuthService::usersEnabled()) {
         $buffer .= "<user id=\"shared\">";
         if (!$details) {
             $buffer .= "<active_repo id=\"" . ConfService::getCurrentRootDirIndex() . "\" write=\"1\" read=\"1\"/>";
         }
         $buffer .= AJXP_XMLWriter::writeRepositoriesData(null, $details);
         $buffer .= "</user>";
     } else {
         if ($loggedUser != null) {
             $buffer .= "<user id=\"" . $loggedUser->id . "\">";
             if (!$details) {
                 $buffer .= "<active_repo id=\"" . ConfService::getCurrentRootDirIndex() . "\" write=\"" . ($loggedUser->canWrite(ConfService::getCurrentRootDirIndex()) ? "1" : "0") . "\" read=\"" . ($loggedUser->canRead(ConfService::getCurrentRootDirIndex()) ? "1" : "0") . "\"/>";
             }
             $buffer .= AJXP_XMLWriter::writeRepositoriesData($loggedUser, $details);
             $buffer .= "<preferences>";
             $buffer .= "<pref name=\"display\" value=\"" . $loggedUser->getPref("display") . "\"/>";
             $buffer .= "<pref name=\"lang\" value=\"" . $loggedUser->getPref("lang") . "\"/>";
             $buffer .= "<pref name=\"diapo_autofit\" value=\"" . $loggedUser->getPref("diapo_autofit") . "\"/>";
             $buffer .= "<pref name=\"sidebar_splitter_size\" value=\"" . $loggedUser->getPref("sidebar_splitter_size") . "\"/>";
             $buffer .= "<pref name=\"vertical_splitter_size\" value=\"" . $loggedUser->getPref("vertical_splitter_size") . "\"/>";
             $buffer .= "<pref name=\"history_last_repository\" value=\"" . $loggedUser->getArrayPref("history", "last_repository") . "\"/>";
             $buffer .= "<pref name=\"history_last_listing\" value=\"" . AJXP_Utils::xmlEntities(stripslashes($loggedUser->getArrayPref("history", ConfService::getCurrentRootDirIndex()))) . "\"/>";
             $buffer .= "<pref name=\"thumb_size\" value=\"" . $loggedUser->getPref("thumb_size") . "\"/>";
             $buffer .= "<pref name=\"columns_size\" value=\"" . stripslashes(str_replace("\"", "'", $loggedUser->getPref("columns_size"))) . "\"/>";
             $buffer .= "<pref name=\"columns_visibility\" value=\"" . stripslashes(str_replace("\"", "'", $loggedUser->getPref("columns_visibility"))) . "\"/>";
             $buffer .= "<pref name=\"ls_history\" value=\"" . stripslashes(str_replace("\"", "'", $loggedUser->getPref("ls_history"))) . "\"/>";
             $buffer .= "<pref name=\"upload_auto_send\" value=\"" . $loggedUser->getPref("upload_auto_send") . "\"/>";
             $buffer .= "<pref name=\"upload_auto_close\" value=\"" . $loggedUser->getPref("upload_auto_close") . "\"/>";
             $buffer .= "<pref name=\"upload_existing\" value=\"" . $loggedUser->getPref("upload_existing") . "\"/>";
             $buffer .= "</preferences>";
             $buffer .= "<special_rights is_admin=\"" . ($loggedUser->isAdmin() ? "1" : "0") . "\"/>";
             $bMarks = $loggedUser->getBookmarks();
             if (count($bMarks)) {
                 $buffer .= "<bookmarks>" . AJXP_XMLWriter::writeBookmarks($bMarks, false) . "</bookmarks>";
             }
             $buffer .= "</user>";
         }
     }
     return $buffer;
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:47,代码来源:class.AJXP_XMLWriter.php

示例5: exit

    }
    if ($loggedUser == null) {
        $requireAuth = true;
    }
    if (isset($loggingResult)) {
        AJXP_XMLWriter::header();
        AJXP_XMLWriter::loggingResult($loggingResult, $rememberLogin, $rememberPass);
        AJXP_XMLWriter::close();
        exit(1);
    }
} else {
    if (isset($_GET["get_action"]) && $_GET["get_action"] == "logged_user") {
        AJXP_XMLWriter::header();
        print "<user id=\"shared\">";
        print "<active_repo id=\"" . ConfService::getCurrentRootDirIndex() . "\" write=\"1\" read=\"1\"/>";
        print AJXP_XMLWriter::writeRepositoriesData(null);
        print "</user>";
        AJXP_XMLWriter::close();
        exit(1);
    }
}
//Set language
$loggedUser = AuthService::getLoggedUser();
if ($loggedUser != null && $loggedUser->getPref("lang") != "") {
    ConfService::setLanguage($loggedUser->getPref("lang"));
} else {
    if (isset($_COOKIE["AJXP_lang"])) {
        ConfService::setLanguage($_COOKIE["AJXP_lang"]);
    }
}
$mess = ConfService::getMessages();
开发者ID:umbecr,项目名称:camilaframework,代码行数:31,代码来源:content.php

示例6: sendUserData

 function sendUserData($userObject = null, $details = false)
 {
     $loggedUser = AuthService::getLoggedUser();
     if ($userObject != null) {
         $loggedUser = $userObject;
     }
     if ($loggedUser != null) {
         print "<user id=\"" . $loggedUser->id . "\">";
         if (!$details) {
             print "<active_repo id=\"" . ConfService::getCurrentRootDirIndex() . "\" write=\"" . ($loggedUser->canWrite(ConfService::getCurrentRootDirIndex()) ? "1" : "0") . "\" read=\"" . ($loggedUser->canRead(ConfService::getCurrentRootDirIndex()) ? "1" : "0") . "\"/>";
         }
         print AJXP_XMLWriter::writeRepositoriesData($loggedUser, $details);
         print "<preferences>";
         print "<pref name=\"display\" value=\"" . $loggedUser->getPref("display") . "\"/>";
         print "<pref name=\"lang\" value=\"" . $loggedUser->getPref("lang") . "\"/>";
         print "<pref name=\"diapo_autofit\" value=\"" . $loggedUser->getPref("diapo_autofit") . "\"/>";
         print "<pref name=\"sidebar_splitter_size\" value=\"" . $loggedUser->getPref("sidebar_splitter_size") . "\"/>";
         print "<pref name=\"vertical_splitter_size\" value=\"" . $loggedUser->getPref("vertical_splitter_size") . "\"/>";
         print "<pref name=\"history_last_repository\" value=\"" . $loggedUser->getPref("history_last_repository") . "\"/>";
         print "<pref name=\"history_last_listing\" value=\"" . $loggedUser->getPref("history_last_listing") . "\"/>";
         print "<pref name=\"thumb_size\" value=\"" . $loggedUser->getPref("thumb_size") . "\"/>";
         print "</preferences>";
         print "<special_rights is_admin=\"" . ($loggedUser->isAdmin() ? "1" : "0") . "\"/>";
         print "</user>";
     }
 }
开发者ID:skdong,项目名称:nfs-ovd,代码行数:26,代码来源:class.AJXP_XMLWriter.php

示例7: getUserXML

 /**
  * Extract all the user data and put it in XML
  * @static
  * @param null $userObject
  * @param bool $details
  * @return string
  */
 static function getUserXML($userObject = null, $details = false)
 {
     $buffer = "";
     $loggedUser = AuthService::getLoggedUser();
     $confDriver = ConfService::getConfStorageImpl();
     if ($userObject != null) {
         $loggedUser = $userObject;
     }
     if (!AuthService::usersEnabled()) {
         $buffer .= "<user id=\"shared\">";
         if (!$details) {
             $buffer .= "<active_repo id=\"" . ConfService::getCurrentRootDirIndex() . "\" write=\"1\" read=\"1\"/>";
         }
         $buffer .= AJXP_XMLWriter::writeRepositoriesData(null, $details);
         $buffer .= "</user>";
     } else {
         if ($loggedUser != null) {
             $buffer .= "<user id=\"" . $loggedUser->id . "\">";
             if (!$details) {
                 $buffer .= "<active_repo id=\"" . ConfService::getCurrentRootDirIndex() . "\" write=\"" . ($loggedUser->canWrite(ConfService::getCurrentRootDirIndex()) ? "1" : "0") . "\" read=\"" . ($loggedUser->canRead(ConfService::getCurrentRootDirIndex()) ? "1" : "0") . "\"/>";
             } else {
                 $buffer .= "<ajxp_roles>";
                 foreach ($loggedUser->getRoles() as $roleId => $boolean) {
                     if ($boolean === true) {
                         $buffer .= "<role id=\"{$roleId}\"/>";
                     }
                 }
                 $buffer .= "</ajxp_roles>";
             }
             $buffer .= AJXP_XMLWriter::writeRepositoriesData($loggedUser, $details);
             $buffer .= "<preferences>";
             $preferences = $confDriver->getExposedPreferences($loggedUser);
             foreach ($preferences as $prefName => $prefData) {
                 if ($prefData["type"] == "string") {
                     $buffer .= "<pref name=\"{$prefName}\" value=\"" . $prefData["value"] . "\"/>";
                 } else {
                     if ($prefData["type"] == "json") {
                         $buffer .= "<pref name=\"{$prefName}\"><![CDATA[" . $prefData["value"] . "]]></pref>";
                     }
                 }
             }
             $buffer .= "</preferences>";
             $buffer .= "<special_rights is_admin=\"" . ($loggedUser->isAdmin() ? "1" : "0") . "\"/>";
             $bMarks = $loggedUser->getBookmarks();
             if (count($bMarks)) {
                 $buffer .= "<bookmarks>" . AJXP_XMLWriter::writeBookmarks($bMarks, false) . "</bookmarks>";
             }
             $buffer .= "</user>";
         }
     }
     return $buffer;
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:59,代码来源:class.AJXP_XMLWriter.php


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