made a copy
[atutor.git] / include / side_menu.inc.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: footer.inc.php 6614 2006-09-27 19:32:29Z joel $
14 if (!defined('AT_INCLUDE_PATH')) { exit; }
15
16 global $next_prev_links;
17 global $_base_path, $_my_uri;
18 global $_stacks, $db;
19 global $system_courses;
20 global $savant;
21
22 $side_menu = array();
23 $stack_files = array();
24
25 if ($_SESSION['course_id'] > 0) {
26         $savant->assign('my_uri', $_my_uri);
27
28         $savant->assign('right_menu_open', TRUE);
29         $savant->assign('popup_help', 'MAIN_MENU');
30         $savant->assign('menu_url', '<a name="menu"></a>');
31         $savant->assign('close_menu_url', htmlspecialchars($_my_uri).'disable='.PREF_MAIN_MENU);
32         $savant->assign('close_menus', _AT('close_menus'));
33
34         //copyright can be found in include/html/copyright.inc.php
35
36         $side_menu = explode('|', $system_courses[$_SESSION['course_id']]['side_menu']);
37
38         foreach ($side_menu as $side) {
39                 if (isset($_stacks[$side])) {
40                         $stack_files[] = $_stacks[$side]['file'];
41                 }
42         }
43 }
44
45 $savant->assign('side_menu', $stack_files);
46 $savant->display('include/side_menu.tmpl.php'); ?>