. * */ require_once 'lib/init.php'; UI::show_header(); switch ($_REQUEST['action']) { case 'get_advanced': $object_ids = Random::advanced($_REQUEST['type'], $_POST); // We need to add them to the active playlist if (is_array($object_ids)) { foreach ($object_ids as $object_id) { $GLOBALS['user']->playlist->add_object($object_id, 'song'); } } case 'advanced': default: require_once AmpConfig::get('prefix') . UI::find_template('show_random.inc.php'); break; } // end switch UI::show_footer();