IMPLEMENT: single index php shema; ADD: _login.php, _register.php, _headerSession.php, _home.php, _myFriendsBook.php, CHANGE: entryForm.php
This commit is contained in:
parent
fdd57cd033
commit
7312df615d
35
index.php
35
index.php
@ -20,6 +20,37 @@
|
|||||||
<body>
|
<body>
|
||||||
<!-- Include the header-->
|
<!-- Include the header-->
|
||||||
<?php include('segments/_header.php'); ?>
|
<?php include('segments/_header.php'); ?>
|
||||||
|
<?php #include('segments/_indexTestLoginVals.php'); ?><!-- For forms testing -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$page = '_404.html';
|
||||||
|
$p = '';
|
||||||
|
if(isset($_GET['page'])){$p = $_GET['page'];}
|
||||||
|
|
||||||
|
if($p == '' || $p == 'home'){$page = '_home.html';}
|
||||||
|
if($p == 'newEntry'){$page = '_entryForm.php';}
|
||||||
|
if($p == 'myFriendsBook'){$page = '_myFriendsBook.html';}
|
||||||
|
if($p == 'login'){$page = '_login.php';}
|
||||||
|
if($p == 'register'){$page = '_register.php';}
|
||||||
|
|
||||||
|
require_once('segments/'.$page)
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<button id="btnCreateTan" type="button" class="btn btn-info">Erstelle Tan</button>
|
<button id="btnCreateTan" type="button" class="btn btn-info">Erstelle Tan</button>
|
||||||
@ -29,10 +60,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Zum testen der Daten die ueber die Modals reinkommen -->
|
<!-- Zum testen der Daten die ueber die Modals reinkommen -->
|
||||||
<!-- <?php include('segments/_indexTestLoginVals.php'); ?> -->
|
|
||||||
|
|
||||||
<!-- Include the entryForm-->
|
|
||||||
<?php include('segments/_entryForm.php'); ?>
|
|
||||||
|
|
||||||
<!-- Include the footer-->
|
<!-- Include the footer-->
|
||||||
<?php include('segments/_footer.html'); ?>
|
<?php include('segments/_footer.html'); ?>
|
||||||
|
1
segments/_404.html
Normal file
1
segments/_404.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<h1>#ERROR: 404 site not found</h1>
|
@ -39,12 +39,17 @@ function consumeTan($tanID) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
<p></p>
|
||||||
<!-- Container fuer entry form-->
|
<!-- Container fuer entry form-->
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
<div class="alert alert-dark" role="alert">
|
||||||
|
<h4>Write a new entry for yor friend!</h4>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<form id="entry-form" action="index.php" method="post">
|
<form id="entry-form" action="index.php" method="post">
|
||||||
<!-- Vorname-->
|
<!-- Vorname-->
|
||||||
<div class="input-group input-group-sm mb-3">
|
<div class="input-group input-group-sm mb-3">
|
||||||
|
@ -24,111 +24,28 @@
|
|||||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||||
<ul class="navbar-nav mr-auto">
|
<ul class="navbar-nav mr-auto">
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
|
<a class="nav-link" href="index.php?page=home">Home <span class="sr-only">(current)</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="#">SPACER</a>
|
<a class="nav-link" href="index.php?page=newEntry">New Entry</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="#">SPACER</a>
|
<a class="nav-link" href="index.php?page=myFriendsBook">My FriendsBook</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<form class="form-inline my-2 my-lg-0">
|
<form class="form-inline my-2 my-lg-0">
|
||||||
<div class="btn-group" role="group" aria-label="Basic example">
|
<div class="btn-group" role="group" aria-label="Basic example">
|
||||||
<!-- Button trigger modal Login -->
|
<!-- Button Login -->
|
||||||
<button id="toggle-login" type="button" class="btn btn-secondary" data-toggle="modal" data-target="#login">
|
<a class="btn btn-secondary" href="index.php?page=login" role="button">
|
||||||
Login
|
Login
|
||||||
</button>
|
</a>
|
||||||
|
|
||||||
<!-- Button trigger modal Register -->
|
<!-- Button Register -->
|
||||||
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#register">
|
<a class="btn btn-secondary" href="index.php?page=register" role="button">
|
||||||
Register
|
Register
|
||||||
</button>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<!-- Modal login-->
|
|
||||||
<?php require("php/signin.php") ?>
|
<?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">×</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">×</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>
|
|
||||||
|
44
segments/_headerSession.php
Normal file
44
segments/_headerSession.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<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="index.php?page=home">Home <span class="sr-only">(current)</span></a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="index.php?page=newEntry">New Entry</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="index.php?page=myFriendsBook">My FriendsBook</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<form class="form-inline my-2 my-lg-0">
|
||||||
|
<div class="btn-group" role="group" aria-label="Basic example">
|
||||||
|
<!-- Button Logout -->
|
||||||
|
<button type="button" class="btn btn-secondary">Logout</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<?php require("php/signin.php") ?>
|
1
segments/_home.php
Normal file
1
segments/_home.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
<h1>HOME SPACER</h1>
|
30
segments/_login.php
Normal file
30
segments/_login.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<p></p>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="alert alert-dark" role="alert">
|
||||||
|
<h4> Login into your FriendsBook Account!</h4>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<!--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>
|
||||||
|
<hr />
|
||||||
|
<button id="btnLogin" type="submit" style="float: right;" class="btn btn-primary">Login</button>
|
||||||
|
<div id="login-status"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> <!-- Ende container login -->
|
1
segments/_myFriendsBook.php
Normal file
1
segments/_myFriendsBook.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
<h1>MYFRIENDSBOOK SPACER</h1>
|
36
segments/_register.php
Normal file
36
segments/_register.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<p></p>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="alert alert-dark" role="alert">
|
||||||
|
<h4> Register at FriendsBook now!</h4>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<!--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>
|
||||||
|
<hr />
|
||||||
|
╭∩╮(ಠಠ)╭∩╮
|
||||||
|
<button id="btnCreate" type="submit" style="float: right;" class="btn btn-primary">Create Account</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> <!-- Ende container login -->
|
Loading…
Reference in New Issue
Block a user