Exemplo n.º 1
0
    //check if the user is coming from signup or sign-in
    if (isset($_POST['signupsubmitbutton'])) {
        /* 
         * this is a signup request, because user clicked the signup submit button
         * echo "singup";
         */
        handleSignup();
    } else {
        if (isset($_POST['signinbutton'])) {
            //this is a signin request.
            //handle Signin();
            //echo "sigin <br/>";
            SignIn();
        } else {
            if (isset($_POST['logout'])) {
                SignOut();
            } else {
                // Do not let the user access this script directly like by typing  www.ourPOS.com/email.php
                // he should not see our scripts.
                // So, whenever this script is called, we check if user submitted the form or now, if he did not submit, then we redirect the user to login page or signup page
                echo "error : not sign in or sign up";
                //header('Location: sign up.php');
            }
        }
    }
} else {
    // Do not let the user access this script directly like by typing  www.ourPOS.com/email.php
    // he should not see our scripts.
    // So, whenever this script is called, we check if user submitted the form or now, if he did not submit, then we redirect the user to login page or signup page
    echo "error : not sign in or sign up, not post ";
    //header('Location: sign up.php');
Exemplo n.º 2
0
function PHPOperation($Action)
{
    switch ($Action) {
        case "UnitTest":
            UnitTest($Action);
            break;
        case "AddAccount":
            AddAccount($Action);
            break;
        case "SignIn":
            SignIn($Action);
            break;
        case "SignInPet":
            SignInPet($Action);
            break;
        case "SignOut":
            SignOut($Action);
            break;
        case "FetchErrors":
            FetchErrors($Action);
            break;
        case "AddError":
            AddError($Action);
            break;
        case "FetchActivities":
            FetchActivities($Action);
            break;
        case "FetchSignInPet":
            FetchSignInPet($Action);
            break;
        case "FetchBreeds":
            FetchBreeds($Action);
            break;
        case "ValidateSession":
            ValidateSession($Action);
            break;
        case "ResetPassword":
            ResetPassword($Action);
            break;
        case "UpdatePassword":
            UpdatePassword($Action);
            break;
        case "AddPet":
            AddPet($Action);
            break;
        case "AddBreed":
            AddBreed($Action);
            break;
        case "FetchUsers":
            FetchUsers($Action);
            break;
        case "FetchUserPets":
            FetchUserPets($Action);
            break;
        case "FetchUserStatus":
            FetchUserStatus($Action);
            break;
        case "FetchPetStatus":
            FetchPetStatus($Action);
            break;
        case "FetchPet":
            FetchPet($Action);
            break;
        case "UpdateAccountStatus":
            UpdateAccountStatus($Action);
            break;
        case "UpdatePetStatus":
            UpdatePetStatus($Action);
            break;
        case "UpdatePetName":
            UpdatePetName($Action);
            break;
        case "UpdatePetBreed":
            UpdatePetBreed($Action);
            break;
        case "UpdatePetGender":
            UpdatePetGender($Action);
            break;
        case "UpdateBreed":
            UpdateBreed($Action);
            break;
        case "FetchPetNameCount":
            FetchPetNameCount($Action);
            break;
        case "FetchUserEmail":
            FetchUserEmail($Action);
            break;
    }
}