Subversion Repositories cheapmusic

Rev

Rev 31 | Rev 42 | 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>
26
<!DOCTYPE html>
27
<html lang="en-US">
28
<head>
29
	<!--head-->
30
	<?php include_once 'elements/head.php'; ?>
41 - 31
    <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback" async defer></script>
32
    <script src="<?php echo PUBLIC_URL; ?>js/recaptcha.js" async defer></script>
25 - 33
	<!--//head-->
34
</head>
35
<body>
31 - 36
<div class="container-fluid">
25 - 37
    <!--header-->
38
    <?php include_once 'elements/header.php'; ?>
39
    <!--//header-->
40
 
41
    <!--main-->
42
	<div class="main-content">
43
		<div class="wrapper-frm">
44
            <h2>Create a New Account</h2>
45
            <div class="top">
46
				<?php echo !empty($statusMsg)?'<p class="status-msg '.$statusMsgType.'">'.$statusMsg.'</p>':''; ?>
47
                <form action="<?php echo BASE_URL; ?>userAccount.php" method="post">
48
                    <div class="frm-input <?php echo !empty($fieldError['first_name'])?'error':''; ?>">
49
                        <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="">
50
                        <?php echo !empty($fieldError['first_name'])?'<p>'.$fieldError['first_name'].'</p>':''; ?>
51
                    </div>
52
                    <div class="frm-input <?php echo !empty($fieldError['last_name'])?'error':''; ?>">
31 - 53
                        <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 - 54
						<?php echo !empty($fieldError['last_name'])?'<p>'.$fieldError['last_name'].'</p>':''; ?>
55
                    </div>
56
                    <div class="frm-input">
26 - 57
                        <input type="text" name="zip" class="addr-in" placeholder="Zip" value="<?php echo !empty($signup_post_data['zip'])?$signup_post_data['zip']:''; ?>">
25 - 58
                    </div>
59
                    <div class="frm-input <?php echo !empty($fieldError['email'])?'error':''; ?>">
60
                        <input type="email" name="email" class="email-in" placeholder="Email" value="<?php echo !empty($signup_post_data['email'])?$signup_post_data['email']:''; ?>" required="">
61
						<?php echo !empty($fieldError['email'])?'<p>'.$fieldError['email'].'</p>':''; ?>
62
                    </div>
63
                    <div class="frm-input <?php echo !empty($fieldError['password'])?'error':''; ?>">
64
                        <input type="password" name="password" class="pass-in" placeholder="Password" required="">
65
						<?php echo !empty($fieldError['password'])?'<p>'.$fieldError['password'].'</p>':''; ?>
66
                    </div>
67
                    <div class="frm-input <?php echo !empty($fieldError['confirm_password'])?'error':''; ?>">
68
                        <input type="password" name="confirm_password" class="pass-in" placeholder="Confirm Password" required="">
69
						<?php echo !empty($fieldError['confirm_password'])?'<p>'.$fieldError['confirm_password'].'</p>':''; ?>
70
                    </div>
41 - 71
                    <div class="frm-input pb-3">
72
                        <input class="pr-2" type="checkbox" id="acceptTerms" name="acceptTerms" value="1" required="">
73
                        <label class="pl-2" for="checkbox">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>
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">
79
                        <input type="submit" name="signupSubmit" value="Sign Up">
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>