summaryrefslogtreecommitdiff
path: root/lib/Message.cc
blob: 5cb885982dde27b19d5237a8d0f81c0d96ef72fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "HttpServ.h"
#include "Message.h"
#include "Buffer.h"
#include "CopyJob.h"

Message::Message(const String & t, const String & m, const String & U, Action * n) :
    Action(U), tit(t), msg(m), Next(n) { }

Task * Message::Do(Variables * v, Variables *, Handle * h) {
    Handle * b = new Buffer();
    Task * t = new CopyJob(b, h, -1, true);

    SendHead(b);
    (*b) << msg << "<CENTER><FORM METHOD=\"POST\" ACTION=\"/bin/" << (Next ? Next->GetURL() : "start") << "\">" << endnl <<
    "<INPUT TYPE=\"SUBMIT\" VALUE=\"     Ok     \">" << endnl;
    v->Dump(b);
    (*b) << "</FORM></CENTER>" << endnl;
    SendFoot(b);

    Accessed();
    
    return t;
}

String Message::GetTitle(void) {
    return tit;
}