From 8346d0774d2d1e076038db27f65f1d082a460f16 Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 20 Sep 2001 23:27:01 +0000 Subject: Initial revision --- lib/Menu.cc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lib/Menu.cc (limited to 'lib/Menu.cc') diff --git a/lib/Menu.cc b/lib/Menu.cc new file mode 100644 index 0000000..7488d1d --- /dev/null +++ b/lib/Menu.cc @@ -0,0 +1,26 @@ +#include "Menu.h" +#include "HttpServ.h" + +Menu::Menu(const String & t, const String & U, String * ts, Action ** as, int nb) : + Action(U), tit(t), lt(ts), la(as), nba(nb) { } + +void Menu::Do(Variables * v, Handle * h) { + int i, f = 0; + + SendHead(h); + (*h) << "
" << endnl; + for (i = 0; i < nba; i++) { + (*h) << "" << endnl; + f = f ? 0 : 1; + } + (*h) << "
" << (i + 1) << "" + "GetURL() : "start") << "\">" + << lt[i] << "
" << endnl; + SendFoot(h); + + Accessed(); +} + +String Menu::GetTitle(void) { + return tit; +} -- cgit v1.2.3