120 |
$gblImages = array( ".jpg",".jpeg",".gif",".png",".ico", |
$gblImages = array( ".jpg",".jpeg",".gif",".png",".ico", |
121 |
".bmp",".xbm") ; |
".bmp",".xbm") ; |
122 |
|
|
123 |
|
// which files to hide (separated by ,) |
124 |
|
$gblHide = ""; |
125 |
|
|
126 |
// Where are users? (by default in .htusers file) |
// Where are users? (by default in .htusers file) |
127 |
$gblUsers = "htusers_file"; |
$gblUsers = "htusers_file"; |
128 |
|
|
636 |
|
|
637 |
function Navigate($fsRoot,$relDir) { |
function Navigate($fsRoot,$relDir) { |
638 |
|
|
639 |
global $gblEditable, $gblIcon, $gblModDays, $webRoot ; |
global $gblEditable, $gblIcon, $gblModDays, $webRoot, $gblHide ; |
640 |
|
|
641 |
$self = $GLOBALS["PHP_SELF"] ; |
$self = $GLOBALS["PHP_SELF"] ; |
642 |
|
|
644 |
|
|
645 |
if (!is_dir($fsDir)) Error("Dir not found",$relDir) ; |
if (!is_dir($fsDir)) Error("Dir not found",$relDir) ; |
646 |
|
|
647 |
|
$hide_items=",$gblHide,"; |
648 |
|
|
649 |
// read directory contents |
// read directory contents |
650 |
if ( !($dir = @opendir($fsDir)) ) |
if ( !($dir = @opendir($fsDir)) ) |
651 |
Error("Read Access denied",$relDir) ; |
Error("Read Access denied",$relDir) ; |
652 |
while ($item = readdir($dir)) { |
while ($item = readdir($dir)) { |
653 |
if ( $item == ".." || $item == "." || substr($item,0,1) == "." ) continue ; |
if ( substr($item,0,1) == "." || strstr($hide_items,",$item,") ) continue ; |
654 |
if ( is_dir($fsDir . $item) ) { |
if ( is_dir($fsDir . $item) ) { |
655 |
$dirList[] = $item ; |
$dirList[] = $item ; |
656 |
} else if ( is_file($fsDir . $item) ) { |
} else if ( is_file($fsDir . $item) ) { |