has_access('100')) { access_denied(); } $action = scrub_in($_REQUEST['action']); $song = scrub_in($_REQUEST['song']); show_template('header'); show_menu_items('Admin'); show_admin_menu('Catalog'); $song_obj = new Song($_REQUEST['song_id']); switch($action) { case "Update": case "update"; update_song_info($song); edit_song_info($song); break; case "Edit": case "edit": edit_song_info($song); break; case "disable": // If we pass just one, make it still work if (!is_array($_REQUEST['song_ids'])) { $song_obj->update_enabled('disabled',$_REQUEST['song_ids']); } else { foreach ($_REQUEST['song_ids'] as $song_id) { $song_obj->update_enabled('disabled',$song_id); } // end foreach } // end else show_confirmation(_("Songs Disabled"),_("The requested song(s) have been disabled"),return_referer()); break; case "enabled": // If we pass just one, make it still work if (!is_array($_REQUEST['song_ids'])) { $song_obj->update_enabled('enabled',$_REQUEST['song_ids']); } else { foreach ($_REQUEST['song_ids'] as $song_id) { $song_obj->update_enabled('enabled',$song_id); } // end foreach } // end else show_confirmation(_("Songs Enabled"),_("The requested song(s) have been enabled"),return_referer()); break; default: echo "Don't know what to do yet."; } /* @function edit_song_info @discussion yea this is just wrong */ function edit_song_info($song) { $info = new Song($song); preg_match("/^.*\/(.*?)$/",$info->file, $short); $filename = htmlspecialchars($short[1]); if(preg_match('/\.ogg$/',$short[1])) { $ogg = TRUE; $oggwarn = "

This file is an OGG file, which Ampache only has limited support for.
"; $oggwarn .= "You can make changes to the database here, but Ampache will not change the actual file's information.


"; } echo <<Editing $info->title

EDIT_SONG_4; if(!$ogg) { echo << EDIT_SONG_5; } echo <<
Editing $info->title
File: $filename $oggwarn
Title:
Artist: EDIT_SONG_1; show_artist_pulldown($info->artist); echo << or
Album: EDIT_SONG_2; show_album_pulldown($info->album); echo << or
Track:
Genre: EDIT_SONG_3; show_genre_pulldown($info->genre, 1); echo <<
Year
    Update id3 tags  
 
EDIT_SONG_6; } ?>