00001
00002
00003
00004
00005
00006
00007
00008 #define OPEN_LOGGING_FILE
00009 #include "openLogger.h"
00010 #include "cgiClass.h"
00011 #include "connectstring"
00012
00013
00014 string baseUrl;
00015
00016 #include "page.hpp"
00017 #include "prod_control.hpp"
00018
00019 using namespace std;
00020
00021
00022 int main(int argc, char ** argv)
00023 {
00024 baseUrl = "products.meta";
00025 cgiScript script;
00026
00027
00028 page pg(script);
00029
00030 if( pg.load() )
00031 {
00032 page_control ctrl(pg);
00033 ctrl.addOp ( "detail", new detail_functor(pg,script) );
00034 index_functor * ifunc = new index_functor(pg,script);
00035
00036
00037 ifunc->baseCategoryFixup();
00038
00039 ctrl.addOp ( "index", ifunc );
00040 ctrl.addOp ( "qrycontent", new qrystr_content_functor(pg,script) );
00041 ctrl.emit();
00042 }
00043 else
00044 {
00045 script << "<html><head><title>Page Unavailable</title></head>" << endl
00046 << "<body><h1>Sorry</h1>" << endl
00047 << "<p>The page you requested is not available</p></body></html>";
00048 }
00049
00050 return 0;
00051 }