#4826 changed htmlspecialchars() to htmlentities_utf8() for the handbook frame set...
[acontent.git] / docs / documentation / index.php
1 <?php
2 /************************************************************************/
3 /* AContent                                                             */
4 /************************************************************************/
5 /* Copyright (c) 2010                                                   */
6 /* Inclusive Design Institute                                           */
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
13 define('TR_INCLUDE_PATH', '../include/');
14 include(TR_INCLUDE_PATH.'vitals.inc.php');
15 include(TR_INCLUDE_PATH.'handbook_pages.inc.php');
16
17 global $handbook_pages;
18
19 if (isset($_GET['p'])) {
20         $p = htmlentities($_GET['p']);
21 } else {
22         // go to first handbook page defined in $handbook_pages
23         foreach ($handbook_pages as $page_key => $page_value)
24         {
25                 if (is_array($page_key))
26                 {
27                         if (isset($_pages[$page_key])) $display_page = $page_key;
28                 }
29                 else
30                 {
31                         if (isset($_pages[$page_value])) $display_page = $page_value;
32                 }
33                 if (isset($display_page))
34                 {
35                         header('Location: index.php?p='.htmlentities($page_key));
36                         exit;
37                 }
38         }
39
40 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 TRANSITIONAL//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
41
42 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>" lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>"> 
43 <head>
44         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
45         <title><?php echo htmlentities_utf8(_AT('Transformable_handbook')); ?></title>
46
47 <script type="text/javascript">
48
49 var i = 0;
50
51 function show2() {
52         var fs = document.getElementById('frameset1');
53         if (fs) {
54                 i += 5;
55                 if (i > 28) {
56                         i = 28;
57                 }
58                 fs.cols = i + '%, *';
59         }
60         if (i < 28) {
61                 window.setTimeout('show2()', 1);
62         }
63         return true;
64 }
65 function show() {
66         i = 0;
67         window.setTimeout('show2()', 1);
68         return true;
69 }
70
71 function hide2() {
72         var fs = document.getElementById('frameset1');
73         if (fs) {
74                 i -= 5;
75                 if (i < 0) {
76                         i =0;
77                 }
78                 fs.cols = i + '%, *';
79         }
80         if (i > 0) {
81                 window.setTimeout('hide2()', 1);
82         }
83         return false;
84 }
85
86 function hide() {
87         i= 28;
88         window.setTimeout('hide2()', 1);
89         return false;
90 }
91 </script>
92 </head>
93 <frameset rows="24,*">
94         <frame src="frame_header.php?p=<?php echo $p; ?>" 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="frame_toc.php" name="toc" id="toc" title="Table of Contents">
97                 <frame frameborder="0" src="frame_content.php?p=<?php echo $p; ?>" name="body" id="body" title="Content">
98         </frameset>
99
100         <noframes>
101                 <h1><?php echo _AT('Transformable_handbook'); ?></h1>
102                 <p><a href="frame_toc.html">Table of Contents</a></p>
103          </noframes>
104 </frameset>
105
106 </html>