has_access(100)) { header ("Location: " . conf('web_path') . "/index.php?access=denied"); exit(); } $action = scrub_in($_REQUEST['action']); show_template('header'); switch ($action) { case 'show': $flags = get_flagged_songs(); show_flagged_songs($flags); break; case 'Set Flags': case 'Update Flags': $flags = scrub_in($_REQUEST['song']); update_flags($flags); $newflags = get_flagged_songs(); show_flagged_songs($newflags); break; case 'Edit Selected': $flags = scrub_in($_REQUEST['song']); $count = add_to_edit_queue($flags); if($count) show_edit_flagged(); break; case 'Next': $song = scrub_in($_REQUEST['song']); update_song_info($song); show_edit_flagged(); // Pull song ids from an edit queue in $_SESSION, // And edit them one at a time break; case 'Skip': $count = add_to_edit_queue(scrub_in($_REQUEST['song'])); if($count) show_edit_flagged(); case 'Flag Songs': break; case 'Remove Flags': break; case 'Clear Edit List': unset($_SESSION['edit_queue']); case 'Done': $song = scrub_in($_REQUEST['song']); update_song_info($song); default: $flags = get_flagged_songs(); show_flagged_songs($flags); } show_footer(); ?>