Subversion Repositories cheapmusic

Rev

Rev 42 | Rev 57 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
25 - 1
<?php
31 - 2
// Include Session Handling
3
require_once('includes/session.php');
4
 
25 - 5
// Include config & login validate file
6
require_once 'includes/validateUser.php';
7
 
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']);
14
}
15
 
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']);
22
}
23
?>
24
<!DOCTYPE html>
25
<html lang="en-US">
26
<head>
27
	<!--head-->
28
	<?php include_once 'elements/head.php'; ?>
43 - 29
    <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback" nonce="QWJDZEVmR2hJaktsCg==" async defer></script>
41 - 30
    <script src="<?php echo PUBLIC_URL; ?>js/recaptcha.js" async defer></script>
42 - 31
    <script src="<?php echo PUBLIC_URL; ?>js/policies.js" async defer></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-->
39
 
40
    <!--main-->
41
	<div class="main-content">
42
		<div class="wrapper-frm">
43
            <h2>Create a New Account</h2>
44
            <div class="top">
45
				<?php echo !empty($statusMsg)?'<p class="status-msg '.$statusMsgType.'">'.$statusMsg.'</p>':''; ?>
46
                <form action="<?php echo BASE_URL; ?>userAccount.php" method="post">
47
                    <div class="frm-input <?php echo !empty($fieldError['first_name'])?'error':''; ?>">
48
                        <input type="text" name="first_name" class="user-in" placeholder="First name" value="<?php echo !empty($signup_post_data['first_name'])?$signup_post_data['first_name']:''; ?>" required="">
49
                        <?php echo !empty($fieldError['first_name'])?'<p>'.$fieldError['first_name'].'</p>':''; ?>
50
                    </div>
51
                    <div class="frm-input <?php echo !empty($fieldError['last_name'])?'error':''; ?>">
31 - 52
                        <input type="text" name="last_name" class="user-in" placeholder="Last name" value="<?php echo !empty($signup_post_data['last_name'])?$signup_post_data['last_name']:''; ?>">
25 - 53
						<?php echo !empty($fieldError['last_name'])?'<p>'.$fieldError['last_name'].'</p>':''; ?>
54
                    </div>
55
                    <div class="frm-input">
26 - 56
                        <input type="text" name="zip" class="addr-in" placeholder="Zip" value="<?php echo !empty($signup_post_data['zip'])?$signup_post_data['zip']:''; ?>">
25 - 57
                    </div>
58
                    <div class="frm-input <?php echo !empty($fieldError['email'])?'error':''; ?>">
59
                        <input type="email" name="email" class="email-in" placeholder="Email" value="<?php echo !empty($signup_post_data['email'])?$signup_post_data['email']:''; ?>" required="">
60
						<?php echo !empty($fieldError['email'])?'<p>'.$fieldError['email'].'</p>':''; ?>
61
                    </div>
62
                    <div class="frm-input <?php echo !empty($fieldError['password'])?'error':''; ?>">
63
                        <input type="password" name="password" class="pass-in" placeholder="Password" required="">
64
						<?php echo !empty($fieldError['password'])?'<p>'.$fieldError['password'].'</p>':''; ?>
65
                    </div>
66
                    <div class="frm-input <?php echo !empty($fieldError['confirm_password'])?'error':''; ?>">
67
                        <input type="password" name="confirm_password" class="pass-in" placeholder="Confirm Password" required="">
68
						<?php echo !empty($fieldError['confirm_password'])?'<p>'.$fieldError['confirm_password'].'</p>':''; ?>
69
                    </div>
42 - 70
                    <div class="check pb-3 pt-2">
71
                        <p id="acceptPoliciesMsg"></p>
72
                        <input type="checkbox" id="acceptPolicies" name="acceptPolicies" value="1" required="">
73
                        <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 - 74
                    </div>
75
                    <div class="pb-3">
76
                        <div class="g-recaptcha" data-sitekey="<?php echo GR_SITE_KEY; ?>" data-badge="inline" data-size="invisible" data-callback="setResponse"></div>
77
                    </div>
25 - 78
                    <div class="frm-btn">
42 - 79
                        <input type="submit" name="signupSubmit" value="Sign Up" onclick="return checkAcceptPolicies();">
25 - 80
                    </div>
81
                </form>
82
            </div>
83
            <div class="bottom">
30 - 84
                <p>Already Have an Account? <a href="<?php echo BASE_URL; ?>index.php">Login</a></p>
25 - 85
            </div>
86
		</div>
87
	</div>
88
	<!--//main-->
89
 
90
	<!--footer-->
91
	<?php include_once 'elements/footer.php'; ?>
92
	<!--//footer-->
93
</div>
94
</body>
26 - 95
</html>