function getAllfolder() { $root = '../../../uploads/'; $res = array(''); if ($Folder = opendir($root)) { while (false !== ($file = readdir($Folder))) { if ($file != "." && $file != "..") { if (is_dir($root . $file)) { $folderName = checkIsSubjectForder($file); if ($folderName) { array_push($res, $file); } } } } closedir($Folder); } return $res; }
} } closedir($Folder); } }else{ $folders=array(); $folders=getAllfolder(); $i=0; for($f=0;$f<count($folders);$f++){ if($folders[$f]==''){ $root='../../../uploads/'; ?><div class="monthTitle cb">Root</div><? }else{ $root='../../../uploads/'.$folders[$f].'/'; ?><div class="monthTitle cb"><?php echo checkIsSubjectForder($folders[$f]); ?> </div><? } if ($Folder = opendir($root)){ while (false !== ($file = readdir($Folder))){ if ($file != "." && $file != "..") { $fileNameParts = explode(".",$file); $Ex =strtolower(end($fileNameParts)); if(in_array($Ex,$img_arr)){ if(!is_dir($root.$file)){ $bgcol='fff'; $inList=0; if(in_array($file,$photos)){ $bgcol='abe799';