prefs['play_type'] != 'democratic') { access_denied(); exit; } /* Clean up the stuff we need */ $action = scrub_in($_REQUEST['action']); switch ($action) { case 'create_playlist': /* We need to make ourselfs a new tmp playlist */ $tmp_playlist = new tmpPlaylist(); $id = $tmp_playlist->create('-1','vote','song',$_REQUEST['playlist_id']); /* Re-generate the playlist */ $tmp_playlist = new tmpPlaylist($id); require_once(conf('prefix') . '/templates/show_tv.inc.php'); break; default: $tmp_playlist = get_democratic_playlist('-1'); require_once(conf('prefix') . '/templates/show_tv.inc.php'); break; } // end switch on action ?>