File: index.php

package info (click to toggle)
knowledgeroot 0.9.7.3-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 6,368 kB
  • ctags: 23,662
  • sloc: php: 6,113; sql: 171; perl: 133; xml: 132; makefile: 40
file content (112 lines) | stat: -rwxr-xr-x 3,922 bytes parent folder | download
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
// Knowledgeroot is published under the GNU GPL! Read LICENSE
// Frank Habermann <lordlamer@lordlamer.de>
// Robert Scholz <scholzrobert@web.de>
//

// set version
$version = "0.9.7.3";

// load requiered files
require_once("/etc/knowledgeroot/config.inc.php");
require_once("include/init.php");

/********************
 * This is the end of initialisation
 * Now do header work
 ********************/

if($CLASS['vars']['knowledgeroot']['charset'] != "") {
	header("Content-Type: text/html; charset=".$CLASS['vars']['knowledgeroot']['charset']."");
	echo '<?xml version="1.0" encoding="'.$CLASS['vars']['knowledgeroot']['charset'].'"?>';
} else {
	echo '<?xml version="1.0" encoding="iso-8859-1"?>';
}


echo "\n";
?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php
	$CLASS['kr_header']->show_header();
?>
</head>
<body <?php if($CLASS['vars']['menu']['type'] == "slide") { echo "onload=\"Hide('tree');\""; } ?>>

<div style="display: none;" id="messagebox">
	<div id="msg" class="loading"><?php echo $CLASS['language']->get['messagebox']['loading']; ?></div>
</div>

<a name="top"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr class="head"><td class="head" colspan="2"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><div class="pagetitle"><?php echo $CLASS['vars']['knowledgeroot']['title']; ?></div></td><td align="right" valign="bottom"><div class="version"><a href="http://www.linuxdelta.de/Knowledgeroot.html">Knowledgeroot</a> - <?php echo $CLASS['language']->get['version'] . ":&nbsp;" . $version; ?></div>
<div class="mainnavi">
<?php
	// show top menu
	$CLASS['kr_content']->show_menu();
?>
</div></td></tr></table></td></tr>

<tr class="navigationpath"><form action="index.php" method="post"><td class="navigation" colspan="2"><div class="navigationleft"><b><?php echo $CLASS['language']->get['path']; ?>:
<?php
	// show path
	if($CLASS['knowledgeroot']->checkRecursivPerm($_SESSION['cid'], $_SESSION['userid']) != 0) {
		echo $CLASS['path']->getPath($_SESSION['cid']);
	} else {
		echo "/";
	}
?>

</b></div><div class="navigationright"><?php echo $CLASS['language']->get['user'] . ":&nbsp;" . $_SESSION['user']; ?>&nbsp;</div>
<div class="navigationmiddle">

		<?php echo $CLASS['language']->get['search']; ?>:
		<input class="searchfield" type="text" name="search" value="<?php if($_POST['search'] != "") { echo htmlspecialchars(stripslashes($_POST['search'])); } ?>">
		<input class="searchgo" type="submit" name="submit" value="<?php echo $CLASS['language']->get['searchgo']; ?>">

</div></td></form></tr>

<tr>
 <td id="treecontainer">
 	<!-- <a href="#" onClick="ShowHide('tree');">#</a> -->
	<div id="treeopener" <?php if($CLASS['vars']['menu']['type'] == "static") { echo "style=\"display:none;\""; } else { echo "style=\"display:block;\""; } ?>>
		<div id="treeshow">
			<a href="#" border="0" onclick="ShowTree();" alt="<?php echo $CLASS['language']->get['tree']['showtree']; ?>"><img id="treeshowimg" src="images/right.gif" width="22" title="<?php echo $CLASS['language']->get['tree']['showtree']; ?>" /></a>
		</div>
	</div>

 	<div id="tree" <?php if($CLASS['vars']['menu']['type'] == "static") { echo "style=\"display:block;\""; } else { echo "style=\"display:none; position:absolute;\""; } ?>>
<?php
	// show tree
	$CLASS['tree']->open = $_SESSION['open'];
	$CLASS['tree']->buildTree(0);
?>
	</div>
 </td>
 <td id="contentcontainer">
<?php
	// show page content
	$CLASS['kr_header']->show_messages();
	$CLASS['kr_content']->show_content();
?>
 </td>
</tr>
</table>

<?php
	// do last cleanups
	if($_SESSION['firstrun'] == "") {
		$_SESSION['firstrun'] = "yes";
	} else {
		$_SESSION['firstrun'] = "no";
	}

	// close db connection
	$CLASS['db']->close();
?>
</body>
</html>