diff options
author | Arun Persaud <arun@nubati.net> | 2008-04-26 13:16:24 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2008-04-26 13:16:24 -0700 |
commit | 4fc2c543112c4734b71272b1e4a1392406d63455 (patch) | |
tree | 4823567aded6dd95726db197e006086e08c0b5ad /register.php | |
parent | 924f395a39eeccbcd54d540613e440cbedd6ba3d (diff) | |
download | e-DoKo-4fc2c543112c4734b71272b1e4a1392406d63455.tar.gz e-DoKo-4fc2c543112c4734b71272b1e4a1392406d63455.tar.bz2 e-DoKo-4fc2c543112c4734b71272b1e4a1392406d63455.zip |
CLEANUP: moved register.php to the include directory
new users are now also automatically logged in.
Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'register.php')
-rw-r--r-- | register.php | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/register.php b/register.php deleted file mode 100644 index 9f4cf0e..0000000 --- a/register.php +++ /dev/null @@ -1,100 +0,0 @@ -<?php -error_reporting(E_ALL); - -include_once("config.php"); -include_once("./include/output.php"); /* html output only */ -include_once("./include/db.php"); /* database only */ -include_once("./include/functions.php"); /* the rest */ - -config_check(); - -if(DB_open()<0) - { - output_header(); - echo "Database error, can't connect... Please wait a while and try again. ". - "If the problem doesn't go away feel free to contact $ADMIN_NAME at $ADMIN_EMAIL."; - output_footer(); - exit(); - } - - -/* done major error checking, output header of HTML page */ -output_header(); - -/* new user wants to register */ -if(myisset("Rfullname","Remail","Rpassword","Rtimezone") ) - { - global $HOST,$INDEX; - $ok=1; - if(DB_get_userid('name',$_REQUEST["Rfullname"])) - { - echo "please chose another name<br />"; - $ok=0; - } - if(DB_get_userid('email',$_REQUEST["Remail"])) - { - echo "this email address is already used ?!<br />"; - $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". - " <a href=\"".$HOST.$INDEX."\">homepage</a> 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 ;)<br /><br />"; - ?> - <form action="register.php" method="post"> - <fieldset> - <legend>Register</legend> - <table> - <tr> - <td><label for="Rfullname">Full name:</label></td> - <td><input type="text" id="Rfullname" name="Rfullname" size="20" maxsize="30" /> </td> - </tr><tr> - <td><label for="Remail">Email:</label></td> - <td><input type="text" id="Remail" name="Remail" size="20" maxsize="30" /></td> - </tr><tr> - <td><label for="Rpassword">Password(will be displayed in cleartext on the next page):</label></td> - <td><input type="password" id="Rpassword" name="Rpassword" size="20" maxsize="30" /></td> - </tr><tr> - <td><label for="Rtimezone">Timezone:</label></td> - <td> - <select id="Rtimezone" name="Rtimezone" size="1"> - <option value="Europe/London">Berlin</option> - <option value="Europe/Berlin">Berlin</option> - <option value="America/Vancouver">Berkeley</option> - <option value="Pacific/Auckland">Wellington</option> - </select> - (If your timezone is not listed, just select whatever you want and email the admin your correct time zone.) - </td> - </tr><tr> - <td colspan="2"> <input type="submit" value="register" /></td> - </table> - </fieldset> - </form> -<?php - } - -output_footer(); - -DB_close(); - -/* - *Local Variables: - *mode: php - *mode: hs-minor - *End: - */ -?> |