internetprogrammierung/segments/_header.php
Marcel Schwarz 359e30d7a4 made login synchronous
Wegen des async aufrufs des login php scripts konnte die session nicht richtig gesetzt werden, deshalb ist der login jetzt syncron. Die Registrierung ist weiterhin asyncron.
2018-06-17 18:24:56 +02:00

135 lines
5.5 KiB
PHP

<div>
<div id="carouselExampleSlidesOnly" class="carousel slide" data-ride="carousel">
<div class="carousel-inner" style="height: 100px;">
<div class="carousel-item active">
<img class="d-block h-100" src="img/header_pink.png" alt="First slide">
</div>
<div class="carousel-item">
<img class="d-block h-100" src="img/header_lime.png" alt="Second slide">
</div>
<div class="carousel-item">
<img class="d-block h-100" src="img/header_blue.png" alt="Third slide">
</div>
</div>
</div>
</div>
<!--Navbar-->
<nav class="navbar sticky-top navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">FriendsBook</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">SPACER</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">SPACER</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<div class="btn-group" role="group" aria-label="Basic example">
<!-- Button trigger modal Login -->
<button id="toggle-login" type="button" class="btn btn-secondary" data-toggle="modal" data-target="#login">
Login
</button>
<!-- Button trigger modal Register -->
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#register">
Register
</button>
</div>
</form>
</div>
</nav>
<!-- Modal login-->
<?php require("php/signin.php") ?>
<div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Login</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
Login into your FriendsBook Account!
<!--Login-->
<form id="login-form" action="index.php" method="post">
<div class="input-group input-group-sm mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-sm">Username</span>
</div>
<input type="text" class="form-control" name="loginName" aria-label="Small" aria-describedby="inputGroup-sizing-sm">
</div>
<div class="input-group input-group-sm mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-sm">Password</span>
</div>
<input type="password" class="form-control" name="loginPassword" aria-label="Small" aria-describedby="inputGroup-sizing-sm">
</div>
<div id="login-status">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="btnLogin" type="submit" class="btn btn-primary">Login</button>
</div>
</form>
</div>
</div>
</div>
<!-- Modal Register-->
<div class="modal fade" id="register" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Register</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
Join our Community now! #friends
<!--Register-->
<form id="create-form" action="index.php" method="post">
<div class="input-group input-group-sm mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-sm">Username</span>
</div>
<input type="text" class="form-control" name="registerName" aria-label="Small" aria-describedby="inputGroup-sizing-sm">
</div>
<div class="input-group input-group-sm mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-sm">Password</span>
</div>
<input type="password" class="form-control" name="registerPassword" aria-label="Small" aria-describedby="inputGroup-sizing-sm">
</div>
<div class="input-group input-group-sm mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-sm">EmailAdress</span>
</div>
<input type="text" class="form-control" name="registerMail" aria-label="Small" aria-describedby="inputGroup-sizing-sm">
</div>
╭∩╮(ಠ۝ಠ)╭∩╮
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="btnCreate" type="submit" class="btn btn-primary">Create Account</button>
</div>
</form>
</div>
</div>
</div>