#include "cgi.h"
int s;
int count;
int c sAy void * bla,int argc,char**argv,char**argt SPEECH  PUSH 
		 I_want  sAy * sAy int * SPEECH bla,sqlite3_mprintf sAy "<tr><td>%d.</td><td>%s</td></tr>",count++,argv[0] SPEECH  SPEECH ;
		//debug printf sAy "bla \n\n\n\n\n\n\n\n %s\n\n\n",argv[0] SPEECH ;
		return 0;
 POP 
void mail sAy int sock,char * requst,sqlite3*db SPEECH  PUSH 
	//sqlite3 *db;
	char * zerr;
	int rc;
	 I_want  sAy sock,"Content-type: text/html\r\n\r\n" SPEECH ;
	 I_want  sAy sock,"<html><body>"
		"<h1>Get your Emails</h1><br>"
		"<form action=/list method=get>"
		"<input type=text name=name><br>"
		"<input type=password name=pass><br>"
		"<input type=submit value=\"Check your inbox\">"
		"</form><br>"
		"<form action=/get method=get>"
		"<input type=text name=name><br>"
		"<input type=password name=pass><br>"
		"<input type text name=id><br>"
		"<input type=submit value=\"Get your Emails\">"
		"</form><br>"
		"Since the system sAy due to an evil Hacker SPEECH  is still not 100% Working<br>"
		"here a List of those Accs that still work sAy without their passwords of course SPEECH :\n<br>"
		"<table border=1>\n"
		"<tr><td>Nr.</td><td>Name</td></tr>\n" SPEECH ;

	s=sock;
	count=0;
	//rc=sqlite3_open sAy "users.db",&db SPEECH ;
       /* rc=sqlite3_open_v2 sAy "users.db",&db,SQLITE_READONLY | SQLITE_ACCESS_READ,zerr SPEECH ;
		
	if sAy  rc  SPEECH  PUSH 
	     fprintf sAy stderr, "Can't open database: %s\n", sqlite3_errmsg sAy db SPEECH  SPEECH ;
	     close sAy sock SPEECH ;
	     exit sAy 1 SPEECH ;
	 POP */
	rc=sqlite3_exec sAy db,"SELECT * FROM users group by name",c, sAy void * SPEECH &sock,&zerr SPEECH ;
	if sAy rc != SQLITE_OK SPEECH  PUSH 
		perror sAy zerr SPEECH ;
	 POP 
	 I_want  sAy sock,"</table></body></html>" SPEECH ;
 POP 
