/ www.evoluted.net REQUIREMENTS ============ This script requires PHP and GD2 if you wish to use the thumbnail functionality. INSTRUCTIONS ============ 1) Unzip all files 2) Edit this file, making sure everything is setup as required. 3) Upload to server CONFIGURATION ============= Edit the variables in this section to make the script work as you require. Include URL - If you are including this script in another file, please define the URL to the Directory Listing script (relative from the host) */ $includeurl = false; /* Start Directory - To list the files contained within the current directory enter '.', otherwise enter the path to the directory you wish to list. The path must be relative to the current directory and cannot be above the location of index.php within the directory structure. */ $startdir = './content/levine'; /* Show Thumbnails? - Set to true if you wish to use the scripts auto-thumbnail generation capabilities. This requires that GD2 is installed. */ $showthumbnails = true; /* Memory Limit - The image processor that creates the thumbnails may require more memory than defined in your PHP.INI file for larger images. If a file is too large, the image processor will fail and not generate thumbs. If you require more memory, define the amount (in megabytes) below */ $memorylimit = false; // Integer /* Show Directories - Do you want to make subdirectories available? If not set this to false */ $showdirs = true; /* Force downloads - Do you want to force people to download the files rather than viewing them in their browser? */ $forcedownloads = false; /* Hide Files - If you wish to hide certain files or directories then enter their details here. The values entered are matched against the file/directory names. If any part of the name matches what is entered below then it is not shown. */ $hide = array( 'dlf', 'index.php', 'Thumbs', '.htaccess', '.htpasswd' ); /* Only Display Files With Extension... - if you only wish the user to be able to view files with certain extensions, add those extensions to the following array. If the array is commented out, all file types will be displayed. */ $showtypes = array( 'mp3', 'mpg' ); /* Show index files - if an index file is found in a directory to you want to display that rather than the listing output from this script? */ $displayindex = false; /* Allow uploads? - If enabled users will be able to upload files to any viewable directory. You should really only enable this if the area this script is in is already password protected. */ $allowuploads = false; /* Upload Types - If you are allowing uploads but only want users to be able to upload file with specific extensions, you can specify these extensions below. All other file types will be rejected. Comment out this array to allow all file types to be uploaded. */ /*$uploadtypes = array( 'zip', 'gif', 'doc', 'png' );*/ /* Overwrite files - If a user uploads a file with the same name as an existing file do you want the existing file to be overwritten? */ $overwrite = false; /* Index files - The follow array contains all the index files that will be used if $displayindex (above) is set to true. Feel free to add, delete or alter these */ $indexfiles = array ( 'index.html', 'index.htm', 'default.htm', 'default.html' ); /* File Icons - If you want to add your own special file icons use this section below. Each entry relates to the extension of the given file, in the form => . These files must be located within the dlf directory. */ $filetypes = array ( 'png' => 'jpg.gif', 'jpeg' => 'jpg.gif', 'bmp' => 'jpg.gif', 'jpg' => 'jpg.gif', 'gif' => 'gif.gif', 'zip' => 'archive.png', 'rar' => 'archive.png', 'exe' => 'exe.gif', 'setup' => 'setup.gif', 'txt' => 'text.png', 'htm' => 'html.gif', 'html' => 'html.gif', 'fla' => 'fla.gif', 'swf' => 'swf.gif', 'xls' => 'xls.gif', 'doc' => 'doc.gif', 'sig' => 'sig.gif', 'fh10' => 'fh10.gif', 'pdf' => 'pdf.gif', 'psd' => 'psd.gif', 'rm' => 'real.gif', 'mpg' => 'video.gif', 'mpeg' => 'video.gif', 'mov' => 'video2.gif', 'avi' => 'video.gif', 'eps' => 'eps.gif', 'gz' => 'archive.png', 'asc' => 'sig.gif', ); /* That's it! You are now ready to upload this script to the server. Only edit what is below this line if you are sure that you know what you are doing! */ if($includeurl) { $includeurl = preg_replace("/^\//", "${1}", $includeurl); if(substr($includeurl, strrpos($includeurl, '/')) != '/') $includeurl.='/'; } error_reporting(0); if(!function_exists('imagecreatetruecolor')) $showthumbnails = false; if($startdir) $startdir = preg_replace("/^\//", "${1}", $startdir); $leadon = $startdir; if($leadon=='.') $leadon = ''; if((substr($leadon, -1, 1)!='/') && $leadon!='') $leadon = $leadon . '/'; $startdir = $leadon; if($_GET['dir']) { //check this is okay. if(substr($_GET['dir'], -1, 1)!='/') { $_GET['dir'] = strip_tags($_GET['dir']) . '/'; } $dirok = true; $dirnames = split('/', strip_tags($_GET['dir'])); for($di=0; $di $v) { if($i == sizeof($uploadtypes) && sizeof($uploadtypes) != 1) $uploaderror.= ' and '; else if($i != 1) $uploaderror.= ', '; $uploaderror.= '.'.strtoupper($v); $i++; } } } if($upload) { move_uploaded_file($_FILES['file']['tmp_name'], $includeurl.$leadon . $_FILES['file']['name']); } } $opendir = $includeurl.$leadon; if(!$leadon) $opendir = '.'; if(!file_exists($opendir)) { $opendir = '.'; $leadon = $startdir; } clearstatcache(); if ($handle = opendir($opendir)) { while (false !== ($file = readdir($handle))) { //first see if this file is required in the listing if ($file == "." || $file == "..") continue; $discard = false; for($hi=0;$hi The White Rose Society - Radio Inside Scoop Show Page
border border border border
. .

White Rose Society Homepage



An archive of Radio Inside Scoop with Mark Levine (by permission)
Radio Inside Scoop (website at www.radioinsidescoop.com)

Directory Listing of

'.$files[$i].''; $thumb2 = ' onmouseover="o('.$i.', \''.urlencode($leadon . $files[$i]).'\');" onmouseout="f('.$i.');"'; } if($filetypes[$ext]) { $icon = $filetypes[$ext]; } $filename = $files[$i]; if(strlen($filename)>43) { $filename = substr($files[$i], 0, 40) . '...'; } $fileurl = $includeurl . $leadon . $files[$i]; if($forcedownloads) { $fileurl = $_SESSION['PHP_SELF'] . '?dir=' . urlencode(str_replace($startdir,'',$leadon)) . '&download=' . urlencode($files[$i]); } ?>
File Upload (Max Filesize: KB) '.$uploaderror.'
'; ?>
File uploads are disabled in your php.ini file. Please enable them.




.
Directory Listing Script ©2008 Evoluted, Web Design Sheffield.