diff --git a/WEB/profil.css b/WEB/profil.css index b977ff1..a5c7880 100644 --- a/WEB/profil.css +++ b/WEB/profil.css @@ -1,7 +1,7 @@ *{ margin: 0; padding: 0; - font-family: "Arial"; + font-family: Arial; } #divImgProfil{ diff --git a/WEB/profil.php b/WEB/profil.php index f1c21ae..c8f8a8a 100644 --- a/WEB/profil.php +++ b/WEB/profil.php @@ -1,41 +1,41 @@ 2 * 1024 * 1024){ + } else if ($fic['size'] > 2 * 1024 * 1024) { header('Location: inscription.php?error=5'); exit(); - } - else{ + } else { move_uploaded_file($file_tmp, $target_file); } } -function modifierUtilisateur($db, $prenom, $nom, $login, $phone){ +function modifierUtilisateur($db, $prenom, $nom, $login, $phone) +{ $result = pg_query_params($db, "UPDATE Utilisateur SET prenom = $1, nom = $2, login = $3, telephone = $4;", array($prenom, $nom, $login, $phone)); return $result; } -function getUser($db, $mail){ - $result = pg_query_params($db,"SELECT * FROM Utilisateur WHERE mail = $1;", array($mail)); +function getUser($db, $mail) +{ + $result = pg_query_params($db, "SELECT * FROM Utilisateur WHERE mail = $1;", array($mail)); return pg_fetch_array($result); } -function printError(){ - if(isset($_GET['error'])){ +function printError() +{ + if (isset($_GET['error'])) { $erreur = getErrorProfil($_GET['error']); echo "

$erreur

"; } } -function isLoginUniqueModifier($db, $mail, $login){ +function isLoginUniqueModifier($db, $mail, $login) +{ $result = pg_query_params($db, "SELECT * FROM Utilisateur WHERE login = $1 AND mail != $2;", array($login, $mail)); - if($result){ + if ($result) { $row = pg_fetch_array($result); return (strcmp($row['login'], $login) != 0); } return false; } -function getErrorProfil($code){ - switch ($code){ +function getErrorProfil($code) +{ + switch ($code) { case 1: return "Ce login est déjà associé à un compte."; case 2: @@ -144,11 +150,13 @@ function getErrorProfil($code){ + Profil +

Profil

@@ -157,42 +165,50 @@ function getErrorProfil($code){
- +
- +
- +
- +
- +
- +
- +
- +