Esempio n. 1
0
echo TBGContext::isProjectContext() ? make_url('project_quicksearch', array('project_key' => TBGContext::getCurrentProject()->getKey())) : make_url('quicksearch');
?>
'})};
				<?php 
if (TBGContext::isDebugMode()) {
    ?>
					TBG.debug = true;
					TBG.debugUrl = '<?php 
    echo make_url('debug', array('debug_id' => '___debugid___'));
    ?>
';
					TBG.Core.AjaxCalls.push({location: 'Page loaded', time: new Date(), debug_id: '<?php 
    echo TBGContext::getDebugID();
    ?>
'});
					TBG.loadDebugInfo('<?php 
    echo TBGContext::getDebugID();
    ?>
', f_init);
				<?php 
} else {
    ?>
					f_init();
				<?php 
}
?>
			});
		</script>
	</body>
</html>
Esempio n. 2
0
 /**
  * Render current headers
  */
 public function renderHeaders()
 {
     header("HTTP/1.0 " . $this->_http_status);
     /* headers to stop caching in browsers and proxies */
     header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
     // Date in the past
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
     // always modified
     header("Cache-Control: no-cache, must-revalidate");
     // HTTP/1.1
     header("Pragma: no-cache");
     // HTTP/1.0
     header("x-tbg-debugid: " . TBGContext::getDebugID());
     if (TBGContext::isI18nInitialized()) {
         header("Content-Type: " . $this->_content_type . "; charset=" . TBGContext::getI18n()->getCharset());
     } else {
         header("Content-Type: " . $this->_content_type . "; charset=utf-8");
     }
     foreach ($this->_headers as $header) {
         header($header);
     }
 }