prepare( $query ); $queryRequest->bindParam( ':id_pro', $id, PDO::PARAM_INT ); $queryRequest->execute(); // Envoi de la notification au professionnel $query2=" SELECT * from inscriptions_pro WHERE id_pro=:id_pro "; $db2 = connect_base(); $queryRequest2 = $db2->prepare( $query2 ); $queryRequest2->bindParam( ':id_pro', $id, PDO::PARAM_INT ); $queryRequest2->execute(); $dataPro=$queryRequest2->fetchAll(); $countPro = $queryRequest2->rowCount(); if($countPro!=1){ //Pro introuvable header('location:./'); exit(); } $maCleDeCryptage = getCleDeCryptage(); $nomEtaPro = decrypter($maCleDeCryptage,$dataPro[0]['etablissement_pro']); $nomPro = decrypter($maCleDeCryptage,$dataPro[0]['nom_pro']); $prenomPro = decrypter($maCleDeCryptage,$dataPro[0]['prenom_pro']); $emailPro = decrypter($maCleDeCryptage,$dataPro[0]['email_pro']); //Envoi d'un email au collège ou lycée require 'config/class.phpmailer.php'; require 'config/phpmailer.settings.php'; $to=$emailPro; $objet="Demande d'inscription refusée"; $affich=''; $affich.=''; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.=''; $affich.=''; $affich.=''."\n"; $affich.='
 
Bonjour,
 
Votre inscription dans le cadre de l\'évènement Déciday! a été refusée.
 
Cordialement.
 
L\'équipe DECIDAY.
'; $mail->IsHTML(true); $mail->AddEmbeddedImage('images/bandeau-contact.jpg', 'bando', 'bandeau-contact.jpg'); $mail->Subject = utf8_decode($objet); $mail->Body = utf8_decode($affich); $mail->AddAddress($to); $mail->AltBody = "/-------//--------/"; $mail->send(); $_SESSION['msg']='Le professionnel est refusé, un email de notification lui a été adressé.'; header('location:suivi-pro-adm.php'); exit(); }