30 lines
823 B
Plaintext
30 lines
823 B
Plaintext
@page
|
|
@using Microsoft.AspNetCore.Http
|
|
@model LoginModel
|
|
|
|
@{
|
|
ViewData["Title"] = "Login";
|
|
if (HttpContext.Session.GetString("authorized") == "true") {
|
|
if (Request.Query.ContainsKey("redir")) {
|
|
Response.Redirect(Request.Query["redir"]);
|
|
}
|
|
else {
|
|
Response.Redirect("/");
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
|
|
<h3>@ViewData["Title"]</h3>
|
|
|
|
<form method="POST">
|
|
<div class="form-group">
|
|
<label for="InputUser">Username</label>
|
|
<input type="text" class="form-control" id="InputUser" name="user">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="InputPassword">Password</label>
|
|
<input type="password" class="form-control" id="InputPassword" name="pass">
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Submit</button>
|
|
</form> |