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'

Usergallerys

'; if($_GET['action']=="add") { echo'
Gallery-Name:
Group: User-Gallery
 
'; } elseif($_GET['action']=="edit") { $ergebnis=safe_query("SELECT * FROM ".PREFIX."gallery WHERE galleryID='".$_GET['galleryID']."' AND userID='".$userID."'"); $ds=mysql_fetch_array($ergebnis); echo'
Group-Name:
Group: User-Gallery
'; } elseif($_GET['action']=="upload") { $id=$_GET['galleryID']; echo'
Name:
Comment:
Visitor comments:
Picture:
'; } else { $size = $galclass->getuserspace($userID); $percent = percent($size, $maxusergalleries, 0); if($percent>95) $color = $loosecolor; else $color = $wincolor; $bg1=BG_1; $bg2=BG_2; $pagebg=PAGEBG; $border=BORDER; $bghead=BGHEAD; $bgcat=BGCAT; echo'
 '.round($size/(1024*1024),2).' MB of '.round($maxusergalleries/(1024*1024),2).' MB are in use.
'; $ergebnis=safe_query("SELECT * FROM ".PREFIX."gallery WHERE userID='".$userID."'"); echo'
'; for($i=1;$ds=mysql_fetch_array($ergebnis);$i++) { if($i%2) $bg=$bg1; else $bg=$bg2; echo''; } if($i==1) echo ''; echo '
Gallery-Name: Actions:
'.$ds[name].'
No galleries available.
'; } } else redirect('index.php?site=login','',0); ?>