|
|
@ -1,245 +1,221 @@
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
|
|
|
|
include '../ressources/navbarHTML.php';
|
|
|
|
require ('../connectionBD.php');
|
|
|
|
navbarHTML("Tableau de bord");
|
|
|
|
$mail = null;
|
|
|
|
|
|
|
|
$db = connexionBD();
|
|
|
|
require ('../connectionBD.php');
|
|
|
|
init();
|
|
|
|
$mail = null;
|
|
|
|
|
|
|
|
$db = connexionBD();
|
|
|
|
$matricule = isset($_POST['matricule']) ? $_POST['matricule'] : NULL; //recuperation valeur formulaire, isset pour eviter l'erreur "Notice: Undefined index"
|
|
|
|
init();
|
|
|
|
$marque = isset($_POST['marque']) ? $_POST['marque'] : NULL;
|
|
|
|
|
|
|
|
$modele = isset($_POST['modele']) ? $_POST['modele'] : NULL;
|
|
|
|
$matricule = isset($_POST['matricule']) ? $_POST['matricule'] : NULL; //recuperation valeur formulaire, isset pour eviter l'erreur "Notice: Undefined index"
|
|
|
|
$nbplaces = isset($_POST['nbplaces']) ? $_POST['nbplaces'] : NULL;
|
|
|
|
$marque = isset($_POST['marque']) ? $_POST['marque'] : NULL;
|
|
|
|
$anneefab = isset($_POST['anneefab']) ? $_POST['anneefab'] : NULL;
|
|
|
|
$modele = isset($_POST['modele']) ? $_POST['modele'] : NULL;
|
|
|
|
|
|
|
|
$nbplaces = isset($_POST['nbplaces']) ? $_POST['nbplaces'] : NULL;
|
|
|
|
if(isset($_POST['submitadd']))
|
|
|
|
$anneefab = isset($_POST['anneefab']) ? $_POST['anneefab'] : NULL;
|
|
|
|
{
|
|
|
|
|
|
|
|
addVoiture($matricule, $marque, $modele, $nbplaces, $anneefab);
|
|
|
|
if(isset($_POST['submitadd'])){
|
|
|
|
}
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function init(){
|
|
|
|
function init(){
|
|
|
|
session_start();
|
|
|
|
session_start();
|
|
|
|
global $mail;
|
|
|
|
global $mail;
|
|
|
|
//Si on est pas connecté redirection vers la page de connexion
|
|
|
|
//Si on est pas connecté redirection vers la page de connexion
|
|
|
|
if(!isset($_SESSION['mail'])){
|
|
|
|
if(!isset($_SESSION['mail'])){
|
|
|
|
header('Location: ../index.php');
|
|
|
|
header('Location: ../index.php');
|
|
|
|
exit();
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
else{
|
|
|
|
$mail = $_SESSION['mail'];
|
|
|
|
$mail = $_SESSION['mail'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getPrenom($mail){
|
|
|
|
function getPrenom($mail){
|
|
|
|
global $db;
|
|
|
|
global $db;
|
|
|
|
$result = pg_query_params($db, "SELECT prenom from Utilisateur WHERE mail = $1;", array($mail));
|
|
|
|
$result = pg_query_params($db, "SELECT prenom from Utilisateur WHERE mail = $1;", array($mail));
|
|
|
|
if($result){
|
|
|
|
if($result){
|
|
|
|
$row = pg_fetch_array($result);
|
|
|
|
$row = pg_fetch_array($result);
|
|
|
|
$prenom = $row[0];
|
|
|
|
$prenom = $row[0];
|
|
|
|
return $prenom;
|
|
|
|
return $prenom;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getLogin($mail){
|
|
|
|
function getLogin($mail){
|
|
|
|
global $db;
|
|
|
|
global $db;
|
|
|
|
$result = pg_query_params($db, "SELECT login from Utilisateur WHERE mail = $1;", array($mail));
|
|
|
|
$result = pg_query_params($db, "SELECT login from Utilisateur WHERE mail = $1;", array($mail));
|
|
|
|
if($result){
|
|
|
|
if($result){
|
|
|
|
$row = pg_fetch_array($result);
|
|
|
|
$row = pg_fetch_array($result);
|
|
|
|
$login = $row[0];
|
|
|
|
$login = $row[0];
|
|
|
|
return $login;
|
|
|
|
return $login;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getTrajetsProposes($mail){
|
|
|
|
function getTrajetsProposes($mail){
|
|
|
|
global $db;
|
|
|
|
global $db;
|
|
|
|
$result = pg_query_params($db, "SELECT COUNT(*) from Trajet WHERE mailProposition = $1 AND estAnnule = false AND datedepart >= current_date;", array($mail));
|
|
|
|
$result = pg_query_params($db, "SELECT COUNT(*) from Trajet WHERE mailProposition = $1 AND estAnnule = false AND datedepart >= current_date;", array($mail));
|
|
|
|
if($result){
|
|
|
|
if($result){
|
|
|
|
$row = pg_fetch_array($result);
|
|
|
|
$row = pg_fetch_array($result);
|
|
|
|
return $row[0];
|
|
|
|
return $row[0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getTrajetsReserves($mail){
|
|
|
|
function getTrajetsReserves($mail){
|
|
|
|
global $db;
|
|
|
|
global $db;
|
|
|
|
$result = pg_query_params($db, "SELECT COUNT(*) FROM trajet tr, reserver r WHERE r.codetrajet = tr.codetrajet AND mailutilisateur = $1 AND etatres != 'Annulée' AND estAnnule = false AND datedepart >= current_date;", array($mail));
|
|
|
|
$result = pg_query_params($db, "SELECT COUNT(*) FROM trajet tr, reserver r WHERE r.codetrajet = tr.codetrajet AND mailutilisateur = $1 AND etatres != 'Annulée' AND estAnnule = false AND datedepart >= current_date;", array($mail));
|
|
|
|
if($result){
|
|
|
|
if($result){
|
|
|
|
$row = pg_fetch_array($result);
|
|
|
|
$row = pg_fetch_array($result);
|
|
|
|
return $row[0];
|
|
|
|
return $row[0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getMessagesNonLus($mail){
|
|
|
|
function getMessagesNonLus($mail){
|
|
|
|
global $db;
|
|
|
|
global $db;
|
|
|
|
$result = pg_query_params($db, "SELECT COUNT(*) from Message WHERE mailRecepteur = $1 AND estLu = FALSE;", array($mail));
|
|
|
|
$result = pg_query_params($db, "SELECT COUNT(*) from Message WHERE mailRecepteur = $1 AND estLu = FALSE;", array($mail));
|
|
|
|
if($result){
|
|
|
|
if($result){
|
|
|
|
$row = pg_fetch_array($result);
|
|
|
|
$row = pg_fetch_array($result);
|
|
|
|
$login = $row[0];
|
|
|
|
$login = $row[0];
|
|
|
|
return $login;
|
|
|
|
return $login;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getAvisNonLus($mail){
|
|
|
|
|
|
|
|
global $db;
|
|
|
|
|
|
|
|
$result = pg_query_params($db, "SELECT COUNT(tr.mailProposition) FROM Trajet tr, Avis av WHERE tr.codeTrajet = av.codeTrajet AND av.estLu = false AND tr.mailProposition = $1;", array($mail));
|
|
|
|
|
|
|
|
if($result){
|
|
|
|
|
|
|
|
$row = pg_fetch_array($result);
|
|
|
|
|
|
|
|
$login = $row[0];
|
|
|
|
|
|
|
|
return $login;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getPathImgProfil($mail){
|
|
|
|
|
|
|
|
if (file_exists("../imageProfil/$mail.png")){
|
|
|
|
|
|
|
|
return "../imageProfil/$mail.png";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return "../imageProfil/default.svg";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function addVoiture($matricule, $marque, $modele, $nbplaces, $anneefab){
|
|
|
|
|
|
|
|
global $db;
|
|
|
|
|
|
|
|
$requete = "INSERT INTO public.voiture (matricule, marque, modele, nbplaces, anneefab, mail) VALUES ('".$matricule."','".$marque."','".$modele."','".$nbplaces."','".$anneefab."','".$_SESSION['mail']."');";
|
|
|
|
|
|
|
|
pg_query($db, $requete);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function changeVoiture($matricule, $marque, $modele, $nbplaces, $anneefab){
|
|
|
|
|
|
|
|
global $db;
|
|
|
|
|
|
|
|
$requete = "UPDATE public.voiture SET (matricule, marque, modele, nbplaces, anneefab) = ('".$matricule."','".$marque."','".$modele."','".$nbplaces."','".$anneefab."') WHERE mail = '".$_SESSION['mail']."';";
|
|
|
|
|
|
|
|
echo "requete =".$requete;
|
|
|
|
|
|
|
|
pg_query($db, $requete);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function showVoiture(){
|
|
|
|
|
|
|
|
global $db;
|
|
|
|
|
|
|
|
$requete = "SELECT * FROM public.voiture WHERE voiture.mail = '".$_SESSION['mail']."';";
|
|
|
|
|
|
|
|
if($donnees = pg_query($db, $requete)){
|
|
|
|
|
|
|
|
while($res = pg_fetch_assoc($donnees)){
|
|
|
|
|
|
|
|
echo "matricule = ".$res['matricule']."<br>";
|
|
|
|
|
|
|
|
echo "marque = ".$res['marque']."<br>";
|
|
|
|
|
|
|
|
echo "modele = ".$res['modele']."<br>";
|
|
|
|
|
|
|
|
echo "nombre de places = ".$res['nbplaces']."<br>";
|
|
|
|
|
|
|
|
echo "année de fabrication = ".$res['anneefab']."<br>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
function getAvisNonLus($mail){
|
|
|
|
}
|
|
|
|
global $db;
|
|
|
|
|
|
|
|
$result = pg_query_params($db, "SELECT COUNT(tr.mailProposition) FROM Trajet tr, Avis av WHERE tr.codeTrajet = av.codeTrajet AND av.estLu = false AND tr.mailProposition = $1;", array($mail));
|
|
|
|
|
|
|
|
if($result){
|
|
|
|
|
|
|
|
$row = pg_fetch_array($result);
|
|
|
|
|
|
|
|
$login = $row[0];
|
|
|
|
|
|
|
|
return $login;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getPathImgProfil($mail){
|
|
|
|
|
|
|
|
if (file_exists("../imageProfil/$mail.png")){
|
|
|
|
|
|
|
|
return "../imageProfil/$mail.png";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return "../imageProfil/default.svg";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function addVoiture($matricule, $marque, $modele, $nbplaces, $anneefab){
|
|
|
|
|
|
|
|
global $db;
|
|
|
|
|
|
|
|
$requete = "INSERT INTO public.voiture (matricule, marque, modele, nbplaces, anneefab, mail) VALUES ('".$matricule."','".$marque."','".$modele."','".$nbplaces."','".$anneefab."','".$_SESSION['mail']."');";
|
|
|
|
|
|
|
|
pg_query($db, $requete);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function changeVoiture($matricule, $marque, $modele, $nbplaces, $anneefab){
|
|
|
|
|
|
|
|
global $db;
|
|
|
|
|
|
|
|
$requete = "UPDATE public.voiture SET (matricule, marque, modele, nbplaces, anneefab) = ('".$matricule."','".$marque."','".$modele."','".$nbplaces."','".$anneefab."') WHERE mail = '".$_SESSION['mail']."';";
|
|
|
|
|
|
|
|
echo "requete =".$requete;
|
|
|
|
|
|
|
|
pg_query($db, $requete);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function showVoiture(){
|
|
|
|
|
|
|
|
global $db;
|
|
|
|
|
|
|
|
$requete = "SELECT * FROM public.voiture WHERE voiture.mail = '".$_SESSION['mail']."';";
|
|
|
|
|
|
|
|
if($donnees = pg_query($db, $requete)){
|
|
|
|
|
|
|
|
while($res = pg_fetch_assoc($donnees)){
|
|
|
|
|
|
|
|
echo "matricule = ".$res['matricule']."<br>";
|
|
|
|
|
|
|
|
echo "marque = ".$res['marque']."<br>";
|
|
|
|
|
|
|
|
echo "modele = ".$res['modele']."<br>";
|
|
|
|
|
|
|
|
echo "nombre de places = ".$res['nbplaces']."<br>";
|
|
|
|
|
|
|
|
echo "année de fabrication = ".$res['anneefab']."<br>";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<script type="text/javascript">
|
|
|
|
<html lang="fr">
|
|
|
|
function ShowTab (E){
|
|
|
|
<head>
|
|
|
|
document.getElementById("addVoiture").style.display = (E == 1) ? 'block' : 'none';
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
document.getElementById("changeVoiture").style.display = (E == 2) ? 'block' : 'none';
|
|
|
|
<link rel="stylesheet" href="tableauBord.css">
|
|
|
|
document.getElementById("showVoiture").style.display = (E == 3) ? 'block' : 'none';
|
|
|
|
<link rel="icon" type="image/png" href="" />
|
|
|
|
}
|
|
|
|
<title>Tableau de bord</title>
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
<div id="content">
|
|
|
|
function ShowTab (E){
|
|
|
|
|
|
|
|
document.getElementById("addVoiture").style.display = (E == 1) ? 'block' : 'none';
|
|
|
|
|
|
|
|
document.getElementById("changeVoiture").style.display = (E == 2) ? 'block' : 'none';
|
|
|
|
|
|
|
|
document.getElementById("showVoiture").style.display = (E == 3) ? 'block' : 'none';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</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="tableauBord">
|
|
|
|
<div id="tableauBord">
|
|
|
|
<h1>Bienvenue <?php echo getLogin($mail); ?></h1>
|
|
|
|
<h1>Bienvenue <?php echo getLogin($mail); ?></h1>
|
|
|
|
<div id="divImgProfil">
|
|
|
|
<div id="divImgProfil">
|
|
|
|
<img id="imgProfil" src="<?php echo getPathImgProfil($mail); ?>">
|
|
|
|
<img id="imgProfil" src="<?php echo getPathImgProfil($mail); ?>">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="trajet">
|
|
|
|
|
|
|
|
<a class="btnTrajet" href="../ah.php">Déposer un trajet</a>
|
|
|
|
|
|
|
|
<a id="btnTrajet2" class="btnTrajet" href="../ah.php">Rechercher un trajet</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="recap">
|
|
|
|
|
|
|
|
<div class="recapLine">
|
|
|
|
|
|
|
|
<img class="recapIcon" src="../car.png">
|
|
|
|
|
|
|
|
<p>Vous avez <?php echo getTrajetsProposes($mail); ?> trajets proposés à effectuer.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="trajet">
|
|
|
|
<div class="recapLine">
|
|
|
|
<a class="btnTrajet" href="../ah.php">Déposer un trajet</a>
|
|
|
|
<img class="recapIcon" src="../car.png">
|
|
|
|
<a id="btnTrajet2" class="btnTrajet" href="../ah.php">Rechercher un trajet</a>
|
|
|
|
<p>Vous avez <?php echo getTrajetsReserves($mail); ?> trajets réservés à effectuer.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="recap">
|
|
|
|
<div class="recapLine">
|
|
|
|
<div class="recapLine">
|
|
|
|
<img class="recapIcon" src="../mail.svg">
|
|
|
|
<img class="recapIcon" src="../car.png">
|
|
|
|
<p>Vous avez <?php echo getMessagesNonLus($mail); ?> messages non lus.</p>
|
|
|
|
<p>Vous avez <?php echo getTrajetsProposes($mail); ?> trajets proposés à effectuer.</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="recapLine">
|
|
|
|
|
|
|
|
<img class="recapIcon" src="../car.png">
|
|
|
|
|
|
|
|
<p>Vous avez <?php echo getTrajetsReserves($mail); ?> trajets réservés à effectuer.</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="recapLine">
|
|
|
|
|
|
|
|
<img class="recapIcon" src="../mail.svg">
|
|
|
|
|
|
|
|
<p>Vous avez <?php echo getMessagesNonLus($mail); ?> messages non lus.</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="recapLine">
|
|
|
|
|
|
|
|
<img class="recapIcon" src="../star.png">
|
|
|
|
|
|
|
|
<p>Vous avez <?php echo getAvisNonLus($mail); ?> avis non lus.</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<form id="choixFormeTestVoiture">
|
|
|
|
<div class="recapLine">
|
|
|
|
<div>
|
|
|
|
<img class="recapIcon" src="../star.png">
|
|
|
|
<input type="radio" name="TabCheck" onclick="ShowTab(1)"/>Ajouter une voiture
|
|
|
|
<p>Vous avez <?php echo getAvisNonLus($mail); ?> avis non lus.</p>
|
|
|
|
<input type="radio" name="TabCheck" onclick="ShowTab(2)"/>Modifier ma voiture
|
|
|
|
|
|
|
|
<input type="radio" name="TabCheck" onclick="ShowTab(3)"/>Afficher ma voiture
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div id="addVoiture" style="display: none;">
|
|
|
|
|
|
|
|
<h1>Ajouter une voiture</h1>
|
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
|
|
|
|
<form action="tableauBord.php" method="post">
|
|
|
|
|
|
|
|
<table>
|
|
|
|
|
|
|
|
<tr><td><p>matricule :</p></td><td><input type="text" name="matricule"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>marque :</p></td><td><input type="text" name="marque"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>modele :</p></td><td><input type="text" name="modele"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>nombre de places :</p></td><td><input type="number" maxlength="1" name="nbplaces"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>année de fabrication :</p></td><td><input type="number" nmaxlength="4" name="anneefab"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p><input type="submit" name="submitadd" value="ajouter une voiture"></td></tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div id="changeVoiture" style="display: none;">
|
|
|
|
|
|
|
|
<h1>Modifier une voiture</h1>
|
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
|
|
|
|
<form action="tableauBord.php" method="post">
|
|
|
|
|
|
|
|
<table>
|
|
|
|
|
|
|
|
<tr><td><p>matricule :</p></td><td><input type="text" name="matricule"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>marque :</p></td><td><input type="text" name="marque"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>modele :</p></td><td><input type="text" name="modele"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>nombre de places :</p></td><td><input type="number" maxlength="1" name="nbplaces"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>année de fabrication :</p></td><td><input type="number" nmaxlength="4" name="anneefab"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p><input type="submit" name="submitchange" value="modifier une voiture"></td></tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div id="showVoiture" style="display: none;">
|
|
|
|
<form id="choixFormeTestVoiture">
|
|
|
|
<h1>Afficher ma voiture</h1>
|
|
|
|
<div>
|
|
|
|
<fieldset>
|
|
|
|
<input type="radio" name="TabCheck" onclick="ShowTab(1)"/>Ajouter une voiture
|
|
|
|
<form action="tableauBord.php" method="post">
|
|
|
|
<input type="radio" name="TabCheck" onclick="ShowTab(2)"/>Modifier ma voiture
|
|
|
|
<table>
|
|
|
|
<input type="radio" name="TabCheck" onclick="ShowTab(3)"/>Afficher ma voiture
|
|
|
|
<tr><td><p><input type="submit" name="submitshow" value="afficher ma voiture"></td></tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<div id="addVoiture" style="display: none;">
|
|
|
|
|
|
|
|
<h1>Ajouter une voiture</h1>
|
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
|
|
|
|
<form action="tableauBord.php" method="post">
|
|
|
|
|
|
|
|
<table>
|
|
|
|
|
|
|
|
<tr><td><p>matricule :</p></td><td><input type="text" name="matricule"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>marque :</p></td><td><input type="text" name="marque"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>modele :</p></td><td><input type="text" name="modele"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>nombre de places :</p></td><td><input type="number" maxlength="1" name="nbplaces"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>année de fabrication :</p></td><td><input type="number" nmaxlength="4" name="anneefab"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p><input type="submit" name="submitadd" value="ajouter une voiture"></td></tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="changeVoiture" style="display: none;">
|
|
|
|
|
|
|
|
<h1>Modifier une voiture</h1>
|
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
|
|
|
|
<form action="tableauBord.php" method="post">
|
|
|
|
|
|
|
|
<table>
|
|
|
|
|
|
|
|
<tr><td><p>matricule :</p></td><td><input type="text" name="matricule"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>marque :</p></td><td><input type="text" name="marque"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>modele :</p></td><td><input type="text" name="modele"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>nombre de places :</p></td><td><input type="number" maxlength="1" name="nbplaces"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p>année de fabrication :</p></td><td><input type="number" nmaxlength="4" name="anneefab"/></td></tr>
|
|
|
|
|
|
|
|
<tr><td><p><input type="submit" name="submitchange" value="modifier une voiture"></td></tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="showVoiture" style="display: none;">
|
|
|
|
|
|
|
|
<h1>Afficher ma voiture</h1>
|
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
|
|
|
|
<form action="tableauBord.php" method="post">
|
|
|
|
|
|
|
|
<table>
|
|
|
|
|
|
|
|
<tr><td><p><input type="submit" name="submitshow" value="afficher ma voiture"></td></tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
</html>
|
|
|
|