/**
* Renders the footer
*
* @return string
*/
public function getDisplay()
{
$retval = '';
$this->_setHistory();
if ($this->_isEnabled) {
if (!$this->_isAjax) {
$retval .= "</div>";
}
if (!$this->_isAjax && !$this->_isMinimal) {
if (PMA_getenv('SCRIPT_NAME') && empty($_POST) && empty($GLOBALS['checked_special']) && !$this->_isAjax) {
$url = $this->getSelfUrl();
$header = Response::getInstance()->getHeader();
$scripts = $header->getScripts()->getFiles();
$menuHash = $header->getMenu()->getHash();
// prime the client-side cache
$this->_scripts->addCode(sprintf('if (! (history && history.pushState)) ' . 'PMA_MicroHistory.primer = {' . ' url: "%s",' . ' scripts: %s,' . ' menuHash: "%s"' . '};', Sanitize::escapeJsString($url), json_encode($scripts), Sanitize::escapeJsString($menuHash)));
}
if (PMA_getenv('SCRIPT_NAME') && !$this->_isAjax) {
$url = $this->getSelfUrl();
$retval .= $this->_getSelfLink($url);
}
$this->_scripts->addCode('var debugSQLInfo = ' . $this->getDebugMessage() . ';');
$retval .= '<div class="clearfloat" id="pma_errors">';
$retval .= $this->getErrorMessages();
$retval .= '</div>';
$retval .= $this->_scripts->getDisplay();
if ($GLOBALS['cfg']['DBG']['demo']) {
$retval .= '<div id="pma_demo">';
$retval .= $this->_getDemoMessage();
$retval .= '</div>';
}
// Include possible custom footers
if (file_exists(CUSTOM_FOOTER_FILE)) {
$retval .= '<div id="pma_footer">';
ob_start();
include CUSTOM_FOOTER_FILE;
$retval .= ob_get_contents();
ob_end_clean();
$retval .= '</div>';
}
}
if (!$this->_isAjax) {
$retval .= "</body></html>";
}
}
return $retval;
}