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


PHP AJXP_XMLWriter::renderHeaderNode方法代码示例

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


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

示例1: switchAction


//.........这里部分代码省略.........
                         $mode = "search";
                     } else {
                         if ($httpVars["options"] == "d") {
                             $skipZip = "true";
                         }
                     }
                 }
                 // skip "complete" mode that was in fact quite the same as standard tree listing (dz)
             }
             if (!isset($dir) || $dir == "/") {
                 $dir = "";
             }
             $searchMode = $fileListMode = $completeMode = false;
             if (isset($mode)) {
                 if ($mode == "search") {
                     $searchMode = true;
                 } else {
                     if ($mode == "file_list") {
                         $fileListMode = true;
                     } else {
                         if ($mode == "complete") {
                             $completeMode = true;
                         }
                     }
                 }
             }
             $nom_rep = $dir;
             //AJXP_Exception::errorToXml($nom_rep);
             $result = $this->SSHOperation->listFilesIn($nom_rep);
             $metaData = array();
             if (RecycleBinManager::recycleEnabled() && RecycleBinManager::currentLocationIsRecycle($dir)) {
                 $metaData["ajxp_mime"] = "ajxp_recycle";
             }
             AJXP_XMLWriter::renderHeaderNode(AJXP_Utils::xmlEntities($dir, true), AJXP_Utils::xmlEntities(basename($dir), true), false, $metaData);
             foreach ($result as $file) {
                 $attributes = "";
                 $fileName = SystemTextEncoding::toUTF8($file["name"]);
                 $icon = AJXP_Utils::mimetype($fileName, "image", $file["isDir"] == 1);
                 if ($searchMode) {
                     if ($file["isDir"] == 0) {
                         $attributes = "is_file=\"true\" icon=\"" . SystemTextEncoding::toUTF8($icon) . "\"";
                     }
                 } else {
                     if ($fileListMode) {
                         $atts = array();
                         $atts[] = "is_file=\"" . (1 - $file["isDir"]) . "\"";
                         $atts[] = "is_image=\"" . AJXP_Utils::is_image($fileName) . "\"";
                         $atts[] = "mimestring=\"" . AJXP_Utils::mimetype($fileName, "type", $file["isDir"] == 1) . "\"";
                         $atts[] = "ajxp_modiftime=\"" . $this->dateModif($file["time"]) . "\"";
                         $atts[] = "filesize=\"" . AJXP_Utils::roundSize($file["size"]) . "\"";
                         $atts[] = "bytesize=\"" . $file["size"] . "\"";
                         $atts[] = "filename=\"" . str_replace("&", "&", $dir . "/" . $fileName) . "\"";
                         $atts[] = "icon=\"" . ($file["isDir"] == 1 ? "folder.png" : SystemTextEncoding::toUTF8($icon)) . "\"";
                         $attributes = join(" ", $atts);
                     } else {
                         if ($file["isDir"] == 1) {
                             $link = SERVER_ACCESS . "?dir=" . $dir . "/" . $fileName;
                             $link = urlencode($link);
                             $folderBaseName = str_replace("&", "&", $fileName);
                             $folderFullName = "{$dir}/" . $folderBaseName;
                             $parentFolderName = $dir;
                             if (!$completeMode) {
                                 $icon = "folder.png";
                                 $openicon = "folder_open.png";
                                 if (preg_match("/\\.zip\$/", $file["name"])) {
                                     $icon = $openicon = CLIENT_RESOURCES_FOLDER . "/images/actions/16/accessories-archiver.png";
开发者ID:umbecr,项目名称:camilaframework,代码行数:67,代码来源:class.sshAccessDriver.php

示例2: listTasks

 public function listTasks($nodeName, $baseDir)
 {
     $mess = ConfService::getMessages();
     AJXP_XMLWriter::renderHeaderNode("/{$baseDir}/{$nodeName}", "Scheduler", false, array("icon" => "scheduler/ICON_SIZE/player_time.png"));
     AJXP_XMLWriter::sendFilesListComponentConfig('<columns switchGridMode="filelist" switchDisplayMode="list"  template_name="action.scheduler_list">
              <column messageId="action.scheduler.12" attributeName="ajxp_label" sortType="String"/>
              <column messageId="action.scheduler.2" attributeName="schedule" sortType="String"/>
              <column messageId="action.scheduler.1" attributeName="action_name" sortType="String"/>
              <column messageId="action.scheduler.4s" attributeName="repository_id" sortType="String"/>
              <column messageId="action.scheduler.17" attributeName="user_id" sortType="String"/>
              <column messageId="action.scheduler.3" attributeName="NEXT_EXECUTION" sortType="String"/>
              <column messageId="action.scheduler.14" attributeName="LAST_EXECUTION" sortType="String"/>
              <column messageId="action.scheduler.13" attributeName="STATUS" sortType="String"/>
     </columns>');
     $tasks = AJXP_Utils::loadSerialFile($this->getDbFile(), false, "json");
     foreach ($tasks as $task) {
         $timeArray = $this->getTimeArray($task["schedule"]);
         $res = $this->getNextExecutionTimeForScript(time(), $timeArray);
         $task["NEXT_EXECUTION"] = date($mess["date_format"], $res);
         $task["PARAMS"] = implode(", ", $task["PARAMS"]);
         $task["icon"] = "scheduler/ICON_SIZE/task.png";
         $task["ajxp_mime"] = "scheduler_task";
         $sFile = AJXP_CACHE_DIR . "/cmd_outputs/task_" . $task["task_id"] . ".status";
         if (is_file($sFile)) {
             $s = $this->getTaskStatus($task["task_id"]);
             $task["STATUS"] = implode(":", $s);
             $task["LAST_EXECUTION"] = date($mess["date_format"], filemtime($sFile));
         } else {
             $task["STATUS"] = "n/a";
             $task["LAST_EXECUTION"] = "n/a";
         }
         AJXP_XMLWriter::renderNode("/admin/scheduler/" . $task["task_id"], isset($task["label"]) ? $task["label"] : "Action " . $task["action_name"], true, $task);
     }
     AJXP_XMLWriter::close();
 }
开发者ID:rbrdevs,项目名称:pydio-core,代码行数:35,代码来源:class.AjxpScheduler.php

示例3: switchAction


//.........这里部分代码省略.........
             $path = $this->urlBase . ($dir != "" ? "/" . $dir : "");
             $threshold = $this->repository->getOption("PAGINATION_THRESHOLD");
             if (!isset($threshold) || intval($threshold) == 0) {
                 $threshold = 500;
             }
             $limitPerPage = $this->repository->getOption("PAGINATION_NUMBER");
             if (!isset($limitPerPage) || intval($limitPerPage) == 0) {
                 $limitPerPage = 200;
             }
             $countFiles = $this->countFiles($path, !$lsOptions["f"]);
             if ($countFiles > $threshold) {
                 $offset = 0;
                 $crtPage = 1;
                 if (isset($page)) {
                     $offset = (intval($page) - 1) * $limitPerPage;
                     $crtPage = $page;
                 }
                 $totalPages = floor($countFiles / $limitPerPage) + 1;
             } else {
                 $offset = $limitPerPage = 0;
             }
             $metaData = array();
             $crtLabel = AJXP_Utils::xmlEntities(basename($dir), true);
             if (RecycleBinManager::recycleEnabled()) {
                 if (RecycleBinManager::currentLocationIsRecycle($dir)) {
                     $metaData["ajxp_mime"] = "ajxp_recycle";
                     $crtLabel = AJXP_Utils::xmlEntities($mess[122]);
                 } else {
                     if ($dir == "") {
                         $metaData["repo_has_recycle"] = "true";
                     }
                 }
             }
             AJXP_XMLWriter::renderHeaderNode(AJXP_Utils::xmlEntities($dir, true), $crtLabel, false, $metaData);
             if (isset($totalPages) && isset($crtPage)) {
                 AJXP_XMLWriter::renderPaginationData($countFiles, $crtPage, $totalPages);
                 if (!$lsOptions["f"]) {
                     AJXP_XMLWriter::close();
                     exit(1);
                 }
             }
             $cursor = 0;
             $handle = opendir($path);
             if (!$handle) {
                 throw new AJXP_Exception("Cannot open dir " . $path);
             }
             $fullList = array("d" => array(), "z" => array(), "f" => array());
             while (strlen($nodeName = readdir($handle)) > 0) {
                 if ($nodeName == "." || $nodeName == "..") {
                     continue;
                 }
                 $isLeaf = is_file($path . "/" . $nodeName) || AJXP_Utils::isBrowsableArchive($nodeName);
                 if (!$this->filterNodeName($path, $nodeName, $isLeaf, $lsOptions)) {
                     continue;
                 }
                 if (RecycleBinManager::recycleEnabled() && $dir == "" && "/" . $nodeName == RecycleBinManager::getRecyclePath()) {
                     continue;
                 }
                 $nodeType = "d";
                 if ($isLeaf) {
                     if (AJXP_Utils::isBrowsableArchive($nodeName)) {
                         if ($lsOptions["f"] && $lsOptions["z"]) {
                             // See archives as files
                             $nodeType = "f";
                         } else {
                             $nodeType = "z";
开发者ID:umbecr,项目名称:camilaframework,代码行数:67,代码来源:class.fsAccessDriver.php


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