tagging as ATutor 1.5.4-release
[atutor.git] / documentation / index.php
1 <?php
2 /************************************************************************/
3 /* ATutor                                                                                                                               */
4 /************************************************************************/
5 /* Copyright (c) 2002-2006 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: menu_pages.php 4799 2005-06-06 13:19:09Z heidi $
14
15
16 $parts = pathinfo($_SERVER['PHP_SELF']);
17 if (substr($parts['dirname'], -5) == 'admin') {
18         $section = 'admin';
19 } else if (substr($parts['dirname'], -10) == 'instructor') {
20         $section = 'instructor';
21 } else if (substr($parts['dirname'], -7) == 'general') {
22         $section = 'general';
23 } else {
24         header('Location: index/index.php');
25         exit;
26 }
27
28 $req_lang = 'en';
29 if (!empty($_GET)) {
30         $req_lang = key($_GET);
31 }
32
33 $path = '../common/';
34 ?>
35 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
36 <html lang="en">
37         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
38         <title>ATutor Handbook</title>
39 <script type="text/javascript">
40
41 var i = 0;
42
43 function show2() {
44         var fs = document.getElementById('frameset1');
45         if (fs) {
46                 i += 5;
47                 if (i > 28) {
48                         i = 28;
49                 }
50                 fs.cols = i + '%, *';
51         }
52         if (i < 28) {
53                 window.setTimeout('show2()', 1);
54         }
55         return true;
56 }
57 function show() {
58         i = 0;
59         window.setTimeout('show2()', 1);
60         return true;
61 }
62
63 function hide2() {
64         var fs = document.getElementById('frameset1');
65         if (fs) {
66                 i -= 5;
67                 if (i < 0) {
68                         i =0;
69                 }
70                 fs.cols = i + '%, *';
71         }
72         if (i > 0) {
73                 window.setTimeout('hide2()', 1);
74         }
75         return false;
76 }
77
78 function hide() {
79         i= 28;
80         window.setTimeout('hide2()', 1);
81         return false;
82 }
83 </script>
84
85 <?php 
86 if (isset($_GET['p'])) {
87         $body = $_GET['p'];
88 } else {
89         $body = 'introduction.php';
90
91 ?>
92 </head>
93 <frameset rows="24,*">
94         <frame src="<?php echo $path; ?>frame_header.php?<?php echo $section; ?>&amp;<?php echo $req_lang; ?>" frameborder="0" name="header" title="header" scrolling="no" noresize="noresize">
95         <frameset cols="22%, *" id="frameset1">
96                 <frame frameborder="0" scrolling="auto" marginwidth="0" marginheight="0" src="<?php echo $path; ?>frame_toc.php?<?php echo $section; ?>&amp;<?php echo $req_lang; ?>" name="toc" id="toc" title="Table of Contents">
97                 <frame frameborder="0" src="<?php echo $body.'?'.$req_lang; ?>" name="body" title="Content">
98         </frameset>
99
100         <noframes>
101                 <h1>Administrator Documentation</h1>
102                 <p><a href="frame_toc.html">Table of Contents</a></p>
103          </noframes>
104 </frameset>
105
106 </html>