Linux multi-monitor fullscreen support
[ryzomcore.git] / web / public_php / setup / auth.php
blobb31646042cf86ebffc1ccf07cd4c26840939949f
1 <?php
3 error_reporting(E_ALL);
4 ini_set('display_errors', 'on');
6 class SystemExit extends Exception {}
7 try {
9 $pageTitle = "Authenticate";
10 include('header.php');
12 require_once('config.php');
15 <div style="margin-left: auto; margin-right: auto; max-width: 512px;">
17 <?php /*var_dump($_POST);*/ $showForm = true; if ($_POST) { ?>
19 <?php if ($_POST['nelSetupPassword'] == $NEL_SETUP_PASSWORD) { ?>
21 <?php
23 $_SESSION['nelSetupAuthenticated'] = 1;
25 printalert("success", "You are now authenticated");
26 $showForm = false;
29 <p>
30 <a class="btn btn-primary" href="index.php">Continue</a>
31 </p>
33 <?php } else {
35 printalert("danger", "Invalid password");
37 } ?>
39 <?php } if ($showForm) { ?>
41 <form class="form" role="form" method="POST" action="" enctype="application/x-www-form-urlencoded">
42 <div class="input-group">
43 <label for="nelSetupPassword" class="sr-only">NeL Setup Password</label>
44 <input type="password" class="form-control" id="nelSetupPassword" name="nelSetupPassword" placeholder="Password">
45 <span class="input-group-btn">
46 <input name="submit" type="submit" value="Authenticate" class="btn btn-primary">
47 </span>
48 </div>
49 </form>
51 <?php } ?>
53 </div>
55 <?php
57 include('footer.php');
60 catch (SystemExit $e) { /* do nothing */ }