and i need to able to use it on that so i cant use that function..../blah/abc/
any help is appreciated
Moderator: General Moderators
and i need to able to use it on that so i cant use that function..../blah/abc/
Code: Select all
function icon($file){
$ext = ext($file);
$files = array(
"code" => array("php", "js", "asp", "sql"),
"image" => array("png", "jpg", "ico", "gif", "psd", "art", "tif", "tiff", "jpeg", "jpe"),
"compressed" => array("zip", "tar", "rar", "7z", "gz", "iso", "tgz"),
"unknown" => array("dll", "ttf"),
"movie" => array("avi", "mp4", "mpeg", "wmv", "mpg"),
"word" => array("doc", "docx", "pdf", "ppt", "pptx", "xlsm", "xlsx", "xls", "docm", "dotx", "dotm", "xltm", "xltx", "potx", "potm", "ppam", "sldx", "sldm", "thmx", "ppsx", "ppsm"),
"text" => array("txt"),
"web" => array("html", "htm"),
"style" => array("css")
);
foreach($files as $icon => $exts){
if(in_array($ext, $exts)){
echo "<img src='./img/fileman/$icon.png' alt='$ext' height='16' width='16' />";
}
if (is_dir($file)){
echo "<img src='./img/fileman/folder.png' alt='Folder' height='16' width='16' />";
}
}
}