$f) if(substr($f,0,1) == ".") unset($files[$key]); //check is dir empty if(count($files) > 0) die(xml_response('alert', $DLG['dir_not_empty']." [b]($file)[/b]")); if($_POST['confirm']) { $info = swampy_pathinfo($path); $delete_ok = true; //Deletes all posibal same image formats foreach($IMAGE_FORMATS as $format) { $format_path = $path."/".$format['dir']; if(file_exists($format_path) && $format['dir'] != "") if(!rmdir($format_path)) $delete_ok = false; } if($delete_ok && rmdir($path)) die(xml_response('done',"[b]'$file'[/b] ".$DLG['dir_delete_success'])); else die(xml_response('error',"[b]'$file'[/b] ".$DLG['dir_delete_failure'])); } ?>