Library Hebergement.h

Dependents:   Nucleo_Web_ENC28J60 Nucleo_Web_ENC28J60_ADC

hebergement.h

Committer:
Fo170
Date:
2016-07-07
Revision:
5:96216ff68185
Parent:
4:11e8d85ca94c

File content as of revision 5:96216ff68185:

#define  __hebergement__                  "http://olivier.fournet.free.fr/"
#define  __Time_between_page_refresh__    "1"

#if defined(TARGET_NUCLEO_F411RE)
const string str_meta_refresh  = "<meta http-equiv=\"refresh\" content=\"" __Time_between_page_refresh__ ";url=http://" __IP_LOCAL__ "/\">";
const string str_JavaScript  = "<script language=\"javascript\" type=\"text/javascript\" src=\"" __hebergement__ "electronique/e/WebServerNucleo/js/WebServerNucleo_Interactivity_init.js\"></script>\r\n";
#endif

#if defined(TARGET_WIZwiki_W7500)
const string str_meta_refresh  = "<meta http-equiv=\"refresh\" content=\"" __Time_between_page_refresh__ ";url=http://%s/\">";
const string str_JavaScript  = "<script language=\"javascript\" type=\"text/javascript\" src=\"" __hebergement__ "electronique/e/WIZwiki-W7500/js/WIZwiki-W7500_Interactivity_init.js\"></script>\r\n";
#endif

const string str_Compilation_DATE_AND_TIME = "<p>Compilation avec mBED &agrave; " __TIME__ " le " __DATE__" \r\n"; 

// Logo Test d'image en base64 :
// http://webcodertools.com/imagetobase64converter/Create
// const string str_Logo_image =  "<img alt='' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAUklEQVQ4T2NggIEGMIBzCTDgSh0cHAjrIcFgiGFoGoCWELYQrgLIgGsg4CtkaTibWNfu378fq2tpHx6EbcAMQ8J6iPU3cpIhbCqaisFpCTwVAwB5lit+0ltbrgAAAABJRU5ErkJggg=='>";
const string str_favicon = "<LINK REL=\"SHORTCUT ICON\" type=\"image/x-icon\" href=\"" __hebergement__ "favicon.ico\">\r\n<link rel=\"icon\" href=\"" __hebergement__ "favicon.ico\" type=\"image/x-icon\">";

#define __image_password_folder__           "password_folder.jpg"
const string str_image_Password_Folder  =   "<img alt='' src='" __hebergement__ "jpg/" __image_password_folder__ "'>";

#define __image_password_folder_x64__       "password_folder_x64.png"
const string str_password_folder_x64    =   "<img alt='' src='" __hebergement__ "png/" __image_password_folder_x64__ "'>";

#define __image_301_Moved_Permanently__     "301_moved_permanently.jpg"
const string str_moved_perm             =   "<img alt='' src='" __hebergement__ "jpg/" __image_301_Moved_Permanently__ "'>";

#define __image_401_Unauthorized__          "401_Unauthorized.png"
const string str_Unauthorized           =   "<img alt='' src='" __hebergement__ "png/" __image_401_Unauthorized__ "'>";

#define __image_ampoule_OFF__               "ampoule_OFF_x32.png"
const string str_ampoule_OFF            =   "<img alt='' src='" __hebergement__ "png/" __image_ampoule_OFF__ "'>";

#define __image_ampoule_ON__                "ampoule_ON_x32.png"
const string str_ampoule_ON             =   "<img alt='' src='" __hebergement__ "png/" __image_ampoule_ON__ "'>";

#define __image_thermometre__               "thermometre_x64.png"
const string str_thermometre            =   "<img alt='' src='" __hebergement__ "png/" __image_thermometre__ "'>";

#define __image_chrono__                    "chrono_x64.png"
const string str_chrono                 =   "<img alt='' src='" __hebergement__ "png/" __image_chrono__ "'>";

#define __image_battery__                    "battery_x64.png"
const string str_battery                 =   "<img alt='' src='" __hebergement__ "png/" __image_battery__ "'>";
//-------------------

const string HTTP_OK      = "HTTP/1.0 200 OK";
const string MOVED_PERM   = "HTTP/1.0 301 Moved Permanently\r\nLocation: ";
const string UNAUTHORIZED = "HTTP/1.0 401 Unauthorized";

#define  ON   1
#define  OFF  0

const string str_DOCTYPE = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\r\n";