} // Now that we've confirmed the session is valid // extend it Session::extend($sid, 'stream'); } } /* Update the users last seen information */ $GLOBALS['user']->update_last_seen(); } else { $secret = $_REQUEST['share_secret']; $share = new Share($share_id); if (!$share->is_valid($secret, 'stream')) { header('HTTP/1.1 403 Access Unauthorized'); exit; } if (!$share->is_shared_media($oid)) { header('HTTP/1.1 403 Access Unauthorized'); exit; } $GLOBALS['user'] = new User($share->user); Preference::init(); } /* If we are in demo mode.. die here */ if (AmpConfig::get('demo_mode') || !Access::check('interface', '25')) { debug_event('UI::access_denied', "Streaming Access Denied:" . AmpConfig::get('demo_mode') . "is the value of demo_mode. Current user level is " . $GLOBALS['user']->access, '3'); UI::access_denied(); exit; } /* If they are using access lists let's make sure that they have enough access to play this mojo