first commit

This commit is contained in:
/usr/bin/nano
2017-04-15 01:34:36 +03:00
commit c715e2a604
5325 changed files with 329700 additions and 0 deletions

35
core/func/page_editor.php Executable file
View File

@@ -0,0 +1,35 @@
<?php
/**
* Рекурсивно получить все файлы и папки
*/
function PageEditorGetListFilesDirs($folder, &$allFiles)
{
$fp = is_readable($folder) ? opendir($folder) : false;
if ($fp)
{
$file = readdir($fp);
while ($file !== false)
{
$path = $folder . "/" . $file;
if (is_file($path))
{
if (substr($path, -4) == ".php")
{
$allFiles[] = $folder . "/" . $file;
}
}
elseif ($file != "." && $file != ".." && is_dir($path))
{
$allFiles[] = $folder . "/" . $file . "/";
PageEditorGetListFilesDirs($path, $allFiles);
}
$file = readdir($fp);
}
closedir($fp);
}
}
?>