pageHeader() ->addExternalJavaScript(WT_JQUERY_URL) ->addExternalJavaScript(WT_JQUERYUI_URL); // Check we're displaying an allowable block. $block_id=safe_GET('block_id'); if (array_key_exists($block_id, $blocks['main'])) { $module_name=$blocks['main'][$block_id]; } elseif (array_key_exists($block_id, $blocks['side'])) { $module_name=$blocks['side'][$block_id]; } else { exit; } if (array_key_exists($module_name, $all_blocks)) { $class_name=$module_name.'_WT_Module'; $module=new $class_name; $module->getBlock($block_id); } if (WT_DEBUG) { echo execution_stats(); } if (WT_DEBUG_SQL) { echo WT_DB::getQueryLog(); } exit; } $controller=new WT_Controller_Base(); if ($ctype=='user') { $controller->requireMemberLogin(); } $controller ->setPageTitle($ctype=='user' ? WT_I18N::translate('My page') : get_gedcom_setting(WT_GED_ID, 'title')) ->pageHeader() // By default jQuery modifies AJAX URLs to disable caching, causing JS libraries to be loaded many times. ->addInlineJavaScript('jQuery.ajaxSetup({cache:true});'); if (WT_USE_LIGHTBOX) { require WT_ROOT.WT_MODULES_DIR.'lightbox/functions/lb_call_js.php'; } echo '