-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathprint.php
59 lines (52 loc) · 1.92 KB
/
print.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/************************************************************************/
/* AContent */
/************************************************************************/
/* Copyright (c) 2010 */
/* Inclusive Design Institute */
/* */
/* This program is free software. You can redistribute it and/or */
/* modify it under the terms of the GNU General Public License */
/* as published by the Free Software Foundation. */
/************************************************************************/
define('TR_INCLUDE_PATH', '../include/');
include(TR_INCLUDE_PATH.'vitals.inc.php');
include(TR_INCLUDE_PATH.'handbook_pages.inc.php');
global $handbook_pages, $_pages;
if (isset($_GET['p'])) {
$this_page = htmlentities($_GET['p']);
} else {
$this_page = 'index.php';
}
function print_handbook($handbook_pages)
{
global $_pages;
foreach ($handbook_pages as $page_key => $page_value)
{
if (is_array($page_value))
{
if (isset($_pages[$page_key]))
{
echo _AT($_pages[$page_key]['guide'])."<br /><br />";
print_handbook($page_value);
}
}
else if (isset($_pages[$page_value]))
{
echo _AT($_pages[$page_value]['guide'])."<br /><br />";
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo _AT('doc_title'); ?></title>
<link rel="stylesheet" href="styles.css" type="text/css" />
</head>
<body>
<a href="index.php?p=<?php echo $this_page; ?>"><?php echo _AT('back_to_chapters'); ?></a><br /><br />
<?php print_handbook($handbook_pages); ?>
</body>
</html>