bug corrected

admin
Flavien Haas 6 years ago
parent 62d31524a1
commit 0158d822c1

@ -41,7 +41,6 @@ function addVoiture($db, $matricule, $marque, $modele, $nbplaces, $anneefab){
function changeVoiture($db, $matricule, $marque, $modele, $nbplaces, $anneefab){ function changeVoiture($db, $matricule, $marque, $modele, $nbplaces, $anneefab){
$requete = "UPDATE public.voiture SET (matricule, marque, modele, nbplaces, anneefab) = ('" . $matricule . "','" . $marque . "','" . $modele . "','" . $nbplaces . "','" . $anneefab . "') WHERE mail = '" . $_SESSION['mail'] . "';"; $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); pg_query($db, $requete);
} }
@ -54,7 +53,6 @@ function showVoiture($db){
echo "modele = ".$res['modele']."<br>"; echo "modele = ".$res['modele']."<br>";
echo "nombre de places = ".$res['nbplaces']."<br>"; echo "nombre de places = ".$res['nbplaces']."<br>";
echo "année de fabrication = ".$res['anneefab']."<br>"; echo "année de fabrication = ".$res['anneefab']."<br>";
//return "matricule = ".$res['matricule']."<br>"."marque = " . $res['marque'] . "<br>"."modele = " . $res['modele'] . "<br>"."nombre de places = " . $res['nbplaces'] . "<br>"."année de fabrication = " . $res['anneefab'] . "<br>";
} }
} }
} }
@ -147,7 +145,6 @@ if (isset($_POST['login']) || isset($_FILES['avatar'])){
<div id="divImgProfil"> <div id="divImgProfil">
<img id="imgProfil" src="<?php echo getPathImgProfil($mail); ?>"> <img id="imgProfil" src="<?php echo getPathImgProfil($mail); ?>">
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
function visibilite(thingId){ function visibilite(thingId){
var targetElement; var targetElement;
@ -167,13 +164,10 @@ if (isset($_POST['login']) || isset($_FILES['avatar'])){
} }
} }
</script> </script>
<ul class="profil-nav"> <ul class="profil-nav">
<li class="FT"><a href="" onclick="javascript:visibilite('profilgeneral'); return false;">Profil général</a></li> <li class="FT"><a href="" onclick="javascript:visibilite('profilgeneral'); return false;">Profil général</a></li>
<li class="FT"><a href="" onclick="javascript:visibilite('profilvoiture'); return false;">Profil voiture</a></li> <li class="FT"><a href="" onclick="javascript:visibilite('profilvoiture'); return false;">Profil voiture</a></li>
</ul> </ul>
<div id="profilgeneral" class="Element" style="display:none;"> <div id="profilgeneral" class="Element" style="display:none;">
<form method="post" action="profil.php" enctype="multipart/form-data"> <form method="post" action="profil.php" enctype="multipart/form-data">
<div class="line"> <div class="line">
@ -223,9 +217,6 @@ if (isset($_POST['login']) || isset($_FILES['avatar'])){
<input id="submit" class="button" type="submit" value="Modifier"> <input id="submit" class="button" type="submit" value="Modifier">
</form> </form>
</div> </div>
<div id="profilvoiture" class="Element" style="display:none;"> <div id="profilvoiture" class="Element" style="display:none;">
<script type="text/javascript"> <script type="text/javascript">
function ShowTab(E) { function ShowTab(E) {

@ -1,10 +1,8 @@
<?php <?php
$path = ".."; $path = "..";
if (file_exists("./inscription.php")) { if (file_exists("./inscription.php")) {
$path = "."; $path = ".";
} }
?> ?>
<div id="menuDiv"> <div id="menuDiv">
<nav id="menu"> <nav id="menu">

Loading…
Cancel
Save