. */ namespace Fisharebest\Webtrees; /** * Defined in session.php * * @global Tree $WT_TREE */ global $WT_TREE; use Fisharebest\Webtrees\Controller\AjaxController; use Fisharebest\Webtrees\Controller\PageController; use Fisharebest\Webtrees\Functions\FunctionsPrint; define('WT_SCRIPT_NAME', 'statistics.php'); require './includes/session.php'; // check for on demand content loading $tab = Filter::getInteger('tab', 0, 3); $ajax = Filter::getBool('ajax'); if (!$ajax) { $controller = new PageController; $controller ->restrictAccess(Module::isActiveChart($WT_TREE, 'statistics_chart')) ->setPageTitle(I18N::translate('Statistics')) ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL) ->addInlineJavascript(' jQuery("#statistics_chart").css("visibility", "visible"); jQuery("#statistics_chart").tabs({ load: function() { jQuery("#loading-indicator").removeClass("loading-image"); }, beforeLoad: function(event, ui) { // Only load each tab once if (ui.tab.data("loaded")) { event.preventDefault(); return; } else { jQuery("#loading-indicator").addClass("loading-image"); } ui.jqXHR.success(function() { ui.tab.data("loaded", true); }); } }); ') ->pageHeader(); echo '