function __struct_get_files($doc_root, $path="", $open_path="", $dirsonly=false) { global $USER; if(!$USER->CanDoFileOperation('fm_view_listing', array($_GET['site'], $path))) return ''; $arFiles = array(); $abs_path = $doc_root."/".$path; $io = CBXVirtualIo::GetInstance(); $directory = $io->GetDirectory($abs_path); $arChildren = $directory->GetChildren(); foreach ($arChildren as $child) { $n = $child->GetName(); if (!$child->IsDirectory()) { if($n == '.section.php' || $n == '.access.php') continue; if(preg_match('/^\.(.*)?\.menu\.(php|html|php3|php4|php5|php6|phtml)$/', $n)) continue; } $arFile = __struct_get_file_info($abs_path, $n); $arFiles[] = $arFile; } usort($arFiles, "__struct_file_sort"); return __struct_show_files($arFiles, $doc_root, $path, $open_path, $dirsonly); }
echo GetMessage($action == "COPY" ? "pub_struct_desc_copy" : "pub_struct_desc_move", array('#NAME#' => htmlspecialcharsbx(urldecode($_REQUEST["NAME"])))); ?> </b></p> <br style="clear:both;" /> <?php $obJSPopup->StartContent(); if (!empty($arResult["ERROR_MESSAGE"])) { if (strpos($arResult["ERROR_MESSAGE"], GetMessage("WD_FILE_ERROR4")) === false) { ShowError($arResult["ERROR_MESSAGE"]); } } ?> <div id="structure_content"> <?php //display first level tree $arRoot = __struct_get_file_info($ob, $DOC_ROOT, "/"); echo __struct_show_files($ob, array($arRoot), $DOC_ROOT, "", $_GET["path"], true); if (is_array($_REQUEST["ID"])) { $_REQUEST["ID"] = $_REQUEST["ID"][0]; } ?> </div> <script> var md5 = '<?php echo md5('/'); ?> '; structGetSubDir(BX('sign_dirs'+md5), 'dir_dirs'+md5, '/', true); </script> <input type="hidden" name="ACTION" value="<?php echo $action;