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


PHP CFileMan::GetDirList方法代码示例

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


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

示例1: getDirStructure

 public static function getDirStructure($bLogical, $site, $path)
 {
     global $USER;
     $arDirContent = array();
     if ($USER->CanDoFileOperation('fm_view_listing', array($site, $path))) {
         \Bitrix\Main\Loader::includeModule('fileman');
         $arDirs = array();
         $arFiles = array();
         \CFileMan::GetDirList(array($site, $path), $arDirs, $arFiles, array(), array("NAME" => "asc"), "DF", $bLogical, true);
         $arDirContent_t = array_merge($arDirs, $arFiles);
         for ($i = 0, $l = count($arDirContent_t); $i < $l; $i++) {
             $file = $arDirContent_t[$i];
             $arPath = array($site, $file['ABS_PATH']);
             if ($file["TYPE"] == "F" && !$USER->CanDoFileOperation('fm_view_file', $arPath) || $file["TYPE"] == "D" && !$USER->CanDoFileOperation('fm_view_listing', $arPath) || $file["TYPE"] == "F" && $file["NAME"] == ".section.php") {
                 continue;
             }
             $f = $file['TYPE'] == 'F' ? new \Bitrix\Main\IO\File($file['PATH'], $site) : new \Bitrix\Main\IO\Directory($file['PATH'], $site);
             $p = $f->getName();
             if ($f->isSystem() || $file['TYPE'] == 'F' && in_array($p, array("urlrewrite.php")) || $file['TYPE'] == 'D' && preg_match("/\\/(bitrix|" . \COption::getOptionString("main", "upload_dir", "upload") . ")\\//", "/" . $p . "/")) {
                 continue;
             }
             $arFileData = array('NAME' => $bLogical ? $file['LOGIC_NAME'] : $p, 'FILE' => $p, 'TYPE' => $file['TYPE'], 'DATA' => $file);
             if (strlen($arFileData['NAME']) <= 0) {
                 $arFileData['NAME'] = GetMessage('SEO_DIR_LOGICAL_NO_NAME');
             }
             $arDirContent[] = $arFileData;
         }
         unset($arDirContent_t);
     }
     return $arDirContent;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:seo_utils.php

示例2: DirsRecursive

 function DirsRecursive($path, &$arDirs, $arFilter = array(), $depth = 0)
 {
     $depth++;
     CFileMan::GetDirList($path, $arDirsTmp, $arFiles, $arFilter, array("name" => "asc"), "D");
     for ($i = 0, $l = count($arDirsTmp); $i < $l; $i++) {
         $arDir = $arDirsTmp[$i];
         $arDir["DEPTH_LEVEL"] = $depth;
         $arDirs[] = $arDir;
         CFileMan::DirsRecursive($arDir["ABS_PATH"], $arDirs, $arFilter, $depth);
     }
 }
开发者ID:Satariall,项目名称:izurit,代码行数:11,代码来源:fileman.php

示例3: InitSorting

                    CFilemanSearch::DelFromSearchResult($searchSess, $pathEx);
                }
                if (strlen($strWarning_tmp) > 0) {
                    $lAdmin->AddGroupError($strWarning_tmp, $ID);
                }
                break;
        }
    }
}
InitSorting();
if (!$bSearch) {
    $arDirs = array();
    $arFiles = array();
    $title = GetMessage("FILEMAN_TITLE");
    if ($USER->CanDoFileOperation('fm_view_listing', $arPath)) {
        CFileMan::GetDirList(array($site, $path), $arDirs, $arFiles, $arFilter, array($by => $order), "DF", $logical == 'Y', true);
        if (strlen($path) > 0) {
            $dname = $path;
            if ($logical == "Y") {
                if ($io->FileExists($absPath . "/.section.php")) {
                    @(include $io->GetPhysicalName($absPath . "/.section.php"));
                    if (strlen($sSectionName) <= 0) {
                        $sSectionName = GetMessage("FILEMAN_ADM_UNTITLED");
                    }
                    $dname = $sSectionName;
                }
            }
            $lAdmin->onLoadScript = "BX.adminPanel.setTitle('" . CUtil::JSEscape($title . ": " . $dname) . "');";
            $title = $title . ": " . $dname;
        } else {
            $lAdmin->onLoadScript = "BX.adminPanel.setTitle('" . CUtil::JSEscape($title) . "');";
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:fileman_admin.php

示例4: Rel2Abs

$site = CFileMan::__CheckSite($site);
$DOC_ROOT = CSite::GetSiteDocRoot($site);
$strWarning = "";
$path = Rel2Abs("/", $path);
$arParsedPath = CFileMan::ParsePath($path);
$arPath = array($site, $path);
if ($type == "flash") {
    $ext = "swf,fla";
} elseif ($type == "image") {
    $ext = "gif,jpg,jpeg,bmp,png";
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_popup_admin.php";
if (!$USER->CanDoFileOperation('fm_download_file', $arPath) || HasScriptExtension($path)) {
    ShowError($arParsedPath["HTML"] . '<br><br><img src="/bitrix/images/fileman/deny.gif" width="28" height="28" border="0" align="left" alt="">' . GetMessage("ACCESS_DENIED"));
} else {
    CFileMan::GetDirList(array($site, $path), $arDirs, $arFiles, array("EXTENSIONS" => $ext, "MIN_PERMISSION" => "R"), array("name" => "asc"));
    ?>
<script>
<!--
function DoEvent(str)
{
	try
	{
		eval("parent."+this.name+"_"+str);
	}
	catch(e){}
}

DoEvent("OnLoad('<?php 
    echo AddSlashes(htmlspecialcharsex($path));
    ?>
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:fileman_file_list.php

示例5: array

	}
}
else
{
	if ($bSearch)
	{
		$searchRes = CFilemanSearch::GetSearchResult($searchSess);
		for($i = 0, $l = count($searchRes); $i < $l; $i++)
			$arFiles[] = $searchRes[$i]['path'];
	}
	else
	{
		$arD = array();
		$arF = array();

		CFileMan::GetDirList(Array($site, $path), $arD, $arF, array("MIN_PERMISSION" => "X"), array(), "DF");
		foreach ($arD as $dir)
			if($USER->CanDoFileOperation('fm_edit_permission',Array($site, $dir['ABS_PATH'])))
				$arFiles[] = $dir["NAME"];

		foreach ($arF as $file)
			if($USER->CanDoFileOperation('fm_edit_permission',Array($site, $file['ABS_PATH'])))
				$arFiles[] = $file["NAME"];
	}
}

$filesCount = count($arFiles);
$arFilesEx = array();
$bFolderInList = false;
$currentValue = false;
$bCurrentValueDiff = false;
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:fileman_server_access.php

示例6: array

$arPermTypes['NOT_REF'] = array('title' => GetMessage("FILEMAN_FOLDER_ACCESS_INHERIT"), 'letter' => 'N');
$strWarning = "";
$arFiles = array();
if (count($files) > 0) {
    CUtil::decodeURIComponent($files);
    for ($i = 0; $i < count($files); $i++) {
        if (!$USER->CanDoFileOperation('fm_edit_permission', array($site, $path . "/" . $files[$i]))) {
            $strWarning .= GetMessage("FILEMAN_ACCESS_TO_DENIED") . " \"" . $files[$i] . "\".\n";
        } elseif ($files[$i] != '.') {
            $arFiles[] = $files[$i];
        }
    }
} else {
    $arPDirs = array();
    $arPFiles = array();
    CFileMan::GetDirList(array($site, $path), $arPDirs, $arPFiles, array("MIN_PERMISSION" => "X"), array(), "DF");
    foreach ($arPDirs as $dir) {
        if ($USER->CanDoFileOperation('fm_edit_permission', array($site, $dir['ABS_PATH']))) {
            $arFiles[] = $dir["NAME"];
        }
    }
    foreach ($arPFiles as $file) {
        if ($USER->CanDoFileOperation('fm_edit_permission', array($site, $file['ABS_PATH']))) {
            $arFiles[] = $file["NAME"];
        }
    }
}
$filesCount = count($arFiles);
function GetAccessArrTmp($path)
{
    global $DOC_ROOT;
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:fileman_access.php


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