diff options
author | Luke Bratch <l_bratch@yahoo.co.uk> | 2014-07-23 16:35:29 +0100 |
---|---|---|
committer | Luke Bratch <l_bratch@yahoo.co.uk> | 2014-07-23 16:35:29 +0100 |
commit | 2e019a75fc16f20a2c0dffebea02994e0dec057b (patch) | |
tree | 93723bebb8cdf0c304250271a0e2435c52a4ecc7 | |
parent | 7b6ceda54dd6f6b49d439447f925474b01fbd6a3 (diff) |
Code tidying
-rw-r--r-- | index.php | 185 |
1 files changed, 92 insertions, 93 deletions
@@ -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++; } |