| Current Path : /home/happyrenas/myreco.online/administration/gestion/ |
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/myreco.online/administration/gestion/find.php |
<?
set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/../');
include("../../configuration.php");
include("../../includes/fonctions.php");
setlocale(LC_TIME, 'fr_FR.UTF-8');
///////////////////////
//PARAMETRES DE LA PAGE
///////////////////////
$totem = "find";
$page = "find";
$ariane = "find";
$ariane1 = "find";
$titre = "find";
?>
<!DOCTYPE html>
<html lang="fr">
<?include("includes/head.php");?>
<style>
.find-page {
max-width: 980px;
margin: 0 auto;
}
.find-hero {
background: #f8f5f1;
border: 1px solid #e6ddd4;
border-radius: 16px;
padding: 2.5rem 2rem;
margin-bottom: 2rem;
}
.find-hero h1 {
font-size: 2rem;
line-height: 1.2;
margin-bottom: 0;
font-weight: 700;
color: #181c32;
}
.find-brand {
color: #04a2e8;
font-weight: 700;
}
.find-domain {
font-size: 0.55em;
color: #7e8299;
font-weight: 600;
}
.find-highlight {
background: #f3f6f9;
border: 1px solid #e4e6ef;
border-radius: 12px;
padding: 1rem 1.25rem;
margin-bottom: 2rem;
}
.find-section-title {
font-size: 1.35rem;
font-weight: 700;
color: #181c32;
margin-bottom: 0.75rem;
}
.find-muted {
color: #7e8299;
}
.find-pricing-card {
height: 100%;
border: 1px solid #e4e6ef;
border-radius: 12px;
padding: 1.5rem;
background: #fff;
box-shadow: 0 0 20px rgba(76, 87, 125, 0.06);
}
.find-pricing-card h3 {
font-size: 1.1rem;
font-weight: 700;
margin-bottom: 1rem;
color: #181c32;
}
.find-price {
font-size: 2rem;
font-weight: 700;
color: #181c32;
line-height: 1.2;
margin-bottom: 0.5rem;
}
.find-price span {
font-size: 0.95rem;
font-weight: 500;
color: #7e8299;
}
.find-old-price {
display: inline-block;
margin-left: 0.75rem;
padding: 0.2rem 0.55rem;
font-size: 0.75rem;
border-radius: 20px;
background: #f3f6f9;
border: 1px solid #e4e6ef;
color: #7e8299;
text-decoration: line-through;
vertical-align: middle;
}
.find-offer {
background: #eef8fe;
border: 1px solid #cfeefe;
border-radius: 12px;
padding: 1rem 1.25rem;
margin-top: 2rem;
margin-bottom: 2rem;
}
.find-subscribe-box {
background: linear-gradient(180deg, #d6cec5 0%, #cbc3ba 100%);
border: 1px solid #b9aea3;
border-radius: 16px;
padding: 1.5rem;
}
.find-subscribe-header {
background: linear-gradient(180deg, #67aae7 0%, #2f82d2 100%);
border: 1px solid #5c97ca;
border-radius: 12px;
padding: 0.9rem 1rem;
text-align: center;
color: #fff;
font-weight: 700;
font-size: 1.1rem;
margin-bottom: 1rem;
}
.find-choice {
display: block;
background: #f9f8f6;
border: 1px solid #d8d2cb;
border-radius: 12px;
padding: 1rem;
cursor: pointer;
transition: all 0.15s ease;
height: 100%;
}
.find-choice:hover {
border-color: #3699ff;
box-shadow: 0 0 0 1px rgba(54, 153, 255, 0.15);
}
.find-choice input {
margin-right: 0.5rem;
}
.find-choice-title {
font-weight: 700;
color: #181c32;
}
.find-choice-text {
display: block;
color: #5e6278;
margin-top: 0.25rem;
}
.find-stripe-note {
font-size: 0.85rem;
color: #5e6278;
text-align: center;
margin-top: 0.75rem;
margin-bottom: 0;
}
.find-selection-note {
display: block;
font-size: 0.9rem;
color: #3f4254;
text-align: center;
margin-top: 0.75rem;
}
@media (max-width: 767.98px) {
.find-hero {
padding: 1.75rem 1.25rem;
}
.find-hero h1 {
font-size: 1.5rem;
}
}
</style>
<body id="kt_body" class="page-loading-enabled page-loading header-fixed header-mobile-fixed subheader-enabled subheader-fixed aside-enabled aside-fixed page-loading" style="background-color:#ECE8E4!important;">
<div id="halt_loader_overlay"></div><div id="halt_loader" class=""><i class="fa fa-spinner fa-spin"></i> <?echo $trad['Chargement des informations, merci de patienter'] ?? '⚠️';?></div>
<div class="d-flex flex-column flex-root">
<!--begin::Page-->
<div class="d-flex flex-row flex-column-fluid page">
<?include("includes/header_left.php");?>
<!--begin::Wrapper-->
<div class="d-flex flex-column flex-row-fluid wrapper" id="kt_wrapper">
<?include("includes/header_top.php");?>
<!--begin::Content-->
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<!--begin::Subheader-->
<div class="subheader py-2 py-4 subheader-solid" id="kt_subheader">
<div class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap">
<div class="d-flex align-items-center">
<div class="btn-group ml-2">
<a class="btn btn-secondary btn-sm" href="index.php?token=<?echo $token;?>"><?echo $trad['Mon compte'] ?? '⚠️';?></a>
</div>
<div class="btn-group ml-2">
<a class="btn btn-secondary btn-sm" href="etablissement_ajout.php?token=<?echo $token;?>"><?echo $trad['Ajouter un lieu'] ?? '⚠️';?></a>
</div>
<div class="btn-group ml-2">
<a class="btn btn-secondary btn-sm" href="lieux_visite.php?token=<?echo $token;?>"><?echo $trad['Supprimer un lieu'] ?? '⚠️';?></a>
</div>
<div class="btn-group ml-2">
<a class="btn btn-secondary btn-sm" href="mon_qrcode.php?token=<?echo $token;?>"><?echo $trad['Mon QR code'] ?? '⚠️';?></a>
</div>
<div class="btn-group ml-2">
<a class="btn btn-secondary btn-sm" href="ma_carte.php?token=<?echo $token;?>"><?echo $trad['Ma carte'] ?? '⚠️';?></a>
</div>
<div class="btn-group ml-2">
<a class="btn btn-primary btn-sm" href="find.php?token=<?echo $token;?>"><?echo $trad['find'] ?? '⚠️';?></a>
</div>
</div>
</div>
</div>
<!--end::Subheader-->
<?php
$myquery = "SELECT * from heb where token='".$token."'";
$fiche = $db->get_row($myquery);
$type_hebergement_db = strtolower(trim($fiche->type_hebergement ?? ''));
if ($type_hebergement_db === 'location') {
$type_hebergement = 'Location';
}
elseif ($type_hebergement_db === 'hotel' || $type_hebergement_db === 'hôtel' || $type_hebergement_db === 'camping') {
$type_hebergement = 'Hotel';
}
else {
$type_hebergement = ''; // cas null ou vide → fallback JS = choix 1
}
$hebergement_id = $fiche->id;
$stripe_locale = $fiche->country_code;
?>
<div class="d-flex flex-column-fluid">
<div class="<?echo $container_type;?>">
<div class="row">
<div class="col-xl-12" >
<div class="card card-custom" style="border: 1px solid <?echo $couleur_bordure;?>;">
<div class="card-body">
<div class="find-page"
data-hebergement-id="<?php echo htmlspecialchars($hebergement_id); ?>"
data-type-hebergement="<?php echo htmlspecialchars($type_hebergement); ?>"
data-locale="<?php echo htmlspecialchars($stripe_locale); ?>">
<div class="find-hero">
<h1>
Augmentez vos réservations directes<br>
avec <span class="find-brand">Find</span><span class="find-domain">.MyReco.online</span>
</h1>
</div>
<div class="find-highlight">
<div class="font-weight-bolder mb-2">Le QR code MyReco reste 100 % gratuit.</div>
<div class="find-muted">
Vous continuez à offrir le service MyReco à vos voyageurs gratuitement, avec ou sans abonnement à Find.
</div>
</div>
<div class="mb-10">
<h2 class="find-section-title">Pourquoi rejoindre Find dès maintenant ?</h2>
<p class="find-muted mb-4">
Les voyageurs utilisant le QR code MyReco recherchent de plus en plus des hébergements "MyReco Friendly".<br>
Profitez du réseau MyReco pour gagner en visibilité et obtenir plus de réservations directes.
</p>
<ul class="text-dark-75 pl-6 mb-0">
<li class="mb-2">Mise en avant de votre hébergement auprès de milliers d'utilisateurs du QR code MyReco</li>
<li class="mb-2">Plus de réservations directes</li>
<li class="mb-2">Moins de dépendance aux grandes plateformes de réservation</li>
<li class="mb-2">Pas de commissions des grandes plateformes = plus de marge pour vous</li>
</ul>
</div>
<div class="mb-10">
<h2 class="find-section-title">Tarifs Find <span class="text-muted font-size-sm">(Offre de lancement)</span></h2>
<div class="row">
<div class="col-md-6 mb-6">
<div class="find-pricing-card">
<h3>Locations, gîtes, chambres d’hôtes…</h3>
<div class="find-price">
24 € <span>TTC / an</span>
<span class="find-old-price">au lieu de 68 € TTC / an</span>
</div>
<p class="find-muted mb-0">Pour les locations saisonnières.</p>
</div>
</div>
<div class="col-md-6 mb-6">
<div class="find-pricing-card">
<h3>Hôtels et campings</h3>
<div class="find-price">
48 € <span>TTC / an</span>
<span class="find-old-price">au lieu de 136 € TTC / an</span>
</div>
<p class="find-muted mb-0">Pour les hôtels, campings et structures assimilées.</p>
</div>
</div>
</div>
<div class="find-offer">
<div class="font-weight-bolder mb-1">En bonus</div>
<div>
Si vous finalisez votre inscription avant le 15 juillet 2026, ce tarif préférentiel vous sera conservé chaque année 😊
</div>
</div>
</div>
<div class="find-subscribe-box">
<div class="find-subscribe-header">Confirmez votre type d’hébergement</div>
<p class="text-center text-muted font-size-sm mb-6">
Si votre type d’hébergement est déjà renseigné dans « Mon compte », il peut être pré-coché automatiquement ici.
</p>
<div class="row">
<div class="col-md-6 mb-4">
<label class="find-choice mb-0">
<div class="d-flex align-items-start">
<input type="radio" name="hebergement_type" value="location">
<div>
<div class="find-choice-title">Location, gîte, chambre d’hôtes…</div>
<span class="find-choice-text">Tarif : 24 € TTC / an</span>
</div>
</div>
</label>
</div>
<div class="col-md-6 mb-4">
<label class="find-choice mb-0">
<div class="d-flex align-items-start">
<input type="radio" name="hebergement_type" value="hotel_camping">
<div>
<div class="find-choice-title">Hôtel / camping</div>
<span class="find-choice-text">Tarif : 48 € TTC / an</span>
</div>
</div>
</label>
</div>
</div>
<div class="text-center mt-4">
<button type="button" class="btn btn-primary font-weight-bolder px-10" id="subscribeBtn">
Souscrire à Find
</button>
<p class="find-stripe-note">
Vous allez être redirigé vers Stripe pour finaliser votre inscription à Find.
</p>
<span class="find-selection-note" id="selectionNote"></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--end::Content-->
</div>
<!--begin::Footer-->
<?include("includes/footer.php");?>
<!--end::Footer-->
</div>
<!--end::Wrapper-->
</div>
<!--end::Page-->
</div>
<!--end::Main-->
<?include("includes/extrav2.php");?>
<script>
(function () {
const wrap = document.querySelector('.find-page');
const btn = document.getElementById('subscribeBtn');
const note = document.getElementById('selectionNote');
const radios = document.querySelectorAll('input[name="hebergement_type"]');
if (!wrap || !btn || !note || !radios.length) {
return;
}
const hebergementId = (wrap.dataset.hebergementId || '').trim();
const typeHebergement = (wrap.dataset.typeHebergement || '').trim();
const stripeLocale = (wrap.dataset.locale || 'fr').trim().toLowerCase();
const STRIPE_URL_LOCATION = 'https://buy.stripe.com/8x29AU09O5H96oAeu23AY0y';
const STRIPE_URL_HOTEL_CAMPING = 'https://buy.stripe.com/dRmfZig8M8Tl28k0Dc3AY0z';
function normalizeType(value) {
const v = String(value || '').trim().toLowerCase();
if (v === 'location') {
return 'location';
}
if (v === 'hôtel' || v === 'hotel' || v === 'camping') {
return 'hotel_camping';
}
return '';
}
function preselectType() {
const normalized = normalizeType(typeHebergement);
if (!normalized) {
radios[0].checked = true;
return;
}
const target = document.querySelector('input[name="hebergement_type"][value="' + normalized + '"]');
if (target) {
target.checked = true;
}
}
function getSelectedType() {
const checked = document.querySelector('input[name="hebergement_type"]:checked');
return checked ? checked.value : 'location';
}
function buildClientReferenceId(idValue) {
return String(idValue || '').trim() + '_Find';
}
function buildStripeUrl(baseUrl, hebergementIdValue, localeValue) {
if (!baseUrl) {
return '';
}
const url = new URL(baseUrl);
url.searchParams.set('locale', localeValue || 'fr');
url.searchParams.set('client_reference_id', buildClientReferenceId(hebergementIdValue));
return url.toString();
}
function getStripeBaseUrlByType(selectedType) {
return selectedType === 'hotel_camping'
? STRIPE_URL_HOTEL_CAMPING
: STRIPE_URL_LOCATION;
}
function updateNote() {
const selected = getSelectedType();
note.textContent =
'Type sélectionné : ' +
(selected === 'location' ? 'location' : 'hôtel / camping');
}
radios.forEach(function (radio) {
radio.addEventListener('change', function () {
updateNote();
});
});
btn.addEventListener('click', function () {
const selectedType = getSelectedType();
const baseUrl = getStripeBaseUrlByType(selectedType);
if (!hebergementId) {
alert('ID hébergement non configuré.');
return;
}
if (!baseUrl) {
alert('URL Stripe non configurée.');
return;
}
const finalUrl = buildStripeUrl(baseUrl, hebergementId, stripeLocale);
window.location.href = finalUrl;
});
preselectType();
updateNote();
})();
</script>
<script type="text/javascript" class="init">
$(document).ready(function() {
})
</script>
<?include("includes/end.php");?>
</body>
</html>