From 2e019a75fc16f20a2c0dffebea02994e0dec057b Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Wed, 23 Jul 2014 16:35:29 +0100 Subject: Code tidying --- index.php | 185 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 92 insertions(+), 93 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 7b6a1a9..f84f961 100644 --- a/index.php +++ b/index.php @@ -143,98 +143,98 @@ while ($this_array = each($new_array)){ $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; + 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; } $listing[$listsize]['filename'] = $value; @@ -242,7 +242,6 @@ while ($this_array = each($new_array)){ $listing[$listsize]['modified'] = $key; $listing[$listsize]['size'] = $size_array[$key]; - $listsize++; } -- cgit v1.2.3