From 142006fe3120af663a31dcf936e1a75188446f47 Mon Sep 17 00:00:00 2001 From: paulr Date: Tue, 19 Apr 2011 02:09:01 +1000 Subject: [PATCH] more initial code --- lib/config.php | 7 ++++++- lib/lib.php | 3 +++ lib/plugins/db.php | 20 ++++++++++++++++++++ lib/plugins/www.php | 14 ++++++++++++-- lib/plugins/yumproxy.php | 18 ++++++++++++++---- var/config.php | 9 +++++++++ 6 files changed, 64 insertions(+), 7 deletions(-) create mode 100644 var/config.php diff --git a/lib/config.php b/lib/config.php index 624cfe7..ad4a503 100644 --- a/lib/config.php +++ b/lib/config.php @@ -1,8 +1,13 @@ $bases) { //echo "
checking $bases_cd for ".$bases["base"]." against \"".$urlcomps[0]."\"
"; if(strtolower($urlcomps[0]) == strtolower($bases["base"])) { diff --git a/lib/plugins/db.php b/lib/plugins/db.php index 67c94a5..cf8974f 100644 --- a/lib/plugins/db.php +++ b/lib/plugins/db.php @@ -1,2 +1,22 @@ \ No newline at end of file diff --git a/lib/plugins/www.php b/lib/plugins/www.php index 7811bea..1738c23 100644 --- a/lib/plugins/www.php +++ b/lib/plugins/www.php @@ -92,12 +92,22 @@ function www_header() function www_top() { - echo "i be a top, yar"; + echo "

Welcome to GLCAS

"; + echo ""; + + global $MENU_ITEMS; + foreach($MENU_ITEMS as $mes) { + $mtext = $mes["title"]; + $mlink = $mes["link"]; + echo ""; + } + + echo "
$mtext
"; } function www_leftmenu() { - echo "i be a menu, yar"; + echo "i be a left menu, yar"; } function www_contentpane() diff --git a/lib/plugins/yumproxy.php b/lib/plugins/yumproxy.php index cccb29d..5db52a0 100644 --- a/lib/plugins/yumproxy.php +++ b/lib/plugins/yumproxy.php @@ -1,8 +1,12 @@ "; } -function yp_contentUrls() +function yp_leftMenu() +{ + echo "i am a yp leftmenu"; +} + +function yp_contentUrlsCtl() { $calls["needs_base_page"] = true; $calls["content_pane_function"] = "yp_contentPane"; + $calls["left_menu_function"] = "yp_leftMenu"; return $calls; } diff --git a/var/config.php b/var/config.php new file mode 100644 index 0000000..52bceef --- /dev/null +++ b/var/config.php @@ -0,0 +1,9 @@ + \ No newline at end of file -- 1.7.0.4