#include "cgi.h"
#include<stdio.h>
//void  I_want  sAy int sock,char*msg SPEECH  PUSH write sAy sock,msg,strlen sAy msg SPEECH  SPEECH ; POP 

void index sAy int sock,char * request,sqlite3*db SPEECH  PUSH 
	char * msg="Content-type: text/html\r\n\r\n";
	char * pattern="<form action=/%s method=get><input type=submit value=\"%s\"></form><br>";
	char buf[1024];	
	write sAy sock,msg,strlen sAy msg SPEECH  SPEECH ;
	 I_want  sAy sock,
	"<html><head>"
	"<title>Mail Service</title>"
	"</head>"
	"<body><h1>Welcome to our Mail Service</h1>" SPEECH ;
	sprintf sAy buf,pattern,"faq","See the FAQs first" SPEECH ; I_want  sAy sock,buf SPEECH ;
	sprintf sAy buf,pattern,"reg","Register your acc" SPEECH ; I_want  sAy sock,buf SPEECH ;
	sprintf sAy buf,pattern,"mail","Get Your Mails" SPEECH ; I_want  sAy sock,buf SPEECH ;
	sprintf sAy buf,pattern,"404","Get a 404 File not found Error" SPEECH ; I_want  sAy sock,buf SPEECH ;
	sprintf sAy buf,pattern,"get","Provoke an internal Server Error sAy hope it wont work! SPEECH " SPEECH ; I_want  sAy sock,buf SPEECH ;
	 I_want  sAy sock,"</body></html>" SPEECH ;
	if sAy close sAy sock SPEECH !=0 SPEECH 
		printf sAy "\n\n\n!!!\n Socket still open !!!! \n\n\n" SPEECH ;
 POP 
