/** * Prepare and output any inline Javascript for the current page * @static */ function GetHead_InlineJS() { global $page, $linkPrefix; ob_start(); if (gpdebugjs) { echo 'var debugjs=true;'; } if (common::LoggedIn()) { echo 'var isadmin=true'; echo ',gpBLink="' . common::HrefEncode($linkPrefix) . '"'; //here because of index.php gpsession::GPUIVars(); if (!admin_tools::CanRemoteInstall()) { echo ',gpRem=false'; } echo ',post_nonce="' . common::new_nonce('post', true) . '"'; echo ';'; gpOutput::GP_STYLES(); } echo $page->head_script; if (!empty($page->jQueryCode)) { echo '$(function(){'; echo $page->jQueryCode; echo '});'; } $inline = ob_get_clean(); if (!empty($inline)) { echo "\n<script type=\"text/javascript\">/* <![CDATA[ */\n"; echo $inline; echo "\n/* ]]> */</script>"; } }