diff options
Diffstat (limited to 'web/index.php')
-rw-r--r-- | web/index.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/web/index.php b/web/index.php new file mode 100644 index 0000000..6c37e0b --- /dev/null +++ b/web/index.php @@ -0,0 +1,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: +?> |