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