2014-09-05 07:57:06 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
ini_set('display_errors', 'on');
|
|
|
|
|
|
|
|
class SystemExit extends Exception {}
|
|
|
|
try {
|
|
|
|
|
|
|
|
$pageTitle = "Authenticate";
|
|
|
|
include('header.php');
|
|
|
|
|
2014-09-05 09:21:21 +00:00
|
|
|
require_once('config.php');
|
|
|
|
|
2014-09-05 07:57:06 +00:00
|
|
|
?>
|
|
|
|
<div style="margin-left: auto; margin-right: auto; max-width: 512px;">
|
|
|
|
|
2014-09-05 09:21:21 +00:00
|
|
|
<?php /*var_dump($_POST);*/ $showForm = true; if ($_POST) { ?>
|
|
|
|
|
|
|
|
<?php if ($_POST['nelSetupPassword'] == $NEL_SETUP_PASSWORD) { ?>
|
2014-09-05 07:57:06 +00:00
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$_SESSION['nelSetupAuthenticated'] = 1;
|
|
|
|
|
|
|
|
printalert("success", "You are now authenticated");
|
2014-09-05 09:21:21 +00:00
|
|
|
$showForm = false;
|
2014-09-05 07:57:06 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
<p>
|
|
|
|
<a class="btn btn-primary" href="index.php">Continue</a>
|
|
|
|
</p>
|
|
|
|
|
2014-09-05 09:21:21 +00:00
|
|
|
<?php } else {
|
|
|
|
|
|
|
|
printalert("danger", "Invalid password");
|
|
|
|
|
|
|
|
} ?>
|
|
|
|
|
|
|
|
<?php } if ($showForm) { ?>
|
2014-09-05 07:57:06 +00:00
|
|
|
|
|
|
|
<form class="form" role="form" method="POST" action="" enctype="application/x-www-form-urlencoded">
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="nelSetupPassword" class="sr-only">NeL Setup Password</label>
|
|
|
|
<input type="password" class="form-control" id="nelSetupPassword" name="nelSetupPassword" placeholder="Password">
|
|
|
|
<span class="input-group-btn">
|
|
|
|
<input name="submit" type="submit" value="Authenticate" class="btn btn-primary">
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
include('footer.php');
|
|
|
|
|
|
|
|
}
|
|
|
|
catch (SystemExit $e) { /* do nothing */ }
|
|
|
|
|
|
|
|
?>
|