| Current Path : /home/happyrenas/old/happy-and-pay.fr/v3/ |
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/v3/module2.php |
<?
error_reporting(E_ALL);
ini_set('display_errors','On');
include("../config.php");
$page="module.php";
$mail_connect = $db->escape($_POST['mail_connect']);
$password_connect = $db->escape($_POST['password_connect']);
$password_connect = md5($password_connect);
$date_debut = $db->escape($_POST['date_debut']);$date_debut = date("Y-m-d", strtotime($date_debut));
$date_fin = $db->escape($_POST['date_fin']);$date_fin = date("Y-m-d", strtotime($date_fin));
$logement_adresse = $db->escape($_POST['logement_adresse']);
$logement_cp = $db->escape($_POST['logement_cp']);
$logement_ville = $db->escape($_POST['logement_ville']);
$logement_pays = $db->escape($_POST['logement_pays']);
$proprietaire_mail = $db->escape($_POST['proprietaire_mail']);
$montant = $db->escape($_POST['montant']);
$montant = str_replace(",",".",$montant);
$paiement_type = $db->escape($_POST['paiement_type']);
$assurance_annulation = $db->escape($_POST['assurance_annulation']);
$date_creation = date("Y-m-d");
$date_creation = date("Y-m-d", strtotime($date_creation));
if ($assurance_annulation==1)
{
//echo "*".$assurance_annulation;
require_once('includes/class.phpmailer.php');
require_once('includes/class.smtp.php');
/// MAIL TO THE CLIENT
include('tpl_assurance.php');
$objet="Votre réservation à ".$logement_ville." du ".date("d-m-Y", strtotime($date_debut))." au ".date("d-m-Y", strtotime($date_fin))." - Assurance annulation";
$from = "no-reply@happy-and-pay.fr";
$destinataire = $_SESSION['mail'];
$reply = $from;
$mail = new PHPmailer();
$mail->SMTPDebug = 0;
$mail->CharSet = "UTF-8";
$mail->IsHTML(true);
$mail->From=$from;
$mail->AddAddress($destinataire);
$mail->AddBCC("phil_aph@hotmail.com");
$mail->AddBCC("assurance@happy-and-pay.fr");
$mail->AddReplyTo($reply);
$mail->Subject=$objet;
$mail->Body=$message;
$piece_jointe="assurance_annulation/assurance_notice_valant_cg.pdf";
$mail->AddAttachment($piece_jointe);
$piece_jointe="assurance_annulation/bulletin adhesion Assurances Happy rentals.pdf";
$mail->AddAttachment($piece_jointe);
if(!$mail->Send())
{echo $mail->ErrorInfo;}
else{echo '';}
unset($mail);
}
// INSERTION RESERVATION
if ($_POST['proprietaire_mail']!='')
{
$client_id=$_SESSION['utilisateur_id'];
$requete="INSERT INTO client_reservation(
client_id,
date_debut,
date_fin,
adresse,
cp,
ville,
pays,
proprietaire_mail,
montant,
paiement_type,
assurance_annulation,
date_creation
)
VALUES(
'$client_id',
'$date_debut',
'$date_fin',
'$logement_adresse',
'$logement_cp',
'$logement_ville',
'$logement_pays',
'$proprietaire_mail',
'$montant',
'$paiement_type',
'$assurance_annulation',
'$date_creation')";
$db->query($requete);
//echo $requete;
$message="insert_reservation_ok";
$_SESSION['montant'] = $montant*100;
$myquery = "select * from client_reservation order by id DESC LIMIT 1";
$marequete = $db->get_row($myquery);
$_SESSION['reservation_id'] = $marequete->id;
//05/07/2016//
$requete="INSERT INTO client_reservation_proprietaire(proprietaire_mail,date_creation) VALUES('$proprietaire_mail','$date_creation')";
$is_unique = $db->get_var("select count(id) from client_reservation_proprietaire where 1 AND proprietaire_mail='".$proprietaire_mail."'");
if ($is_unique==0) {$db->query($requete);}
//05/07/2016//
}
?>
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<title>Happy And Pay</title>
<meta name='description' content=""/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="icon" href="../images/icone.ico"/>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="../assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="../assets/base/css/plugins.css" rel="stylesheet" type="text/css" />
<link href="../assets/base/css/components.css" id="style_components" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="design.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/prefixfree.js"></script>
</head>
<body>
<div id="bloc-assistance">
<button onclick="ouvrir('bloc-assistance');"><img src="../images/assistance.png" alt="Assistance"/></button><!--
--><p class="font11">
Vous rencontrez un problème ? Contactez notre service d’assistance :<br/>
<a href="http://www.happy-rentals.com/happy-pay/demande-assistance.php" title="Vous rencontrez un problème ? Contactez notre assistance !">
ASSISTANCE
</a>
</p>
</div>
<header>
<div>
<p id="logo"><a href="http://www.happy-and-pay.fr/" title=""><img src="../images/logo-happy-rentals.jpg" alt="Logo Happy Rentals" class="middle"/></a></p>
</div>
</header>
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<section id="main-content" class="paiement-module">
<div class="width940">
<p id="top"></p>
</p>
<div>
<h1>MODULE DE PAIEMENT DIRECT</h1>
<p class="font18 center blanc encadre">
<a href="paiement_simple.php" class="underline">
<b>Merci ! Nous disposons maintenant de toutes les informations.<br> Cliquez pour effectuer votre paiement</b>
</a>
</p>
</div>
</div>
</section>
<footer>
<div>
<nav>
<a href="http://www.happy-rentals.com" title="Revenir à l'accueil du site internet">Accueil</a>
<a href="../le-concept-happy-rentals.php" title="Le concept Happy Rentals : sécurité et simplicité">Pourquoi ?</a>
<a href="../comment-utiliser-happy-rentals.php" title="Comment utiliser Happy-Rentals ?">Comment ?</a>
<a href="../tarifs.php" title="Les tarifs : prix mini, sécurité maxi">Tarifs</a>
<a href="../questions-frequentes.php" title="Une question ? Consultez la F.A.Q Happy Rentals">F.A.Q</a>
<a href="../demonstration-happy-rentals.php" title="Découvrez comment fonctionne Happy Rentals">Démo</a>
<a href="../contactez-happy-rentals.php" title="Prendre contact avec Happy Rentals">Contact</a>
</nav>
<p>
© Copyright 2014 - Happy Rentals - Tous droits réservés - Marque déposée<br/>
<a href="../docs/conditions-generales-vente-happy-rentals.pdf" title="Conditions générales de vente" target="_blank">Conditions générales de vente</a>
- <a href="../docs/conditions-generales-utilisation-happy-rentals.pdf" title="Conditions générales d'utilisation" target="_blank">Conditions générales d'utilisation</a> - <a href="docs/Mangopay_Terms-FR.pdf" title="Conditions générales Mangopay" target="_blank">Conditions générales Mangopay</a>
<br/>
Happy R protège les clients des faux propriétaires ou de personnes qui usurpent l'identité de vrai propriétaire.<br/>
Une création Web <a href="http://www.melting-k.fr" title="Création de sites internet à Toulouse">Melting K</a> - <a href="../mentions-legales.php" title="Nos mentions légales">Mentions légales</a>
<br/><br/>
<img src="../images/powered-by-mangopay.png" alt="Powered by mango pay" class="middle"/> -|- <a href="http://www.goonassurances.com/" title="GO ON, partenaire assurance annulation" target="_blank">Partenaire Assurance Annulation : <img src="../images/logo-go-on-assurances.png" alt="GO ON ASURANCES" class="middle"/> </a>
</p>
</div>
</footer>
</body>
<link rel="stylesheet" type="text/css" media="all" href="/modules/datepicker/daterangepicker.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="/modules/datepicker/moment.js"></script>
<script type="text/javascript" src="/modules/datepicker/daterangepicker.js"></script>
<?
//$date_picker = date("Y-m-d");
//$date_picker = date("d/m/Y", strtotime($date_picker));
$date_picker = date('d/m/Y', strtotime('+ 4 days'));
$date_naissance = date('d/m/Y', strtotime('-18 years'));
?>
<script type="text/javascript">
$(function() {
$('input[name="date_debut"]').daterangepicker({
"singleDatePicker": true,
"autoApply": true,
"locale": {
"format": "DD-MM-YYYY",
"separator": " - ",
"applyLabel": "Apply",
"cancelLabel": "Cancel",
"fromLabel": "From",
"toLabel": "To",
"customRangeLabel": "Custom",
"weekLabel": "W",
"daysOfWeek": [
"Di",
"Lu",
"Ma",
"Me",
"Je",
"Ve",
"Sa"
],
"monthNames": [
"Janvier",
"Février",
"Mars",
"Avril",
"Mai",
"Juin",
"Juillet",
"Aout",
"Septembre",
"Octobre",
"Novembre",
"Decembre"
],
"firstDay": 1
},
"linkedCalendars": false,
"startDate": "<?echo $date_picker;?>",
"minDate": "<?echo $date_picker;?>"
}, function(start, end, label) {
//var $date1 = $('#date_debut').val();
//var $date2 = $('#date_fin').val();
//var $toto = $(this).value;
//alert (start.format('DD-MM-YYYY'));
//$('#date_fin').data('daterangepicker').setStartDate('01-07-2016');
$('#date_fin').val(start.format('DD-MM-YYYY'));
//console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
});
});
</script>
<script type="text/javascript">
$(function() {
$('input[name="date_fin"]').daterangepicker({
"singleDatePicker": true,
"autoApply": true,
"locale": {
"format": "DD-MM-YYYY",
"separator": " - ",
"applyLabel": "Apply",
"cancelLabel": "Cancel",
"fromLabel": "From",
"toLabel": "To",
"customRangeLabel": "Custom",
"weekLabel": "W",
"daysOfWeek": [
"Di",
"Lu",
"Ma",
"Me",
"Je",
"Ve",
"Sa"
],
"monthNames": [
"Janvier",
"Février",
"Mars",
"Avril",
"Mai",
"Juin",
"Juillet",
"Aout",
"Septembre",
"Octobre",
"Novembre",
"Decembre"
],
"firstDay": 1
},
"linkedCalendars": false,
"startDate": "<?echo $date_picker;?>",
"minDate": "<?echo $date_picker;?>"
}, function(start, end, label) {
//console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
});
});
</script>
<script type="text/javascript">
$(function() {
$('input[name="date_naissance"]').daterangepicker({
"singleDatePicker": true,
"autoApply": true,
"locale": {
"format": "DD-MM-YYYY",
"separator": " - ",
"applyLabel": "Apply",
"cancelLabel": "Cancel",
"fromLabel": "From",
"toLabel": "To",
"customRangeLabel": "Custom",
"weekLabel": "W",
"daysOfWeek": [
"Di",
"Lu",
"Ma",
"Me",
"Je",
"Ve",
"Sa"
],
"monthNames": [
"Janvier",
"Février",
"Mars",
"Avril",
"Mai",
"Juin",
"Juillet",
"Aout",
"Septembre",
"Octobre",
"Novembre",
"Decembre"
],
"firstDay": 1
},
"linkedCalendars": false,
"startDate": "<?echo $date_naissance;?>",
"endDate": "<?echo $date_naissance;?>"
}, function(start, end, label) {
//console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
});
});
</script>
<!-- SCRIPTS -->
<script type="text/javascript">
function affiche(id)
{
var element = document.getElementById(id);
var elements = document.getElementsByClassName('visible');
var i = elements.length;
if (element.className=="visible")
{
element.className="not-visible"
}
else if (element.className=="not-visible")
{
while(i--) {
elements[i].className="not-visible";
}
element.className="visible"
}
}
</script>
<script type="text/javascript">
function ouvrir(id)
{
var element = document.getElementById(id);
if (element.className=="open")
{
element.className="close";
}
else
{
element.className="open";
}
}
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-89044331-3', 'auto');
ga('send', 'pageview');
</script>
</html>