| Current Path : /home/happyrenas/old/happy-and-pay.fr/administration/templates/admin3/ |
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/happyrenas/old/happy-and-pay.fr/administration/templates/admin3/relance.php |
<?
$page="index.php";
include("config.php");
$payment_id = $db->escape($_GET['payment_id']);
$reservation_id = $db->escape($_GET['reservation_id']);
$myquery = "SELECT * from client_reservation where id =".$reservation_id;
$reservation = $db->get_row($myquery);
$reservation_id = $reservation->id;
$proprietaire_id = $reservation->proprietaire_id;
$date1 = $reservation->date_debut; $date1 = date("d-m-Y", strtotime($date1));
$date2 = $reservation->date_fin; $date2 = date("d-m-Y", strtotime($date2));
$proprietaire_mail = $reservation->proprietaire_mail;
$ville = $reservation->ville;
$paiement_type = $reservation->paiement_type;
$myquery = "SELECT * from client where id =".$reservation->client_id;
$client = $db->get_row($myquery);
$client_nom = $client->nom;
$client_prenom = $client->prenom;
$client_mail = $client->mail;
require_once('includes/class.phpmailer.php');
require_once('includes/class.smtp.php');
//CLIENT
include('tpl_j_plus_4_client.php');
$client_mail="phil_aph@hotmail.com";
$objet="Votre réservation à ".$ville." du ".$date1." au ".$date2." - Attente acceptation par le propriétaire";
$from = "no-reply@happy-and-pay.fr";
$reply = $from;
$mail = new PHPmailer();
$mail->SMTPDebug = 0;
$mail->CharSet = "UTF-8";
$mail->IsHTML(true);
$mail->From=$from;
$mail->AddAddress($client_mail);
$mail->AddBCC("phil_aph@hotmail.com");
$mail->AddReplyTo($reply);
$mail->Subject=$objet;
$mail->Body=$message;
if(!$mail->Send())
{echo $mail->ErrorInfo;}
else{echo '';}
unset($mail);
sleep(2);
//PROPRIETAIRE
include('tpl_j_plus_4_proprietaire.php');
$client_mail="phil_aph@hotmail.com";
$objet="Votre réservation à ".$ville." du ".$date1." au ".$date2." - Demande de paiement acompte";
$from = "no-reply@happy-and-pay.fr";
$reply = $from;
$mail = new PHPmailer();
$mail->SMTPDebug = 0;
$mail->CharSet = "UTF-8";
$mail->IsHTML(true);
$mail->From=$from;
$mail->AddAddress($client_mail);
$mail->AddBCC("phil_aph@hotmail.com");
$mail->AddReplyTo($reply);
$mail->Subject=$objet;
$mail->Body=$message;
if(!$mail->Send())
{echo $mail->ErrorInfo;}
else{echo '';}
unset($mail);
$cgv_relance_date = date("Y-m-d H:i:s");
$cgv_relance_date = date("Y-m-d H:i:s", strtotime($cgv_relance_date));
$requete="UPDATE client_reservation set cgv_relance ='1', cgv_relance_date='".$cgv_relance_date."' where id =".$reservation_id;
echo $requete;
$db->query($requete);
?>