summaryrefslogtreecommitdiff
path: root/lib/HtmlSkinner.cc
diff options
context:
space:
mode:
authorpixel <pixel>2007-04-14 14:29:22 +0000
committerpixel <pixel>2007-04-14 14:29:22 +0000
commitbbdabec18228665d548557f1c78159486cffc54d (patch)
treeef3163e39cf75de86208b8a30e62392304a08137 /lib/HtmlSkinner.cc
parent215e6d6ef338cd3eb1c36c118be4ff01f87376f3 (diff)
Creation of the HtmlSkinner class.
Diffstat (limited to 'lib/HtmlSkinner.cc')
-rw-r--r--lib/HtmlSkinner.cc33
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>";
+}