get_objects(); $name = $GLOBALS['user']->username . ' - Playlist'; break; case 'playlist': $playlist = new Playlist($_REQUEST['id']); $song_ids = $playlist->get_songs(); $name = $playlist->name; break; case 'album': $album = new Album($_REQUEST['id']); $song_ids = $album->get_songs(); $name = $album->name; break; case 'genre': $id = scrub_in($_REQUEST['id']); $genre = new Genre($id); $song_ids = $genre->get_songs(); $name = $genre->name; break; default: // Rien a faire break; } // action switch // Take whatever we've got and send the zip $song_files = get_song_files($song_ids); set_memory_limit($song_files['1']+32); send_zip($name,$song_files['0']); ?>