function RunOut() { global $page, $gp_head_content; $page->RunScript(); //decide how to send the content gpOutput::Prep(); $req = ''; if (isset($_REQUEST['gpreq'])) { $req = $_REQUEST['gpreq']; } switch ($req) { // <a name="admin_box"> case 'flush': gpOutput::Flush(); break; // remote request // file browser // remote request // file browser case 'body': common::CheckTheme(); gpOutput::BodyAsHTML(); break; // <a name="gpajax"> // <a name="gpajax"> case 'json': common::CheckTheme(); includeFile('tool/ajax.php'); gpAjax::Response(); break; case 'content': gpOutput::Content(); break; default: common::CheckTheme(); gpOutput::Template(); break; } //if logged in, prepare the admin content and don't send 304 response if (common::LoggedIn()) { admin_tools::AdminHtml(); return; } /* attempt to send 304 response */ if ($page->fileModTime > 0) { $len = strlen($gp_head_content) + ob_get_length(); common::Send304(common::GenEtag($page->fileModTime, $len)); } }