gallery.class.php update