Subversion Repositories cheapmusic

Rev

Rev 124 | Rev 134 | 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
65 - 3
require_once ('includes/session.php');
25 - 4
// Include config & login validate file
65 - 5
require_once ('includes/validateUser.php');
25 - 6
?>
7
<!DOCTYPE html>
8
<html lang="en-US">
9
<head>
10
	<!--head-->
65 - 11
	<?php include_once ('elements/head.php'); ?>
120 - 12
    <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 - 13
	<!--//head-->
14
</head>
15
<body>
43 - 16
<div class="main">
25 - 17
    <!--header-->
65 - 18
    <?php include_once ('elements/header.php'); ?>
25 - 19
    <!--//header-->
29 - 20
 
25 - 21
    <!--main-->
22
	<div class="main-content">
57 - 23
        <div class="wrapper-frm bg-light text-dark border shadow text-center">
124 - 24
    	    <div class="header">
107 - 25
                <h1>Login To Your Account</h1>
57 - 26
            </div>
25 - 27
            <div class="top">
65 - 28
				<?php echo !empty($statusMsg) ? '<p class="status-msg ' . $statusMsgType . '">' . $statusMsg . '</p>' : ''; ?>
129 - 29
                <form id="loginForm" action="<?php echo BASE_URL; ?>userAccount.php" method="post">
122 - 30
					<input type="hidden" name="nonce" value="<?php if (isset($_SESSION['nonce'])) echo $_SESSION['nonce']; ?>" />
25 - 31
                    <div class="frm-input">
116 - 32
                        <input type="email" name="email" class="email-in" placeholder="Email" required="" aria-label="Email Address" autocomplete="username" />
25 - 33
                    </div>
34
                    <div class="frm-input">
116 - 35
                        <input type="password" name="password" class="pass-in" placeholder="Password" required="" aria-label="Password" autocomplete="current-password" />
25 - 36
                    </div>
37
                    <div class="frm-info">
38
                        <div class="check">
116 - 39
                            <input type="checkbox" id="remb" name="rememberMe" value="1" />
25 - 40
                            <label for="remb"><span></span>Remember me</label>
41
                        </div>
42
                        <a href="<?php echo BASE_URL; ?>forgotPassword.php">Forgot Password?</a>
57 - 43
                        <div class="clearfix"></div>
25 - 44
                    </div>
45
                    <div class="frm-btn">
57 - 46
                        <button class="btn btn-success" type="submit" name="loginSubmit" value="Sign In">Sign In</button>
25 - 47
                    </div>
48
                </form>
129 - 49
                <script nonce="<?php echo base64_encode($_SESSION["nonce"]) ?>">
50
                    document.addEventListener("DOMContentLoaded", function() {
51
                       	document.getElementById("loginForm").addEventListener("submit", function() {
52
                            window.dataLayer.push({'event' : 'login', 'method' :  'Website'});
53
                       	});
54
                    });
55
                </script>
25 - 56
            </div>
65 - 57
			<?php if (!empty($fbLoginURL) || !empty($gpLoginURL) || !empty($twLoginURL)) { ?>
42 - 58
                <div class="group">
59
                    <div class="item line"></div>
60
                    <div class="item text">or</div>
61
                    <div class="item line"></div>
62
                </div>
63
                <div class="social-icons">
107 - 64
                <h2>Login with your Social Account</h2>
42 - 65
                <div class="check pt-4 pb-2">
66
                    <p id="acceptPoliciesMsg"></p>
116 - 67
                    <input type="checkbox" id="acceptPolicies" name="acceptPolicies" value="1" required="" />
42 - 68
                    <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>
69
                </div>
25 - 70
                <ul class="bottom-sc-icons">
65 - 71
					<?php if (!empty($fbLoginURL)) { ?>
120 - 72
                    <li><a id="fbLoginBtn" href="<?php echo $fbLoginURL; ?>" class="facebook"><i></i><span>Facebook</span></a></li>
73
                    <script nonce="<?php echo base64_encode($_SESSION["nonce"]) ?>">
74
                    document.addEventListener("DOMContentLoaded", function() {
75
                       	document.getElementById("fbLoginBtn").addEventListener("click", function(e) {
129 - 76
                            if (!checkAcceptPolicies()) {e.preventDefault();} else { window.dataLayer.push({ "event" : "login", "method" :  "Facebook"}); }
120 - 77
                       	});
78
                    });
79
                    </script>
65 - 80
					<?php
81
    } ?>
82
					<?php if (!empty($gpLoginURL)) { ?>
120 - 83
                    <li><a id="gpLoginBtn" href="<?php echo $gpLoginURL; ?>" class="google"><i></i><span>Google</span></a></li>
84
                    <script nonce="<?php echo base64_encode($_SESSION["nonce"]) ?>">
85
                    document.addEventListener("DOMContentLoaded", function() {
86
                       	document.getElementById("gpLoginBtn").addEventListener("click", function(e) {
129 - 87
                            if (!checkAcceptPolicies()) {e.preventDefault();} else { window.dataLayer.push({ "event" : "login", "method" :  "Google"}); }
120 - 88
                       	});
89
                    });
90
                    </script>
65 - 91
					<?php
92
    } ?>
93
					<?php if (!empty($twLoginURL)) { ?>
120 - 94
                    <li><a id="twLoginBtn" href="<?php echo $twLoginURL; ?>" class="twitter"><i></i><span>Twitter</span></a></li>
95
                    <script nonce="<?php echo base64_encode($_SESSION["nonce"]) ?>">
96
                    document.addEventListener("DOMContentLoaded", function() {
97
                       	document.getElementById("twLoginBtn").addEventListener("click", function(e) {
129 - 98
                            if (!checkAcceptPolicies()) {e.preventDefault();} else { window.dataLayer.push({ "event" : "login", "method" :  "Twitter"}); }
120 - 99
                       	});
100
                    });
101
                    </script>
65 - 102
					<?php
103
    } ?>
25 - 104
                </ul>
57 - 105
                <div class="clearfix"> </div>
25 - 106
            </div>
65 - 107
			<?php
108
} ?>
25 - 109
            <div class="bottom">
110
                <p>Don't Have an Account? <a href="<?php echo BASE_URL; ?>registration.php">Register Now</a></p>
111
            </div>
57 - 112
        </div>
25 - 113
	</div>
114
	<!--//main-->
29 - 115
 
25 - 116
	<!--footer-->
65 - 117
	<?php include_once ('elements/footer.php'); ?>
25 - 118
	<!--//footer-->
119
</div>
120
</body>
31 - 121
</html>
122
<?php MySessionHandler::commit(session_id()); ?>