function pictureDelete() { $pid = isset($_GET['pid']) ? addslashes($_GET['pid']) : 0; if ($pid == 0) { die('No ID'); } $car = new Galleryphoto(); $car->getByID($pid); $car->delete($pid); //delete di server unlink($this->uploadDir . $car->photo_filename); unlink($this->uploadDirThumb . $car->photo_filename); }
function pictureDelete() { $pid = isset($_GET['pid']) ? addslashes($_GET['pid']) : 0; if ($pid == 0) { die('No ID'); } $car = new Galleryphoto(); $car->getByID($pid); $car->delete($pid); //delete di server unlink(_PHOTOPATH . $car->photo_filename); unlink(_PHOTOPATH . "thumbnail/" . $car->photo_filename); //delete inputfilehistory $if = new InputFileModel(); $arr = $if->getWhere("file_filename = '" . $car->photo_filename . "' LIMIT 0,1"); $if = $arr[0]; $if->delete($if->file_id); }