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


PHP GetDirList函数代码示例

本文整理汇总了PHP中GetDirList函数的典型用法代码示例。如果您正苦于以下问题:PHP GetDirList函数的具体用法?PHP GetDirList怎么用?PHP GetDirList使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: sprintf

    }
} else {
    if (!empty($_REQUEST['nbrows']) && $_REQUEST['nbrows'] > $nbrows) {
        $nbrows = $_REQUEST['nbrows'];
    }
}
if ($nbrows > 16) {
    $nbrows = 16;
}
$content .= sprintf('<tr><td align="right">%s:</td>', $l['str_number_of_rows_per_record']);
$content .= sprintf('<td><input type=text name="nbrows" value="%s" size="3"></td></tr>', $nbrows);
# language row
$content .= sprintf('<tr><td align="right">%s:</td>', $l['str_language']);
$content .= '<td><select name="newlang">';
// select current available langs
$list = GetDirList('includes/strings');
reset($list);
while ($newlang = array_shift($list)) {
    $content .= sprintf('<option value="%s"%s>%s</option>', $newlang, $newlang === $lang ? ' selected' : '', $newlang);
}
$content .= '</select></td></tr>';
# disclaimer row
$content .= '<tr><td width="65%" align="right">';
$_url = sprintf('disclaimer.php?language=%s', $lang);
$_url2 = sprintf('%sdisclaimer.php', $config->mainurl);
$_winopt = sprintf("'%s','M','toolbar=no,location=no,directories=no," . "status=no,alwaysraised=yes,dependant=yes,menubar=no,scrollbars=yes," . "resizable=yes,width=640,height=480'", $_url);
$_disclaimer = sprintf('<a target=_blank href="%s" onclick="window.open(%s)">%s</a>', $_url, $_winopt, $_url2);
$content .= sprintf($l['str_i_have_read_and_i_understand_discl_available_at_x'], $_disclaimer);
$content .= '</td>';
$content .= '<td><input type="checkbox" name="ihaveread" value="1"></td></tr>';
$content .= '<tr><td colspan="2" align="center">';
开发者ID:RzeszowPL,项目名称:freedns,代码行数:31,代码来源:createuser_form.php

示例2: InitSorting

					}
				}
				else
					$lAdmin->AddGroupError(GetMessage("MAIN_DUMP_ERR_NAME"), $ID);
			break;
		}
	}
}
InitSorting();

$arDirs = array();
$arFiles = array();
$arTmpFiles = array();
$arFilter = array();

GetDirList(Array($site, $path), $arDir, $arTmpFiles, $arFilter, Array($by=>$order), "F");

