remove old readme
[atutor.git] / include / html / dropdowns / related_topics.inc.php
1 <?php
2 /****************************************************************/
3 /* ATutor                                                                                                               */
4 /****************************************************************/
5 /* Copyright (c) 2002-2010                                      */
6 /* http://atutor.ca                                                                                             */
7 /*                                                              */
8 /* This program is free software. You can redistribute it and/or*/
9 /* modify it under the terms of the GNU General Public License  */
10 /* as published by the Free Software Foundation.                                */
11 /****************************************************************/
12 // $Id$
13
14 if (!defined('AT_INCLUDE_PATH')) { exit; }
15 global $contentManager;
16 global $_base_path, $path;
17 global $savant;
18
19 ob_start();
20 $related = $contentManager->getRelatedContent($_SESSION['s_cid']);
21
22 if (count($related) == 0) {
23         echo '<strong>'._AT('none_found').'</strong>';
24 } else {
25         for ($i=0; $i < count($related); $i++) {
26                 echo '&#176; <a href="'.$_base_path.'content.php?cid='.$related[$i].'">';
27                 echo $contentManager->_menu_info[$related[$i]]['title'];
28                 echo '</a>';
29                 echo '<br />';
30         }
31 }
32 $_my_uri = isset($_my_uri) ? $_my_uri : '';
33
34 $savant->assign('dropdown_contents', ob_get_contents());
35 ob_end_clean();
36 $savant->assign('close_url', htmlspecialchars($_my_uri).'disable=PREF_RELATED'.htmlentities(SEP).'menu_jump=3');
37 $savant->assign('dropdown_close', _AT('close_related_topics'));
38
39 $savant->assign('title', _AT('related_topics'));
40 $savant->display('include/box.tmpl.php');
41 ?>