2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2010 */
6 /* Inclusive Design Institute */
8 /* This program is free software. You can redistribute it and/or */
9 /* modify it under the terms of the GNU General Public License */
10 /* as published by the Free Software Foundation. */
11 /************************************************************************/
13 if (!defined('TR_INCLUDE_PATH')) { exit; }
14 /* available header.tmpl.php variables:
15 * $this->lang_code the ISO language code
16 * SITE_NAME the site name from the config file
17 * $this->page_title the name of this page to use in the <title>
18 * top_level_pages array(array('url', 'title')) the top level pages. AContent default creates tabs.
19 * current_top_level_page string full url to the current top level page in "top_leve_pages"
20 * path array(array('url', 'title')) the breadcrumb path to the current page.
21 * sub_menus array(array('url', 'title')) the sub level menus.
22 * current_page string full url to the current sub level page in the "sub_level_pages"
23 * section_title string the name of the current section. either name of the course, administration, my start page, etc.
24 * page_title string the title of the current page.
25 * user_name string name of login user
26 * $this->lang_charset the ISO language character set
27 * $this->base_path the absolute path to this AContent installation
28 * $this->theme the directory name of the current theme
29 * $this->custom_head the custom head script used in <head> section
30 * $this->$onload the html body onload event
31 * $this->shortcuts array of editor tools available title:url:icon
32 * $this->content_base_href the <base href> to use for this page
33 * $this->rtl_css if set, the path to the RTL style sheet
34 * $this->icon the path to a course icon
35 * $this->banner_style -deprecated-
36 * $this->base_href the full url to this AContent installation
37 * $this->onload javascript onload() calls
38 * $this->img the absolute path to this theme's images/ directory
39 * $this->sequence_links associative array of 'previous', 'next', and/or 'resume' links
40 * $this->path associative array of path to this page: aka bread crumbs
41 * $this->rel_url the relative url from the installation root to this page
42 * $this->nav_courses associative array of this user's enrolled courses
43 * $this->section_title the title of this section (course, public, admin, my start page)
44 * $this->top_level_pages associative array of the top level navigation
45 * $this->current_top_level_page the full path to the current top level page with file name
46 * $this->sub_level_pages associate array of sub level navigation
47 * $this->back_to_page if set, the path and file name to the part of this page (if parent is not a top level nav)
48 * $this->current_sub_level_page the full path to the current sub level page with file name
49 * $this->guide the full path and file name to the guide page
50 * $this->user_name string, the name of the current login user
51 * $this->isAuthor boolean, whether the current login user is the author of the selected course. Only passed in when there is login user and selected course
52 * ======================================
53 * back_to_page array('url', 'title') the link back to the part of the current page, if needed.
55 include_once(TR_INCLUDE_PATH.'classes/Utility.class.php');
56 $lang_charset = "UTF-8";
59 $mtime = explode(' ', $mtime);
60 $mtime = $mtime[1] + $mtime[0];
64 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
66 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>" lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>">
69 <title><?php echo SITE_NAME; ?> : <?php echo $this->page_title; ?></title>
70 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $this->lang_charset; ?>" />
71 <meta name="Generator" content="AContent - Copyright 2010 by IDRC/IDI http://inclusivedesign.ca/" />
72 <meta name="keywords" content="AContent, free, open source, elearning, authoring, common cartridge, content package, QTI, AccessForAll, AFA, repository" />
73 <meta name="description" content="AContent is a standards compliant Web-based elearning content authoring tool and repository that can be used with any system that supports IMS content interoperability standards." />
74 <base href="<?php echo $this->content_base_href; ?>" />
76 <!-- <link href='http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold' rel='stylesheet' type='text/css' /> -->
77 <link rel="icon" href="<?php echo $this->base_path; ?>favicon.ico" type="image/x-icon" />
78 <link rel="stylesheet" href="<?php echo $this->base_path.'include/jscripts/infusion/framework/fss/css/fss-layout.css'; ?>" type="text/css" />
79 <link rel="stylesheet" href="<?php echo $this->base_path.'include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css'; ?>" type="text/css" />
80 <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/forms.css" type="text/css" />
81 <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/styles.css" type="text/css" />
83 <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/ie_styles.css" type="text/css" />
85 <?php echo $this->rtl_css; ?>
86 <script src="<?php echo $this->base_path; ?>include/jscripts/infusion/InfusionAll.js" type="text/javascript"></script>
87 <script src="<?php echo $this->base_href; ?>include/jscripts/infusion/framework/enhancement/js/ProgressiveEnhancement.js" type="text/javascript"></script>
88 <script src="<?php echo $this->base_path; ?>include/jscripts/infusion/jquery.autoHeight.js" type="text/javascript"></script>
89 <script src="<?php echo $this->base_path; ?>include/jscripts/flowplayer/flowplayer-3.2.4.min.js" type="text/javascript"></script>
90 <script src="<?php echo $this->base_path; ?>include/jscripts/handleAjaxResponse.js" type="text/javascript"></script>
91 <script src="<?php echo $this->base_path; ?>include/jscripts/transformable.js" type="text/javascript"></script>
92 <?php echo $this->custom_css; ?>
95 <body onload="<?php echo $this->onload; ?>">
97 <div id="liquid-round">
99 <div class="center-content">
100 <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#content" accesskey="c">
101 <img src="<?php echo $this->base_path; ?>images/clr.gif" height="1" width="1" border="0" alt="<?php echo _AT('goto_content'); ?> ALT+c" /></a>
103 <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#menu<?php echo $_REQUEST['cid'] ?>" accesskey="m"><img src="<?php echo $this->base_path; ?>images/clr.gif" height="1" width="1" border="0" alt="<?php echo _AT('goto_menu'); ?> ALT+m" /></a>
104 <span id="logininfo">
106 if (isset($this->user_name))
108 echo _AT('logged_in_as'). ' '.$this->user_name;
111 <a href="<?php echo TR_BASE_HREF; ?>logout.php" ><?php echo _AT('logout'); ?></a>
117 <a href="<?php echo TR_BASE_HREF; ?>login.php" ><?php echo _AT('login'); ?></a>
119 <a href="<?php echo TR_BASE_HREF; ?>register.php" ><?php echo _AT('register'); ?></a>
128 <div class="topnavlistcontainer">
129 <!-- the main navigation. in our case, tabs -->
130 <ul class="navigation">
132 foreach ($this->top_level_pages as $page) {
133 if (strpos($page['url'], '?') > 0) {
134 $url_without_param = substr($page['url'], 0, strpos($page['url'], '?'));
136 $url_without_param = $page['url'];
138 if ($url_without_param == $this->current_top_level_page) {
140 <li class="navigation"><a href="<?php echo $page['url']; ?>" title="<?php echo $page['title']; ?>" class="active"><?php echo $page['title']; ?></a></li>
142 <li class="navigation"><a href="<?php echo $page['url']; ?>" title="<?php echo $page['title']; ?>"><?php echo $page['title']; ?></a></li>
149 <div class="topnavlistcontainer">
150 <ul class="topnavlist">
151 <?php foreach ($this->top_level_pages as $page): ?>
152 <?php if ($page['url'] == $this->current_top_level_page): ?>
153 <li><a href="<?php echo $page['url']; ?>" title="<?php echo $page['title']; ?>" class="active"><?php echo $page['title']; ?></a></li>
155 <li><a href="<?php echo $page['url']; ?>" title="<?php echo $page['title']; ?>"><?php echo $page['title']; ?></a></li>
163 <!-- the sub navigation and guide -->
166 <div class="search_top">
167 <form target="_top" action="<?php echo TR_BASE_HREF; ?>home/search.php" method="get">
168 <input type="text" name="search_text" id="search_text_at_header" value="<?php if (isset($_GET['search_text'])) echo htmlentities_utf8($_GET['search_text'], ENT_QUOTES, 'UTF-8'); ?>" size="25" />
170 <?php if (is_array($this->categories)) { // print category dropdown list box?>
171 <select name="catid">
172 <option value="" <?php if (!isset($_GET['catid']) || $_GET['catid'] == '') echo 'selected="selected"'; ?>><?php echo _AT('all_categories'); ?></option>
173 <option value=""></option>
174 <?php foreach ($this->categories as $category) {?>
175 <option value="<?php echo $category['category_id']; ?>" <?php if ($_GET['catid'] == $category['category_id']) echo 'selected'; ?> title="<?php echo $category['category_name']; ?>">
176 <?php echo Utility::validateLength($category['category_name'], TR_MAX_LAN_CATEGORY_NAME, 1); ?>
179 <option value="0" <?php if ($_GET['catid'] == 0 && $_GET['catid'] <> '') echo 'selected'; ?>><?php echo _AT('cats_uncategorized'); ?></option>
182 <input type="submit" name="search" value="<?php echo _AT("search"); ?>" />
188 <div id="breadcrumbs">
189 <?php if (is_array($this->path)) {?>
190 <?php foreach ($this->path as $page){ ?>
191 <a href="<?php echo $page['url']; ?>"><?php echo $page['title']; ?></a> >
192 <?php }} echo $this->page_title; ?>
195 <?php if (isset($this->guide)) {?>
196 <a href="<?php echo $this->guide; ?>" id="guide" onclick="trans.utility.poptastic('<?php echo $this->guide; ?>'); return false;"><em><?php echo $this->page_title; ?></em></a>
204 <div id="sequence-links">
205 <?php //if ($_SESSION["prefs"]["PREF_SHOW_NEXT_PREVIOUS_BUTTONS"]) { ?>
206 <?php if ($this->sequence_links['resume']): ?>
207 <a style="color:white;" href="<?php echo $this->sequence_links['resume']['url']; ?>" accesskey="."><img src="<?php echo $this->base_path.'themes/'.$this->theme; ?>/images/resume.png" border="0" title="<?php echo _AT('resume').': '.$this->sequence_links['resume']['title']; ?> Alt+." alt="<?php echo $this->sequence_links['resume']['title']; ?> Alt+." class="img-size-ascdesc" /></a>
209 if ($this->sequence_links['previous']): ?>
210 <a href="<?php echo $this->sequence_links['previous']['url']; ?>" title="<?php echo _AT('previous_topic').': '. $this->sequence_links['previous']['title']; ?> Alt+," accesskey=","><img src="<?php echo $this->base_path.'themes/'.$this->theme; ?>/images/previous.png" border="0" alt="<?php echo _AT('previous_topic').': '. $this->sequence_links['previous']['title']; ?> Alt+," class="img-size-ascdesc" /></a>
212 if ($this->sequence_links['next']): ?>
213 <a href="<?php echo $this->sequence_links['next']['url']; ?>" title="<?php echo _AT('next_topic').': '.$this->sequence_links['next']['title']; ?> Alt+." accesskey="."><img src="<?php echo $this->base_path.'themes/'.$this->theme; ?>/images/next.png" border="0" alt="<?php echo _AT('next_topic').': '.$this->sequence_links['next']['title']; ?> Alt+." class="img-size-ascdesc" /></a>
221 <?php if (isset($this->guide)) { ?>
222 <div id="guide_box" title="<?php echo _AT('handbook_for').' '.$this->page_title; ?>">
223 <a href="<?php echo $this->guide; ?>" onclick="trans.utility.poptastic('<?php echo $this->guide; ?>'); return false;" id="guide" target="_new"><em><?php echo $this->page_title; ?></em></a>
227 <?php if (is_array($this->tool_shortcuts) ||isset($this->course_id) && $this->course_id > 0){ ?>
228 <div class="shortcuts">
230 <?php if (is_array($this->tool_shortcuts)){ ?>
231 <?php foreach ($this->tool_shortcuts as $link){ ?>
232 <li><a href="<?php echo $link['url']; ?>"><img src="<?php echo $link['icon']; ?>" alt="<?php echo $link['title']; ?>" title="<?php echo $link['title']; ?>" class="shortcut_icon"/><!-- <?php echo $link['title']; ?> --></a></li>
236 <?php if (isset($this->course_id) && $this->course_id > 0) {?>
237 <!-- <div id="course-tools">-->
238 <?php if ($this->isAuthor) { // only for authors ?>
239 <li><a href="<?php echo $this->base_path; ?>home/course/course_property.php?_course_id=<?php echo $this->course_id; ?>">
240 <img src="<?php echo $this->base_path. "themes/".$this->theme."/images/course_property.png"; ?>" title="<?php echo _AT('course_property'); ?>" alt="<?php echo _AT('course_property'); ?>" border="0" class="shortcut_icon"/>
243 <li><a href="<?php echo $this->base_path; ?>home/editor/arrange_content.php?_course_id=<?php echo $this->course_id; ?>">
244 <img src="<?php echo $this->base_path. "themes/".$this->theme."/images/arrange_content.gif"; ?>" title="<?php echo _AT('arrange_content'); ?>" alt="<?php echo _AT('arrange_content'); ?>" border="0" class="shortcut_icon"/>
247 <li><a href="<?php echo $this->base_path; ?>home/editor/import_export_content.php?_course_id=<?php echo $this->course_id; ?>">
248 <img src="<?php echo $this->base_path. "themes/".$this->theme."/images/import_export.png"; ?>" title="<?php echo _AT('content_packaging'); ?>" alt="<?php echo _AT('content_packaging'); ?>" border="0" class="shortcut_icon"/>
251 <li><a href="<?php echo $this->base_path; ?>home/course/del_course.php?_course_id=<?php echo $this->course_id; ?>">
252 <img src="<?php echo $this->base_path. "themes/".$this->theme."/images/delete.gif"; ?>" title="<?php echo _AT('del_course'); ?>" alt="<?php echo _AT('del_course'); ?>" border="0" class="shortcut_icon"/>
256 <li><a href="<?php echo $this->base_path; ?>home/index.php">
257 <img src="<?php echo $this->base_path. "themes/".$this->theme."/images/exit.png"; ?>" title="<?php echo _AT('exit_course'); ?>" alt="<?php echo _AT('exit_course'); ?>" border="0" class="shortcut_icon"/>
264 <?php //if ($this->course_id > 0) { ?>
265 <div id="contentwrapper">
266 <?php //if ((isset($this->course_id) && $this->course_id > 0)): ?>
267 <div id="leftcolumn">
268 <script type="text/javascript">
270 var state = trans.utility.getcookie("side-menu");
271 if (state && (state == 'none')) {
272 document.writeln('<a name="menu"></a><div style="display:none;" id="side-menu">');
274 document.writeln('<a name="menu"></a><div id="side-menu">');
278 <?php require(TR_INCLUDE_PATH.'side_menu.inc.php'); ?>
279 <script type="text/javascript">
281 document.writeln('</div>');
287 <div id="contentcolumn"
288 <?php if (isset($this->course_id) && $this->course_id <= 0): ?>
289 style="margin-left:0.5em;width:99%;"
293 <?php //if (isset($this->course_id) && $this->course_id > 0): ?>
294 <div id="menutoggle">
295 <?php //if ($this->course_id > 0): ?>
296 <script type="text/javascript" language="javascript">
298 var state = trans.utility.getcookie("side-menu");
299 if (state && (state == 'none')) {
300 trans.utility.showTocToggle("side-menu", "<img src=\"<?php echo $this->base_path; ?>themes/default/images/showmenu.gif.png\" alt=\'<?php echo _AT('show'); ?>\' title=\"<?php echo _AT('show'); ?>\" />","<img src=\"<?php echo $this->base_path; ?>themes/default/images/hidemenu.gif.png\" alt=\'<?php echo _AT('hide'); ?>\' title=\"<?php echo _AT('hide'); ?>\" />", "", "show");
302 document.getElementById('contentcolumn').id="contentcolumn_shiftright";
303 trans.utility.showTocToggle("side-menu", "<img src=\"<?php echo $this->base_path; ?>themes/default/images/showmenu.gif.png\" alt=\'<?php echo _AT('show'); ?>\' title=\"<?php echo _AT('show'); ?>\" />","<img src=\"<?php echo $this->base_path; ?>themes/default/images/hidemenu.gif.png\" alt=\'<?php echo _AT('hide'); ?>\' title=\"<?php echo _AT('hide'); ?>\" />", "", "hide");
311 <!-- the page title -->
312 <a name="content" title="<?php echo _AT('content'); ?>"></a>
313 <h2 class="page-title"><?php echo $this->page_title; ?></h2>
314 <div id="server-msg">
315 <?php global $msg; $msg->printAll(); ?>
318 <?php if (count($this->sub_level_pages) > 0): ?>
320 <!-- <div id="topnavlistcontainer">
322 <?php $accesscounter = 0; //initialize ?>
323 <?php foreach ($this->top_level_pages as $page): ?>
324 <?php ++$accesscounter; $accesscounter = ($accesscounter == 10 ? 0 : $accesscounter); ?>
325 <?php $accesskey_text = ($accesscounter < 10 ? 'accesskey="'.$accesscounter.'"' : ''); ?>
326 <?php $accesskey_title = ($accesscounter < 10 ? ' Alt+'.$accesscounter : ''); ?>
327 <?php if ($page['url'] == $this->current_top_level_page): ?>
328 <li><a href="<?php echo $page['url']; ?>" <?php echo $accesskey_text; ?> title="<?php echo $page['title'] . $accesskey_title; ?>" class="active"><?php echo $page['title']; ?></a></li>
330 <li><a href="<?php echo $page['url']; ?>" <?php echo $accesskey_text; ?> title="<?php echo $page['title'] . $accesskey_title; ?>"><?php echo $page['title']; ?></a></li>
332 <?php $accesscounter = ($accesscounter == 0 ? 11 : $accesscounter); ?>
338 <!-- the main navigation. in our case, tabs -->
343 <!-- the sub navigation -->
344 <?php if (is_array($this->sub_menus) && count($this->sub_menus) > 0): ?>
345 <div id="subnavlistcontainer">
346 <div id="sub-navigation">
347 <?php if (isset($this->back_to_page)): ?>
348 <div id="subnavbacktopage">
349 <a href="<?php echo $this->back_to_page['url']; ?>" id="back-to"><?php echo '<img src="'.TR_BASE_HREF.'images/arrowicon.png" alt="'._AT('back_to').':'.$this->back_to_page['title'].'" title="'._AT('back_to').':'.$this->back_to_page['title'].'" style="vertical-align:center;" />'; ?></a>
353 <?php $num_pages = count($this->sub_menus); ?>
354 <?php for ($i=0; $i<$num_pages; $i++): ?>
355 <?php list($sub_menu_url, $param) = Utility::separateURLAndParam($this->sub_menus[$i]['url']);
356 if ($sub_menu_url == $this->current_page): ?>
357 <li class="active"><strong><?php echo $this->sub_menus[$i]['title']; ?></strong></li>
359 <li><a href="<?php echo $this->sub_menus[$i]['url']; ?>"><?php echo $this->sub_menus[$i]['title']; ?></a></li>
361 <?php if ($i < $num_pages-1): ?>
368 <?php if (is_array($this->sub_menus) && count($this->sub_menus) > 0): ?>