summaryrefslogtreecommitdiff
path: root/web/index.php
blob: 6c37e0b61b0124e311067c98fe62dc7f5f098b4f (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
<?

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

$namespace = new Namespace(
	array( have_database => 1, 
	       have_session => 1,
	       have_user => 1 )
) 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:
?>