2 require(dirname(__FILE__) . '/vitals.inc.php');
6 * prints an unordered html list representation of the multidimensional array.
7 * $pages the array of items to print.
8 * $section the directory name of the files.
10 function hb_print_toc($pages, $section) {
11 global $_pages, $req_lang;
13 foreach ($pages as $page_key => $page_value) {
15 if (is_array($page_value)) {
16 echo '<a href="../'.$section.'/'.$page_key.'?'.$req_lang.'" id="id'.$page_key.'" class="tree">'.$_pages[$page_key].'</a>';
17 hb_print_toc($page_value, $section);
19 echo '<a href="../'.$section.'/'.$page_value.'?'.$req_lang.'" id="id'.$page_value.'" class="leaf">'.$_pages[$page_value].'</a>';
26 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
27 <html lang="<?php if ($missing_lang) { echo 'en'; } else { echo $req_lang; } ?>">
29 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
30 <title><?php get_text('handbook_toc'); ?></title>
31 <base target="body" />
32 <style type="text/css">
33 body { font-family: Verdana,Arial,sans-serif; font-size: x-small; margin: 0px; padding: 0px; background: #f4f4f4; margin-left: -5px; }
34 ul { list-style: none; padding-left: 0px; margin-left: -15px; }
35 li { margin-left: 19pt; padding-top: 2px; }
36 a { background-repeat: no-repeat; background-position: 0px 1px; padding-left: 12px; text-decoration: none; }
37 a.tree { background-image: url('folder.gif'); }
38 a.leaf { background-image: url('paper.gif'); }
39 a:link, a:visited { color: #006699; }
40 a:hover { color: #66AECC; }
42 <script type="text/javascript">
44 function highlight(page) {
46 if (parent.header.currentPage) {
47 var toc = parent.toc.document.getElementById(parent.header.currentPage);
48 toc.style.color = 'blue';
49 toc.style.fontWeight = 'bold';
52 if (parent.header.currentPage) {
53 var toc = parent.toc.document.getElementById(parent.header.currentPage);
55 toc.style.fontWeight = '';
58 var toc = parent.toc.document.getElementById(page);
59 toc.style.color = 'blue';
60 toc.style.fontWeight = 'bold';
61 parent.header.currentPage = page;
67 <body onload="highlight(false);">
69 require(dirname(__FILE__).'/../'.$section.'/pages.inc.php');
70 if (($req_lang != 'en') && (file_exists(dirname(__FILE__).'/../'.$section.'/'.$req_lang.'/pages.inc.php'))) {
71 require(dirname(__FILE__).'/../'.$section.'/'.$req_lang.'/pages.inc.php');
73 if ($section == 'admin'){
76 'installation.php' => array(
77 'requirements_recommendations.php',
78 'new_installation.php',
81 'configuration.php' => array('my_account.php'),
82 'system_preferences.php' => array(
83 'default_preferences.php',
85 'themes.php' => array(
86 'importing_themes.php',
87 'managing_existing_themes.php',
95 'enrollment.php' => array(
96 'enrollment_privileges.php',
99 'instructor_requests.php',
100 'master_student_list.php',
104 'courses.php' => array(
106 'creating_courses.php',
107 'default_student_tools.php',
108 'default_side_menu.php',
113 'troubleshooting.php',
116 hb_print_toc($pages, 'admin');
118 } else if ($section == 'instructor'){
120 'introduction.php' => array('creating_courses.php'),
123 'backups.php' => array(
124 'creating_restoring.php',
125 'downloading_uploading.php',
126 'editing_deleting.php'
129 'content.php' => array(
130 'creating_editing_content.php' => array(
132 'content_properties.php',
133 'glossary_terms.php',
134 'content_preview.php',
137 'content_packages.php',
139 'tile_repository.php',
143 'enrollment.php' => array(
144 'enrollment_privileges.php',
145 'enrollment_alumni.php',
146 'enrollment_course_list.php'
148 'file_manager.php' => array(
149 'managing_files_folders.php',
150 'extracting_zip_archives.php'
152 'forums.php' => array(
153 'managing_threads.php' => array('managing_posts.php')
160 'properties.php' => array('authenticated_access.php', 'delete_course.php'),
163 'student_tools.php' => array('side_menu.php'),
164 'tests_surveys.php' => array(
165 'creating_tests_surveys.php',
166 'question_database.php' => array('creating_questions.php'),
167 'question_categories.php',
168 'edit_delete_tests.php',
171 'student_submissions.php',
172 'test_statistics.php'
177 hb_print_toc($pages, 'instructor');
184 'browse_courses.php',
185 'password_reminder.php',
186 'my_start_page.php' => array(
187 'my_courses.php' => array('create_course.php'),
192 'inside_course.php' => array(
193 'export_content.php',
199 hb_print_toc($pages, 'general');