connect(); $function = scrub_in($_GET['cmd']); $localplay->$function(); echo $function; 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"'; ?> onclick="ajaxPut('','action=change_play_type&type=stream','play_type');return true;">    onclick="ajaxPut('','action=change_play_type&type=localplay','play_type');return true;">