Edite members space
- Change Signin, Profil
This commit is contained in:
ccunatbrule
2023-02-12 14:27:14 +01:00
parent 67ce37f4d0
commit 9fe23f6c3f
28 changed files with 170 additions and 138 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
Thumbs.db

View File

@@ -11,8 +11,8 @@ if (!isset($_POST['pseudo'])) { //Page de formulaire
<h2>Connexion</h2>
<form method="post" action="connexion.php">
<br><fieldset>
<label class="labelI" for="pseudo">Pseudo :</label><input name="pseudo" type="text" id="pseudo" /><br>
<label class="labelI" for="password">Password :</label><input type="password" name="password" id="password" />
<label class="labelI" for="pseudo">Pseudo :</label><br><input name="pseudo" type="text" id="pseudo" /><br>
<label class="labelI" for="password">Mot de passe :</label><br><input type="password" name="password" id="password" />
</fieldset><br>
<p class="btns"><input type="submit" value="Connexion" class="button-3" /></p>
</form>

View File

@@ -13,13 +13,56 @@ function erreur($err='')
</section>
</div>');
}
function move_avatar($avatar)
function edit_avatar($avatar, $pseudo)
{
$extension_upload = strtolower(substr( strrchr($avatar['name'], '.') ,1));
$name = time();
$nomavatar = str_replace(' ','',$name).".".$extension_upload;
$name = "./images/avatars/".str_replace(' ','',$name).".".$extension_upload;
move_uploaded_file($avatar['tmp_name'],$name);
return $nomavatar;
if (isset ($avatar)){
$imagename = $avatar['name'];// exemple.png
$source = $avatar['tmp_name'];// /volume1/@tmp/phpiES0qN
$locate = "./images/avatars/".$pseudo."/";
$dir = $locate."img_user.jpeg";
move_uploaded_file($source,$dir);
changeToJpeg($dir,$dir);
resize_avatar($dir,$dir);
$rdir = substr($dir,1);
return $rdir;
}
}
function changeToJpeg($source, $dir)
{
$ext = substr($_FILES['avatar']['type'],6); //jpeg
switch($ext) {
case 'jpg':
$image = imagecreatefromjpeg($source);
break;
case 'jpeg':
$image = imagecreatefromjpeg($source);
break;
case 'png':
$image = imagecreatefrompng($source);
break;
case 'gif':
$image = imagecreatefromgif($source);
break;
default:
throw new Exception('Unknown image type.');
}
imagejpeg($image, $dir);
}
function resize_avatar($dir,$out )
{
list($width, $height) = getimagesize($dir);
$modwidth = 150; //target width
$diff = $width / $modwidth;
$modheight = $height / $diff;
$tn = imagecreatetruecolor($modwidth, $modheight);
$image = imagecreatefromjpeg($dir);
imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height);
imagejpeg($tn, $out);
}
?>

View File

