diff options
author | Pixel <Pixel> | 2001-11-15 14:52:43 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-11-15 14:52:43 +0000 |
commit | 3f720784d55707024fff675a5238fde0168d1a40 (patch) | |
tree | 84a5b9843ede69aaf76cd9b791686b2a3ea7c3d7 /lib/Table.cc | |
parent | 8694409f2a5531e9f3263e8a42248a3ca91ac14f (diff) |
More work into TaskMan...
Diffstat (limited to 'lib/Table.cc')
-rw-r--r-- | lib/Table.cc | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/lib/Table.cc b/lib/Table.cc index 776caae..30f3127 100644 --- a/lib/Table.cc +++ b/lib/Table.cc @@ -1,5 +1,8 @@ #include "Table.h" #include "HttpServ.h" +#include "CopyJob.h" +#include "Buffer.h" +#include "config.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) { } @@ -8,34 +11,38 @@ String Table::GetTitle(void) { return tit; } -void Table::Do(Variables * v, Handle * h) { - SendHead(h); +Task * Table::Do(Variables * v, Handle * h) { + Handle * b = new Buffer(); + Task * t = new CopyJob(b, h, -1, true); + + SendHead(b); - (*h) << "<center><TABLE BORDER=0>" << endnl; + (*b) << "<center><TABLE BORDER=0>" << endnl; if (hds) { - (*h) << "<TR>" << endnl; + (*b) << "<TR>" << endnl; for (int i = 0; i < nc; i++) { - (*h) << "<TH BGCOLOR=\"#bbbbbb\">" << hds[i] << "</TH>" << endnl; + (*b) << "<TH BGCOLOR=\"#bbbbbb\">" << hds[i] << "</TH>" << endnl; } - (*h) << "</TR>" << endnl; + (*b) << "</TR>" << endnl; } for (int l = 0; l < nl; l++) { - (*h) << "<TR>" << endnl; + (*b) << "<TR>" << endnl; for (int c = 0; c < nc; c++) { - (*h) << "<TD BGCOLOR=\"#" << (l % 2 ? "cccccc" : "dddddd") << "\">" << cls[l * nc + c] << "</TD>" << endnl; + (*b) << "<TD BGCOLOR=\"#" << (l % 2 ? "cccccc" : "dddddd") << "\">" << cls[l * nc + c] << "</TD>" << endnl; } - (*h) << "</TR>" << endnl; + (*b) << "</TR>" << endnl; } - (*h) << "</TABLE>" + (*b) << "</TABLE>" "<FORM METHOD=\"POST\" ACTION=\"/bin/" << (Next ? Next->GetURL() : "start") << "\">" << endnl << "<INPUT TYPE=\"SUBMIT\" VALUE=\" Ok \">" << endnl; -(*h) << "</FORM></CENTER>" << endnl; +(*b) << "</FORM></CENTER>" << endnl; - - SendFoot(h); + SendFoot(b); Accessed(); + + return t; } |