2 error_reporting(E_ALL);
4 include_once("config.php");
5 include_once("output.php"); /* html output only */
6 include_once("db.php"); /* database only */
7 include_once("functions.php"); /* the rest */
14 echo "Database error, can't connect... Please wait a while and try again. ".
15 "If the problem doesn't go away feel free to contact $ADMIN_NAME at $ADMIN_EMAIL.";
21 /* done major error checking, output header of HTML page */
24 /* new user wants to register */
25 if(myisset("Rfullname","Remail","Rpassword","Rtimezone") )
28 if(DB_get_userid_by_name($_REQUEST["Rfullname"]))
30 echo "please chose another name<br />";
33 if(DB_get_userid_by_email($_REQUEST["Remail"]))
35 echo "this email address is already used ?!<br />";
40 $r=mysql_query("INSERT INTO User VALUES(NULL,".DB_quote_smart($_REQUEST["Rfullname"]).
41 ",".DB_quote_smart($_REQUEST["Remail"]).
42 ",".DB_quote_smart(md5($_REQUEST["Rpassword"])).
43 ",".DB_quote_smart($_REQUEST["Rtimezone"]).",NULL)");
46 echo " Welcome to e-DoKo, you are now registered, please visit the".
47 " <a href=\"$host\">homepage</a> to continue.";
49 echo " something went wrong, couldn't add you to the database, please contact $ADMIN_NAME at $ADMIN_EMAIL.";
52 /* page for registration */
55 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 />";
57 <form action="register.php" method="post">
59 <legend>Register</legend>
62 <td><label for="Rfullname">Full name:</label></td>
63 <td><input type="text" id="Rfullname" name="Rfullname" size="20" maxsize="30" /> </td>
65 <td><label for="Remail">Email:</label></td>
66 <td><input type="text" id="Remail" name="Remail" size="20" maxsize="30" /></td>
68 <td><label for="Rpassword">Password(will be displayed in cleartext on the next page):</label></td>
69 <td><input type="password" id="Rpassword" name="Rpassword" size="20" maxsize="30" /></td>
71 <td><label for="Rtimezone">Timezone:</label></td>
73 <select id="Rtimezone" name="Rtimezone" size="1">
74 <option value="1">Berlin</option>
75 <option value="-8">Berkeley</option>
76 <option value="13">Wellington</option>
78 (If your timezone is not listed, just select whatever you want and email the admin your correct time zone.)
81 <td colspan="2"> <input type="submit" value="register" /></td>