@@ -12,15 +12,23 @@ if (empty($_POST['pseudo'])) // Si on la variable est vide, on peut considérer
<h2>Inscription</h2>
<form method="post" action="inscription.php" enctype="multipart/form-data">
<label class="labelI" >*Pseudo</label><br><input name="pseudo" type="text" id="pseudo" placeholder=" Entre 3 à 15 caractères"/><br><br>
<label class="labelI" for="password">*Mot de Passe :</label><input type="password" name="password" id="password" />
<label class="labelI" for="confirm">*Confirmer :</label><input type="password" name="confirm" id="confirm" /><br>
<label class="labelI" for="password">*Mot de Passe :</label><input type="password" name="password" id="password" placeholder="Mot de passe"/>
<label class="labelI" for="confirm">*Confirmer :</label><input type="password" name="confirm" id="confirm" placeholder="Confirmation"/><br>
</fieldset>
<label class="labelI" for="email">*Votre adresse email :</label><br><input type="text" name="email" id="email" /><br>
<label class="labelI" for="email">*Votre adresse email :</label><br><input type="email" name="email" id="email" placeholder="email@mail.fr"/><br>
</fieldset>
<label class="labelI" for="localisation">Localisation :</label><br><input type="text" name="localisation" id="localisation" /><br>
<label class="labelI" for="localisation">Localisation :</label><br><input type="text" name="localisation" id="localisation" placeholder="Adresse" /><br>
<label class="labelI" for="prenom">Prenom :</label><br><input type="text" name="prenom" id="prenom" placeholder="Prénom"/><br>
<label class="labelI" for="nom">Nom :</label><br><input type="text" name="nom" id="nom" placeholder="Nom"/><br>
<label class="labelI" for="sexe">Sexe :</label><br>
<div><input type="radio" id="femme" name="sexe" value="FEMME" checked><label for="femme">Femme</label>
<input type="radio" id="homme" name="sexe" value="HOMME"><label for="homme">Homme</label></div>
<label class="labelI" for="age">Age :</label><br><input type="number" name="age" id="age" min="5" max="90" placeholder="Age"/><br>
<fieldset>
<label class="labelI" for="galop">Galop :</label><br><input type="number" name="galop" id="galop" min="0" max="7" placeholder="1 à 7"/><br>
</fieldset>
<fieldset><legend class="colorbold marg3 pad1">Profil sur le forum</legend>
<label for="avatar">Choisissez votre avatar :</label><br><input type="file" name="avatar" id="avatar" /><br>(Taille max : 10Ko)
<label for="avatar">Choisissez votre avatar :</label><br><input type="file" name="avatar" id="avatar" accept=".png, .jpg, .jpeg, gif" /><br>
</fieldset><br>
<p class="btns"><input type="submit" value="S'inscrire" class="button-3"/></p><br>
<p>Les champs précédés d'un * sont obligatoires</p>
@@ -33,15 +41,17 @@ if (empty($_POST['pseudo'])) // Si on la variable est vide, on peut considérer
else //On est dans le cas traitement
{
$pseudo_erreur1 = NULL;$pseudo_erreur2 = NULL;
$email_erreur1 = NULL;$email_erreur2 = NULL;
$avatar_erreur = NULL;$avatar_erreur1 = NULL;
$avatar_erreur2 = NULL;$avatar_erreur3 = NULL;
$email_erreur1 = NULL;
$mdp_erreur = NULL;
$avatar_erreur3 = NULL;
//On récupère les variables
$i = 0;
$extensions_valides = array( 'jpg' , 'jpeg' , 'gif' , 'png' );
$pseudo=$_POST['pseudo'];
$email = $_POST['email'];
$localisation = $_POST['localisation'];
$prenom = $_POST['prenom'];
$nom = $_POST['nom'];
$pass = /*md5*/($_POST['password']);
$confirm = /*md5*/($_POST['confirm']);
//Verification des champs formulaire
@@ -67,43 +77,12 @@ else //On est dans le cas traitement
$email_erreur1 = "Votre adresse email est déjà utilisée par un membre";
$i++;
}
if (!preg_match("#^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]{2,}\.[a-z]{2,4}$#", $email) || empty($email))
$extension_upload = strtolower(substr( strrchr($_FILES['avatar']['name'], '.') ,1));
if (!in_array($extension_upload,$extensions_valides) )
{
$email_erreur2 = "Votre adresse email n'a pas un format valide";
$avatar_erreur3 = "Extension de l'avatar incorrecte";
$i++;
}
if (!empty($_FILES['avatar']['size']))
{
$maxsize = 10024; //Poid de l'image
$maxwidth = 100; //Largeur de l'image
$maxheight = 100; //Longueur de l'image
//Liste des extensions valides
$extensions_valides = array( 'jpg' , 'jpeg' , 'gif' , 'png', 'bmp' );
if ($_FILES['avatar']['error'] > 0)
{
$avatar_erreur = "Erreur lors du transfert de l'avatar : ";
}
if ($_FILES['avatar']['size'] > $maxsize)
{
$i++;
$avatar_erreur1 = "Le fichier est trop gros : (<strong>".$_FILES['avatar']['size']." Octets</strong> contre <strong>".$maxsize." Octets</strong>)";
}
$image_sizes = getimagesize($_FILES['avatar']['tmp_name']);
if ($image_sizes[0] > $maxwidth OR $image_sizes[1] > $maxheight)
{
$i++;
$avatar_erreur2 = "Image trop large ou trop longue :
(<strong>".$image_sizes[0]."x".$image_sizes[1]."</strong> contre <strong>".$maxwidth."x".$maxheight."</strong>)";
}
$extension_upload = strtolower(substr( strrchr($_FILES['avatar']['name'], '.') ,1));
if (!in_array($extension_upload,$extensions_valides) )
{
$i++;
$avatar_erreur3 = "Extension de l'avatar incorrecte";
}
}
if ($i==0)
{
?>
@@ -113,7 +92,6 @@ else //On est dans le cas traitement
<p>Cliquez <a href="./espace_membre.php">ici</a> pour revenir dans votre espace membre</p>
</div>
<?php
$nomavatar=(!empty($_FILES['avatar']['size']))?move_avatar($_FILES['avatar']):'';
post_Registre();
//Et on définit les variables de sessions
$_SESSION['pseudo'] = $pseudo;
@@ -126,11 +104,10 @@ else //On est dans le cas traitement
<div class="text-center"><h2>Inscription interrompue</h2><br>
<h5><?php echo $i; ?> erreurs se sont produites lors de votre incription</h5><br>
<ul>
<p><?php echo $email_erreur1; $email_erreur2; ?></p>
<p><?php echo $email_erreur1; ?></p>
<p><?php echo $pseudo_erreur1; $pseudo_erreur2; ?></p>
<p><?php echo $avatar_erreur1; $avatar_erreur2; ?></p>
<p><?php echo $avatar_erreur3; $avatar_erreur; ?></p>
<p><?php echo $mdp_erreur; ?></p>
<p><?php echo $avatar_erreur3; ?></p>
</ul><br>
<p>Cliquez <a href="./inscription.php">ici</a> pour recommencer</p>
</div>

View File

@@ -14,13 +14,27 @@ switch($action)
<div class="container-fluid">
<section id="content" class="page-content">
<div class="container text-center">
<h2>Profil de <?php echo stripslashes(htmlspecialchars($data['pseudo'])); ?></h2><br>
<img src=".<?php echo $data['imageeleve']; ?>" alt="Acun avatar" /><br>
<p class="text-2" ><strong>Adresse E-Mail : </strong>
<a class=link2 href="mailto:<?php echo stripslashes($data['adressemail']); ?>"> <?php echo stripslashes(htmlspecialchars($data['adressemail'])); ?></a><br/><br>
Ce membre est inscrit depuis le <strong><?php echo date('d-m-Y', strtotime(str_replace('/','-',$data['dateenregistre']))); ?></strong><br/><br/>
<strong>Localisation : </strong> <?php echo stripslashes(htmlspecialchars($data['adresse'])); ?>
</p>
<h2>Profil</h2><br>
<strong>Pseudo</strong><br>
<?php echo stripslashes(htmlspecialchars($data['pseudo'])); ?><br><br>
<strong>Avatar</strong><br>
<img src=".<?php echo $data['imageeleve']; ?>" alt="Acun avatar" /><br><br>
<p class="text-2" >
<strong>Email</strong><br>
<a class=link2 href="mailto:<?php echo stripslashes($data['adressemail']); ?>"> <?php echo stripslashes(htmlspecialchars($data['adressemail'])); ?></a><br/>
<strong>Prénom</strong><br>
<?php echo stripslashes(htmlspecialchars($data['prenom'])); ?><br>
<strong>Nom</strong><br>
<?php echo stripslashes(htmlspecialchars($data['nom'])); ?><br>
<strong>Age</strong><br>
<?php echo stripslashes(htmlspecialchars($data['age'])); ?><br>
<strong>Galop</strong><br>
<?php echo stripslashes(htmlspecialchars($data['galop'])); ?><br>
<strong>Adresse</strong><br>
<?php echo stripslashes(htmlspecialchars($data['adresse'])); ?><br><br>
<strong>Inscrit depuis :</strong><br>
<?php echo date('d F Y', strtotime(str_replace('/','-',$data['dateenregistre']))); ?><br/><br/>
</p>
</div>
</section>
</div>
@@ -41,31 +55,40 @@ switch($action)
<form method="post" action="profil.php?action=modifier" enctype="multipart/form-data">
<h2>Edition du profil de <?php echo stripslashes(htmlspecialchars($data['pseudo']));?></h2><br>
<fieldset>
<label class="labelI" for="password">*Mot de passe<br>Nouveau mot de passe</label><br>
<h3 class="labelI" for="password">Mot de passe</h3>
<label class="labelI" for="password">Nouveau mot de passe</label><br>
<input type="password" name="password" id="password" /><br>
<label class="labelI" for="confirm">*Confirmation du mot de passe</label><br>
<input type="password" name="confirm" id="confirm" /><br>
</fieldset><br>
<fieldset><legend class=colorbold marg3 pad1>Contacts</legend>
</fieldset><br><br>
<fieldset><h2 class=colorbold marg3 pad1>Contacts</h2>
<label class="labelI" for="email">Adresse email</label><br>
<input type="text" name="email" id="email" value="<?php echo stripslashes($data['adressemail']); ?>" /><br>
</fieldset><br>
<fieldset><legend class=colorbold marg3 pad1>Informations supplémentaires</legend>
</fieldset><br><br>
<fieldset><h2 class=colorbold marg3 pad1>Informations supplémentaires</h2>
<label class="labelI" for="prenom">Prénom</label><br>
<input type="text" name="prenom" id="prenom" readonly="readonly" value="<?php echo stripslashes($data['prenom']); ?>" /><br>
<label class="labelI" for="nom">Nom</label><br>
<input type="text" name="nom" id="nom" readonly="readonly" value="<?php echo stripslashes($data['nom']); ?>" /><br>
<label class="labelI" for="age">Age</label><br>
<input type="number" name="age" id="age" readonly="readonly" value="<?php echo stripslashes($data['age']); ?>" /><br>
<label class="labelI" for="galop">Galop</label><br>
<input type="number" name="galop" id="galop" readonly="readonly" value="<?php echo stripslashes($data['galop']); ?>" /><br>
<label class="labelI" for="localisation">Localisation</label><br>
<input type="text" name="localisation" id="localisation" value="<?php echo stripslashes($data['adresse']); ?>" />
</fieldset><br>
<fieldset><legend class=colorbold marg3 pad1>Profil sur le forum</legend>
Avatar actuel <img src=".<?php echo $data['imageeleve'];?>" alt="pas d avatar" /><br><br>
<label class="labelI" for="avatar">Changer mon avatar</label><br>
<input type="file" name="avatar" id="avatar" /><br>(Taille max : 10 ko)<br><br>
<label><input type="checkbox" name="delete" value="Delete" /> Supprimer mon avatar</label>
</fieldset><br><br>
<fieldset><h2 class=colorbold marg3 pad1>Profil sur le forum</h2>
<label class="labelI" for="avatar">Avatar actuel</label><br>
<img src=".<?php echo $data['imageeleve'];?>" alt="pas d avatar" /><br><br>
<strong class="labelI" for="avatar">Nouvelle image : </strong>
<input type="file" name="avatar" id="avatar" accept=".png, .jpg, .jpeg, gif" /><br><br>
<strong><input type="checkbox" name="delete" value="Delete" /> Supprimer mon avatar</strong>
</fieldset><br>
<p>
<input type="submit" value="Modifier mon profil" class="button-3"/><br>
<input type="hidden" id="sent" name="sent" value="1" />
</p><br>
<p>Les champs avec une * sont obligatoires</p><br>
<strong>Les champs avec une * sont obligatoires</strong><br><br>
</form>
</div>
</section>
@@ -77,10 +100,6 @@ switch($action)
//On déclare les variables
$mdp_erreur = NULL;
$email_erreur1 = NULL;
$email_erreur2 = NULL;
$avatar_erreur = NULL;
$avatar_erreur1 = NULL;
$avatar_erreur2 = NULL;
$avatar_erreur3 = NULL;
//Encore et toujours notre belle variable $i :p
$i = 0;
@@ -89,6 +108,7 @@ switch($action)
$localisation = $_POST['localisation'];
$pass = /*md5*/($_POST['password']);
$confirm = /*md5*/($_POST['confirm']);
$extensions_valides = array( 'jpg' , 'jpeg' , 'gif' , 'png' );
//Vérification des champs du formulaire
if ($pass != $confirm || empty($confirm) || empty($pass))
{
@@ -104,52 +124,19 @@ switch($action)
$email_erreur1 = "Votre adresse email est déjà utilisé par un membre";
$i++;
}
if (!preg_match("#^[a-z0-9A-Z._-]+@[a-z0-9._-]{2,}\.[a-z]{2,4}$#", $email) || empty($email))
{
$email_erreur2 = "Votre nouvelle adresse E-Mail n'a pas un format valide";
$i++;
}
}
if (!empty($_FILES['avatar']['size']))
$data = get_Pseudo();
$extension_upload = strtolower(substr( strrchr($_FILES['avatar']['name'], '.') ,1));
if (!in_array($extension_upload,$extensions_valides) )
{
$maxsize = 30072; //Poid de l'image
$maxwidth = 100; //Largeur de l'image
$maxheight = 150; //Longueur de l'image
//Liste des extensions valides
$extensions_valides = array( 'jpg' , 'jpeg' , 'gif' , 'png', 'bmp' );
if ($_FILES['avatar']['error'] > 0)
{
$avatar_erreur = "Erreur lors du tranfsert de l'avatar : ";
}
if ($_FILES['avatar']['size'] > $maxsize)
{
$i++;
$avatar_erreur1 = "Le fichier est trop gros :
(<strong>".$_FILES['avatar']['size']." Octets</strong>
contre <strong>".$maxsize." Octets</strong>)";
}
$image_sizes = getimagesize($_FILES['avatar']['tmp_name']);
if ($image_sizes[0] > $maxwidth OR $image_sizes[1] > $maxheight)
{
$i++;
$avatar_erreur2 = "Image trop large ou trop longue :
(<strong>".$image_sizes[0]."x".$image_sizes[1]."</strong> contre
<strong>".$maxwidth."x".$maxheight."</strong>)";
}
$extension_upload = strtolower(substr( strrchr($_FILES['avatar']['name'], '.') ,1));
if (!in_array($extension_upload,$extensions_valides) )
{
$i++;
$avatar_erreur3 = "Extension de l'avatar incorrecte";
}
$i++;
$avatar_erreur3 = "Extension de l'avatar incorrecte";
}
if ($i == 0) // Si $i est vide, il n'y a pas d'erreur sur l'avatar
{
if (!empty($_FILES['avatar']['size']))
{
post_UpdateAvatar();
post_UpdateAvatar($data['pseudo']);
}
if (isset($_POST['delete']))
{

View File

@@ -10,6 +10,7 @@ footer {
overflow:hidden;
}
.container-fluid{
min-height: 80vh;
margin:0 !important;
padding:0 !important;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,9 +1,9 @@
<?php
// Connexion <20> la base de donn<6E>es
// Connexion <20> la base de donn<6E>es
try
{
$bdd = new PDO('mysql:host=nasccb:3307;dbname=Ecurie', 'christian', 'F8orP#NRqd#oKLQ#',array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
$bdd = new PDO('mysql:host=nasccb:PORT;dbname=Ecurie', 'USER', 'PASS',array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
}
catch(Exception $e)
{

View File

@@ -27,14 +27,26 @@ function post_Registre()
$pseudo=$_POST['pseudo'];
$pass = /*md5*/($_POST['password']);
$email = $_POST['email'];
$nomavatar=(!empty($_FILES['avatar']['size']))?move_avatar($_FILES['avatar']):'';
mkdir("./images/avatars/".$pseudo."/", 0700);
$nomavatar=(!empty($_FILES['avatar']['size']))?edit_avatar($_FILES['avatar'], $pseudo):'';
$localisation = $_POST['localisation'];
$req = $bdd->prepare('INSERT INTO Eleve (pseudo, mdp, adressemail, imageeleve, adresse, dateenregistre)
VALUES (:pseudo, :pass, :email, :nomavatar, :localisation, NOW())');
$prenom = $_POST['prenom'];
$nom = $_POST['nom'];
$sexe = $_POST['sexe'];
$age = $_POST['age'];
$galop = $_POST['galop'];
$req = $bdd->prepare('INSERT INTO Eleve (pseudo, mdp, adressemail, imageeleve, adresse, prenom, nom, sexe, age, galop, dateenregistre)
VALUES (:pseudo, :pass, :email, :nomavatar, :localisation, :prenom, :nom, :sexe, :age, :galop, NOW())');
$req->bindValue(':pseudo', $pseudo, PDO::PARAM_STR);
$req->bindValue(':pass', $pass, PDO::PARAM_INT);
$req->bindValue(':pass', $pass, PDO::PARAM_STR);
$req->bindValue(':email', $email, PDO::PARAM_STR);
$req->bindValue(':nomavatar', $nomavatar, PDO::PARAM_STR);
$req->bindValue(':localisation', $localisation, PDO::PARAM_STR);
$req->bindValue(':prenom', $prenom, PDO::PARAM_STR);
$req->bindValue(':nom', $nom, PDO::PARAM_STR);
$req->bindValue(':sexe', $sexe, PDO::PARAM_STR);
$req->bindValue(':age', $age, PDO::PARAM_INT);
$req->bindValue(':galop', $galop, PDO::PARAM_INT);
$req->execute();
}

View File

@@ -4,7 +4,7 @@ function get_MemberInfo()
global $bdd;
$membre = isset($_GET['m'])?(int) $_GET['m']:'';
//On récupère les infos du membre
$req = $bdd->prepare('SELECT pseudo, imageeleve, adressemail, dateenregistre, adresse FROM Eleve WHERE ideleve=:membre');
$req = $bdd->prepare('SELECT pseudo, imageeleve, adressemail, dateenregistre, adresse, prenom, nom, age, galop FROM Eleve WHERE ideleve=:membre');
$req->bindValue(':membre',$membre, PDO::PARAM_INT);
$req->execute();
$data = $req->fetch();
@@ -14,8 +14,9 @@ function get_MemberInfoId()
{
global $bdd;
$id=(isset($_SESSION['ideleve']))?(int) $_SESSION['ideleve']:0;
//On prend les infos du membre
$req = $bdd->prepare('SELECT pseudo, adressemail,adresse,imageeleve FROM Eleve WHERE ideleve=:id');
$req = $bdd->prepare('SELECT pseudo, imageeleve, adressemail, adresse, prenom, nom, age, galop FROM Eleve WHERE ideleve=:id');
$req->bindValue(':id',$id,PDO::PARAM_INT);
$req->execute();
$data = $req->fetch();
@@ -32,6 +33,17 @@ function get_checkMail()
$data = $req->fetch();
return $data;
}
function get_Pseudo()
{
global $bdd;
$id=(isset($_SESSION['ideleve']))?(int) $_SESSION['ideleve']:0;
//On commence donc par récupérer le pseudo
$req = $bdd->prepare('SELECT pseudo FROM Eleve WHERE ideleve =:id');
$req->bindValue(':id',$id,PDO::PARAM_INT);
$req->execute();
$data = $req->fetch();
return $data;
}
function get_checkCopyMail()
{
global $bdd;
@@ -44,11 +56,11 @@ function get_checkCopyMail()
$req->CloseCursor();
return $mail_free;
}
function post_UpdateAvatar()
function post_UpdateAvatar($pseudo)
{
global $bdd;
$id=(isset($_SESSION['ideleve']))?(int) $_SESSION['ideleve']:0;
$nomavatar=move_avatar($_FILES['avatar']);
$nomavatar=edit_avatar($_FILES['avatar'], $pseudo );
$req = $bdd->prepare('UPDATE Eleve SET imageeleve = :avatar WHERE ideleve = :id');
$req->bindValue(':avatar',$nomavatar,PDO::PARAM_STR);
$req->bindValue(':id',$id,PDO::PARAM_INT);
@@ -72,7 +84,7 @@ function post_UpdateMember()
$email = $_POST['email'];
$localisation = $_POST['localisation'];
$req = $bdd->prepare('UPDATE Eleve SET mdp = :mdp, adressemail=:mail, adresse=:loc WHERE ideleve=:id');
$req->bindValue(':mdp',$pass,PDO::PARAM_INT);
$req->bindValue(':mdp',$pass,PDO::PARAM_STR);
$req->bindValue(':mail',$email,PDO::PARAM_STR);
$req->bindValue(':loc',$localisation,PDO::PARAM_STR);
$req->bindValue(':id',$id,PDO::PARAM_INT);

View File

@@ -2,7 +2,6 @@
</div>
</div>
<!--MapsBootsrap-->
<script async="" src="https://www.google-analytics.com/ga.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>

View File

@@ -32,7 +32,7 @@
</button>
</div>
<div class="modal-body">
<img class="modal-image" src="./images/centre/obstacle.jpg">
<img class="img-thumbnail" src="./images/centre/obstacle.jpg">
<p></p>
</div>
</div>
@@ -49,7 +49,7 @@
</button>
</div>
<div class="modal-body">
<img class="modal-image" src="./images/centre/carriere.jpg">
<img class="img-thumbnail" src="./images/centre/carriere.jpg">
<p></p>
</div>
</div>
@@ -66,7 +66,7 @@
</button>
</div>
<div class="modal-body">
<img class="modal-image" src="./images/centre/dressage.jpg">
<img class="img-thumbnail" src="./images/centre/dressage.jpg">
<p></p>
</div>
</div>
@@ -83,7 +83,7 @@
</button>
</div>
<div class="modal-body">
<img class="modal-image" src="./images/centre/manege.jpg">
<img class="img-thumbnail" src="./images/centre/manege.jpg">
<p></p>
</div>
</div>
@@ -100,7 +100,7 @@
</button>
</div>
<div class="modal-body">
<img class="modal-image" src="./images/centre/boxe.jpg">
<img class="img-thumbnail" src="./images/centre/boxe.jpg">
<p></p>
</div>
</div>
@@ -117,7 +117,7 @@
</button>
</div>
<div class="modal-body">
<img class="modal-image" src="./images/centre/stabulation.jpg">
<img class="img-thumbnail" src="./images/centre/stabulation.jpg">
</div>
</div>
</div>
@@ -133,7 +133,7 @@
</button>
</div>
<div class="modal-body">
<img class="modal-image" src="./images/centre/paddock.jpg">
<img class="img-thumbnail" src="./images/centre/paddock.jpg">
<p></p>
</div>
</div>
@@ -150,7 +150,7 @@
</button>
</div>
<div class="modal-body">
<img class="modal-image" src="./images/centre/rond.jpg">
<img class="img-thumbnail" src="./images/centre/rond.jpg">
<p></p>
</div>
</div>