From 4fc2c543112c4734b71272b1e4a1392406d63455 Mon Sep 17 00:00:00 2001
From: Arun Persaud
Date: Sat, 26 Apr 2008 13:16:24 -0700
Subject: CLEANUP: moved register.php to the include directory
new users are now also automatically logged in.
Signed-off-by: Arun Persaud
---
include/output.php | 2 +-
include/register.php | 83 ++++++++++++++++++++++++++++++++++++++++++
index.php | 3 ++
register.php | 100 ---------------------------------------------------
4 files changed, 87 insertions(+), 101 deletions(-)
create mode 100644 include/register.php
delete mode 100644 register.php
diff --git a/include/output.php b/include/output.php
index b22b6ef..4f4a5b6 100644
--- a/include/output.php
+++ b/include/output.php
@@ -275,7 +275,7 @@ function output_home_page($pre,$game,$done,$avgtime)
echo "$done games have been completed on this server. Average time of a game: $avgtime days
";
?>
- Please register, in case you have not done that yet
+
Please register, in case you have not done that yet
or login with you email-address or name and password here:
+
\ No newline at end of file
diff --git a/index.php b/index.php
index 31c497a..d1d2926 100644
--- a/index.php
+++ b/index.php
@@ -57,6 +57,9 @@ switch($action)
require './include/login.php';
require './include/user.php';
break;
+ case 'register':
+ require './include/register.php';
+ break;
case 'game':
require './include/game.php';
break;
diff --git a/register.php b/register.php
deleted file mode 100644
index 9f4cf0e..0000000
--- a/register.php
+++ /dev/null
@@ -1,100 +0,0 @@
-";
- $ok=0;
- }
- if(DB_get_userid('email',$_REQUEST["Remail"]))
- {
- echo "this email address is already used ?!
";
- $ok=0;
- }
- if($ok)
- {
- $r=mysql_query("INSERT INTO User VALUES(NULL,".DB_quote_smart($_REQUEST["Rfullname"]).
- ",".DB_quote_smart($_REQUEST["Remail"]).
- ",".DB_quote_smart(md5($_REQUEST["Rpassword"])).
- ",".DB_quote_smart($_REQUEST["Rtimezone"]).",NULL,NULL)");
-
- if($r)
- echo " Welcome to e-DoKo, you are now registered, please visit the".
- " homepage to continue.";
- else
- echo " something went wrong, couldn't add you to the database, please contact $ADMIN_NAME at $ADMIN_EMAIL.";
- }
- }
-/* page for registration */
- else
- {
- echo "IMPORTANT: passwords are going over the net as clear text, so pick an easy password. No need to pick anything complicated here ;)
";
- ?>
-
-
--
cgit v1.2.3-18-g5258