Facebook login implemented

This commit is contained in:
Joey Lai
2017-01-31 16:12:22 +01:00
parent 08f668859c
commit 8e98001217
82 changed files with 11126 additions and 133 deletions

View File

@@ -0,0 +1,66 @@
<?php
try{
$fbUsername = str_replace(' ', '', test_input(($_POST["fbUsername"])));
checkInputChoice($fbUsername, "fbUsername");
} catch(usernameException $e){
$fbCorrect = false;
$fbUsernameErr = $e->getMessage();
}
try{
$fbPassword = str_replace(' ', '', test_input(($_POST["fbPassword"])));
checkInputChoice($fbPassword, "longerEight");
matchfbPassword();
} catch(passwordException $e){
$fbCorrect = false;
$fbPasswordErr = $e->getMessage();
} catch(fbConfirmPasswordException $e){
$fbCorrect = false;
$fbConfirmpasswordErr = $e->getMessage();
}
try{
$fbName = test_input(($_POST["fbName"]));
checkInputChoice($fbName, "lettersAndSpaces");
} catch(lettersAndSpacesException $e){
$fbCorrect = false;
}
try {
$fbSurname = test_input(($_POST["fbSurname"]));
checkInputChoice($fbSurname, "lettersAndSpaces");
}
catch(lettersAndSpacesException $e){
$fbCorrect = false;
}
try {
$fbDay_date = test_input(($_POST["fbDay_date"]));
$fbMonth_date = test_input(($_POST["fbMonth_date"]));
$fbYear_date = test_input(($_POST["fbYear_date"]));
$fbBday = $fbYear_date . "-" . $fbMonth_date . "-" . $fbDay_date;
checkInputChoice($fbBday, "bday");
} catch (bdayException $e) {
$fbBdayErr = $e->getMessage();
$fbCorrect = false;
}
try{
$fbEmail = test_input(($_POST["fbEmail"]));
checkInputChoice($fbEmail, "fbEmail");
} catch(emailException $e){
$fbCorrect = false;
$fbEmailErr = $e->getMessage();
}
try {
fbRegisterCheck($fbCorrect);
} catch(registerException $e){
echo "<script>
window.onload = function() {
$('#fbModal').show();
}
</script>";
$fbRegisterErr = $e->getMessage();
}