'); /* user1 - User setting 1 - include standard items 0 : include links to directory index and parent directory 1 : include link to parent directory 2 : include neither of the above */ $user1 = 0; /* user2 - User Setting 2 - whether to include a specific dowload link 0 : Off. Do not include download links 1 : On. Include download link for every file N.B. This must be off for the web server WebJames on RISC OS If On, the file 'download.php' must be present for the links to work */ $user2 = 0; /* pageTitle - Page Title - for browser tab and on the page */ $pageTitle = "File Catalogue"; ?> <?=$pageTitle?>

Object Download'); } echo('Size Type Last Mod'); $folder = getcwd(); $fileh = opendir("$folder"); while (false !== ($filename = readdir($fileh))) { $filenames[] = $filename; } sort($filenames); $arraysize = sizeof($filenames) - 1; for ($i = $user1; $i <= $arraysize; $i++) { $fi = $filenames[$i]; $fd = date('Ymd_His',filemtime($fi)); if ($user2 == "1") { $fm = mime_content_type($fi); } // change hard space to regular space for textual filename $fn = str_replace(" "," ",$fi); $fo = str_replace(" ","%20",$fi); if ($fn==".") { $fn = ". directory index"; } if ($fn=="..") { $fn = ".. parent directory"; } $fs = filesize($fi); $ft = filetype($fi); print("
$fn"); if ($user2 == "1") { print(" "); if ($ft == "file") { print("download"); } } print(" $fs"); print(" $ft"); print(" $fd "); print("\n"); } ?>
Table generated by cat.php