diff --git a/src/dbquery.c b/src/dbquery.c index 7ae8dbb..7705e03 100644 --- a/src/dbquery.c +++ b/src/dbquery.c @@ -31,7 +31,7 @@ static inline void print_tblheader(const char *c) { char *labels; switch (*c) { default: - labels = "\ + labels = "
\ \ \ \ @@ -41,7 +41,7 @@ static inline void print_tblheader(const char *c) { "; break; case QMLEADERBOARD: - labels = "


Map List

Name
\ + labels = "
\ \ \ \ @@ -50,7 +50,7 @@ static inline void print_tblheader(const char *c) { "; break; case QRPLAYER: - labels = "


Leaderboard

Rank
\ + labels = "
\ \ \ \ @@ -98,7 +98,7 @@ static void qresult(sqlite3_stmt * const sp, const char *c) { if (ISPLAYERNAME(c, i)) { print_plname(field); } else if (ISMAPNAME(c, i)) { - printf("", field, field); + printf("", field, field); } else if (i == 2 && (*c == QMLEADERBOARD || *c == QOVERVIEW)) { print_time(field); } else { diff --git a/src/main.c b/src/main.c index ea1b5a4..0f64fd4 100644 --- a/src/main.c +++ b/src/main.c @@ -8,10 +8,7 @@ void html(void) { \ /v/ - Xonotic\ "; - const char *html_bot = "

Pages under construction.
\ - Service may sporadically become unavailable.
\ - In-game database is not directly synced with this web server.\ -

\ + const char *html_bot = "

\ "; const char *html_mid = "
\

hi / good luck and have fun.

Available Pages

\ @@ -29,7 +26,14 @@ void html(void) { printf("%s", html_bot); } +// use with template +void templated(void) { + const char *qstr = getenv("QUERY_STRING"); + getquery(qstr); + return; +} + int main(void) { - html(); + templated(); return 0; }


Ranks

Name%s%s