remove old readme
[atutor.git] / docs / themes / default15 / include / header.tmpl.php
1 <?php
2 if (!defined('AT_INCLUDE_PATH')) { exit; }
3
4 /* available header.tmpl.php variables:
5  * $this->lang_code                     the ISO language code
6  * SITE_NAME                            the site name from the config file
7  * $this->page_title            the name of this page to use in the <title>
8  * $this->lang_charset          the ISO language character set
9  * $this->content_base_href     the <base href> to use for this page
10  * $this->base_path                     the absolute path to this atutor installation
11  * $this->rtl_css                       if set, the path to the RTL style sheet
12  * $this->banner_style          -deprecated-
13  * $this->theme                         the directory name of the current theme
14  * $this->base_href                     the full url to this atutor installation
15  * $this->onload                        javascript onload() calls
16  * $this->img                           the absolute path to this theme's images/ directory
17  * $this->sequence_links        associative array of 'previous', 'next', and/or 'resume' links
18  * $this->path                          associative array of path to this page: aka bread crumbs
19  * $this->rel_url                       the relative url from the installation root to this page
20  * $this->nav_courses           associative array of this user's enrolled courses
21  * $this->section_title         the title of this section (course, public, admin, my start page)
22  * $this->top_level_pages       associative array of the top level navigation
23  * $this->current_top_level_page        the full path to the current top level page with file name
24  * $this->sub_level_pages                       associate array of sub level navigation
25  * $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)
26  * $this->current_sub_level_page        the full path to the current sub level page with file name
27  * $this->guide                         the full path and file name to the guide page
28  * ======================================
29  * top_level_pages           array(array('url', 'title'))     the top level pages. ATutor default creates tabs.
30  * section_title             string                           the name of the current section. either name of the course, administration, my start page, etc.
31  * page_title                string                           the title of the current page.
32  * path                      array(array('url', 'title'))     the path to the current page.
33  * back_to_page              array('url', 'title')            the link back to the part of the current page, if needed.
34  * current_top_level_page    string                           full url to the current top level page in "top_leve_pages"
35  * current_sub_level_page    string                           full url to the current sub level page in the "sub_level_pages"
36  * sub_level_pages           array(array('url', 'title'))     the sub level pages.
37  */
38
39 // will have to be moved to the header.inc.php
40 global $system_courses;
41
42 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
43 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="<?php echo $this->lang_code; ?>">
44 <head>
45         <title><?php echo SITE_NAME; ?> : <?php echo $this->page_title; ?></title>
46         <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $this->lang_charset; ?>" />
47         <meta name="Generator" content="ATutor - Copyright 2007 by http://atutor.ca" />
48         <base href="<?php echo $this->content_base_href; ?>" />
49         <link rel="shortcut icon" href="<?php echo $this->base_path; ?>favicon.ico" type="image/x-icon" />
50         <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/print.css" type="text/css" media="print" />
51         <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/styles.css" type="text/css" />
52         <!--[if IE]>
53           <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/ie_styles.css" type="text/css" />
54         <![endif]-->
55         <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/forms.css" type="text/css" />
56         <?php if ($system_courses[$_SESSION['course_id']]['rss']): ?>
57         <link rel="alternate" type="application/rss+xml" title="<?php echo SITE_NAME; ?> - RSS 2.0" href="<?php echo $this->base_path; ?>get_rss.php?<?php echo $_SESSION['course_id']; ?>-2" />
58         <link rel="alternate" type="application/rss+xml" title="<?php echo SITE_NAME; ?> - RSS 1.0" href="<?php echo $this->base_path; ?>get_rss.php?<?php echo $_SESSION['course_id']; ?>-1" />
59         <?php endif; ?>
60         <script src="<?php echo $this->base_path; ?>jscripts/infusion/InfusionAll.js" type="text/javascript"></script>
61     <script src="<?php echo $this->base_path; ?>jscripts/ATutor.js" type="text/javascript"></script>   
62     <script language="javascript" type="text/javascript">
63     //<!--
64     jQuery.noConflict();
65     //-->
66     </script>
67     <?php echo $this->custom_css; ?>
68     <?php echo $this->rtl_css; ?>
69     <style id="pref_style" type="text/css"></style> 
70 </head>
71 <body onload="<?php echo $this->onload; ?>">
72 <div id="member-links" style="float: right;">
73         <!-- hidden direct link to content -->
74         <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#content" style="border: 0px;" accesskey="c"><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>
75         <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#menu" style="border: 0px;" 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>
76
77         <?php if ($_SESSION['is_super_admin']): ?>
78                 <a href="<?php echo $this->base_path; ?>bounce.php?admin"><?php echo _AT('return_to_admin_area'); ?></a> | 
79         <?php endif; ?>
80
81         <?php if ($_SESSION['valid_user']): ?>
82                 <?php     if (!admin_authenticate(AT_ADMIN_PRIV_ADMIN, AT_PRIV_RETURN) && $last_path_part != 'preferences.php') {?>
83                     <a class="pref_wiz_launcher"><img border="0" alt="<?php echo _AT('preferences').' - '._AT('new_window'); ?>" src="<?php echo $this->base_href; ?>images/wand.png" /></a> |
84                     <?php } ?> 
85                 <strong><?php echo get_display_name($_SESSION['member_id']); ?></strong>  |
86                 <?php if ($_SESSION['course_id'] > -1): ?>
87                         <?php if (get_num_new_messages()): ?>
88                                 <strong><a href="<?php echo $this->base_path; ?>inbox/index.php"><?php echo _AT('inbox'); ?> - <?php echo get_num_new_messages(); ?></a></strong> | 
89                         <?php else: ?>
90                                 <a href="<?php echo $this->base_path; ?>inbox/index.php"><?php echo _AT('inbox'); ?></a> | 
91                         <?php endif; ?>
92                 <?php endif; ?>
93                 <a href="<?php echo $this->base_path; ?>search.php"><?php echo _AT('search'); ?></a> |
94                 <a href="<?php echo $this->base_path; ?>help/index.php"><?php echo _AT('help'); ?></a> |
95                 <a href="<?php echo $this->base_path; ?>logout.php"><?php echo _AT('logout'); ?></a>
96         <?php elseif ($_SESSION['course_id'] == -1): ?>
97                 <img src="<?php echo $this->img;?>user-star.gif" style="vertical-align: middle;" class="img-size-star" alt="" /><strong><?php echo get_display_name($_SESSION['member_id']); ?></strong>  |
98                 <a href="<?php echo $this->base_path; ?>search.php"><?php echo _AT('search'); ?></a> |
99                 <a href="<?php echo $this->base_path; ?>help/index.php"><?php echo _AT('help'); ?></a> |
100                 <a href="<?php echo $this->base_path; ?>logout.php"><?php echo _AT('logout'); ?></a>
101         <?php else: ?>
102                 <a href="<?php echo $this->base_path; ?>browse.php"><?php echo _AT('browse_courses'); ?></a> | 
103                 <a href="<?php echo $this->base_path; ?>login.php?course=<?php echo $_SESSION['course_id']; ?>"><?php echo _AT('login'); ?></a> | 
104                 <a href="<?php echo $this->base_path; ?>search.php"><?php echo _AT('search'); ?></a> | 
105                 <a href="<?php echo $this->base_path; ?>help/index.php"><?php echo _AT('help'); ?></a>
106         <?php endif; ?>
107 </div>
108
109 <div style="float: right;">
110         <?php if (isset($_SESSION['member_id']) && $_SESSION['member_id']): ?>
111                 <!-- start the jump menu -->
112                 <?php if (empty($_GET)): ?>
113                         <form method="post" action="<?php echo $this->base_path; ?>bounce.php?p=<?php echo urlencode($this->rel_url); ?>" target="_top">
114                 <?php else: ?>
115                         <form method="post" action="<?php echo $this->base_path; ?>bounce.php" target="_top">
116                 <?php endif; ?>
117                 <label for="jumpmenu" accesskey="j"></label>
118                 <select name="course" id="jumpmenu" title="<?php echo _AT('jump'); ?>:  Alt-j">                                                 
119                         <option value="0" id="start-page"><?php echo _AT('my_start_page'); ?></option>
120                         <optgroup label="<?php echo _AT('courses_below'); ?>">
121                                 <?php foreach ($this->nav_courses as $this_course_id => $this_course_title): ?>
122                                         <option value="<?php echo $this_course_id; ?>"><?php echo $this_course_title; ?></option>
123                                 <?php endforeach; ?>
124                         </optgroup>
125                 </select> <input type="submit" name="jump" value="<?php echo _AT('jump'); ?>" id="jump-button" /></form>
126                 <!-- /end the jump menu -->
127         <?php endif; ?>
128 </div>
129
130 <?php if ($_SESSION["prefs"]["PREF_SHOW_BREAD_CRUMBS"]) { ?>
131 <div id="breadcrumbs">
132         <span style="white-space:nowrap;font-size:smaller;padding-top:150px;">
133         <?php foreach ($this->path as $page): ?>
134                 <a href="<?php echo $page['url']; ?>" title="<?php echo _AT('back_to').' '.$page['title']; ?>"><?php echo htmlspecialchars($page['title'], ENT_COMPAT, "UTF-8"); ?></a> &raquo; 
135         <?php endforeach; ?> <?php echo $this->page_title; ?></span>
136 </div>
137 <?php } ?>
138
139 <div class="header">
140         <!-- section title -->  
141         <?php if ($_SESSION['valid_user']): 
142                 echo '<span style="font-size:small;font-weight:bold;padding-left:5px;">'.stripslashes(SITE_NAME).'</span>'; 
143         else:
144                 echo '<br />';  
145         endif; ?>
146         <h1><?php echo $this->section_title; ?>
147         <?php if (($_SESSION['course_id'] > 0) && ($_SESSION['enroll'] == AT_ENROLL_NO)) : ?>
148                 - <small><a href="<?php echo $this->base_path; ?>enroll.php?course=<?php echo $_SESSION['course_id']; ?>"><?php echo _AT('enroll_me'); ?></a></small>
149         <?php endif; ?></h1>
150
151         <div id="topnavlistcontainer">
152                 <!-- the main navigation. in our case, tabs -->
153                 <ul id="topnavlist">
154                         <?php foreach ($this->top_level_pages as $page): ?>
155                                 <?php ++$accesscounter; $accesscounter = ($accesscounter == 10 ? 0 : $accesscounter); ?>
156                                 <?php $accesskey_text = ($accesscounter < 10 ? 'accesskey="'.$accesscounter.'"' : ''); ?>
157                                 <?php $accesskey_title = ($accesscounter < 10 ? ' Alt+'.$accesscounter : ''); ?>
158                                 <?php if ($page['url'] == $this->current_top_level_page): ?>
159                                         <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>
160                                 <?php else: ?>
161                                         <li><a href="<?php echo $page['url']; ?>" <?php echo $accesskey_text; ?> title="<?php echo $page['title'] . $accesskey_title; ?>"><?php echo $page['title']; ?></a></li>
162                                 <?php endif; ?>
163                                 <?php $accesscounter = ($accesscounter == 0 ? 11 : $accesscounter); ?>
164                         <?php endforeach; ?>
165                 </ul>
166         </div>
167 </div>
168
169 <!-- the sub navigation -->
170 <div style="text-align: right; padding-top: 5px; padding-right: 5px;"><small><?php echo $this->current_date; ?></small></div>
171 <?php if ($this->sub_level_pages && !(count($this->sub_level_pages) == 1 && $this->sub_level_pages[0]['url'] == $this->current_sub_level_page)): ?>
172         <div id="sub-navigation">
173                 <?php if (isset($this->back_to_page)): ?>
174                         <a href="<?php echo $this->back_to_page['url']; ?>" id="back-to"><?php echo _AT('back_to'); ?> <?php echo $this->back_to_page['title']; ?></a> | 
175                 <?php endif; ?>
176
177                 <?php $num_pages = count($this->sub_level_pages); ?>
178                 <?php for($i=0; $i<$num_pages; $i++): ?>
179                         <?php if ($this->sub_level_pages[$i]['url'] == $this->current_sub_level_page): ?>
180                                 <strong><?php echo $this->sub_level_pages[$i]['title']; ?></strong>
181                         <?php else: ?>
182                                 <a href="<?php echo $this->sub_level_pages[$i]['url']; ?>"><?php echo $this->sub_level_pages[$i]['title']; ?></a>
183                         <?php endif; ?>
184                         <?php if ($i < $num_pages-1): ?>
185                                 | 
186                         <?php endif; ?>
187                 <?php endfor; ?>
188         </div>
189 <?php else: ?>
190         <div id="sub-navigation">
191                 &nbsp;
192         </div>
193 <?php endif; ?>
194
195 <table align="center" border="0" cellpadding="0" cellspacing="0" width="99%">
196         <tr>
197                 <?php if ($_SESSION['course_id'] > 0): ?>
198                         <td valign="top" width="100%">
199                 <?php else: ?>
200                         <td valign="top" width="100%" colspan="2">
201                 <?php endif; ?>
202
203 <!-- the page title -->
204         <div style="text-align: right; padding-bottom: 10px; padding-right: 10px; float: right; margin-top: 10px; padding-right: 5px;">
205                 <?php if ($this->guide && ($_SESSION["prefs"]["PREF_SHOW_GUIDE"] || $_SESSION["course_id"] == "-1")): ?>
206                         <a href="<?php echo $this->guide; ?>" id="guide" onclick="ATutor.poptastic('<?php echo $this->guide; ?>'); return false;" target="_new"><strong><?php echo $this->page_title; ?></strong></a>
207                 <?php endif; ?>
208
209
210         </div>
211         <?php if ($_SESSION['course_id'] > 0 && $system_courses[$_SESSION['course_id']]['side_menu']): ?>
212             <div id="menutoggle">
213                 <a accesskey="n"><img src="" title="" alt="" /></a>
214             </div>
215
216
217         <div id="sequence-links">
218         <?php if ($_SESSION["prefs"]["PREF_SHOW_NEXT_PREVIOUS_BUTTONS"]) { ?>
219                 <?php if ($this->sequence_links['resume']): ?>
220                                 <a style="color:white;" href="<?php echo $this->sequence_links['resume']['url']; ?>" accesskey="."><img src="<?php echo $this->img; ?>resume.gif" 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>
221                 <?php else:
222                         if ($this->sequence_links['previous']): ?>
223                                 <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->img; ?>previous.gif" border="0" alt="<?php echo _AT('previous_topic').': '. $this->sequence_links['previous']['title']; ?> Alt+," class="img-size-ascdesc" /></a>
224                         <?php endif;
225                         if ($this->sequence_links['next']): ?>
226                                 <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->img; ?>next.gif" border="0" alt="<?php echo _AT('next_topic').': '.$this->sequence_links['next']['title']; ?> Alt+." class="img-size-ascdesc" /></a>
227                         <?php endif; ?>
228                 <?php endif; ?>
229         <?php } ?>
230                 &nbsp;
231         </div>
232 <br style="clear:both;">
233         <?php endif; ?>
234         <h2 class="page-title"><?php echo htmlspecialchars($this->page_title, ENT_COMPAT, "UTF-8"); ?></h2>
235
236 <a name="content"></a>
237 <?php global $msg; $msg->printAll(); ?>