X-Git-Url: http://git.pjr.cc/?p=gwvp.git;a=blobdiff_plain;f=gwvplib%2Fgwvpauth.php;h=ad42b2b98b2c9c89470630d49e7fc2958b4ba32b;hp=f7e036d2d1bebeb732ecd70f5ba5def7ce9383b7;hb=d8838ab5dbcab38ab548ad7b74047bf507217063;hpb=6d9db0b0d2928d864c9e1541f255b640ec295d6f diff --git a/gwvplib/gwvpauth.php b/gwvplib/gwvpauth.php index f7e036d..ad42b2b 100644 --- a/gwvplib/gwvpauth.php +++ b/gwvplib/gwvpauth.php @@ -9,10 +9,15 @@ function gwvp_AuthCallMe() session_start(); if(isset($_REQUEST["q"])) { - $query = $_REQUEST["q"]; - if($query == "login") return "gwvp_AuthHandleLogin"; - if($query == "logout") return "gwvp_AuthHandleLogout"; - if($query == "register") return "gwvp_RegistrationCall"; + $query = explode("/", $_REQUEST["q"]); + if($query[0] == "login") return "gwvp_AuthHandleLogin"; + if($query[0] == "logout") return "gwvp_AuthHandleLogout"; + if($query[0] == "register") { + if(isset($query[1])) { + return "qwvp_attemptRegistration"; + } + return "gwvp_RegistrationCall"; + } } $login = gwvp_isLoggedIn(); @@ -134,13 +139,24 @@ function gwvp_AuthHandleLogin() function gwvp_RegistrationPageBody() { + global $BASE_URL; + + // TODO: registration page needs to be prettier - mostly the image for the captcha + ?> -
+ + @@ -152,6 +168,8 @@ function gwvp_RegistrationPageBody() + + @@ -160,6 +178,24 @@ function gwvp_RegistrationPageBody() check($_POST['captcha_code']) == false) { + // the code was incorrect + // you should handle the error so that the form processor doesn't continue + + // or you can use the following code if there is no validation or you do not know how + echo "The security code entered was incorrect.

"; + echo "Please go back and try again."; + } else { + echo "code was right"; + } + + } +} + function gwvp_checkBasicAuthLogin() { $user = false;
Name Your Full Name + + CAPTCHA Image
+ + [ Different Image ] + +
Email The Name Used to Refer to you on the site