From 428d38c8be1086bbeabe9affed63b0b4c03bb288 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Wed, 23 Jul 2014 16:10:59 +0100 Subject: First commit --- index.php | 269 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 269 insertions(+) create mode 100644 index.php (limited to 'index.php') diff --git a/index.php b/index.php new file mode 100644 index 0000000..b8a98fa --- /dev/null +++ b/index.php @@ -0,0 +1,269 @@ + + + +Irn-Bru + + + + +
+

+
Remember me

+

+
+ + += $sys['size'] && $i < $depth) { + $size /= $sys['size']; + $i++; + } + + return sprintf($retstring, $size, $sys['prefix'][$i]); +} +?> + + + + +Index of / + + + +
+ +
+ + + + +
Icon  Name                    Last modified      Size
$file) { + $c_date = filemtime("$files_directory/$file"); + $new_array[$c_date] = $file; + $size_array[$c_date] = filesize("$files_directory/$file"); +} + +if (isset($sort)) { + if ($sort[0] == "M") { + if ($sort[1] == "A") { + ksort($new_array); + } else { + krsort($new_array); + } + } +} else { + krsort($new_array); +} + +while ($this_array = each($new_array)){ + $value = $this_array['value']; + $key = $this_array['key']; + $key_convert = date("d-M-Y H:i", $key); + if (strlen($value) > 23) { + $preview = substr($value, 0, 20) . "..>"; + } else { + $preview = $value; + } + $spaces = ""; + for ($i = 0; $i < (24 - strlen($preview)); $i++) { + $spaces = $spaces . " "; + } + +$fileparts = explode('.', strtolower($value)); +$icon = "unknown"; + +switch ($fileparts[count($fileparts)-1]) { + case "png": + case "jpg": + case "gif": + case "bmp": + case "jpeg": + case "svg": + $icon="image2"; + break; + case "exe": + case "jar": + case "class": + case "apk": + $icon="binary"; + break; + case "c": + case "cpp": + case "h": + $icon="c"; + break; + case "doc": + case "docx": + case "dot": + case "dotx": + case "odt": + case "ott": + case "oth": + case "odm": + case "xls": + case "xlsx": + case "ppt": + case "pptx": + $icon="layout"; + break; + case "avi": + case "mkv": + case "wmv": + case "ogv": + case "3gp": + case "divx": + case "mov": + $icon="movie"; + break; + case "pdf": + $icon="pdf"; + break; + case "ps": + $icon="ps"; + break; + case "java": + case "php": + case "html": + case "htm": + case "xml": + case "cs": + case "sh": + case "bat": + case "js": + case "jsp": + case "py": + case "cgi": + case "pl": + $icon="script"; + break; + case "wav": + $icon="sound1"; + break; + case "mp3": + case "ogg": + case "wma": + case "aac": + $icon="sound2"; + break; + case "tex": + $icon="tex"; + case "txt": + case "rtf": + case "log": + $icon="text"; + break; + case "zip": + case "rar": + case "gz": + case "bz2": + case "tar": + case "tgz": + case "7z": + case "iso": + $icon="compressed"; + break; + default: + $icon="unknown"; + break; +} + + echo '[IMG] ' . $preview . '' . $spaces . $key_convert . ' ' . size_readable($size_array[$key], null, "bi") . ' ' . "\n"; +} + +clearstatcache(); +?> +
+ +
Apache Server at www.blaupload.co.uk Port 80
+ -- cgit v1.2.3