-
Notifications
You must be signed in to change notification settings - Fork 4
/
connect.php
49 lines (45 loc) · 1.19 KB
/
connect.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
<?php
include("conf.php");
?>
<!doctype html>
<html>
<head>
<?php require_once("common-head.php"); ?>
<title>Plug n Play cluster</title>
</head>
<body>
<?php require_once("nav.php"); ?>
<div class="container">
<div class="row">
<?php
if($conf['auth'] == true) {
// auth is required as per configuration
?>
<div class="col-md-4"></div>
<div class="col-md-4 text-center">
<h2 style="font-weight:bold;">Worker Node login</h2><hr>
<p>Please enter the password to join the cluster.</p>
<form action="" method="post">
<?php
if(isset($_POST['pass'])) {
header("Location: login.php?pass=".$_POST['pass']);
exit();
}
?>
<input name="pass" type="password" required="required" placeholder="Enter password" class="form-control"><br>
<button type="submit" class="btn btn-primary">Authenticate</button>
</form>
</div>
<div class="col-md-4"></div>
<?php
} else {
// auth not required
header("Location: dashboard.php");
exit();
} // else block ends
?>
<div>
</div>
<?php require_once("footer.php"); ?>
</body>
</html>