summaryrefslogtreecommitdiff
path: root/web/index.php
blob: 7852e25bf0e7e7d3c488d135b36d3b52bc0d29d3 (plain)
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
<?

require_once( "../include/Namespace.inc" );
require_once( "../include/Template.inc" );
require_once("../include/Tools.inc");

$namespace = new Namespace(
	array( have_database => 0,
	       have_session => 0,
	       have_user => 0
		   )
) or
	die("Nobody loves me. I don't even have space for a name.");

$data = array();
$data['remotehostname'] = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$data['remoteip'] = $_SERVER['REMOTE_ADDR'];
$data['user'] = $namespace->session->data['user']['username'];
$data['have_ssl'] = $_SERVER['SSL_PROTOCOL'] ? 1 : 0;
$template = new Template('index.html', $namespace->config->template_path);
$template->parse($data);
print $template->output();

$namespace->stop();

# vim:ts=4:
# vim:shiftwidth=4:
?>