Exemple #1
0
        $localplay->connect();
        $localplay->repeat(make_bool($_REQUEST['value']));
        ob_start();
        $objects = $localplay->get();
        require_once AmpConfig::get('prefix') . UI::find_template('show_localplay_status.inc.php');
        $results['localplay_status'] = ob_get_contents();
        ob_end_clean();
        break;
    case 'random':
        // Make sure that they have access to do this
        if (!Access::check('localplay', '50')) {
            debug_event('DENIED', 'Attempted to set random without access', '1');
            exit;
        }
        // Scrub her in
        $localplay = new Localplay(AmpConfig::get('localplay_controller'));
        $localplay->connect();
        $localplay->random(make_bool($_REQUEST['value']));
        ob_start();
        $objects = $localplay->get();
        require_once AmpConfig::get('prefix') . UI::find_template('show_localplay_status.inc.php');
        $results['localplay_status'] = ob_get_contents();
        ob_end_clean();
        break;
    default:
        $results['rfc3514'] = '0x1';
        break;
}
// switch on action;
// We always do this
echo xoutput_from_array($results);