#include "stdafx.h"
#include "Standard.h"

Standard::Standard(char* start_color)
{
           cout <<"Content-type: text/html\n\n";
           strcpy(color, start_color);
}

Standard::Standard()
{
           strcpy(color, DEFAULT_COLOR);
}// inform http server that we want to send html code..., with some color live
void Standard::startmsg(char* start_color)
{
           cout<<"Content-type:text/html\n\n";
           strcpy(color, start_color);
}// add a classic html begining page...
void Standard::normal_head(char* title)
{
           cout<<"<HTML><HEAD>\n";
           cout<<"<TITLE>\n"<<title<<"</TITLE>\n";
           cout<<"</HEAD>"<<"<BODY>\n";
}// inform http server that we want to send html code...
void
Standard::start_msg()
{ cout<<"Content-type: text/html\n\n";}
// give colors...
void
Standard::color_head(char* title)
{
           normal_head(title);
           cout << "<BODY BGCOLOR=\"" << color << "\">\n" << "</BODY>\n";
}// to add the html close tags...
void
Standard::end()
{
           cout<<"</BODY></HTML>\n";
}// to add comments
void Standard::comment(char* mycomment)
{
           cout<<"<!--"<<mycomment<<"-->\n";
}// to add images...
void
Standard::image(char* myimage)
{
           cout<<"<IMG SRC=\""<<myimage<<"\">\n";
}// to add images with alternative text
void
Standard::image(char* myimage, char* alt)
{
           cout<<"<IMG SRC=\"" <<myimage<<"\"ALT=\""<<alt<<"\">\n";
}// to add links...
void
Standard::anchor(char* link, char* hottext)
{
           cout<<"<A HREF=\""<<link<<"\">"<<hottext<<"></A>\n";
}
