From 4c8065892087cbbeb7345a5eb81e36b018476666 Mon Sep 17 00:00:00 2001 From: David Kaufmann Date: Wed, 15 Jul 2015 02:53:52 +0200 Subject: [PATCH] add global menu --- funcs.php | 15 +++++++++++++++ index.php | 9 +++------ list.php | 4 ++-- stats.php | 2 +- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/funcs.php b/funcs.php index c1d31cc..9331705 100644 --- a/funcs.php +++ b/funcs.php @@ -112,3 +112,18 @@ function html_bottom(){ EOF; } + +function html_linkbox($current = "") { + $items = array( + 'index' => "Home", + 'list' => "Anmeldungen", + 'calendar' => "Kalender", + 'stats' => "Stats" + ); + $out = "

Anmeldesystem

"; + foreach ($items as $file => $name) { + $activeitem = ($current === $file) ? ' menuactive' : ''; + $out .= ''; + } + return ''; +} diff --git a/index.php b/index.php index 7f0a7cf..05c9961 100644 --- a/index.php +++ b/index.php @@ -1,9 +1,6 @@ -

anmeldesystem

- -

zu der Liste der angemeldeten

-

Stats

- diff --git a/list.php b/list.php index 9056261..4c89f08 100644 --- a/list.php +++ b/list.php @@ -1,10 +1,10 @@ -

Anmeldungsliste

Person hinzufügen

Person hinzufügen

diff --git a/stats.php b/stats.php index 3d89641..76607cd 100644 --- a/stats.php +++ b/stats.php @@ -2,9 +2,9 @@ require_once('./funcs.php'); login(); echo html_top("Stats"); +echo html_linkbox("stats"); ?> -

Stats

TODO, wenn überhaupt (kann-Ziel) -- 2.43.0