BUGFIX: couldn't unclick no90 call
[e-DoKo.git] / register.php
index 827e77ea3c0b7524db2190f64b1e1288afe9a9f0..1c482886cd51847b65b38825d5b39abe9f3da969 100644 (file)
@@ -24,13 +24,14 @@ output_header();
 /* new user wants to register */
 if(myisset("Rfullname","Remail","Rpassword","Rtimezone") )
   {
+    global $HOST,$INDEX;
     $ok=1;
-    if(DB_get_userid_by_name($_REQUEST["Rfullname"]))
+    if(DB_get_userid('name',$_REQUEST["Rfullname"]))
       {
        echo "please chose another name<br />";
        $ok=0;
       }
-    if(DB_get_userid_by_email($_REQUEST["Remail"]))
+    if(DB_get_userid('email',$_REQUEST["Remail"]))
       {
        echo "this email address is already used ?!<br />";
        $ok=0;
@@ -40,11 +41,11 @@ if(myisset("Rfullname","Remail","Rpassword","Rtimezone") )
        $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)"); 
+                      ",".DB_quote_smart($_REQUEST["Rtimezone"]).",NULL,NULL)"); 
        
        if($r)
          echo " Welcome to e-DoKo, you are now registered, please visit the".
-           " <a href=\"$host\">homepage</a> to continue.";
+           " <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.";
       }
@@ -71,9 +72,10 @@ if(myisset("Rfullname","Remail","Rpassword","Rtimezone") )
               <td><label for="Rtimezone">Timezone:</label></td>
                <td>
                  <select id="Rtimezone" name="Rtimezone" size="1">
-                     <option value="1">Berlin</option>
-                     <option value="-8">Berkeley</option>
-                     <option value="13">Wellington</option>
+                     <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>