diff options
Diffstat (limited to 'lib/HtmlSkinner.cc')
-rw-r--r-- | lib/HtmlSkinner.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/HtmlSkinner.cc b/lib/HtmlSkinner.cc new file mode 100644 index 0000000..31ed083 --- /dev/null +++ b/lib/HtmlSkinner.cc @@ -0,0 +1,33 @@ +#include "HtmlSkinner.h" + +HtmlSkinner::HtmlSkinner() { +} + +HtmlSkinner::~HtmlSkinner() { +} + +String HtmlSkinner::Redirect(const String & location) { + return "<HTML><HEAD><TITLE>301 - Moved Permanently</TITLE></HEAD>\n" + "<BODY><center><b><h2>You should be redirected <a href=\"" + location + "\">here</a> shortly</h2></b></center>\n" + "</BODY></HTML>\n"; +} + +String HtmlSkinner::Error(const String & location) { + return "<HTML><HEAD><TITLE>404 - Error</TITLE></HEAD>\n" + "<BODY><center><b><h2>The server was unable to process your query</h2></b></center>\n" + "Click <A HREF=\"/\">here</A> to go the main page.</BODY></HTML>\n"; +} + +String HtmlSkinner::Header(const String & title) { + return "<HTML><HEAD><TITLE>" + title + "</TITLE>\n" + "<META http-equiv=\"Content-Style-Type\" content=\"text/css\">\n" + "<LINK REL=STYLESHEET HREF=\"/image/style.css\" TYPE=\"text/css\">\n" + "</HEAD><BODY BGCOLOR=\"#aaaaaa\" BACKGROUND=\"/image/grain.png\">\n" + "<center><TABLE WIDTH=\"50%\" BORDER=3 cellspacing=1 BGCOLOR=\"#ffffff\"><TR><TD>\n" + "<center><b><h1>" + title + "</h1></b></center></TD></TR></TABLE><P>\n" + "<TABLE WIDTH=\"80%\" BORDER=2 cellspacing=1 BGCOLOR=\"#ffffff\"><TR><TD>\n"; +} + +String HtmlSkinner::Footer() { + return "</TABLE></TD></TR></BODY></HTML>"; +} |