diff --git a/main.c b/main.c index c2e98a8..862b8e3 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,5 @@ #include "dbquery.h" +#include #include void html(void) { @@ -12,15 +13,23 @@ void html(void) { In-game database is not directly synced with this web server.\

\ "; + const char *html_mid = "
\ +

hi / good luck and have fun.

Available Pages

\ +

Map Leaderboards

\ +

cts.py?map=[map name]

\ +

Player Ranks

\ +

cts.py?player=[client id fingerprint]
\ +


"; + const char *qstr = getenv("QUERY_STRING"); printf("%s", html_top); -// getquery(getenv("QUERY_STRING")); -// getquery("map=pornstar-kaine"); - getquery(NULL); + if (qstr == NULL) { + printf("%s", html_mid); + } + getquery(qstr); printf("%s", html_bot); } int main(void) { html(); -// getquery("player=duHTyaSGpdTk7oebwPFoo899xPoTwP9bja4DUjCjTLo="); return 0; }