remove old readme
[atutor.git] / docs / documentation / common / body_header.inc.php
1 <?php
2 /************************************************************************/
3 /* ATutor                                                                                                                               */
4 /************************************************************************/
5 /* Copyright (c) 2002-2010                                              */
6 /* Inclusive Design Institute                                           */
7 /* http://atutor.ca                                                     */
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: body_header.inc.php 6230 2006-05-26 21:35:34Z greg $
13
14 require(dirname(__FILE__) . '/vitals.inc.php');
15
16 $missing_lang = FALSE;
17 if ($req_lang != 'en') {
18         $file_name = basename($_SERVER['PHP_SELF']);
19
20         $lang_file = $req_lang . '/' . $file_name;
21
22         if (file_exists($lang_file)) {
23                 header('Location: '.$lang_file.'?r');
24                 exit;
25         } else if (!isset($_GET['r'])) {
26                 $missing_lang = TRUE;
27                 $lang = 'en';
28         }
29 }
30
31 if (strpos(@ini_get('arg_separator.input'), ';') !== false) {
32         define('SEP', ';');
33 } else {
34         define('SEP', '&');
35 }
36
37 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
38 <html lang="<?php if ($missing_lang) { echo 'en'; } else { echo $req_lang; } ?>">
39 <head>
40         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
41         <title><?php get_text('atutor_documentation'); ?></title>
42         <link rel="stylesheet" href="<?php echo $rel_path; ?>common/styles.css" type="text/css" />
43 </head>
44
45 <body onload="doparent();">
46 <script type="text/javascript">
47 // <!--
48 function doparent() {
49         if (parent.toc && parent.toc.highlight) parent.toc.highlight('id<?php echo $this_page; ?>');
50 }
51 // -->
52 </script>
53 <?php
54 require(dirname(__FILE__).'/../'.$section.'/pages.inc.php');
55 if (($req_lang != 'en') && (file_exists(dirname(__FILE__).'/../'.$section.'/'.$req_lang.'/pages.inc.php'))) {
56         require(dirname(__FILE__).'/../'.$section.'/'.$req_lang.'/pages.inc.php');
57 }
58
59 while (current($_pages) !== FALSE) {
60         if (key($_pages) == $this_page) {
61                 next($_pages);
62                 $next_page = key($_pages);
63                 break;
64         }
65         $previous_page = key($_pages);
66         next($_pages);
67 }
68 ?>
69 <div class="seq">
70         <?php if (isset($previous_page)): ?>
71                 <?php get_text('previous_chapter'); ?>: <a href="<?php echo $rel_path; ?><?php echo $section; ?>/<?php echo $previous_page; ?>?<?php echo $req_lang; ?>" accesskey="," title="<?php echo $_pages[$previous_page]; ?> Alt+,"><?php echo $_pages[$previous_page]; ?></a><br />
72         <?php endif; ?>
73
74         <?php if (isset($next_page)): ?>
75                 <?php get_text('next_chapter'); ?>: <a href="<?php echo $rel_path; ?><?php echo $section; ?>/<?php echo $next_page; ?>?<?php echo $req_lang; ?>" accesskey="." title="<?php echo $_pages[$next_page]; ?> Alt+."><?php echo $_pages[$next_page]; ?></a>
76         <?php endif; ?>
77 </div>
78
79 <?php if ($missing_lang): ?>
80         <div style="margin: 20px auto; border: 1px solid #aaf; padding: 4px; text-align: center; background-color: #eef;">
81                 <?php get_text('page_not_translated'); ?>
82         </div>
83 <?php endif; ?>
84
85 <?php if (isset($_GET['noted'])): ?>
86         <div style="margin: 20px auto; border: 1px solid #aaf; padding: 4px; text-align: center; background-color: #eef;">
87                 <?php get_text('note_added'); ?>
88         </div>
89 <?php endif; ?>