Beispiel #1
0
 */
require_once 'lib/init.php';
UI::show_header();
// Switch on the incomming action
switch ($_REQUEST['action']) {
    case 'add_shout':
        // Must be at least a user to do this
        if (!Access::check('interface', '25')) {
            UI::access_denied();
            exit;
        }
        if (!Core::form_verify('add_shout', 'post')) {
            UI::access_denied();
            exit;
        }
        $shout_id = Shoutbox::create($_POST);
        header("Location:" . AmpConfig::get('web_path'));
        break;
    case 'show_add_shout':
        // Get our object first
        $object = Shoutbox::get_object($_REQUEST['type'], $_REQUEST['id']);
        if (!$object || !$object->id) {
            Error::add('general', T_('Invalid Object Selected'));
            Error::display('general');
            break;
        }
        $object->format();
        if (strtolower(get_class($object)) == 'song') {
            $data = $_REQUEST['offset'];
        }
        // Now go ahead and display the page where we let them add a comment etc