file_exists( $abs )) { $error[$i] = $GLOBALS["error_msg"]["itemexist"]; $err=true; continue; } if(!get_show_item($dir, $items[$i])) { $error[$i] = $GLOBALS["error_msg"]["accessitem"]; $err=true; continue; } // Delete if( ext_isFTPMode() ) $abs = str_replace('\\', '/', get_abs_item($dir,$abs) ); $ok= $GLOBALS['ext_File']->remove( $abs ); if($ok===false || PEAR::isError( $ok )) { $error[$i]=$GLOBALS["error_msg"]["delitem"]; if( PEAR::isError( $ok ) ) { $error[$i].= ' ['.$ok->getMessage().']'; } $err=true; continue; } $error[$i]=NULL; } if($err) { // there were errors $err_msg=""; for($i=0;$i<$cnt;++$i) { if($error[$i]==NULL) continue; $err_msg .= $items[$i]." : ".$error[$i].".\n"; } ext_Result::sendResult('delete', false, $err_msg); } ext_Result::sendResult('delete', true, $GLOBALS['messages']['success_delete_file'] ); } }