www.saucecan.com Original Script Author: Ash Young . www.evoluted.net Original Layout: Manny . www.tenka.co.uk CONFIGURATION ============= Edit the variables in this section to make the script work as you require. Start Directory This variable is used to allow our script to operate in the various folders we've provided (NMR, IR, Uploads) This is passed from the URL */ if($_GET['cat']==""){ $startdir = "nmr"; } else{ $startdir = $_GET['cat']; } /* Supported Files Something I added that limits what files types show up in the file listing. You can expand this if you wish. Simply add more extensions in the format established. */ $supportedtypes = array('jdx','dx'); /* 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 ( 'jdx' => 'jdx.gif', 'dx' => 'jdx.gif' ); /* The following variables shouldn't need to be changed */ /* Allow uploads? If enabled users will be able to upload files to any viewable directory. This is determined based on which folder you're in. Shouldn't change. */ if($startdir=="uploads" or $startdir=="uploads/" ){ $allowuploads = true; } else{ $allowuploads = 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' ); /* Show Thumbnails? Set to true if you wish to use the scripts auto-thumbnail generation capabilities. This requires that GD2 is installed. This only applies to images, not useful for us. */ $showthumbnails = true; /* 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 now shown. */ $hide = array( 'dlf', 'index.php', 'Thumbs', '.htaccess', '.htpasswd', 'html', '.Trash' ); /* 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; /* 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; /* Only edit what is below this line if you are sure that you know what you are doing! */ // Preprocessing the URLs and Directories... nothing we should alter error_reporting(0); if(!function_exists('imagecreatetruecolor')) $showthumbnails = false; $leadon = $startdir; if($leadon=='.') $leadon = ''; if((substr($leadon, -1, 1)!='/') && $leadon!='') $leadon = $leadon . '/'; $startdir = $leadon; if($_GET['dir']) { if(substr($_GET['dir'], -1, 1)!='/') { $_GET['dir'] = $_GET['dir'] . '/'; } $dirok = true; $dirnames = split('/', $_GET['dir']); for($di=0; $di Directory Listing of //



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 = $leadon . $files[$i]; if($ext=='jdx' or $ext=='dx'){ $jdx = "onClick=\"loadFile('/" . $fileurl . "')\""; $fileurl = '#'; } if($forcedownloads) { $fileurl = $_SESSION['PHP_SELF'] . '?dir=' . urlencode($leadon) . '&download=' . urlencode($files[$i]); } ?>
File Upload (Max Filesize: KB)
Authenticate to upload
Back to main page
Spectra displayed using SpectreView© by Ian Kaster '06