diff options
Diffstat (limited to 'lib/Action.cc')
-rw-r--r-- | lib/Action.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/Action.cc b/lib/Action.cc index 23f96d0..2fb0e2a 100644 --- a/lib/Action.cc +++ b/lib/Action.cc @@ -8,6 +8,7 @@ Action * Action::start = 0; static int counter = 0; +static HtmlSkinner default_skinner; static String genurl(const String & u) { if (u.strlen()) { @@ -19,9 +20,12 @@ static String genurl(const String & u) { } } -Action::Action(const String & u) : next(start), prev(0), URL(genurl(u)), hastoclean(false), accessed(false) { +Action::Action(const String & u, HtmlSkinner * _skin) : next(start), prev(0), URL(genurl(u)), hastoclean(false), accessed(false), skin(_skin) { start = this; if (next) next->prev = this; + if (!skin) { + skin = &default_skinner; + } } Action::~Action() { @@ -57,17 +61,15 @@ Action * Action::Look4URL(const String & URL) { */ void Action::SendHead(Handle * h) { - (*h) << "<HTML><HEAD><TITLE>" << GetTitle() << "</TITLE>" << endnl << - "<META http-equiv=\"Content-Style-Type\" content=\"text/css\">" << endnl << - "<LINK REL=STYLESHEET HREF=\"/image/style.css\" TYPE=\"text/css\">" << endnl << - "</HEAD><BODY BGCOLOR=\"#aaaaaa\" BACKGROUND=\"/image/grain.png\">" << endnl << - "<center><TABLE WIDTH=\"50%\" BORDER=3 cellspacing=1 BGCOLOR=\"#ffffff\"><TR><TD>" << endnl << - "<center><b><h1>" << GetTitle() << "</h1></b></center></TD></TR></TABLE><P>" << endnl << - "<TABLE WIDTH=\"80%\" BORDER=2 cellspacing=1 BGCOLOR=\"#ffffff\"><TR><TD>" << endnl; + (*h) << skin->Header(GetTitle()); } void Action::SendFoot(Handle * h) { - (*h) << "</TABLE></TD></TR></BODY></HTML>" << endnl; + (*h) << skin->Footer(); +} + +HtmlSkinner * Action::GetSkinner() { + return skin; } String Action::GetURL(void) { |