| Current Path : /home/h/a/p/happyrenas/myreco.online/ |
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/myreco.online/activation.php |
<?
include("configuration.php");
include("includes/fonctions.php");
$auth = $db->escape($_REQUEST['auth']);
$refo = $db->escape($_REQUEST['refo']);
$idsu = $db->escape($_REQUEST['idsu']);
$idc = $db->escape($_REQUEST['idc']);
$activation = $db->escape($_REQUEST['activation']);
$token_activation = $db->escape($_REQUEST['token_activation']);
if ($auth!=$auth_activation) {exit;}
$postal_code = $db->escape($_REQUEST['postal_code']);
$token = $db->escape($_REQUEST['token']);
$country_code = $db->escape($_REQUEST['country_code']);
$dossier_qr = "qrcode";
$modele = "habillage_france.png";
$dossier_design = "qrcode_design";
$label_etape1 = "Etape 1 : Saisissez le code postal de votre lieu d'hébergement";
$label_codepostal = "Code postal (5 caractères)";
$label_valider = "Valider";
$label_etape2 = "Etape 2 : Sélectionnez votre lieu d'hébergement";
$label_selectionnez = "Sélectionnez";
$label_votre = "Votre hébergement n'est pas dans la liste ?";
$label_contact = "Contactez nous";
$label_aucun = "Aucun hébergement pour ce code postal";
$label_etape3 = "Etape 3 : Génération de votre QR Code";
$label_jactive = "J'ACTIVE MON QR CODE";
$label_telechargement = "Téléchargement";
$trad = chargerTraductions($country_code);
if ($langue)
{
$dossier_qr = "qrcode_".$langue;
$modele = "habillage_".$langue.".png";
$dossier_design ="qrcode_design_".$langue;
}
if ($langue=="italie")
{
$label_etape1 = "Fase 1: Inserisci il codice postale del tuo luogo di alloggio";
$label_codepostal = "Codice postale (5 caratteri)";
$label_valider = "Convalida";
$label_etape2 = "Fase 2: Seleziona il tuo luogo di alloggio";
$label_selectionnez = "Seleziona";
$label_votre = "Il tuo alloggio non è nell'elenco?";
$label_contact = "Contattaci";
$label_aucun = "Nessun alloggio per questo codice postale";
$label_etape3 = "Fase 3: Generazione del tuo QR Code";
$label_jactive = "ATTIVO IL MIO QR CODE";
$label_telechargement = "Download";
}
if ($langue=="espagne")
{
$label_etape1 = "Paso 1: Ingrese el código postal de su lugar de alojamiento";
$label_codepostal = "Código postal (5 caracteres)";
$label_valider = "Validar";
$label_etape2 = "Paso 2: Seleccione su lugar de alojamiento";
$label_selectionnez = "Seleccione";
$label_votre = "¿Su alojamiento no está en la lista?";
$label_contact = "Contáctenos";
$label_aucun = "Ningún alojamiento para este código postal";
$label_etape3 = "Paso 3: Generación de su Código QR";
$label_jactive = "ACTIVO MI CÓDIGO QR";
$label_telechargement = "Descarga";
}
?>
<!DOCTYPE html>
<html class="no-js" lang="fr">
<head>
<?include("includes/google_head.php");?>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>MyReco.Online</title>
<meta name="description" content="" />
<meta name="robots" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" href="img/icone.png" />
<link rel="stylesheet" href="assets/css/bootstrap.min.css" />
<link rel="stylesheet" href="assets/css/LineIcons.2.0.css" />
<link rel="stylesheet" href="assets/css/animate.css" />
<link rel="stylesheet" href="assets/css/tiny-slider.css" />
<link rel="stylesheet" href="assets/css/glightbox.min.css" />
<link rel="stylesheet" href="assets/css/main.css" />
</head>
<body>
<?include("includes/google_body.php");?>
<!--[if lte IE 9]>
<p class="browserupgrade">
You are using an <strong>outdated</strong> browser. Please
<a href="https://browsehappy.com/">upgrade your browser</a> to improve
your experience and security.
</p>
<![endif]-->
<div class="preloader">
<div class="preloader-inner">
<div class="preloader-icon">
<span></span>
<span></span>
</div>
</div>
</div>
<header class="header navbar-area">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-12">
<div class="nav-inner">
<!-- Start Navbar -->
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand" href="index.php">
<img src="img/logo.png" alt="Logo">
</a>
<button class="navbar-toggler mobile-menu-btn" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="toggler-icon"></span>
<span class="toggler-icon"></span>
<span class="toggler-icon"></span>
</button>
</nav>
</div>
</div>
</div>
</div>
</header>
<section class="section call-action">
<div class="container">
<div class="row">
</div>
</div>
</section>
<?if (!$activation) {
?>
<form action="activation.php" method="post">
<input type="hidden" name="token_activation" value="<?echo $token;?>">
<input type="hidden" name="country_code" value="<?echo $country_code;?>">
<input type="hidden" name="auth" value="<?echo $auth;?>">
<input type="hidden" name="refo" value="<?echo $refo;?>">
<input type="hidden" name="idsu" value="<?echo $idsu;?>">
<input type="hidden" name="idc" value="<?echo $idc;?>">
<section class="section call-action" style="height:900px">
<div class="container">
<div class="row">
<div class="col-12">
<div class="title">
<h3 class="text-white"><?echo $trad['Etape 1 : Saisissez le code postal de votre lieu d hébergement'] ?? '⚠️';?></h3>
</div>
</div>
</div>
<div class="row mt-20">
<div class="input-group input-group-lg mb-3">
<input type="text" name="postal_code" maxlength=5 value="<?echo $postal_code;?>" pattern="[0-9]{5}" class="form-control lg" placeholder="<?echo $trad['Code postal (5 caractères)'] ?? '⚠️';?>" required>
<div class="">
<button type="submit" class="btn btn-lg btn-secondary"><?echo $trad['Valider'] ?? '⚠️';?><span class="dir-part"></span></button>
</div>
</div>
</div>
<?if ($postal_code) {
$myquery = "SELECT id,name,token,city from heb where 1 AND business_status!='CLOSED_PERMANENTLY' AND postal_code='".$postal_code."' order by name ";
$myquery_calls = $db->get_results($myquery);
$hebergement_nombre = $db->num_rows;
?>
<div class="row mt-30">
<div class="col-12">
<div class="title">
<h3 class="text-white"><?echo $trad['Etape 2 : Sélectionnez votre lieu d hébergement'] ?? '⚠️';?></h3>
</div>
</div>
</div>
<div class="row mt-20">
<div class="col-12">
<select class="choix form-select form-select-lg" >
<option value=""><?echo $trad['Sélectionnez'] ?? '⚠️';?> </option>
<?
if (!empty($myquery_calls))
{
foreach ( $myquery_calls as $liste )
{
?>
<option <?if ($token && $token==$liste->token) {?> selected <?}?> value="<?echo $liste->token;?>"><?echo $liste->name;?></option>
<?
}
?>
<optgroup label="<?echo $trad['Votre hébergement n est pas dans la liste ?'] ?? '⚠️';?>">
<option value=""><?echo $trad['Contactez nous'] ?? '⚠️';?> </option>
</optgroup>
<?
}
?>
<?if (!$hebergement_nombre) {?>
<optgroup label="<?echo $trad['Aucun résultat'] ?? '⚠️';?>">
<option value=""<?echo $trad['Aucun résultat'] ?? '⚠️';?>> <?echo $trad['Contactez nous'] ?? '⚠️';?> </option>
</optgroup>
<?}?>
</select>
</div>
</div>
<?if ($token) {?>
<div class="row mt-30">
<div class="col-12">
<div class="title">
<h3 class="text-white"><?echo $trad['Etape 3 : Génération de votre QR Code'] ?? '⚠️';?></h3>
</div>
</div>
</div>
<div class="row mt-20">
<div class="col-12">
<button type="submit" name="activation" value="oui" class="btn btn-secondary btn-lg btn-block"><?echo $trad['J ACTIVE MON QR CODE'] ?? '⚠️';?></button>
</div>
</div>
<?}?>
<?}?>
</div>
</section>
</form>
<?} else {
$result = genererQRCodeHabilleSansEcraser($token_activation, $country_code);
if ($result['statut'] === 'ok') {
echo "<img src='{$result['qrcode']}' width='100'>";
echo "<img src='{$result['qrcode_habille']}' width='150'>";
} else {
echo "<p>Erreur : {$result['statut']}</p>";
}
$requete="UPDATE heb set compteur_telechargement = compteur_telechargement+1 where token ='".$token_activation."'";
$db->query($requete);
//echo $requete;
?>
<section class="app-info section">
<div class="container">
<div class="row">
<div class="col-12">
</div>
</div>
<div class="row">
<div class="col-lg-8 offset-lg-2 col-md-12 col-12">
<div class="row">
<div class="col-12">
<div class="offset-lg-3 button mb-5">
<a href="telecharger_qrcode.php?token=<?echo $token_activation;?>" class="btn btn-block"><?echo $trad['Téléchargement'] ?? '⚠️';?></a>
</div>
</div>
<div class="col-12">
<div class="single-achievement wow fadeInUp" data-wow-delay=".2s">
<?if ($result['statut'] === 'ok') {?>
<a target="_blank" href="<?echo $result['qrcode_habille'];?>"><img width=600 src="<?echo $result['qrcode_habille'];?>"></a>
<?}?>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<?
$date_activation = date("Y-m-d");
$requete_update="UPDATE heb set refo='".$refo."', idsu='".$idsu."', idc='".$idc."', date_activation='".$date_activation."' where token ='".$token_activation."'";
//echo $requete_update;
$db->query($requete_update);
ob_start();
var_dump($_REQUEST);
$var_dump_output = ob_get_clean();
// Chemin vers le fichier texte où vous voulez enregistrer le contenu de var_dump
$filename = 'logs/activation.txt';
// Ouvre le fichier en mode écriture
$file_handle = fopen($filename, 'a');
// Vérifie si l'ouverture du fichier a réussi
if ($file_handle === false) {
die("Impossible d'ouvrir le fichier pour l'écriture.");
}
// Écrit le contenu de var_dump dans le fichier
fwrite($file_handle, $var_dump_output);
// Ferme le fichier
fclose($file_handle);
//echo "Le contenu de var_dump a été enregistré dans le fichier $filename.";
?>
<?}?>
<?//include("includes/footer.php");?>
<!-- ========================= scroll-top ========================= -->
<a href="#" class="scroll-top">
<i class="lni lni-chevron-up"></i>
</a>
<!-- ========================= JS here ========================= -->
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/wow.min.js"></script>
<script src="assets/js/tiny-slider.js"></script>
<script src="assets/js/glightbox.min.js"></script>
<script src="assets/js/count-up.min.js"></script>
<script src="assets/js/main.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript">
$('.choix').on('change', function() {
var val = $(this).val();
if (val)
{
window.location.href = 'activation.php?auth=<?echo $auth;?>&country_code=<?echo $country_code;?>&postal_code=<?echo $postal_code;?>&refo=<?echo $refo;?>&idsu=<?echo $idsu;?>&idc=<?echo $idc;?>&token='+val;
}
})
//====== counter up
var cu = new counterUp({
start: 0,
duration: 2000,
intvalues: true,
interval: 100,
append: " ",
});
cu.start();
</script>
</body>
</html>