getTopPages();
$_all_pages = $menu->getAllPages();
$_current_root_page = $menu->getRootPage();
$_breadcrumb_path = $menu->getPath();
$current_page = $menu->getCurrentPage();
$_sub_menus = $menu->getSubMenus();
$back_to_page = $menu->getBackToPage();
$_pages = $menu->getAllPages(); // add "param" element into $_pages items
//debug($_base_path.$current_page);
//debug($back_to_page);
//debug($_sub_menus);
//exit;
//debug($_top_level_pages);
//debug($_all_pages);
//debug($_current_root_page);
//debug($_current_page);
$savant->assign('path', $_breadcrumb_path);
$savant->assign('top_level_pages', $_top_level_pages);
$savant->assign('current_top_level_page', $_current_root_page);
$savant->assign('sub_menus', $_sub_menus);
if ($back_to_page <> '') $savant->assign('back_to_page', $back_to_page);
$savant->assign('current_page', $_base_path.$current_page);
if (isset($_pages[$current_page]['title'])) {
$_page_title = $_all_pages[$current_page]['title'];
} else {
$_page_title = _AT($_all_pages[$current_page]['title_var']);
}
$savant->assign('page_title', htmlspecialchars($_page_title, ENT_COMPAT, "UTF-8"));
if ($_course_id > 0) {
$sequence_links = $contentManager->generateSequenceCrumbs($_content_id);
$savant->assign('sequence_links', $sequence_links);
}
if (isset($_current_user))
{
$savant->assign('user_name', $_current_user->getUserName());
if ($_course_id > 0) $savant->assign('isAuthor', $_current_user->isAuthor($_course_id));
}
if ($myLang->isRTL()) {
$savant->assign('rtl_css', '');
} else {
$savant->assign('rtl_css', '');
}
$_tmp_base_href = TR_BASE_HREF;
if (isset($course_base_href) || isset($content_base_href)) {
$_tmp_base_href .= $course_base_href;
if ($content_base_href) {
$_tmp_base_href .= $content_base_href;
}
}
// Setup array of content tools for shortcuts tool bar.
$savant->assign('tool_shortcuts', $_tool_shortcuts); // array of content tools for shortcuts tool bar.
$savant->assign('content_base_href', $_tmp_base_href);
$savant->assign('lang_code', $_SESSION['lang']);
$savant->assign('lang_charset', $myLang->getCharacterSet());
$savant->assign('base_path', $_base_path);
$savant->assign('theme', $_SESSION['prefs']['PREF_THEME']);
$theme_img = $_base_path . 'themes/'. $_SESSION['prefs']['PREF_THEME'] . '/images/';
$savant->assign('img', $theme_img);
// course categories for search tool
require_once(TR_INCLUDE_PATH.'classes/DAO/CourseCategoriesDAO.class.php');
$courseCategoriesDAO = new CourseCategoriesDAO();
$savant->assign('categories', $courseCategoriesDAO->getAll());
// get custom css
$custom_css = '';
if (isset($_custom_css)) {
$custom_css = '';
}
if (isset($_custom_head)) {
$custom_css .= '
' . $_custom_head;
}
if (isset($_pages[$current_page]['guide']))
{
$script_name = substr($_SERVER['PHP_SELF'], strlen($_base_path));
$savant->assign('guide', TR_GUIDES_PATH .'index.php?p='. htmlentities_utf8($script_name));
}
$savant->assign('custom_css', $custom_css);
if ($onload) $savant->assign('onload', $onload);
$savant->assign('course_id', $_course_id);
if ($framed || $popup) {
$savant->assign('framed', 1);
$savant->assign('popup', 1);
$savant->display('include/fm_header.tmpl.php');
} else {
$savant->display('include/header.tmpl.php');
}
?>