| 10 |
|
# |
| 11 |
|
# END CONFIGURATION |
| 12 |
|
|
| 13 |
< |
|
| 14 |
< |
# return an array of subdirectories from a directory. |
| 15 |
< |
function getdirArray($dir='./',$sort='asort') { |
| 16 |
< |
global $dir_file_count; |
| 17 |
< |
if ( is_dir($dir) ) { |
| 18 |
< |
$fd = @opendir($dir); |
| 19 |
< |
while ( ($part = @readdir($fd)) == TRUE ) { |
| 20 |
< |
clearstatcache(); |
| 21 |
< |
if ($part != "." && $part != "..") { |
| 22 |
< |
$dir_array[] = $part; |
| 23 |
< |
} |
| 24 |
< |
} |
| 25 |
< |
if($fd == TRUE) { |
| 26 |
< |
closedir($fd); |
| 27 |
< |
} |
| 28 |
< |
if (is_array($dir_array)) { |
| 29 |
< |
$sort($dir_array); |
| 30 |
< |
$dir_file_count = count($dir_array); |
| 31 |
< |
Return $dir_array; |
| 32 |
< |
} else { |
| 33 |
< |
Return FALSE; |
| 34 |
< |
} |
| 35 |
< |
} else { |
| 36 |
< |
Return FALSE; |
| 37 |
< |
} |
| 38 |
< |
} |
| 13 |
> |
include("iutils.inc.php"); |
| 14 |
|
|
| 15 |
|
function printLine($title) { |
| 16 |
|
echo "<hr color=\"#9999ff\">"; |