|
|
@ -410,20 +410,20 @@ function copyDirTo($origDirPath, $destination, $move=true) |
|
|
|
|
|
|
|
|
|
|
|
function index_dir($path) |
|
|
|
function index_dir($path) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$save_dir = getcwd(); |
|
|
|
$save_dir = getcwd(); |
|
|
|
|
|
|
|
if(is_dir($path)){ |
|
|
|
chdir($path); |
|
|
|
chdir($path); |
|
|
|
$handle = opendir($path); |
|
|
|
$handle = opendir($path); |
|
|
|
|
|
|
|
} |
|
|
|
// reads directory content end record subdirectoies names in $dir_array |
|
|
|
// reads directory content end record subdirectoies names in $dir_array |
|
|
|
|
|
|
|
if (file_exists($handle)) { |
|
|
|
while ($element = readdir($handle) ) |
|
|
|
while ($element = readdir($handle) ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ( $element == "." || $element == "..") continue; // skip the current and parent directories |
|
|
|
if ( $element == "." || $element == "..") continue; // skip the current and parent directories |
|
|
|
if ( is_dir($element) ) $dirArray[] = $path."/".$element; |
|
|
|
if ( is_dir($element) ) $dirArray[] = $path."/".$element; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
closedir($handle) ; |
|
|
|
closedir($handle) ; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// recursive operation if subdirectories exist |
|
|
|
// recursive operation if subdirectories exist |
|
|
|
$dirNumber = sizeof($dirArray); |
|
|
|
$dirNumber = sizeof($dirArray); |
|
|
|