connect(); $function = scrub_in($_GET['cmd']); $value = scrub_in($_GET['value']); $localplay->$function($value); break; case 'change_play_type': init_preferences(); session_id(scrub_in($_REQUEST['sessid'])); session_start(); $_SESSION['data']['old_play_type'] = conf('play_type'); $pref_id = get_preference_id('play_type'); $GLOBALS['user']->update_preference($pref_id,$_GET['type']); /* Now Replace the text as you should */ $ajax_url = conf('web_path') . '/server/ajax.server.php'; $required_info = "&user_id=" . $GLOBALS['user']->id . "&sessid=" . session_id(); ${$_GET['type']} = 'id="pt_active"'; require_once(conf('prefix') . '/templates/show_localplay_switch.inc.php'); break; case 'reloadnp': show_now_playing(); break; default: echo "Default Action"; break; } // end switch action ?>