00001
00002
00003
00004
00005
00006
00007 #include <exception>
00008 #include <iostream>
00009
00010 #include "cgicc/Cgicc.h"
00011 #include "cgicc/HTTPHTMLHeader.h"
00012 #include "cgicc/HTMLClasses.h"
00013
00014 using namespace std;
00015 using namespace cgicc;
00016
00017 int
00018 main(int argc,
00019 char **argv)
00020 {
00021 try {
00022 Cgicc cgi;
00023
00024
00025 cout << HTTPHTMLHeader() << HTMLDoctype(HTMLDoctype::eStrict) << endl;
00026 cout << html().set("lang", "en").set("dir", "ltr") << endl;
00027
00028
00029 cout << head() << endl;
00030 cout << title() << "GNU cgicc v" << cgi.getVersion() << title() << endl;
00031 cout << head() << endl;
00032
00033
00034 cout << body() << endl;
00035
00036
00037 cout << h1("Hello, world from GNU cgicc") << endl;
00038
00039
00040 cout << body() << html();
00041 }
00042
00043 catch(const exception& e) {
00044
00045 }
00046
00047 return 0;
00048 }