Subversion Repositories cheapmusic

Rev

Rev 43 | Rev 65 | 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">
57 - 42
          <div class="wrapper-frm bg-light text-dark border shadow text-center">
43
    	    <div>
44
               <h2>Create a New Account</h2>
45
            </div>
25 - 46
            <div class="top">
47
				<?php echo !empty($statusMsg)?'<p class="status-msg '.$statusMsgType.'">'.$statusMsg.'</p>':''; ?>
48
                <form action="<?php echo BASE_URL; ?>userAccount.php" method="post">
49
                    <div class="frm-input <?php echo !empty($fieldError['first_name'])?'error':''; ?>">
50
                        <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="">
51
                        <?php echo !empty($fieldError['first_name'])?'<p>'.$fieldError['first_name'].'</p>':''; ?>
52
                    </div>
53
                    <div class="frm-input <?php echo !empty($fieldError['last_name'])?'error':''; ?>">
31 - 54
                        <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 - 55
						<?php echo !empty($fieldError['last_name'])?'<p>'.$fieldError['last_name'].'</p>':''; ?>
56
                    </div>
57
                    <div class="frm-input">
26 - 58
                        <input type="text" name="zip" class="addr-in" placeholder="Zip" value="<?php echo !empty($signup_post_data['zip'])?$signup_post_data['zip']:''; ?>">
25 - 59
                    </div>
60
                    <div class="frm-input <?php echo !empty($fieldError['email'])?'error':''; ?>">
61
                        <input type="email" name="email" class="email-in" placeholder="Email" value="<?php echo !empty($signup_post_data['email'])?$signup_post_data['email']:''; ?>" required="">
62
						<?php echo !empty($fieldError['email'])?'<p>'.$fieldError['email'].'</p>':''; ?>
63
                    </div>
64
                    <div class="frm-input <?php echo !empty($fieldError['password'])?'error':''; ?>">
65
                        <input type="password" name="password" class="pass-in" placeholder="Password" required="">
66
						<?php echo !empty($fieldError['password'])?'<p>'.$fieldError['password'].'</p>':''; ?>
67
                    </div>
68
                    <div class="frm-input <?php echo !empty($fieldError['confirm_password'])?'error':''; ?>">
69
                        <input type="password" name="confirm_password" class="pass-in" placeholder="Confirm Password" required="">
70
						<?php echo !empty($fieldError['confirm_password'])?'<p>'.$fieldError['confirm_password'].'</p>':''; ?>
71
                    </div>
42 - 72
                    <div class="check pb-3 pt-2">
73
                        <p id="acceptPoliciesMsg"></p>
74
                        <input type="checkbox" id="acceptPolicies" name="acceptPolicies" value="1" required="">
75
                        <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 - 76
                    </div>
77
                    <div class="pb-3">
78
                        <div class="g-recaptcha" data-sitekey="<?php echo GR_SITE_KEY; ?>" data-badge="inline" data-size="invisible" data-callback="setResponse"></div>
79
                    </div>
25 - 80
                    <div class="frm-btn">
57 - 81
                        <button class="btn btn-success" type="submit" name="signupSubmit" value="Sign Up" onclick="return checkAcceptPolicies();">Sign Up</button>
25 - 82
                    </div>
83
                </form>
84
            </div>
85
            <div class="bottom">
30 - 86
                <p>Already Have an Account? <a href="<?php echo BASE_URL; ?>index.php">Login</a></p>
25 - 87
            </div>
57 - 88
          </div>
25 - 89
	</div>
90
	<!--//main-->
91
 
92
	<!--footer-->
93
	<?php include_once 'elements/footer.php'; ?>
94
	<!--//footer-->
95
</div>
96
</body>
26 - 97
</html>