\n"; // Make Array of Files and Array of Dirs $dir = opendir($rootDir); $file_number=1; while(false !== ($file = readdir($dir))) { $type = filetype($rootDir ."/". $file); if($type == "dir" && $file!="." && $file!=".." && $file!="cgi-bin") { $dir_array[$file_number] = $file; } if($type != "dir" && $file!=".DS_Store" && $file!="index.php") { $file_array[$file_number] = $file; } $file_number+=1; } closedir($dir); if (substr_count($rootDir, "/")>1) { echo "
  • "; echo ""; echo "
    Up
    "; echo "
    "; echo "
  • \n"; } // Loop through arrays and draw folder tree if ($dir_array) { foreach($dir_array as $subdir) { echo "
  • "; echo ""; echo "" . stripslashes($subdir) . "
    "; echo "
    "; echo "
  • \n"; } } if ($file_array) { foreach($file_array as $file) { $item_path_array = explode("/", $file); if (substr(end($item_path_array), 0, 6)!="thumb-") { $thumb = implode("/", array_slice($item_path_array, 0, count($item_path_array)-1) + array("thumb-" . end($item_path_array))); echo "
  • \"""; echo "
    "; echo "
  • \n"; } } } echo "\n"; } else { echo "
    " . $rootDir . " is not a directory"; } } ?>

    Photobook

    "; echo "Photos"; foreach($path_array as $item) { echo " -\n" . $item . ""; echo ""; } if ($path!="") { echo " -\n" . $current_folder . ""; } echo ""; $theDirectory = "photos/" . $path; if ($path!="") { $theDirectory = $theDirectory . "/"; } drawTree($theDirectory); ?>
    With Selected: