-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.php
More file actions
129 lines (111 loc) · 6.07 KB
/
index.php
File metadata and controls
129 lines (111 loc) · 6.07 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<?php
session_start();
//Check if user is already logged in
if (isset($_SESSION['stagingLoggedIn']) || $_SESSION['stagingLoggedIn'] == true) {
header("Location: index.php");
}
if(!empty($_POST)){
$userUsername = $_POST["username"];
$userPassword = $_POST["password"];
$mysqli = new mysqli("NULLED_FOR_SECURITY", "NULLED_FOR_SECURITY", "NULLED_FOR_SECURITY", "NULLED_FOR_SECURITY");
// Check connection
if(mysqli_connect_errno()) {
echo "Connection Failed: " . mysqli_connect_errno();
exit();
}
/* create a prepared statement */
if ($stmt = $mysqli->prepare("SELECT `NULLED_FOR_SECURITY` FROM `NULLED_FOR_SECURITY` WHERE NULLED_FOR_SECURITY = ?")) {
/* Bind parameters: s - string, b - blob, i - int, etc */
$stmt -> bind_param("s", $userUsername);
/* Execute it */
$stmt -> execute();
/* Bind results */
$stmt -> bind_result($result);
/* Fetch the value */
$stmt -> fetch();
/* Close statement */
$stmt -> close();
echo $result;
}
if(password_verify($userPassword, $result)){
$_SESSION['stagingLoggedIn'] = true;
header("Location: index.php");
}else{
header("Location: staging.php");
}
$mysqli->close();
}
?>
<html lang="en">
<head>
<title>Ritual Software Staging Server</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->
<link rel="icon" type="image/png" href="staging/images/icons/favicon.ico"/>
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="staging/vendor/bootstrap/css/bootstrap.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="staging/fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="staging/fonts/Linearicons-Free-v1.0.0/icon-font.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="staging/vendor/animate/animate.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="staging/vendor/css-hamburgers/hamburgers.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="staging/vendor/animsition/css/animsition.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="staging/vendor/select2/select2.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/daterangepicker/daterangepicker.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="staging/css/util.css">
<link rel="stylesheet" type="text/css" href="staging/css/main.css">
<!--===============================================================================================-->
</head>
<body>
<div class="limiter">
<div class="container-login100" style="background-image: url('staging/images/bg-01.jpg');">
<div class="wrap-login100 p-t-30 p-b-50">
<span class="login100-form-title p-b-41">
Ritual Software
</span>
<form action="staging.php" autocomplete="off" class="login100-form validate-form p-b-33 p-t-5" method="post">
<div class="wrap-input100 validate-input" data-validate = "Enter username">
<input class="input100" type="text" id="username" name="username" placeholder="User name">
<span class="focus-input100" data-placeholder=""></span>
</div>
<div class="wrap-input100 validate-input" data-validate="Enter password">
<input class="input100" type="password" id="password" name="password" placeholder="Password">
<span class="focus-input100" data-placeholder=""></span>
</div>
<div class="container-login100-form-btn m-t-32">
<button type="submit" class="login100-form-btn">
Authenticate
</button>
</div>
</form>
</div>
</div>
</div>
<div id="dropDownSelect1"></div>
<!--===============================================================================================-->
<script src="staging/vendor/jquery/jquery-3.2.1.min.js"></script>
<!--===============================================================================================-->
<script src="staging/vendor/animsition/js/animsition.min.js"></script>
<!--===============================================================================================-->
<script src="staging/vendor/bootstrap/js/popper.js"></script>
<script src="staging/vendor/bootstrap/js/bootstrap.min.js"></script>
<!--===============================================================================================-->
<script src="staging/vendor/select2/select2.min.js"></script>
<!--===============================================================================================-->
<script src="staging/vendor/daterangepicker/moment.min.js"></script>
<script src="staging/vendor/daterangepicker/daterangepicker.js"></script>
<!--===============================================================================================-->
<script src="staging/vendor/countdowntime/countdowntime.js"></script>
<!--===============================================================================================-->
<script src="staging/js/main.js"></script>
</body>
</html>