25 |
- |
1 |
<?php
|
31 |
- |
2 |
// Include Session Handling
|
65 |
- |
3 |
require_once ('includes/session.php');
|
31 |
- |
4 |
|
25 |
- |
5 |
// Include config & login validate file
|
|
|
6 |
require_once 'includes/validateUser.php';
|
|
|
7 |
|
65 |
- |
8 |
if (isset($_SESSION['signup_post_data'])) {
|
|
|
9 |
// Get not submitted form data from session
|
|
|
10 |
$signup_post_data = $_SESSION['signup_post_data'];
|
|
|
11 |
|
|
|
12 |
// Remove post data from session
|
|
|
13 |
unset($_SESSION['signup_post_data']);
|
25 |
- |
14 |
}
|
|
|
15 |
|
65 |
- |
16 |
if (isset($_SESSION['sessData']['field_error'])) {
|
|
|
17 |
// Get form field error from session
|
|
|
18 |
$fieldError = $_SESSION['sessData']['field_error'];
|
|
|
19 |
|
|
|
20 |
// Remove field error data from session
|
|
|
21 |
unset($_SESSION['field_error']['sessData']);
|
25 |
- |
22 |
}
|
|
|
23 |
?>
|
|
|
24 |
<!DOCTYPE html>
|
|
|
25 |
<html lang="en-US">
|
|
|
26 |
<head>
|
|
|
27 |
<!--head-->
|
|
|
28 |
<?php include_once 'elements/head.php'; ?>
|
120 |
- |
29 |
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback" nonce="<?php echo base64_encode($_SESSION["nonce"]); ?>" async defer></script>
|
|
|
30 |
<script src="<?php echo PUBLIC_URL . "js/recaptcha.js?" . filemtime("assets/js/recaptcha.js"); ?>" async defer integrity="sha384-<?php echo base64_encode(hash_file("sha384", "assets/js/recaptcha.js", true)); ?>" crossorigin="anonymous"></script>
|
|
|
31 |
<script src="<?php echo PUBLIC_URL . "js/policies.js?" . filemtime("assets/js/policies.js"); ?>" async defer integrity="sha384-<?php echo base64_encode(hash_file("sha384", "assets/js/policies.js", true)); ?>" crossorigin="anonymous"></script>
|
25 |
- |
32 |
<!--//head-->
|
|
|
33 |
</head>
|
|
|
34 |
<body>
|
43 |
- |
35 |
<div class="main">
|
25 |
- |
36 |
<!--header-->
|
|
|
37 |
<?php include_once 'elements/header.php'; ?>
|
|
|
38 |
<!--//header-->
|
107 |
- |
39 |
|
25 |
- |
40 |
<!--main-->
|
|
|
41 |
<div class="main-content">
|
57 |
- |
42 |
<div class="wrapper-frm bg-light text-dark border shadow text-center">
|
124 |
- |
43 |
<div class="header">
|
107 |
- |
44 |
<h1>Create a New Account</h1>
|
57 |
- |
45 |
</div>
|
25 |
- |
46 |
<div class="top">
|
65 |
- |
47 |
<?php echo !empty($statusMsg) ? '<p class="status-msg ' . $statusMsgType . '">' . $statusMsg . '</p>' : ''; ?>
|
25 |
- |
48 |
<form action="<?php echo BASE_URL; ?>userAccount.php" method="post">
|
122 |
- |
49 |
<input type="hidden" name="nonce" value="<?php if (isset($_SESSION['nonce'])) echo $_SESSION['nonce']; ?>" />
|
65 |
- |
50 |
<div class="frm-input <?php echo !empty($fieldError['first_name']) ? 'error' : ''; ?>">
|
116 |
- |
51 |
<input type="text" name="first_name" class="user-in" placeholder="First name" aria-label="First name" value="<?php echo !empty($signup_post_data['first_name']) ? $signup_post_data['first_name'] : ''; ?>" required="" />
|
65 |
- |
52 |
<?php echo !empty($fieldError['first_name']) ? '<p>' . $fieldError['first_name'] . '</p>' : ''; ?>
|
25 |
- |
53 |
</div>
|
65 |
- |
54 |
<div class="frm-input <?php echo !empty($fieldError['last_name']) ? 'error' : ''; ?>">
|
116 |
- |
55 |
<input type="text" name="last_name" class="user-in" placeholder="Last name" aria-label="Last name" value="<?php echo !empty($signup_post_data['last_name']) ? $signup_post_data['last_name'] : ''; ?>" />
|
65 |
- |
56 |
<?php echo !empty($fieldError['last_name']) ? '<p>' . $fieldError['last_name'] . '</p>' : ''; ?>
|
25 |
- |
57 |
</div>
|
|
|
58 |
<div class="frm-input">
|
116 |
- |
59 |
<input type="text" name="zip" class="addr-in" placeholder="Zip" aria-label="Zip Code" value="<?php echo !empty($signup_post_data['zip']) ? $signup_post_data['zip'] : ''; ?>" />
|
25 |
- |
60 |
</div>
|
65 |
- |
61 |
<div class="frm-input <?php echo !empty($fieldError['email']) ? 'error' : ''; ?>">
|
116 |
- |
62 |
<input type="email" name="email" class="email-in" placeholder="Email" aria-label="Email Address" value="<?php echo !empty($signup_post_data['email']) ? $signup_post_data['email'] : ''; ?>" required="" autocomplete="username" />
|
65 |
- |
63 |
<?php echo !empty($fieldError['email']) ? '<p>' . $fieldError['email'] . '</p>' : ''; ?>
|
25 |
- |
64 |
</div>
|
65 |
- |
65 |
<div class="frm-input <?php echo !empty($fieldError['password']) ? 'error' : ''; ?>">
|
116 |
- |
66 |
<input type="password" name="password" class="pass-in" placeholder="Password" aria-label="Password" required="" autocomplete="new-password" />
|
65 |
- |
67 |
<?php echo !empty($fieldError['password']) ? '<p>' . $fieldError['password'] . '</p>' : ''; ?>
|
25 |
- |
68 |
</div>
|
65 |
- |
69 |
<div class="frm-input <?php echo !empty($fieldError['confirm_password']) ? 'error' : ''; ?>">
|
116 |
- |
70 |
<input type="password" name="confirm_password" class="pass-in" placeholder="Confirm Password" aria-label="Confirm Password" required="" autocomplete="new-password" />
|
65 |
- |
71 |
<?php echo !empty($fieldError['confirm_password']) ? '<p>' . $fieldError['confirm_password'] . '</p>' : ''; ?>
|
25 |
- |
72 |
</div>
|
42 |
- |
73 |
<div class="check pb-3 pt-2">
|
|
|
74 |
<p id="acceptPoliciesMsg"></p>
|
116 |
- |
75 |
<input type="checkbox" id="acceptPolicies" name="acceptPolicies" value="1" required="" />
|
42 |
- |
76 |
<label for="acceptPolicies"><span></span>I agree to the <a href="../terms.php" target="_blank">Terms of Service</a> and I accept the <a href="../privacy.php" target="_blank">Privacy Policy</a>.</label>
|
41 |
- |
77 |
</div>
|
|
|
78 |
<div class="pb-3">
|
|
|
79 |
<div class="g-recaptcha" data-sitekey="<?php echo GR_SITE_KEY; ?>" data-badge="inline" data-size="invisible" data-callback="setResponse"></div>
|
|
|
80 |
</div>
|
25 |
- |
81 |
<div class="frm-btn">
|
120 |
- |
82 |
<button id="signupBtn" class="btn btn-success" type="submit" name="signupSubmit" value="Sign Up">Sign Up</button>
|
|
|
83 |
<script nonce="<?php echo base64_encode($_SESSION["nonce"]) ?>">
|
134 |
- |
84 |
document.addEventListener("DOMContentLoaded", function() {
|
|
|
85 |
document.getElementById("signupBtn").addEventListener("click", function() {
|
|
|
86 |
if(window.google_tag_manager && window.ga && ga.create) {
|
|
|
87 |
window.dataLayer.push({"event": "sign_up", "method": "Website", "eventTimeout": 2000, "eventCallback": function() { return checkAcceptPolicies(); }});
|
|
|
88 |
} else {
|
|
|
89 |
return checkAcceptPolicies();
|
|
|
90 |
}
|
|
|
91 |
});
|
|
|
92 |
});
|
120 |
- |
93 |
</script>
|
25 |
- |
94 |
</div>
|
|
|
95 |
</form>
|
|
|
96 |
</div>
|
|
|
97 |
<div class="bottom">
|
30 |
- |
98 |
<p>Already Have an Account? <a href="<?php echo BASE_URL; ?>index.php">Login</a></p>
|
25 |
- |
99 |
</div>
|
57 |
- |
100 |
</div>
|
25 |
- |
101 |
</div>
|
|
|
102 |
<!--//main-->
|
107 |
- |
103 |
|
25 |
- |
104 |
<!--footer-->
|
|
|
105 |
<?php include_once 'elements/footer.php'; ?>
|
|
|
106 |
<!--//footer-->
|
|
|
107 |
</div>
|
|
|
108 |
</body>
|
26 |
- |
109 |
</html>
|