From cf23cb2f0efb3a32b384049e9fb57df3586328aa Mon Sep 17 00:00:00 2001 From: Matthew Thiffault Date: Wed, 11 Mar 2009 00:37:34 -0400 Subject: [PATCH] Actually commit the changes this time. --- buttons/Makefile | 3 ++- library/index.cgi | 48 ++++++++++++++++++++++++++++++++++++----------- menu.xml | 2 +- 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/buttons/Makefile b/buttons/Makefile index 56201dd..f33fe0c 100644 --- a/buttons/Makefile +++ b/buttons/Makefile @@ -1,4 +1,5 @@ FILES = about.png events.png gitweb.png home.png mailman.png media.png \ - office.png services.png stats.png webmail.png wiki.png gallery.png + office.png services.png stats.png webmail.png wiki.png gallery.png \ + library.png RELDIR = buttons/ include ../common.mk diff --git a/library/index.cgi b/library/index.cgi index 1c04396..94334d8 100755 --- a/library/index.cgi +++ b/library/index.cgi @@ -16,7 +16,7 @@ $in = $ENV{'QUERY_STRING'}; @pairs = split(/[&=]/,$in); %fields = @pairs; chomp(%fields); -$webroot = ".."; +$webroot = "../../.."; print <Computer Science Club
-HOME -Services -Office -Events -Media -Wiki -Webmail -Gallery -Stats -


END + +open(DIR,"/users/www/www/directory.xml") or print "Couldn't open file\n"; +@items = ; +close(MENU); + +shift @items; +shift @items; +shift @items; +shift @items; +shift @items; +$items[-1] = undef; + +foreach $item (@items){ + if($item){ + + $item =~ s/[<>]//g; + $item =~ s/\/$//g; + $item =~ s/menuitem//g; + $item =~ s/ //; + @pairs = split(/[ =]/,$item); + shift @pairs; + %fields = @pairs; + + $fields{'href'} =~ s/"//g; + + chomp($fields{'href'}); + + $fields{'title'} =~ s/"//g; + + print "$fields{'title'}\n"; + + } +} + +print "


\n"; + #display the search form if($fields{'do'} eq "home" || $fields{'do'} eq ""){ diff --git a/menu.xml b/menu.xml index f9d1600..031771d 100644 --- a/menu.xml +++ b/menu.xml @@ -10,5 +10,5 @@ - +