| 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/module1.php |
<?
error_reporting(E_ALL);
ini_set('display_errors','On');
include("../config.php");
$page="module.php";
$nom = $db->escape($_POST['nom']);
$prenom = $db->escape($_POST['prenom']);
$adresse = $db->escape($_POST['adresse']);
$cp = $db->escape($_POST['cp']);
$ville = $db->escape($_POST['ville']);
$pays = $db->escape($_POST['pays']);
$mail = $db->escape($_POST['mail']);
$password = $db->escape($_POST['password']);
$password = md5($password);
$tel = $db->escape($_POST['tel']);
$nationalite = $db->escape($_POST['nationalite']);
$date_naissance = $db->escape($_POST['date_naissance']);
$date_naissance = date("Y-m-d", strtotime($date_naissance));
$description = $db->escape($_POST['description']);
$statut = 1;
$date_creation = date("Y-m-d");
$date_creation = date("Y-m-d", strtotime($date_creation));
// INSERTION CLIENT
if ($_POST['nom']!='')
{
$requete="INSERT INTO client(
nom,
prenom,
adresse,
cp,
ville,
pays,
mail,
password,
tel,
nationalite,
date_naissance,
description,
statut,
date_creation
)
VALUES(
'$nom',
'$prenom',
'$adresse',
'$cp',
'$ville',
'$pays',
'$mail',
'$password',
'$tel',
'$nationalite',
'$date_naissance',
'$description',
'$statut',
'$date_creation')";
$is_unique = $db->get_var("select count(id) from client where 1 AND mail='".$mail."'");
if ($is_unique==0)
{
//INSERTION OK
$db->query($requete);
$_SESSION['nom'] = $nom;
$_SESSION['prenom'] = $prenom;
$_SESSION['adresse'] = $adresse;
$_SESSION['cp'] = $cp;
$_SESSION['ville'] = $ville;
$_SESSION['pays'] = $pays;
$_SESSION['mail'] = $mail;
$_SESSION['tel'] = $tel;
$_SESSION['nationalite'] = $nationalite;
$_SESSION['date_naissance'] = $date_naissance;
$myquery="select * from client order by id DESC LIMIT 1";
$marequete = $db->get_row($myquery);
$_SESSION['utilisateur_id'] = $marequete->id;
}
else
{
//INSERTION FAILED
$message="ce compte existe déjà et le mot de passe est incorrect";
}
}
?>
<!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>
<h1>MODULE DE PAIEMENT DIRECT <small><small> (Compte client HR<?echo $_SESSION['utilisateur_id'];?>)</small></small></h1>
<p class="font18 center encadre blanc"> Etape II : Votre séjour</p>
<form action="module2.php" method="POST" class="formulaire-module-paiement">
<label>Date début: </label>
<input value="" type="text" name="date_debut" id="date_debut" required/>
<label>Date fin: </label>
<input value="" type="text" name="date_fin" id="date_fin" required/>
<label>Adresse du logement : </label>
<input value="" type="text" name="logement_adresse" placeholder="" maxlength="100" required />
<label>Code postal : </label>
<input value="" type="text" name="logement_cp" placeholder="" maxlength="100" required />
<label>Ville : </label>
<input value="" type="text" name="logement_ville" placeholder="" maxlength="100" required />
<label>Pays : </label>
<select name="logement_pays" id="logement_pays" >
<?
$myquery = "SELECT * from pays where 1 order by nom_fr_fr";
$pays = $db->get_results($myquery);
if (!empty($pays))
{
foreach ( $pays as $pays )
{
?>
<option class="blue" <?php if($pays->id==75){echo ' selected';}?> value="<?echo $pays->nom_fr_fr;?>"><?echo $pays->nom_fr_fr;?></option>
<?
}
}
?>
</select>
<label>Email du propriétaire : </label>
<input value="" type="email" name="proprietaire_mail" placeholder="" maxlength="100" required />
<label>Type de paiement : </label>
<select name="paiement_type" id="paiement_type" >
<option value="1">ACOMPTE</option>
<option value="2">SOLDE</option>
</select>
<label>Montant à payer : </label>
<input value="" type="numeric" name="montant" maxlength="100" required />
<label></label>
<input type="checkbox" name="assurance_annulation" value="1" >
<a target="_blank" class="gris underline" href="assurance_annulation/bulletin adhesion Assurances Happy rentals.pdf">Option assurance annulation</a> (3,5% du prix de la location) : contrat à compléter et à renvoyer <a class="underline gris" target="_blank" href="assurance_annulation/assurance_notice_valant_cg.pdf">avec le chèque de règlement à GO ON assurance</a>
<br/><br/>
<input type="checkbox" value="" required> <a target="_blank" class="underline gris" href="http://www.happy-and-pay.fr/docs/conditions-generales-utilisation-happy-and-pay.pdf">J'accepte les CGU</a>
<br/><br/>
<button type="submit" class="bouton-arrondi">VALIDER</button>
</form>
<script>
document.getElementById('logement_pays').style.backgroundColor = "#ff6400";
document.getElementById('paiement_type').style.backgroundColor = "#ff6400";
</script>
<script type='text/javascript' src='//code.jquery.com/jquery-1.9.1.js'></script>
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$(function() {
if($('#paiement_type').val() == '2') {
$('#divstatut_detail').hide();
}
$('#paiement_type').change(function(){
if($('#paiement_type').val() == '1') {
$('#divstatut_detail').show();
} else {
$('#divstatut_detail').hide();
}
}
);
});
});//]]>
</script>
</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>
</html>