Subversion Repositories cheapmusic

Rev

Rev 120 | Rev 124 | 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">
24
    	    <div>
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>' : ''; ?>
25 - 29
                <form 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>
49
            </div>
65 - 50
			<?php if (!empty($fbLoginURL) || !empty($gpLoginURL) || !empty($twLoginURL)) { ?>
42 - 51
                <div class="group">
52
                    <div class="item line"></div>
53
                    <div class="item text">or</div>
54
                    <div class="item line"></div>
55
                </div>
56
                <div class="social-icons">
107 - 57
                <h2>Login with your Social Account</h2>
42 - 58
                <div class="check pt-4 pb-2">
59
                    <p id="acceptPoliciesMsg"></p>
116 - 60
                    <input type="checkbox" id="acceptPolicies" name="acceptPolicies" value="1" required="" />
42 - 61
                    <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>
62
                </div>
25 - 63
                <ul class="bottom-sc-icons">
65 - 64
					<?php if (!empty($fbLoginURL)) { ?>
120 - 65
                    <li><a id="fbLoginBtn" href="<?php echo $fbLoginURL; ?>" class="facebook"><i></i><span>Facebook</span></a></li>
66
                    <script nonce="<?php echo base64_encode($_SESSION["nonce"]) ?>">
67
                    document.addEventListener("DOMContentLoaded", function() {
68
                       	document.getElementById("fbLoginBtn").addEventListener("click", function(e) {
69
                            if (!checkAcceptPolicies()) {e.preventDefault();}
70
                       	});
71
                    });
72
                    </script>
65 - 73
					<?php
74
    } ?>
75
					<?php if (!empty($gpLoginURL)) { ?>
120 - 76
                    <li><a id="gpLoginBtn" href="<?php echo $gpLoginURL; ?>" class="google"><i></i><span>Google</span></a></li>
77
                    <script nonce="<?php echo base64_encode($_SESSION["nonce"]) ?>">
78
                    document.addEventListener("DOMContentLoaded", function() {
79
                       	document.getElementById("gpLoginBtn").addEventListener("click", function(e) {
80
                            if (!checkAcceptPolicies()) {e.preventDefault();}
81
                       	});
82
                    });
83
                    </script>
65 - 84
					<?php
85
    } ?>
86
					<?php if (!empty($twLoginURL)) { ?>
120 - 87
                    <li><a id="twLoginBtn" href="<?php echo $twLoginURL; ?>" class="twitter"><i></i><span>Twitter</span></a></li>
88
                    <script nonce="<?php echo base64_encode($_SESSION["nonce"]) ?>">
89
                    document.addEventListener("DOMContentLoaded", function() {
90
                       	document.getElementById("twLoginBtn").addEventListener("click", function(e) {
91
                            if (!checkAcceptPolicies()) {e.preventDefault();}
92
                       	});
93
                    });
94
                    </script>
65 - 95
					<?php
96
    } ?>
25 - 97
                </ul>
57 - 98
                <div class="clearfix"> </div>
25 - 99
            </div>
65 - 100
			<?php
101
} ?>
25 - 102
            <div class="bottom">
103
                <p>Don't Have an Account? <a href="<?php echo BASE_URL; ?>registration.php">Register Now</a></p>
104
            </div>
57 - 105
        </div>
25 - 106
	</div>
107
	<!--//main-->
29 - 108
 
25 - 109
	<!--footer-->
65 - 110
	<?php include_once ('elements/footer.php'); ?>
25 - 111
	<!--//footer-->
112
</div>
113
</body>
31 - 114
</html>
115
<?php MySessionHandler::commit(session_id()); ?>