From: muchweb Date: Wed, 11 Feb 2015 23:53:54 +0000 (+0000) Subject: Listing files X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f55972bdc46c8a375381a934c65fff2dcec98035;p=simple-upload.git Listing files --- diff --git a/index.php b/index.php index 461ee3a..c0b0685 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,8 @@ 'strace.club', + 'title' => 'strace.club', // Directory to store uploaded files - uploaddir => '.', + 'uploaddir' => '.', // Display list uploaded files - listfiles => true, + 'listfiles' => true, // Allow users to delete files that they have uploaded (will enable sessions) - allow_deletion => true, + 'allow_deletion' => true, // Allow users to mark files as hidden - allow_private => true, + 'allow_private' => true, // Display file sizes - listfiles_size => true, + 'listfiles_size' => true, // Display file dates - listfiles_date => true, + 'listfiles_date' => true, // Display file dates format - listfiles_date_format => 'F d Y H:i:s', + 'listfiles_date_format' => 'F d Y H:i:s', // Randomize file names (number of 'false') - random_name_len => 8, + 'random_name_len' => 8, // Keep filetype information (if random name is activated) - random_name_keep_type => true, + 'random_name_keep_type' => true, // Random file name letters - random_name_alphabet => 'qazwsxedcrfvtgbyhnujmikolp1234567890', + 'random_name_alphabet' => 'qazwsxedcrfvtgbyhnujmikolp1234567890', // Display debugging information - debug => false, + 'debug' => true, // Complete URL to your directory (including tracing slash) - url => 'http://strace.club/' + 'url' => 'http://strace.club/', // Amount of seconds that each file should be stored for (0 for no limit) - time_limit => 0, + 'time_limit' => 0, // Files that will be ignored - ignores = array('.', '..', 'LICENSE', 'README.md'), + 'ignores' => array('.', '..', 'LICENSE', 'README.md'), ); // =============={ Configuration End }============== @@ -70,6 +74,7 @@ $data['scriptname'] = pathinfo(__FILE__, PATHINFO_BASENAME); // Adding current script name to ignore list + $data['ignores'] = $settings['ignores']; $data['ignores'][] = $data['scriptname']; // Use canonized path @@ -229,6 +234,12 @@ return $file_array; } + $file_array = ListFiles($settings['uploaddir'], $data['ignores']); + + foreach ($file_array as $value) { + echo($value.'
'); + } + ?> @@ -346,7 +357,6 @@