| Current Path : /home/h/a/p/happyrenas/old/happy-r.fr/transfere_pro/administration/templates/admin2/ |
Linux webd005.cluster105.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 |
| Current File : /home/h/a/p/happyrenas/old/happy-r.fr/transfere_pro/administration/templates/admin2/mail.php |
<?
$vdate=date("Y-m-d");
$vdate_fr = date("d-m-Y", strtotime($vdate));
$vheure = date("Y-m-d H:i:s");
require('includes/class.phpmailer.php');
require('includes/class.smtp.php');
$objet="Happy Rentals";
$lien=$nom_de_domaine."/administration/templates/admin2/contrat.php";
// MESSAGE
$message='
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>POSITIONNEMENT</title>
<style type="text/css">
#outlook a {padding:0;}
body{width:100% !important; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; margin:0; padding:0;}
.ExternalClass {width:100%;}
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;}
#backgroundTable {margin:0; padding:0; width:100% !important; line-height: 100% !important;}
img {outline:none; text-decoration:none; -ms-interpolation-mode: bicubic;}
a img {border:none;}
.image_fix {display:block;}
p {margin: 1em 0;}
h1, h2, h3, h4, h5, h6 {color: black !important;}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {color: blue !important;}
h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active {color: red !important;}
h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited {color: purple !important;}
table td {border-collapse: collapse;padding:10px;height:16px;}
table { border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; }
a:link { color: orange; }
a:visited { color: blue; }
a:hover { color: green; }
body {font-family:Verdana, Arial, Helvetica, sans-serif;font-size: 11px;}
#alt{color:#000;background-color:#EAF2D3;}
@media only screen and (max-device-width: 480px)
{
a[href^="tel"], a[href^="sms"] {
text-decoration: none;
color: black;
pointer-events: none;
cursor: default;
}
.mobile_link a[href^="tel"], .mobile_link a[href^="sms"] {
text-decoration: default;
color: orange !important;
pointer-events: auto;
cursor: default;
}
}
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
a[href^="tel"], a[href^="sms"] {
text-decoration: none;
color: blue;
pointer-events: none;
cursor: default;
}
.mobile_link a[href^="tel"], .mobile_link a[href^="sms"] {
text-decoration: default;
color: orange !important;
pointer-events: auto;
cursor: default;
}
}
@media only screen and (-webkit-min-device-pixel-ratio: 2) {}
@media only screen and (-webkit-device-pixel-ratio:.75){}
@media only screen and (-webkit-device-pixel-ratio:1){}
@media only screen and (-webkit-device-pixel-ratio:1.5){}
</style>
<!--[if IEMobile 7]>
<style type="text/css">
</style>
<![endif]-->
<!--[if gte mso 9]>
<style>
</style>
<![endif]-->
</head>
<body>
<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable">
<tr>
<td>
Madame, Monsieur, <br>
Faisant suite à nos échanges, veuillez trouver ci-dessous le lien vous permettant d\'accéder au contrat en ligne et finaliser votre réservation. <br>
Cliquez sur ce lien et laissez-vous guider : '.$lien.'<br>
Une fois le contrat complété et l\'acompte réglé, vous recevrez un e-mail avec votre contrat accompagné du descriptif de l\'hébergement.<br>
Dans l\'attente de vous accueillir dans notre belle région, je reste à votre disposition pour tout complément d\'information.<br>
Cordialement,<br>
HR<br>
</td>
</tr>
</table>
</body>
</html>
';
$message=utf8_decode($message);
$from=$nom_du_mail;
$to_1=$nom_du_mail;
$to_2=$nom_du_mail;
$reply=$nom_du_mail;
$mail = new PHPmailer();
$mail->IsHTML(true);
$mail->From=$from;
$mail->AddAddress($to_1);
$mail->AddAddress($to_2);
$mail->AddReplyTo($reply);
$mail->Subject=$objet;
$mail->Body=$message;
function lister($dir)
{
if (is_dir($dir))
{
if ($dh = opendir($dir))
{
while (($file = readdir($dh)) !== false)
{
if ($file!='.' && $file!='..' && $file!='thumbnail')
{
$cpt=$cpt+1;
$matrice[$cpt] = array('nom' => $file);
}
}
closedir($dh);
return $matrice;
}
}
}
// LISTER LE CONTENU DU DOSSIER
$id_proprietaire=1;
$logement_id=12;
$dir="../../assets/global/plugins/jquery-file-upload/server/php/files/".$id_proprietaire."/".$logement_id."/";
$lister_exec = lister($dir);
if (!empty($lister_exec))
{
foreach ($lister_exec as $key)
{
foreach ($key as $v2)
{
echo $dir.$v2."<br>";
$mail->AddAttachment($dir.$v2);
}
}
}
if(!$mail->Send())
{echo $mail->ErrorInfo;}
else{echo '';}
unset($mail);
?>