savethumb($dir.'large/'.$insertid.$endung, $dir.'thumb/'.$insertid.'.jpg'); if( ($galclass->getuserspace($userID)+filesize($dir.'large/'.$insertid.$endung) + filesize($dir.'thumb/'.$insertid.'.jpg')) > $maxusergalleries ) { @unlink($dir.'large/'.$insertid.$endung); @unlink($dir.'thumb/'.$insertid.'.jpg'); safe_query("DELETE FROM ".PREFIX."gallery_pictures WHERE picID='".$insertid."'"); echo '
There is no space left: Canceled.
'; } } } elseif($_GET['delete']) { //SQL if(safe_query("DELETE FROM ".PREFIX."gallery WHERE galleryID='".$_GET['galleryID']."' AND userID='".$userID."'")) { //FILES $ergebnis=safe_query("SELECT picID FROM ".PREFIX."gallery_pictures WHERE galleryID='".$_GET['galleryID']."'"); while($ds=mysql_fetch_array($ergebnis)) { @unlink('images/gallery/thumb/'.$ds[picID].'.jpg'); //thumbnails $path = 'images/gallery/large/'; if(file_exists($path.$ds[picID].'.jpg')) $path = $path.$ds[picID].'.jpg'; else $path = $path.$ds[picID].'.gif'; @unlink($path); //large safe_query("DELETE FROM ".PREFIX."comments WHERE parentID='".$ds[picID]."' AND type='ga'"); } safe_query("DELETE FROM ".PREFIX."gallery_pictures WHERE galleryID='".$_GET['galleryID']."'"); } } echo'
| '.round($size/(1024*1024),2).' MB of '.round($maxusergalleries/(1024*1024),2).' MB are in use. |