added navbar to tableaubord

admin
Flavien Haas 6 years ago
parent 1bbc5eaf76
commit a2e72de86c

@ -0,0 +1,128 @@
*{
margin: 0;
padding: 0;
font-family: "Calibri Light";
}
h1{
font-size: 3em;
text-align: center;
text-decoration: underline;
}
#content{
min-width: 320px;
width: 100%;
display: flex;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
}
#tableauBord{
margin: 2em;
padding: 1em;
width: 100%;
}
.menu {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
background-color: rgb(65, 154, 28);
}
.menuItem {
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
color: white;
width: 10%;
min-width: 5em;
font-weight: bold;
text-decoration: none;
padding: 0.8em;
border-bottom: 4px solid rgb(65, 154, 28);
font-size: 1.1em;
text-align: center;
}
.menuItem:hover{
cursor: pointer;
border-bottom: 4px solid orange;
}
#divImgProfil{
width: 100%;
display: flex;
flex-wrap: nowrap;
justify-content: center;
}
#imgProfil{
background-color: white;
margin-top: 2.5em;
width: 60%;
height: 60%;
max-width: 210px;
max-height: 210px;
border-radius: 10px;
}
#trajet{
margin-top: 2em;
display: flex;
flex-wrap: wrap;
flex-direction: row;
justify-content: center;
text-align: center;
width: 100%;
}
.btnTrajet{
display: flex;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
text-decoration: none;
padding: 0.4em;
color: black;
background-color: lightgray;
border: 1px solid black;
}
.btnTrajet:hover{
background-color: grey;
}
#btnTrajet2{
margin-left: 10%;
}
#recap{
margin-top: 2.5em;
width: 50%;
margin-left: 50%;
transform: translate(-50%);
}
.recapLine{
margin-bottom: 1.5em;
display: flex;
flex-wrap: nowrap;
justify-content: left;
align-items: center;
width: 100%;
}
.recapIcon{
width: 50px;
height: 50px;
}
p{
margin-left: 10%;
}

@ -0,0 +1,5 @@
<?php
function navbarHTML($title){
echo '<!DOCTYPE html><html lang="fr"><head><meta charset="UTF-8"><link rel="stylesheet" href="tableauBord.css"><link rel="icon" type="image/png" href=""/><title>'.$title.'</title><nav class="menu"><a class="menuItem" href="./../inscription.php">Tableau de bord</a><a class="menuItem" href="../inscription.php">Trajets publiés</a><a class="menuItem" href="../inscription.php">Trajets réservés</a><a class="menuItem" href="../inscription.php">Messagerie</a><a class="menuItem" href="../inscription.php">Avis reçus</a><a class="menuItem" href="../inscription.php">Avis laissés</a><a class="menuItem" href="../inscription.php">Profil</a><a class="menuItem" href="../deconnexion.php">Se déconnecter</a></nav></head><body>';
}
?>

@ -1,4 +1,6 @@
<?php <?php
include '../ressources/navbarHTML.php';
navbarHTML("Tableau de bord");
require ('../connectionBD.php'); require ('../connectionBD.php');
$mail = null; $mail = null;
@ -11,16 +13,13 @@
$nbplaces = isset($_POST['nbplaces']) ? $_POST['nbplaces'] : NULL; $nbplaces = isset($_POST['nbplaces']) ? $_POST['nbplaces'] : NULL;
$anneefab = isset($_POST['anneefab']) ? $_POST['anneefab'] : NULL; $anneefab = isset($_POST['anneefab']) ? $_POST['anneefab'] : NULL;
if(isset($_POST['submitadd'])) if(isset($_POST['submitadd'])){
{
addVoiture($matricule, $marque, $modele, $nbplaces, $anneefab); addVoiture($matricule, $marque, $modele, $nbplaces, $anneefab);
} }
if(isset($_POST['submitchange'])) if(isset($_POST['submitchange'])){
{
changeVoiture($matricule, $marque, $modele, $nbplaces, $anneefab); changeVoiture($matricule, $marque, $modele, $nbplaces, $anneefab);
} }
if(isset($_POST['submitshow'])) if(isset($_POST['submitshow'])){
{
showVoiture(); showVoiture();
} }
@ -132,16 +131,8 @@
} }
} }
} }
?> ?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="tableauBord.css">
<link rel="icon" type="image/png" href="" />
<title>Tableau de bord</title>
<script type="text/javascript"> <script type="text/javascript">
function ShowTab (E){ function ShowTab (E){
document.getElementById("addVoiture").style.display = (E == 1) ? 'block' : 'none'; document.getElementById("addVoiture").style.display = (E == 1) ? 'block' : 'none';
@ -149,18 +140,6 @@
document.getElementById("showVoiture").style.display = (E == 3) ? 'block' : 'none'; document.getElementById("showVoiture").style.display = (E == 3) ? 'block' : 'none';
} }
</script> </script>
<nav class="menu">
<a class="menuItem" href="./../inscription.php">Tableau de bord</a>
<a class="menuItem" href="../inscription.php">Trajets publiés</a>
<a class="menuItem" href="../inscription.php">Trajets réservés</a>
<a class="menuItem" href="../inscription.php">Messagerie</a>
<a class="menuItem" href="../inscription.php">Avis reçus</a>
<a class="menuItem" href="../inscription.php">Avis laissés</a>
<a class="menuItem" href="../inscription.php">Profil</a>
<a class="menuItem" href="../deconnexion.php">Se déconnecter</a>
</nav>
</head>
<body>
<div id="content"> <div id="content">
<div id="tableauBord"> <div id="tableauBord">
<h1>Bienvenue <?php echo getLogin($mail); ?></h1> <h1>Bienvenue <?php echo getLogin($mail); ?></h1>
@ -196,7 +175,6 @@
<input type="radio" name="TabCheck" onclick="ShowTab(3)"/>Afficher ma voiture <input type="radio" name="TabCheck" onclick="ShowTab(3)"/>Afficher ma voiture
</div> </div>
</form> </form>
<div id="addVoiture" style="display: none;"> <div id="addVoiture" style="display: none;">
<h1>Ajouter une voiture</h1> <h1>Ajouter une voiture</h1>
<fieldset> <fieldset>
@ -212,7 +190,6 @@
</form> </form>
</fieldset> </fieldset>
</div> </div>
<div id="changeVoiture" style="display: none;"> <div id="changeVoiture" style="display: none;">
<h1>Modifier une voiture</h1> <h1>Modifier une voiture</h1>
<fieldset> <fieldset>
@ -228,7 +205,6 @@
</form> </form>
</fieldset> </fieldset>
</div> </div>
<div id="showVoiture" style="display: none;"> <div id="showVoiture" style="display: none;">
<h1>Afficher ma voiture</h1> <h1>Afficher ma voiture</h1>
<fieldset> <fieldset>

Loading…
Cancel
Save