Ajout reservation / annulation debug admin
parent
5d6c29070f
commit
c8308b0504
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
require_once ("../connexionBD.php");
|
||||
require_once ("../ressources/trajet.php");
|
||||
session_start();
|
||||
|
||||
//Si on est pas connecté redirection vers la page de connexion
|
||||
if (!isset($_SESSION['mail'])) {
|
||||
header('Location: ../index.php');
|
||||
exit();
|
||||
}
|
||||
$mail = $_SESSION['mail'];
|
||||
|
||||
if (isset($_GET['codetrajet'])){
|
||||
$codetrajet = $_GET['codetrajet'];
|
||||
annulerTrajet($db, $codetrajet);
|
||||
}
|
||||
header('Location: ../tableauBord/tableauBord.php');
|
||||
exit();
|
@ -0,0 +1,49 @@
|
||||
body {
|
||||
color:black;
|
||||
background-color:white;
|
||||
background-image:url("../ressources/image/background.jpg");
|
||||
background-repeat:no-repeat;
|
||||
background-size:104%;
|
||||
margin: 0;
|
||||
font-family: Ubuntu,Helvetica,sans-serif;
|
||||
}
|
||||
|
||||
#container{
|
||||
margin : 5% 5% 5% 5%;
|
||||
background-color : white;
|
||||
border : 2px solid black;
|
||||
}
|
||||
|
||||
h1{
|
||||
text-align : center;
|
||||
font-size : 250%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h2{
|
||||
text-align : center;
|
||||
font-size : 150%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#bouton_retour{
|
||||
transform : rotate(45deg);
|
||||
}
|
||||
|
||||
.separation{
|
||||
margin-top : 5%;
|
||||
margin-left : 20%;
|
||||
min-height: 2em;
|
||||
width : 5px;
|
||||
background: black;
|
||||
}
|
||||
|
||||
td{
|
||||
padding-left: 1.5em;
|
||||
padding-right: 1.5em;
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
#info{
|
||||
width: 60%;
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once("../connexionBD.php");
|
||||
require_once("../ressources/trajet.php");
|
||||
require_once("../ressources/user.php");
|
||||
|
||||
//Si on est pas connecté redirection vers la page de connexion
|
||||
if (!isset($_SESSION['mail'])) {
|
||||
header('Location: ../index.php');
|
||||
exit();
|
||||
}
|
||||
$mail = $_SESSION['mail'];
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="liste_trajet_publie.css">
|
||||
<link rel="stylesheet" href="../ressources/navbarhtml.css">
|
||||
<link rel="icon" href="../ressources/favicon.ico"/>
|
||||
<title>Liste des trajets publiés</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
require_once("../ressources/navbarhtml.php");
|
||||
?>
|
||||
<div id="container">
|
||||
<div id="entete">
|
||||
<a href="../tableauBord/tableauBord.php"><img id="bouton_retour" src="../ressources/image/return.png"
|
||||
alt="Bouton retour"></a>
|
||||
<h1 class="float" id="titre">Liste des trajets publiés</h1>
|
||||
<br>
|
||||
<h2>Trajets publiés : </h2>
|
||||
</div>
|
||||
<div id="liste">
|
||||
<table>
|
||||
<?php
|
||||
$result = pg_query_params($db, "SELECT * FROM Trajet Where mailproposition = $1 AND estannule = false;", array($mail));
|
||||
while ($row = pg_fetch_array($result)) {
|
||||
$login = getLogin($db, $mail);
|
||||
$date_depart = $row['datedepart'];
|
||||
$codetrajet = $row['codetrajet'];
|
||||
$source = getDepart($db, $codetrajet);
|
||||
$dest = getFin($db, $codetrajet);
|
||||
echo "<tr><td class='ligne'><hr class='separation'/></td><td class='info'>";
|
||||
echo "<p>$date_depart - $source vers $dest proposé par : $login</p></td>";
|
||||
echo "<td><a href='annulerTrajet.php?codetrajet=$codetrajet'>Annuler le trajet</a></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
require_once ("../connexionBD.php");
|
||||
require_once ("../ressources/trajet.php");
|
||||
session_start();
|
||||
|
||||
//Si on est pas connecté redirection vers la page de connexion
|
||||
if (!isset($_SESSION['mail'])) {
|
||||
header('Location: ../index.php');
|
||||
exit();
|
||||
}
|
||||
$mail = $_SESSION['mail'];
|
||||
|
||||
if (isset($_GET['codetrajet'])){
|
||||
$codetrajet = $_GET['codetrajet'];
|
||||
annulerReservation($db, $mail, $codetrajet);
|
||||
}
|
||||
header('Location: ../tableauBord/tableauBord.php');
|
||||
exit();
|
@ -1,18 +1,12 @@
|
||||
<?php
|
||||
$path = "..";
|
||||
if (file_exists("./inscription.php")) {
|
||||
$path = ".";
|
||||
}
|
||||
?>
|
||||
<div id="menuDiv">
|
||||
<nav id="menu">
|
||||
<div id="divFlex"><div id="divlogo"><img src="../ressources/logo.png" alt="logo Upssi'Covoit" id="logo"/></div></div>
|
||||
<a class="menuItem" href="<?php echo $path ; ?>../tableauBord/tableauBord.php">Tableau de bord</a>
|
||||
<a class="menuItem" href="<?php echo $path ; ?>/inscription.php">Trajets publiés</a>
|
||||
<a class="menuItem" href="<?php echo $path ; ?>/inscription.php">Trajets réservés</a>
|
||||
<a class="menuItem" href="<?php echo $path ; ?>../avis_recus/avis_recus.php">Avis reçus</a>
|
||||
<a class="menuItem" href="<?php echo $path ; ?>../avis_laisses/avis_laisses.php">Avis laissés</a>
|
||||
<a id="colorAdmin" class="menuItem" href="<?php echo $path ; ?>../profil/admin.php">Administration</a>
|
||||
<a class="menuItem" href="<?php echo $path ; ?>../deconnexion.php">Se déconnecter</a>
|
||||
<a class="menuItem" href="../tableauBord/tableauBord.php">Tableau de bord</a>
|
||||
<a class="menuItem" href="../listeTrajetPublie/liste_trajet_publie.php">Trajets publiés</a>
|
||||
<a class="menuItem" href="../listeTrajetReserve/liste_trajet_reserve.php">Trajets réservés</a>
|
||||
<a class="menuItem" href="../avis_recus/avis_recus.php">Avis reçus</a>
|
||||
<a class="menuItem" href="../avis_laisses/avis_laisses.php">Avis laissés</a>
|
||||
<a id="colorAdmin" class="menuItem" href="../profil/admin.php">Administration</a>
|
||||
<a class="menuItem" href="../deconnexion.php">Se déconnecter</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
@ -1,12 +1,23 @@
|
||||
<div id="menuDiv">
|
||||
<nav id="menu">
|
||||
<div id="divFlex"><div id="divlogo"><img src="../ressources/logo.png" alt="logo Upssi'Covoit" id="logo"/></div></div>
|
||||
<a class="menuItem" href="../tableauBord/tableauBord.php">Tableau de bord</a>
|
||||
<a class="menuItem" href="/inscription.php">Trajets publiés</a>
|
||||
<a class="menuItem" href="../listeTrajetReserve/liste_trajet_reserve.php">Trajets réservés</a>
|
||||
<a class="menuItem" href="../avis_recus/avis_recus.php">Avis reçus</a>
|
||||
<a class="menuItem" href="../avis_laisses/avis_laisses.php">Avis laissés</a>
|
||||
<a class="menuItem" href="../profil/profil.php">Profil</a>
|
||||
<a class="menuItem" href="../deconnexion.php">Se déconnecter</a>
|
||||
<?php
|
||||
require_once ('../connexionBD.php');
|
||||
require_once ('../ressources/user.php');
|
||||
require_once ('verifconnecte.php');
|
||||
if (getUser($db, $mail)['estadmin']){
|
||||
require_once ('../ressources/navbaradminhtml.php');
|
||||
}
|
||||
else {
|
||||
echo"
|
||||
<div id='menuDiv'>
|
||||
<nav id='menu'>
|
||||
<div id='divFlex'><div id='divlogo'><img src='../ressources/logo.png' alt='logo Upssi'Covoit' id='logo'/></div></div>
|
||||
<a class='menuItem' href='../tableauBord/tableauBord.php''>Tableau de bord</a>
|
||||
<a class='menuItem' href='../listeTrajetPublie/liste_trajet_publie.php'>Trajets publiés</a>
|
||||
<a class='menuItem' href='../listeTrajetReserve/liste_trajet_reserve.php'>Trajets réservés</a>
|
||||
<a class='menuItem' href='../avis_recus/avis_recus.php'>Avis reçus</a>
|
||||
<a class='menuItem' href='../avis_laisses/avis_laisses.php'>Avis laissés</a>
|
||||
<a class='menuItem' href='../profil/profil.php'>Profil</a>
|
||||
<a class='menuItem' href='../deconnexion.php'>Se déconnecter</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>";
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue