(no commit message)
[atutor.git] / docs / themes / mobile / include / header.tmpl.php
1 <?php
2 /************************************************************************/
3 /* ATutor                                                                                                                               */
4 /************************************************************************/
5 /* Copyright (c) 2002-2008 by Greg Gay, Joel Kronenberg & Heidi Hazelton*/
6 /* Adaptive Technology Resource Centre / University of Toronto                  */
7 /* http://atutor.ca                                                                                                             */
8 /*                                                                                                                                              */
9 /* This program is free software. You can redistribute it and/or                */
10 /* modify it under the terms of the GNU General Public License                  */
11 /* as published by the Free Software Foundation.                                                */
12 /************************************************************************/
13 // $Id: header.tmpl.php 3825 2005-03-11 15:35:51 joel $
14 if (!defined('AT_INCLUDE_PATH')) { exit; }
15 /* available header.tmpl.php variables:
16  * $this->lang_code                     the ISO language code
17  * SITE_NAME                            the site name from the config file
18  * $this->page_title            the name of this page to use in the <title>
19  * $this->lang_charset          the ISO language character set
20  * $this->content_base_href     the <base href> to use for this page
21  * $this->base_path                     the absolute path to this atutor installation
22  * $this->rtl_css                       if set, the path to the RTL style sheet
23  * $this->icon                  the path to a course icon
24  * $this->banner_style          -deprecated-
25  * $this->theme                         the directory name of the current theme
26  * $this->base_href                     the full url to this atutor installation
27  * $this->onload                        javascript onload() calls
28  * $this->img                           the absolute path to this theme's images/ directory
29  * $this->sequence_links        associative array of 'previous', 'next', and/or 'resume' links
30  * $this->path                          associative array of path to this page: aka bread crumbs
31  * $this->rel_url                       the relative url from the installation root to this page
32  * $this->nav_courses           associative array of this user's enrolled courses
33  * $this->section_title         the title of this section (course, public, admin, my start page)
34  * $this->current_top_level_page        the full path to the current top level page with file name
35  * $this->sub_level_pages                       associate array of sub level navigation
36  * $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)
37  * $this->current_sub_level_page        the full path to the current sub level page with file name
38  * $this->guide                         the full path and file name to the guide page
39  * ======================================
40  * top_level_pages           array(array('url', 'title'))     the top level pages. ATutor default creates tabs.
41  * section_title             string                           the name of the current section. either name of the course, administration, my start page, etc.
42  * page_title                string                           the title of the current page.
43  * path                      array(array('url', 'title'))     the path to the current page.
44  * back_to_page              array('url', 'title')            the link back to the part of the current page, if needed.
45  * current_top_level_page    string                           full url to the current top level page in "top_leve_pages"
46  * current_sub_level_page    string                           full url to the current sub level page in the "sub_level_pages"
47  * sub_level_pages           array(array('url', 'title'))     the sub level pages.
48  * is_mobile_device          true or false                    the request is from a mobile device or a desktop device
49  * mobile_device_type        One of the constants: IPOD_DEVICE, BLACKBERRY_DEVICE, ANDROID_DEVICE, UNKNOWN_DEVICE (@see include/lib/constants.inc.php)
50  */
51
52 // will have to be moved to the header.inc.php
53 global $system_courses, $_custom_css, $db, $_base_path, $contentManager;
54
55 // 1. any click on the page closes the content menu but the link "content_link" itself
56 // 2. the click on link "content_link" opens the content menu
57
58
59 require ('TeraWurflRemoteClient.php');
60 $wurflObj = new TeraWurflRemoteClient('http://wurfl.thesedays.com/webservice.php');
61 $capabilities = array("product_info");
62 $data_format = TeraWurflRemoteClient::$FORMAT_JSON;
63 $wurflObj->getCapabilitiesFromAgent(null, $capabilities, $data_format);
64
65 // open/close content menu
66 $this->onload .= "
67 jQuery('#content_link').click(function(e) {
68   e.stopPropagation();
69   
70   jQuery('#content').slideToggle();
71   jQuery('#content_link').toggleClass('.content_link_tablet_highlight');
72   ";
73 $this->onload .= "});
74 ";
75
76
77 // open/close content menu - smartphones 
78 $this->onload .= "
79 jQuery('#content_link_phone').click(function(e) {
80   e.stopPropagation();
81   
82   jQuery('#content').slideToggle();
83   jQuery('#content-link-surround').toggleClass('content-closed');
84   
85   ";
86 $this->onload .= "});
87 ";
88
89 // open/close header navigational menu for smartphones
90 // jQuery('#topnavlist-link').toggleClass('topnavlist-link-highlight');
91 $this->onload .= "
92 jQuery(document).click(function () {
93 jQuery('#topnavlist').slideUp(600);}); 
94 jQuery('.topnavlist-link').click(function(e) {
95   e.stopPropagation();
96   jQuery('#topnavlist').slideToggle();
97  jQuery('#topnavlist-link').toggleClass('.topnavlist-link-highlight');
98 });
99 ";
100
101 // open/close header navigational menu for tablets
102
103 $this->onload .= "
104 jQuery(document).click(function () {
105 jQuery('#navigation-column').slideUp();}); 
106 jQuery('.topnavlist-link').click(function(e) {
107   e.stopPropagation();
108   jQuery('#navigation-column').slideToggle();
109     jQuery('#topnavlist-link').toggleClass('topnavlist-link-highlight');
110 });
111 ";
112
113 //jQuery for Gmail dock-style "more" button that makes the subnavlist expand for more options
114 $this->onload .= "
115 jQuery(document).click(function () {
116 jQuery('.subnavlist-more').slideUp();}); 
117 jQuery('.more-button').click(function(e) {
118   e.stopPropagation();
119   jQuery('.subnavlist-more').slideToggle();
120 });
121 ";
122
123
124 //hide and show results on Browse Courses page
125
126 $this->onload .= "
127 jQuery('#results-hide-show-link').click(function(e) {
128   e.stopPropagation();
129     jQuery('#results-display').slideToggle();
130     jQuery(this).toggleClass('content-closed');
131     jQuery(this).preventDefault();
132   ";
133 $this->onload .= "});
134 ";
135
136 //hide and show results elsewhere (uses classes) 
137 $this->onload .= "
138 jQuery('.results-hide-show-link').click(function(e) {
139   e.stopPropagation();
140         jQuery(this).parent().next('.results-display').slideToggle(); 
141           jQuery(this).toggleClass('content-closed');
142   ";
143 $this->onload .= "});
144 ";
145         
146
147 // Hide the addressbar
148 $this->onload .= "
149 setTimeout(function() { window.scrollTo(0, 1) }, 100);
150 ";
151
152
153
154 ?>
155
156 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
157
158 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="<?php echo $this->lang_code; ?>"> 
159
160 <head>
161         <title><?php echo SITE_NAME; ?> : <?php echo $this->page_title; ?></title>
162         <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $this->lang_charset; ?>" />
163         <meta name="Generator" content="ATutor - Copyright 2005 by http://atutor.ca" />
164         <base href="<?php echo $this->content_base_href; ?>" />
165         <link rel="shortcut icon" href="<?php echo $this->base_path; ?>favicon.ico" type="image/x-icon" /> 
166         <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/print.css" type="text/css" media="print" />
167         <!-- mobile fss -->     
168         <link rel="stylesheet" href="<?php echo $this->base_path; ?>jscripts/infusion/framework/fss/css/fss-mobile-layout.css" type="text/css"/>
169         <link rel="stylesheet" href="<?php echo $this->base_path; ?>jscripts/infusion/framework/fss/css/fss-mobile-theme-iphone.css" type="text/css"/>  
170         
171 <?php if ($this->is_mobile_device == true): ?>
172         <?php if ($this->mobile_device_type == ANDROID_DEVICE): ?>
173         <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/android.css" type="text/css"/>
174         <meta name="viewport" content="user-scalable=no, width=device-width" />
175         <?php endif; ?>
176         <?php if ($this->mobile_device_type == IPOD_DEVICE || $this->mobile_device_type == IPHONE_DEVICE): ?>
177         <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/iphone.css" type="text/css"/>
178         <meta name="viewport" content="user-scalable=no, width=device-width" />
179         <?php endif; ?>
180         <!-- Armin 25.08.2010: Detect BLACKBERRY_DEVICE and use blackberry.css-->
181         <?php if ($this->mobile_device_type == BLACKBERRY_DEVICE): ?>
182         <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/blackberry.css" type="text/css"/>
183         <meta name="viewport" content="user-scalable=no, width=device-width" />
184         <?php endif; ?>
185         <?php if ($this->mobile_device_type == IPAD_DEVICE): ?>
186         <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/tablet.css" type="text/css"/>
187         <meta name="viewport" content="width=768px, minimum-scale=1.0, maximum-scale=1.0" />
188         
189         <?php endif; ?>
190 <?php endif; ?>
191
192         <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/forms.css" type="text/css" />
193                 
194         <!-- Fluid Infusion -->
195         <script src="<?php echo $this->base_path; ?>jscripts/infusion/InfusionAll.js" type="text/javascript"></script>
196         <script language="javascript" type="text/javascript">
197
198         //<!--
199         jQuery.noConflict();
200         //-->
201         </script>
202         <script src="<?php echo $this->base_path; ?>jscripts/ATutor.js" type="text/javascript"></script>   
203
204         
205 <?php echo $this->rtl_css; ?>
206 <?php if (isset($this->course_id) && $system_courses[$this->course_id]['rss']): ?>
207         <link rel="alternate" type="application/rss+xml" title="<?php echo SITE_NAME; ?> - RSS 2.0" href="<?php echo $this->base_href; ?>get_rss.php?<?php echo $this->course_id; ?>-2" />
208         <link rel="alternate" type="application/rss+xml" title="<?php echo SITE_NAME; ?> - RSS 1.0" href="<?php echo $this->base_href; ?>get_rss.php?<?php echo $this->course_id; ?>-1" />
209 <?php endif; ?>
210
211
212 <?php echo $this->custom_css; ?>
213 </head>
214
215
216 <?php if ($this->mobile_device_type != IPAD_DEVICE): ?><!--  smartphone theme only -->
217
218 <body onload="<?php echo $this->onload; ?>" class="fl-theme-iphone ui-mobile-viewport">
219
220 <div id="wrapper">
221 <div id="main">
222         <div id="header">
223
224                 <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#content">
225                 <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>          
226
227                 <div id="header-section-title">
228                         <!-- <?php if (isset($_SESSION['valid_user']) && $_SESSION['valid_user']): 
229                                         echo '<div id="site-name">'.stripslashes(SITE_NAME).'</div>'; 
230                                 endif; ?> --> 
231                         <h1 id="section-title"><?php echo $this->section_title; ?>
232                                 <?php if ((isset($this->course_id) && $this->course_id > 0) && ($_SESSION['enroll'] == AT_ENROLL_NO)) : ?> 
233                                 <!-- <small><a href="<?php echo $this->base_path; ?>enroll.php?course=<?php echo $this->course_id; ?>"><?php echo _AT('enroll_me'); ?></a></small>-->
234                                 <?php endif; ?>
235                                 </h1>
236                 </div>
237         </div> <!--  END HEADER -->
238
239
240         <div id="contentwrapper">
241
242         <!--  Note: ARIA roles cause XHTML validation errors because the XHTML DTD does not yet support ARIA. Use ARIA anyway -->
243
244         <div id="navigation-contentwrapper">
245         <div id="navigation-bar">
246                 <!--  this should be a button on its own  -->
247                         <?php if ($this->current_sub_level_page): ?>
248                         <div id="topnavlistcontainer" role="menu" aria-live="assertive" class="topnavlistcontainer" >
249                         <a class="navigation-bar-button topnavlist-link" id="topnavlist-link" href="javascript:void(0);" tabindex="1"><?php echo _AT('navigation'); ?></a>
250                                 <ul id="topnavlist"  class="fl-list-menu">
251                                         <?php $accesscounter = 0; //initialize ?>
252                                         <?php foreach ($this->top_level_pages as $page): ?>
253                                                 <?php ++$accesscounter; $accesscounter = ($accesscounter == 10 ? 0 : $accesscounter); ?>
254                                                 <?php $accesskey_text = ($accesscounter < 10 ? 'accesskey="'.$accesscounter.'"' : ''); ?>
255                                                 <?php $accesskey_title = ($accesscounter < 10 ? ' Alt+'.$accesscounter : ''); ?>
256                                                 <?php if ($page['url'] == $this->current_top_level_page): ?>
257                                                         <li role="menuitem"><a  href="<?php echo $page['url']; ?>" <?php echo $accesskey_text; ?> title="<?php echo $page['title'];?>"><?php echo $page['title']; ?></a>  </li>
258                                                 <?php else: ?>
259                                                         <li role="menuitem"><a  href="<?php echo $page['url']; ?>" <?php echo $accesskey_text; ?> title="<?php echo $page['title']; ?>"><?php echo $page['title']; ?></a></li>
260                                                 <?php endif; ?>
261                                 
262                                                 <?php $accesscounter = ($accesscounter == 0 ? 11 : $accesscounter); ?>
263                                         
264                                         <?php endforeach; ?>
265                                         <?php if(!$this->just_social): ?>
266                                         <li role="menuitem"><a href="<?php echo $this->base_path; ?>search.php"><?php echo _AT('search'); ?></a> </li>
267                                         <?php endif; ?> 
268                                 </ul>
269                         </div>
270                         <?php endif; ?>
271                 </div>
272
273
274
275         <ul class="home-guide fl-tabs" id="home-guide">
276         <!--  CHECK TO SEE IF USER IS A STUDENT -->
277         <?php if($_SESSION['is_admin'] == 0 && $_SESSION['privileges'] == 0 ):?>
278                 <li><a  href="<?php echo $this->base_path; ?>users/index.php"><?php echo _AT("home"); ?></a></li> 
279         <?php endif;?>          
280         <!--  CHECK TO SEE IF USER IS AN ADMINISTRATOR -->
281         <?php //if($_SESSION['is_admin'] == 0 && $_SESSION['privileges'] == 1):
282                 if($_SESSION['is_admin'] == 0 && $_SESSION['privileges'] == AT_ADMIN_PRIV_ADMIN):?>
283                 <li><a href="<?php echo $this->base_path; ?>admin/index.php"><?php echo _AT("home"); ?></a></li> 
284         <?php endif;?>
285         <!--  CHECK TO SEE IF USER IS AN INSTRUCTOR -->
286         <?php if($_SESSION['is_admin'] == 1): ?>
287                 <li><a href="<?php echo $this->base_path; ?>users/index.php"><?php echo _AT("home"); ?></a></li> 
288         <?php endif;?>
289         
290         <?php if (isset($this->guide) && isset($_SESSION["course_id"]) && $this->guide && ($_SESSION["prefs"]["PREF_SHOW_GUIDE"] || $_SESSION["course_id"] == "-1")) : ?>
291                         <li>
292                         <div id="guide_box">
293                                         <!--    <a href="<?php echo $this->guide; ?>" id="guide" onclick="ATutor.poptastic('<?php echo $this->guide; ?>'); return false;" target="_new"><img src="<?php echo $this->img; ?>guide-icon.png" width="30" height="30" title="guide: <?php echo $this->page_title; ?>"alt="guide: <?php echo $this->page_title; ?>"></img></a> -->
294                 
295                                   <a href="<?php echo $this->guide; ?>" id="guide" onclick="ATutor.poptastic('<?php echo $this->guide; ?>'); return false;" target="_new"><?php echo _AT("guide"); ?></a> 
296                         </div>
297                         </li>
298                         <?php endif; ?>
299                 </ul>
300         </div><!--  END navigation-contentwrapper -->
301         
302         <div id="content-sequence-links">
303         <!-- ENSURE "content_link" DOESN'T APPEAR IF NOT LOGGED IN -->
304         <?php if (isset($this->course_id) && $this->course_id > 0): ?>
305                         
306         
307                 <ul class="sequence-links fl-tabs" id="sequence-links">
308                         <?php if ($_SESSION["prefs"]["PREF_SHOW_NEXT_PREVIOUS_BUTTONS"]) { ?>
309                                 <?php if ($this->sequence_links['resume']): ?>
310                                                 <li>
311                                                 <a href="<?php echo $this->sequence_links['resume']['url']; ?>" class="previous-next" title="<?php echo _AT('resume').': '.$this->sequence_links['resume']['title']; ?>"><?php echo _AT('resume'); ?></a>
312                                                 </li>
313                                 <?php else:
314                                         if ($this->sequence_links['previous']): ?>
315                                                 <li class="arrow back"><a  href="<?php echo $this->sequence_links['previous']['url']; ?>" class="arrow back" title="<?php echo _AT('previous_topic').': '. $this->sequence_links['previous']['title']; ?>"> <?php echo "Previous"; ?> </a>
316                                                 </li>
317                                         <?php endif;
318                                         if ($this->sequence_links['next']): ?>
319                                                 <li class="arrow forward">
320                                                 <a href="<?php echo $this->sequence_links['next']['url']; ?>" class=""  title="<?php echo _AT('next_topic').': '.$this->sequence_links['next']['title']; ?>"> <?php echo "Next"; ?></a>
321                                                 </li>
322                                         <?php endif; ?>
323                                 <?php endif; ?>
324                         <?php } ?>
325                                 &nbsp;
326                         </ul> <!-- end sequence-links -->
327                 <?php endif; ?>
328         
329         
330         <?php if(isset($_SESSION['course_id']) && $_SESSION['course_id'] > 0): ?> 
331                 <div id="content-link-container"role="navigation" aria-live="assertive" class="flc-screenNavigator-navbar ">
332                 <div id="content-link-surround"  class=" content-link-surround content-expanded"" >
333                 <a id="content_link_phone"  href="javascript:void(0);"><?php echo "Content";//_AT("content_navigation"); ?></a>
334                 </div>
335                 </div>
336                 <div id="content" style=" display: none; position: absolute; top: 6.5em; clear: left; clear: right; z-index: 1;">
337                 <?php $contentManager->printMainMenu(); ?>
338                                 <script language="javascript" type="text/javascript"></script>
339                 </div>
340                 
341         <?php endif; ?>
342 </div>
343                 <div id="inner-contentwrapper" class="fl-container" >
344
345
346
347         <div id="contentcolumn">        
348                 
349
350                 <!-- the page title -->
351                 <a name="content" title="<?php echo _AT('content'); ?>"></a>
352                 <h2 class="page-title"><?php echo $this->page_title; ?></h2>
353         
354                 <?php global $msg; $msg->printAll(); $_base_href;?>
355         
356                 <!-- the sub navigation -->
357                 <?php if (count($this->sub_level_pages) > 0): ?>
358                                 <div id="subnavlistcontainer">
359                                         <div id="subnavbacktopage">
360                                         <?php if (isset($this->back_to_page)): ?>
361                                                 <a href="<?php echo $this->back_to_page['url']; ?>">
362                                                 <img border="0" width="10" height="11" alt="<?php echo _AT('back_to').' '.$this->back_to_page['title']; ?>" src="<?php echo $this->base_href; ?>images/arrowicon.gif" style="float:left;"/></a>&nbsp;
363                                         <?php endif; ?>
364                                         </div>
365
366                                         <ul id="subnavlist">
367                                         <?php $num_pages = count($this->sub_level_pages); ?>
368                                         <?php for ($i=0; $i<$num_pages; $i++): ?>                               
369                                                 <?php if ($this->sub_level_pages[$i]['url'] == $this->current_sub_level_page): ?>
370                                                 <li id="test" ><?php echo $this->sub_level_pages[$i]['title']; ?></li>
371                                                 <?php else: ?>
372                                                 <li><a href="<?php echo $this->sub_level_pages[$i]['url']; ?>"><?php echo $this->sub_level_pages[$i]['title']; ?></a></li>
373                                                 <?php endif; ?>
374                                         <?php if ($i < $num_pages-1): 
375                                                 echo " ";?>
376                                         <?php endif; ?>
377                                         <?php endfor; ?>
378                                         </ul>
379                                 </div> <!--  end subnavlistcontainer -->
380                 <?php endif; ?>
381 <?php endif; ?>
382
383
384 <!--  end header template for iphone, android, blackberry -->
385 <?php if ($this->mobile_device_type == IPAD_DEVICE): ?><!-- start header template for ipad/tablets -->
386 <body onload="<?php echo $this->onload; ?>" class="fl-theme-iphone ui-mobile-viewport">
387
388 <div id="wrapper">
389 <div id="main">
390         <div id="header" role="header">
391
392         <div id="header-section-title">
393                         <!-- <?php if (isset($_SESSION['valid_user']) && $_SESSION['valid_user']): 
394                                         echo '<div id="site-name">'.stripslashes(SITE_NAME).'</div>'; 
395                                 endif; ?> --> 
396                         <h1 id="section-title"><?php echo $this->section_title; ?>
397                                 <?php if ((isset($this->course_id) && $this->course_id > 0) && ($_SESSION['enroll'] == AT_ENROLL_NO)) : ?> 
398                                 <!-- <small><a href="<?php echo $this->base_path; ?>enroll.php?course=<?php echo $this->course_id; ?>"><?php echo _AT('enroll_me'); ?></a></small>-->
399                                 <?php endif; ?>
400                                 </h1>
401                 </div>
402         <div id="navigation-contentwrapper" >
403                 
404                 
405         <ul class="home-guide fl-tabs" id="home-guide">
406         <!--  CHECK TO SEE IF USER IS A STUDENT -->
407         <?php if($_SESSION['is_admin'] == 0 && $_SESSION['privileges'] == 0 ):?>
408                 <li><a href="<?php echo $this->base_path; ?>users/index.php"><?php echo _AT("home"); ?></a></li> 
409         <?php endif;?>          
410         <!--  CHECK TO SEE IF USER IS AN ADMINISTRATOR -->
411         <?php //if($_SESSION['is_admin'] == 0 && $_SESSION['privileges'] == 1):
412                 if($_SESSION['is_admin'] == 0 && $_SESSION['privileges'] == AT_ADMIN_PRIV_ADMIN):?>
413                 <li><a href="<?php echo $this->base_path; ?>admin/index.php"><?php echo _AT("home"); ?></a></li> 
414         <?php endif;?>
415         <!--  CHECK TO SEE IF USER IS AN INSTRUCTOR -->
416         <?php if($_SESSION['is_admin'] == 1): ?>
417                 <li><a href="<?php echo $this->base_path; ?>users/index.php"><?php echo _AT("home"); ?></a></li> 
418         <?php endif;?>
419         
420         <?php if (isset($this->guide) && isset($_SESSION["course_id"]) && $this->guide && ($_SESSION["prefs"]["PREF_SHOW_GUIDE"] || $_SESSION["course_id"] == "-1")) : ?>
421                         <li>
422                         <div id="guide_box">
423                                         <!--    <a href="<?php echo $this->guide; ?>" id="guide" onclick="ATutor.poptastic('<?php echo $this->guide; ?>'); return false;" target="_new"><img src="<?php echo $this->img; ?>guide-icon.png" width="30" height="30" title="guide: <?php echo $this->page_title; ?>"alt="guide: <?php echo $this->page_title; ?>"></img></a> -->
424                 
425                                   <a href="<?php echo $this->guide; ?>" id="guide" onclick="ATutor.poptastic('<?php echo $this->guide; ?>'); return false;" target="_new"><?php echo _AT("guide"); ?></a> 
426                         </div>
427                         </li>
428                         <?php endif; ?>
429                 </ul>
430         
431         <?php if (isset($this->course_id) && $this->course_id > 0): ?>
432                         
433         
434                 <ul class="sequence-links fl-tabs" id="sequence-links">
435                         <?php if ($_SESSION["prefs"]["PREF_SHOW_NEXT_PREVIOUS_BUTTONS"]) { ?>
436                                 <?php if ($this->sequence_links['resume']): ?>
437                                                 <li>
438                                                 <a href="<?php echo $this->sequence_links['resume']['url']; ?>" class="previous-next" title="<?php echo _AT('resume').': '.$this->sequence_links['resume']['title']; ?>"><?php echo _AT('resume'); ?></a>
439                                                 </li>
440                                 <?php else:
441                                         if ($this->sequence_links['previous']): ?>
442                                                 <li class="arrow back"><a  href="<?php echo $this->sequence_links['previous']['url']; ?>" class="arrow back" title="<?php echo _AT('previous_topic').': '. $this->sequence_links['previous']['title']; ?>"> <?php echo "Previous"; ?> </a>
443                                                 </li>
444                                         <?php endif;
445                                         if ($this->sequence_links['next']): ?>
446                                                 <li class="arrow forward">
447                                                 <a href="<?php echo $this->sequence_links['next']['url']; ?>" class=""  title="<?php echo _AT('next_topic').': '.$this->sequence_links['next']['title']; ?>"> <?php echo "Next"; ?></a>
448                                                 </li>
449                                         <?php endif; ?>
450                                 <?php endif; ?>
451                         <?php } ?>
452                                 &nbsp;
453                         </ul> <!-- end sequence-links -->
454                 <?php endif; ?>
455         
456         
457                 <!--  this should be a button on its own  -->
458                         <?php if ($this->current_sub_level_page): ?>
459                         <div id="topnavlistcontainer" role="menu" aria-live="assertive" class="topnavlistcontainer fl-container" >
460                         <a class="navigation-bar-button topnavlist-link " id="topnavlist-link" href="javascript:void(0);" tabindex="1"><?php echo _AT('navigation'); ?></a>
461                         
462                                 <div id="navigation-column" class="triangle-isosceles top">
463                                 <!--  requires ARIA roles review -->
464                                 <!--  this should be a button on its own  -->
465                                 <?php if ($this->current_sub_level_page): ?>
466                                 <ul id="topnavlist-tablet"  class="fl-list-menu" role="menu">
467                                         <?php $accesscounter = 0; //initialize ?>
468                                         <?php foreach ($this->top_level_pages as $page): ?>
469                                                 <?php ++$accesscounter; $accesscounter = ($accesscounter == 10 ? 0 : $accesscounter); ?>
470                                                 <?php $accesskey_text = ($accesscounter < 10 ? 'accesskey="'.$accesscounter.'"' : ''); ?>
471                                                 <?php $accesskey_title = ($accesscounter < 10 ? ' Alt+'.$accesscounter : ''); ?>
472                                                 <?php if ($page['url'] == $this->current_top_level_page): ?>
473                                                         <!-- note bug http://issues.fluidproject.org/browse/FLUID-4313 makes class "flc-screenNavigator-backButton fl-link-hilight" not work -->
474                                                         <li role="menuitem"><a  href="<?php echo $page['url']; ?>" <?php echo $accesskey_text; ?> class="flc-screenNavigator-backButton fl-link-hilight" title="<?php echo $page['title'];?>"><?php echo $page['title']; ?></a>  </li>
475                                                 <?php else: ?>
476                                                         <li role="menuitem"><a  href="<?php echo $page['url']; ?>" <?php echo $accesskey_text; ?> title="<?php echo $page['title']; ?>"><?php echo $page['title']; ?></a></li>
477                                                 <?php endif; ?>
478                                 
479                                                 <?php $accesscounter = ($accesscounter == 0 ? 11 : $accesscounter); ?>
480                                         
481                                         <?php endforeach; ?>
482                                          
483                                 </ul>
484                                 <?php endif; ?>
485                         </div>
486                         </div>
487                         <?php endif; ?>
488
489         
490
491
492         
493         </div>
494         </div> <!--  END HEADER -->
495
496 <?php if (count($this->sub_level_pages) > 0): ?>
497                                 <div id="subnavlistcontainer" 
498                                         <div id="subnavbacktopage" >
499                                         <?php if (isset($this->back_to_page)): ?>
500                                                 <a href="<?php echo $this->back_to_page['url']; ?>">
501                                                 <img border="0" width="10" height="11" alt="<?php echo _AT('back_to').' '.$this->back_to_page['title']; ?>" src="<?php echo $this->base_href; ?>images/arrowicon.gif" style="float:left;"/></a>&nbsp;
502                                         <?php endif; ?>
503                                         </div>
504                                 
505                                         <!-- Markup for a subnavlist styled like a Gmail dock. Clean up this code for redundancy but it works for now. -->
506                                         <!-- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#B6C0C6), to(#F8FAFB));  -->
507                                         <ul id="subnavlist" style="text-align: center; border-bottom: 1px #B6C0C6 solid; background: #B6C0C6; ">
508                                         <?php $num_pages = count($this->sub_level_pages); ?>
509                                                 <?php for ($i=0; $i<$num_pages; $i++): ?>       
510                                                         
511                                                         <?php if($num_pages <= 5): ?>
512                                                                 <?php if($this->sub_level_pages[$i][url] == $this->current_sub_level_page): ?>
513                                                                 <li class="selected" style="font-size: 14px; padding-left: .313em; padding-right: .313em;"><a href="<?php echo $this->sub_level_pages[$i]['url']; ?>"><?php echo $this->sub_level_pages[$i]['title']; ?></a></li>
514                                                                 <?php else: ?> 
515                                                                 <li style="font-size: 14px; padding-left: .313em; padding-right: .313em"><a href="<?php echo $this->sub_level_pages[$i]['url']; ?>"><?php echo $this->sub_level_pages[$i]['title']; ?></a></li>
516                                                                 <?php endif; ?> 
517                                                         <?php endif; ?>
518                                                         <?php if($num_pages > 5): ?>
519                                                                 <?php if($i <= 5):?>
520                                                                         <?php if($this->sub_level_pages[$i][url] == $this->current_sub_level_page): ?>
521                                                                                 <li class="selected" style="font-size: 14px; padding-left: .313em; padding-right: .313em;"><a href="<?php echo $this->sub_level_pages[$i]['url']; ?>"><?php echo $this->sub_level_pages[$i]['title']; ?></a></li>
522                                                                         <?php else: ?> 
523                                                                                 <li style="font-size: 14px; padding-left: .313em; padding-right: .313em"><a href="<?php echo $this->sub_level_pages[$i]['url']; ?>"><?php echo $this->sub_level_pages[$i]['title']; ?></a></li>
524                                                                         <?php endif; ?> 
525                                                                 <?php endif;?>
526                                                                 <?php if($i== 6): ?>
527                                                                         <li class="more-button-surround" style="font-size: 14px; padding-left: .313em; padding-right: .313em"><a class="more-button" href="javascript:void(0);" tabindex="1">More</a></li>
528                                                                         <ul class="subnavlist-more">
529                                                                         <li class="more-item" style="font-size: 14px; list-style-type: bullet"><a href="<?php echo $this->sub_level_pages[$i]['url']; ?>"><?php echo $this->sub_level_pages[$i]['title']; ?></a></li>
530                                                                         
531                                                                 <?php endif;?>
532                                                                 <?php if($i > 6 && $i < $num_pages): ?>
533                                                                         <li style="font-size: 14px; list-style-type: bullet"><a href="<?php echo $this->sub_level_pages[$i]['url']; ?>"><?php echo $this->sub_level_pages[$i]['title']; ?></a></li>
534                                                                 <?php endif;?>
535                                                                 <?php if($i==$num_pages): ?>
536                                                                         <li style="font-size: 14px; list-style-type: bullet"><a href="<?php echo $this->sub_level_pages[$i]['url']; ?>"><?php echo $this->sub_level_pages[$i]['title']; ?></a></li>
537                                                                         </ul>
538                                                                 <?php endif; ?>
539                                                         <?php endif; ?>
540                                                 
541                                                 
542                                                         
543                                         <?php if ($i < $num_pages-1): 
544                                                 echo " ";?>
545                                         <?php endif; ?>
546                                         <?php endfor; ?>
547                                         </ul>
548
549                                 </div> <!--  end subnavlistcontainer -->                                
550                 <?php endif; ?> 
551 <?php if(isset($_SESSION['course_id']) && $_SESSION['course_id'] > 0): ?>       
552
553
554
555
556 <div id="course-level-navigation">
557                 
558         
559                         
560                         <div id="content-link-container" role="navigation" aria-live="assertive" class="flc-screenNavigator-navbar ">
561                                 <a id="content_link" class="content_link_tablet content_link" href="javascript:void(0);"><?php echo "Content";//_AT("content_navigation"); ?></a>       
562                         </div>          
563                                 <div id="content" style="display: none;" class="triangle-isosceles top right">
564                                         <?php $contentManager->printMainMenu(); ?>
565                                         <script language="javascript" type="text/javascript"></script>
566                                 </div>
567                 
568 </div><!-- course-level navigation -->          
569
570 <?php endif;?>
571
572         
573         <?php global $msg; $msg->printAll(); $_base_href;?>
574         
575                 
576         <!--  end course-level-naviagtion -->   
577                 
578         <div id="contentwrapper" class="fl-container" >
579
580
581 <?php endif; ?><!--  end header template for ipad/tablets -->