summaryrefslogtreecommitdiff
path: root/src/webserver/generate.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-21 06:06:21 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-21 06:06:21 +0000
commit126ce626c0e0ef900a19c1643efe884f95938892 (patch)
tree85553bb7b0be2895c3f75072960814eb86a016ab /src/webserver/generate.c
parent24056776a3d8dfad2e0494136b58f0bbd85f03b3 (diff)
downloadhercules-126ce626c0e0ef900a19c1643efe884f95938892.tar.gz
hercules-126ce626c0e0ef900a19c1643efe884f95938892.tar.bz2
hercules-126ce626c0e0ef900a19c1643efe884f95938892.tar.xz
hercules-126ce626c0e0ef900a19c1643efe884f95938892.zip
* Moved /tool and /webserver to under /src and added 'make tools' and 'make web-server'
* Removed ladmin compiling from 'make sql' git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1261 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/webserver/generate.c')
-rw-r--r--src/webserver/generate.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/webserver/generate.c b/src/webserver/generate.c
new file mode 100644
index 000000000..26d2c7492
--- /dev/null
+++ b/src/webserver/generate.c
@@ -0,0 +1,38 @@
+
+void generate_page(char password[25], int sock_in, char *query, char *ip)
+{
+ char *page = get_param(query, 0);
+ char *ppass = get_param(query, "password");
+
+
+ if ( (ppass == 0) || (strcmp(password, ppass) != 0) )
+ {
+ web_send(sock_in, html_header("Enter your password"));
+ web_send(sock_in, "<H1>NOT LOGGED IN!</H1><form action=\"/\" method=\"GET\">\n");
+ web_send(sock_in, "Enter your password:<br>\n<input type=\"text\" name=\"password\">\n");
+ web_send(sock_in, "<input type=\"submit\" value=\"Login\">\n");
+ }
+ else
+ {
+
+
+ //To make this simple, we will have a bunch of if statements
+ //that then shoot out data off into functions.
+
+
+ //The 'index'
+ if ( strcmp(page, "/") == 0 )
+ generate_notdone(sock_in, query, ip);
+
+
+ //About page:
+ if ( strcmp(page, "/about.html") == 0 )
+ generate_about(sock_in, query, ip);
+
+
+ //Test page:
+ if ( strcmp(page, "/testing/") == 0 )
+ generate_sample(sock_in, query, ip);
+
+ }
+}