
#define TCPCONFIG 1
#memmap xmem
#define USE_RABBITWEB 1

#use "dcrtcp.lib"
#use "http.lib"
#use "placa_ies.lib"

#ximport "/pages/timbre.html"	timbre_zhtml

SSPEC_MIMETABLE_START
	SSPEC_MIME_FUNC(".zhtml", "text/html", zhtml_handler),
	SSPEC_MIME(".html", "text/html")
SSPEC_MIMETABLE_END

SSPEC_RESOURCETABLE_START
	SSPEC_RESOURCE_XMEMFILE("/", timbre_zhtml),
	SSPEC_RESOURCE_XMEMFILE("/index.zhtml", timbre_zhtml)
SSPEC_RESOURCETABLE_END


int timbre[20][2];
int i;



#web_groups user,admin

#web  timbre[@][0]       (($timbre[@][0] >= 0) && ($timbre[@][0] <24))
#web  timbre[@][1]       (($timbre[@][1] >= 0) && ($timbre[@][1] <60))




void main(void)
{

   IniciP();

   for (i=0;i<20;i++){
   	timbre[i][0]=0;
   	timbre[i][1]=0;
   }


   sock_init();      // Initialize the TCP/IP stack, HTTP server
   http_init();


   while (1)
   {
      http_handler();     // Drive the HTTP server
   }
}