a0c705a3b6a6bc899bd5fd2aea11e1686f73cd07
[atutor.git] / mods / wiki / index.php
1 <?php
2 /****************************************************************/
3 /* ATutor                                                                                                               */
4 /****************************************************************/
5 /* Copyright (c) 2002-2005 by Greg Gay & Joel Kronenberg        */
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: index.php 5123 2005-07-12 14:59:03Z joel $
14 //$_user_location       = 'public';
15
16 // Ewiki Module for ATutor - Version: .02
17 if (isset($_GET['top'])) {
18         header('Location: index.php');
19         exit;
20 }
21         $page = 'wiki';
22         define('AT_INCLUDE_PATH', '../../include/');
23         require (AT_INCLUDE_PATH.'vitals.inc.php');
24
25         include_once(AT_INCLUDE_PATH."../mods/wiki/config.php");
26         $content =  ewiki_page();
27         $content = stripslashes($content);
28
29         $_pages['mods/wiki/index.php']['title']  = 'Wiki';
30         $_pages['mods/wiki/index.php']['children'] = array('mods/wiki/page.php?edit/'.$ewiki_title);
31
32         $_pages['mods/wiki/page.php?edit/'.$ewiki_title]['title'] = 'Edit This Page';
33         $_pages['mods/wiki/page.php?edit/'.$ewiki_title]['parent'] ='mods/wiki/index.php';
34
35         //$_pages['mods/wiki/page.php?page/'.$ewiki_title]['title'] = 'Edit This Page';
36         //$_pages['mods/wiki/page.php?page/'.$ewiki_title]['parent'] ='mods/wiki/index.php';
37
38         
39 //      $_pages['./tools/wiki/index.php']['title']  = 'Wiki Home';
40 //      $_pages['tools/wiki/index.php']['title']  = "$ewiki_title"; //'wiki';
41 //      $_pages['tools/wiki/index.php?page='.$_GET['page'].'']['parent']    = 'tools/wiki/index.php';
42 //      $_pages['tools/wiki/index.php']['children']  = array('./tools/wiki/index.php');
43
44         $_custom_css = $_base_path . 'mods/wiki/module.css';
45         require (AT_INCLUDE_PATH.'header.inc.php');
46
47         // Display the Toolbar at the top of the page too, after making $o global in ewiki_control_links_list()
48  if($o){
49                 echo '<div class="wiki-plugins" align="right" style="margin-right:1em;">';
50                 echo $o;
51                 echo '</div><hr>';
52         }
53         echo $content;
54         // Show the Calendar if the page displayed has one associated with it.
55          if (function_exists("calendar_exists") && calendar_exists()) {
56                   echo  calendar();
57           }
58
59  require(AT_INCLUDE_PATH.'footer.inc.php');
60  ?>