-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
75 lines (70 loc) · 2.45 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<?php
if (isset($_GET['error'])) {
$error = $_GET['error'];
}else{
$error = 0;
}
?>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login - UMT | SOCIAL</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="style.css">
</head>
<body onload="check()">
<img src="assets/login_logo2.png" id="loginlogo" alt="">
<div class="bg" id="bg">
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="loginbox ">
<div class="text-center">
<h3 id="heading">Welcome Back!</h3>
<span id="uppertext">We are so happy to see you again!</span>
</div>
<form class="" action="script_login.php" method="post">
<input type="email" placeholder="Email" name="email" autocomplete="off" value="" required><br>
<input type="password" name="password" value="" placeholder="Password" required>
<div class="">
<input type="submit" id="btn" name="" value="Login" class="">
<span style="color: rgb(114, 137, 218);" id=" ">I am an Admin</span> <input type="checkbox" name="admincheck" value="admin">
</div>
</form>
<span id="linktext">
Need an account? <a href="signup.html">Register</a>
</span>
<br>
<span id="msg" class="text-danger"> </span>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function check(){
var msg = <?php echo $error; ?>;
if (msg == '1') {
document.getElementById('msg').innerHTML = "Invalid Email or Password";
}
if (msg == '2') {
document.getElementById('msg').innerHTML = "You are not logged in!";
}
if (msg == '3') {
document.getElementById('msg').innerHTML = "You have been banned from UMT | SOCIAL";
}
randomize();
}
function randomize(){
var x = Math.floor((Math.random() * 10) + 1);
if (x > 5) {
document.getElementById('bg').style.backgroundImage= "url('assets/bg2.jpg')"
}else{
document.getElementById('bg').style.backgroundImage= "url('assets/bg3.png')"
}
}
</script>
</body>
</html>