57 lines
1.2 KiB
C++
Raw Normal View History

#include "applicat.h"
void Application::print_content()
{
cout << "Content-type: text/html" << endl ;
// Force expiring action, since these are CGI outputs...
// Guess this date...
cout << "Expires: Tue, 10 Nov 1992 00:00:00 GMT" << endl << endl;
}
void Application::print_bin_content()
{
cout << "Content-type: application/octet-stream" << endl << endl;
}
void Application::print_database_error()
{
cout << "<BR><BR><H1>Errore sul database</H1><BR><BR>" << endl;
cout << "<P>Connessione al database fallita.</P><BR>" << endl;
}
void Application::print_header(const char* title)
{
print_content();
cout << "<HTML>" << endl;
cout << "<HEAD>" << endl;
cout << "<TITLE>" << title << "</TITLE>" << endl;
cout << "<link rel=\"stylesheet\" href=\"/def_style.css\" type=\"text/css\">" << endl;
cout << "</HEAD>" << endl;
cout << "<BODY>" << endl;
}
void Application::print_footer()
{
cout << "<BR><BR>" << endl;
//cout << "Torna <A HREF=\"javascript:history.back(1)\">indietro</A>" << endl;
cout << "</BODY></HTML>" << endl;
}
void Application::run(int argc, char* argv[])
{
__argc = argc;
__argv = (const char**)argv;
if (create())
main_func();
destroy();
}