From 8346d0774d2d1e076038db27f65f1d082a460f16 Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 20 Sep 2001 23:27:01 +0000 Subject: Initial revision --- lib/Table.cc | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 lib/Table.cc (limited to 'lib/Table.cc') diff --git a/lib/Table.cc b/lib/Table.cc new file mode 100644 index 0000000..776caae --- /dev/null +++ b/lib/Table.cc @@ -0,0 +1,41 @@ +#include "Table.h" +#include "HttpServ.h" + +Table::Table(const String & titre, const String & url, String * heads, String * cells, int nbc, int nbl, Action * na) : + Action(url), tit(titre), hds(heads), cls(cells), nc(nbc), nl(nbl), Next(na) { } + +String Table::GetTitle(void) { + return tit; +} + +void Table::Do(Variables * v, Handle * h) { + SendHead(h); + + (*h) << "
" << endnl; + + if (hds) { + (*h) << "" << endnl; + for (int i = 0; i < nc; i++) { + (*h) << "" << endnl; + } + (*h) << "" << endnl; + } + + for (int l = 0; l < nl; l++) { + (*h) << "" << endnl; + for (int c = 0; c < nc; c++) { + (*h) << "" << endnl; + } + (*h) << "" << endnl; + } + + (*h) << "
" << hds[i] << "
" << cls[l * nc + c] << "
" + +"
GetURL() : "start") << "\">" << endnl << +"" << endnl; +(*h) << "
" << endnl; + + + SendFoot(h); + Accessed(); +} -- cgit v1.2.3