/** * deletes file or directory recursevely * @param string $file * @return void */ public static function delete($file) { if (is_dir($file)) { $objects = scandir($file); foreach ($objects as $object) { if ($object != '.' and $object != '..') { if (is_dir($file . '/' . $object)) { core::delete($file . '/' . $object); } else { unlink($file . '/' . $object); } } } reset($objects); @rmdir($file); } elseif (is_file($file)) { unlink($file); } }
function delete($id = '') { core::delete('outbox', 'gammu', 'ID', $id); redirect('outbox'); }
function delete($id = '') { core::delete('sentitems', 'gammu', 'ID', $id); redirect('sending'); }
function delete($id = '') { core::delete('pbk', 'gammu', 'ID', $id); redirect('pbk'); }
function delete($id = NULL) { core::delete('tbl', $id); redirect(''); }