// Clouds
if (($arAllBucket = CBackup::GetBucketList()) && $_REQUEST['mode'])
{
	foreach($arAllBucket as $arBucket)
	{
		if ($arCloudFiles = CBackup::GetBucketFileList($arBucket['ID'], BX_ROOT.'/backup/'))
		{
			foreach($arCloudFiles['file'] as $k=>$v)
			{
				$arTmpFiles[] = array(
					'NAME' => $v,
					'SIZE' => $arCloudFiles['file_size'][$k],
					'DATE' => '',
					'PERMISSION' => 'X',
开发者ID:nProfessor,项目名称:Mytb,代码行数:31,代码来源:dump.php

示例3: GetItems


//.........这里部分代码省略.........
	size : '<?php 
                    echo $arFiles["file_size"][$ind];
                    ?>
'
};
<?php 
                }
            }
            ?>
arFDPermission['<?php 
            echo $path_js;
            ?>
'] = {
	new_folder : false,
	upload : false
};
<?php 
            return;
        }
        $io = CBXVirtualIo::GetInstance();
        $site = $Params['site'];
        $path = $io->CombinePath("/", $APPLICATION->UnJSEscape($Params['path']));
        $path_js = $path == "" ? "/" : addslashes(htmlspecialcharsex($path));
        $path_js = str_replace("//", "/", $path_js);
        $bCheckEmpty = $Params['bCheckEmpty'];
        $rootPath = CSite::GetSiteDocRoot($site);
        if (!$io->FileExists($rootPath . $path) && !$io->DirectoryExists($rootPath . $path) && $Params['bThrowException'] === true) {
            return $APPLICATION->ThrowException(GetMessage('BX_FD_ERROR') . ': ' . GetMessage('BX_FD_PATH_CORRUPT'), 'path_corrupt');
        } elseif (!$USER->CanDoFileOperation('fm_view_listing', array($site, $path))) {
            return $APPLICATION->ThrowException(GetMessage('BX_FD_ERROR') . ': ' . GetMessage('BX_FD_ACCESS_DENIED'), 'access_denied');
        }
        $arDirs = array();
        $arFiles = array();
        GetDirList(array($site, $path), $arDirs, $arFiles, array(), array("name" => "asc"), "DF", false, true);
        ?>
arFDDirs['<?php 
        echo $path_js;
        ?>
'] = [];
arFDFiles['<?php 
        echo $path_js;
        ?>
'] = [];
<?php 
        $ind = -1;
        foreach ($arDirs as $Dir) {
            $name = addslashes(htmlspecialcharsex($Dir["NAME"]));
            $path_i = addslashes(htmlspecialcharsex($path)) . "/" . $name;
            $path_i = str_replace("//", "/", $path_i);
            $arPath_i = array($site, $path_i);
            if (!$USER->CanDoFileOperation('fm_view_listing', $arPath_i)) {
                continue;
            }
            $ind++;
            $empty = true;
            if ($bCheckEmpty) {
                $dirTmp = $io->GetDirectory($rootPath . $path . '/' . $name);
                $arDirTmpChildren = $dirTmp->GetChildren();
                foreach ($arDirTmpChildren as $child) {
                    if (!$child->IsDirectory()) {
                        continue;
                    }
                    $empty = false;
                    break;
                }
            }
开发者ID:spas-viktor,项目名称:books,代码行数:67,代码来源:file_dialog.php

示例4: GetDirList

 function GetDirList($path, &$arDirs, &$arFiles, $arFilter = array(), $sort = array(), $type = "DF", $bLogical = false, $task_mode = false)
 {
     return GetDirList($path, $arDirs, $arFiles, $arFilter, $sort, $type, $bLogical, $task_mode);
 }
开发者ID:Satariall,项目名称:izurit,代码行数:4,代码来源:fileman.php

示例5: DirsRecursive

 function DirsRecursive($ID, $path = "", $depth = 0, $maxDepth = 1)
 {
     $arRes = array();
     $depth++;
     GetDirList(BX_PERSONAL_ROOT . "/templates/" . $ID . "/" . $path, $arDirsTmp, $arResTmp);
     foreach ($arResTmp as $file) {
         switch ($file["NAME"]) {
             case "chain_template.php":
                 $file["DESCRIPTION"] = GetMessage("MAIN_TEMPLATE_NAV");
                 break;
             case "":
                 $file["DESCRIPTION"] = "";
                 break;
             default:
                 if (($p = strpos($file["NAME"], ".menu_template.php")) !== false) {
                     $file["DESCRIPTION"] = str_replace("#MENU_TYPE#", substr($file["NAME"], 0, $p), GetMessage("MAIN_TEMPLATE_MENU"));
                 } elseif (($p = strpos($file["NAME"], "authorize_registration.php")) !== false) {
                     $file["DESCRIPTION"] = GetMessage("MAIN_TEMPLATE_AUTH_REG");
                 } elseif (($p = strpos($file["NAME"], "forgot_password.php")) !== false) {
                     $file["DESCRIPTION"] = GetMessage("MAIN_TEMPLATE_SEND_PWD");
                 } elseif (($p = strpos($file["NAME"], "change_password.php")) !== false) {
                     $file["DESCRIPTION"] = GetMessage("MAIN_TEMPLATE_CHN_PWD");
                 } elseif (($p = strpos($file["NAME"], "authorize.php")) !== false) {
                     $file["DESCRIPTION"] = GetMessage("MAIN_TEMPLATE_AUTH");
                 } elseif (($p = strpos($file["NAME"], "registration.php")) !== false) {
                     $file["DESCRIPTION"] = GetMessage("MAIN_TEMPLATE_REG");
                 }
         }
         $arRes[] = $file;
     }
     $nTemplateLen = strlen(BX_PERSONAL_ROOT . "/templates/" . $ID . "/");
     foreach ($arDirsTmp as $dir) {
         $arDir = $dir;
         $arDir["DEPTH_LEVEL"] = $depth;
         $arRes[] = $arDir;
         if ($depth < $maxDepth) {
             $dirPath = substr($arDir["ABS_PATH"], $nTemplateLen);
             $arRes = array_merge($arRes, CSiteTemplate::DirsRecursive($ID, $dirPath, $depth, $maxDepth));
         }
     }
     return $arRes;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:42,代码来源:main.php

示例6: CheckBackup

 function CheckBackup()
 {
     $arCount = 0;
     $arResult = array();
     $arResult["STATUS"] = false;
     $bMcrypt = function_exists('mcrypt_encrypt');
     $bBitrixCloud = $bMcrypt && CModule::IncludeModule('bitrixcloud') && CModule::IncludeModule('clouds');
     $site = CSite::GetSiteByFullPath(DOCUMENT_ROOT);
     $path = BX_ROOT . "/backup";
     $arTmpFiles = array();
     $arFilter = array();
     GetDirList(array($site, $path), $arDir, $arTmpFiles, $arFilter, array('sort' => 'asc'), "F");
     foreach ($arTmpFiles as $ar) {
         if (strpos($ar['NAME'], ".enc.gz") || strpos($ar['NAME'], ".tar.gz") || strpos($ar['NAME'], ".tar") || strpos($ar['NAME'], ".enc")) {
             $arCount++;
         }
     }
     if ($bBitrixCloud) {
         $backup = CBitrixCloudBackup::getInstance();
         try {
             foreach ($backup->listFiles() as $ar) {
                 if (strpos($ar['FILE_NAME'], ".enc.gz") || strpos($ar['FILE_NAME'], ".tar.gz") || strpos($ar['FILE_NAME'], ".tar") || strpos($ar['FILE_NAME'], ".enc")) {
                     $arCount++;
                 }
             }
         } catch (Exception $e) {
         }
     }
     if ($arCount > 0) {
         $arResult["STATUS"] = true;
         $arResult["MESSAGE"]["PREVIEW"] = GetMessage("CL_FOUND_BACKUP", array("#count#" => $arCount));
     } else {
         $arResult["MESSAGE"]["PREVIEW"] = GetMessage("CL_NOT_FOUND_BACKUP");
     }
     return $arResult;
 }
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:36,代码来源:checklist.php

示例7: preg_replace

<?php

// print a box with list of available languages
$title = $l['str_languages_title'];
$mylink = "?" . $_SERVER["QUERY_STRING"];
$mylink = preg_replace("/(&amp;|&|)language=[a-z][a-z]/", "", $mylink);
if ($mylink != "?") {
    $mylink .= "&amp;";
}
$mylink = preg_replace("/&amp;/", "&", $mylink);
$mylink = preg_replace("/&/", "&amp;", $mylink);
$dirlist = GetDirList("includes/strings");
$content = '';
reset($dirlist);
while ($countrycode = array_shift($dirlist)) {
    $content .= '<a href="' . $_SERVER['PHP_SELF'] . $mylink . 'language=' . $countrycode . '"><img src="images/' . $countrycode . '.png" alt="' . $countrycode . '"></a>
    ';
}
$content = '<p>' . $content . '</p>';
print $html->box('languages', $title, $content);
开发者ID:RzeszowPL,项目名称:freedns,代码行数:20,代码来源:languages.php


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