Skip to content

Instantly share code, notes, and snippets.

@elmarputz
Created December 2, 2016 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elmarputz/3d450f195cf2c2c1a2c5dbbe7c2e0aca to your computer and use it in GitHub Desktop.
Save elmarputz/3d450f195cf2c2c1a2c5dbbe7c2e0aca to your computer and use it in GitHub Desktop.
login.php
<?php
if (AuthenticationManager::isAuthenticated()) {
Util::redirect("index.php");
}
$userName = isset($_REQUEST['userName']) ? $_REQUEST['userName'] : null;
?>
<?php
require_once('views/partials/header.php');
?>
<div class="page-header">
<h2>Login</h2>
</div>
<div class="panel panel-default">
<div class="panel-heading">
Please fill out the form below:
</div>
<div class="panel-body">
<form class="form-horizontal" method="post" action="<?php echo Util::action('login', array('view' => $view)); ?>">
<div class="form-group">
<label for="inputName" class="col-sm-2 control-label">User name:</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="userName" name="userName" placeholder="try 'scm4'" value="<?php echo htmlentities($userName); ?>">
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="col-sm-2 control-label">Password</label>
<div class="col-sm-6">
<input type="password" class="form-control" id="inputPassword" name="password" placeholder="try 'scm4'">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-6">
<button type="submit" class="btn btn-default">Login</button>
</div>
</div>
</form>
</div>
</div>
<?php
require_once('views/partials/footer.php');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment