Example #1
0
        if ($ctrlAccount->getIsLoggedIn()) {
            Header("Location: index.php");
            die;
        }
        if ($_x == '1' && $ctrlAccount->doRegister($_POST)) {
            $ctrlAccount->displayRegisterDone($_POST);
        } else {
            $ctrlAccount->displayRegister($_POST);
        }
        break;
        // Logout
    // Logout
    case 'logout':
        session_destroy();
        Header("Location: index.php");
        die;
        break;
        // Settings/default
    // Settings/default
    case 'settings':
    default:
        if (!$ctrlAccount->getIsLoggedIn()) {
            Header("Location: index.php?w=account&s=login");
            die;
        }
        if ($_x == '1') {
            $ctrlAccount->saveAccountSettings($_POST);
        }
        $ctrlAccount->displayAccountSettings();
        break;
}