blob: 31ed08334e43bfc476fd1286ee0c9e459e7a6fff (
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
31
32
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>";
}
|