fetch('inc/wrappers/' . $pageType . '-header.tpl', $GLOBALS['currentTab'], $GLOBALS['compileId']); } /** * Fetch and store our page content. * * $cacheId is set in init.php or the colling script. It * is unique for any number of combinations of parameters (GET, typically). * * $compileId is set in init.php and corresponds to the current app. */ $pageOutput .= $tpl->fetch($content,$cacheId,$compileId); /** * Fetch and store our page footer. We do not pass it a cacheId or compileId * because the footer doesn't change based on parameters. * * Our special case is if the pageType is xml, where we would not display the HTML headers. */ if ($pageType != 'xml') { $pageOutput .= $tpl->fetch('inc/wrappers/' . $pageType . '-footer.tpl'); } /** * If our config says so, the page should be cached. * * Only set the cache if we have a valid connection to our cache server (see $memcachedConnected in init.php). */ if (!empty($cache_config[SCRIPT_NAME]) && !empty($memcacheConnected) && $memcacheConnected) { // Save our page output to our cache. $cache->set($memcacheId, $pageOutput, false, $cache_config[SCRIPT_NAME]); } /** * If we have specified a custom content-type for this script, echo the header here. */ if (!empty($contentType_config[SCRIPT_NAME])) { header('Content-type: '.$contentType_config[SCRIPT_NAME]); } /** * If we get here, there is no caching. * We should just dump the output. */ echo $pageOutput; ?>