Derniere version de site au 4/10/2026

This commit is contained in:
Oleg Barykin committed 2026-10-04 14:50:04 +02:00
1 parent 21f34c64c9
commit dbb8e299a0
35 files changed
+8697 -1242

No files matched your search

+86 -86
View File
@@ -5,87 +5,87 @@
// ===== Helpers header (identiques à index.php) =====
function is_client_logged_in(): bool
{
$role = $_SESSION['role'] ?? ($_SESSION['user_type'] ?? '');
if (! empty($_SESSION['user_id']) && $role === 'client') {
return true;
}
$role = $_SESSION['role'] ?? ($_SESSION['user_type'] ?? '');
if (! empty($_SESSION['user_id']) && $role === 'client') {
return true;
}
if (! empty($_SESSION['client_id'])) {
return true;
}
if (! empty($_SESSION['client_id'])) {
return true;
}
if (! empty($_SESSION['reference_id']) && $role === 'client') {
return true;
}
if (! empty($_SESSION['reference_id']) && $role === 'client') {
return true;
}
if (! empty($_SESSION['user_id']) && $role === 'praticien') {
return true;
}
if (! empty($_SESSION['user_id']) && $role === 'praticien') {
return true;
}
if (! empty($_SESSION['praticien_id'])) {
return true;
}
if (! empty($_SESSION['praticien_id'])) {
return true;
}
if (! empty($_SESSION['reference_id']) && $role === 'praticien') {
return true;
}
if (! empty($_SESSION['reference_id']) && $role === 'praticien') {
return true;
}
return false;
return false;
}
function include_header_clean(string $absPath): void
{
global $translations, $lang;
ob_start();
include $absPath; // /public/includes/header.php
$buf = ob_get_clean() ?: '';
global $translations, $lang;
ob_start();
include $absPath; // /public/includes/header.php
$buf = ob_get_clean() ?: '';
// 0) DOCTYPE + <html>…</html>
$buf = preg_replace('~<!doctype\s+html[^>]*>~i', '', $buf);
$buf = preg_replace('~</?html\b[^>]*>~i', '', $buf);
// 0) DOCTYPE + <html>…</html>
$buf = preg_replace('~<!doctype\s+html[^>]*>~i', '', $buf);
$buf = preg_replace('~</?html\b[^>]*>~i', '', $buf);
// 1) retirer <head>…</head> et <body> ouverts/fermés
$buf = preg_replace('~<head\b[^>]*>.*?</head>~is', '', $buf);
$buf = preg_replace('~</?body\b[^>]*>~i', '', $buf);
// 1) retirer <head>…</head> et <body> ouverts/fermés
$buf = preg_replace('~<head\b[^>]*>.*?</head>~is', '', $buf);
$buf = preg_replace('~</?body\b[^>]*>~i', '', $buf);
// 2) retirer les <link> CSS “globaux” pour éviter d’écraser la home
$buf = preg_replace('~<link[^>]+href="[^"]*(bootstrap[^"]*\.css|mobil_style\.css|site_style\.css|fonts\.googleapis)[^"]*"[^>]*>~i', '', $buf);
// 2) retirer les <link> CSS “globaux” pour éviter d’écraser la home
$buf = preg_replace('~<link[^>]+href="[^"]*(bootstrap[^"]*\.css|mobil_style\.css|site_style\.css|fonts\.googleapis)[^"]*"[^>]*>~i', '', $buf);
// 3) retirer le <script> Bootstrap CDN (on le charge déjà en bas de la page)
$buf = preg_replace('~<script[^>]+src="[^"]*bootstrap[^"]*bundle[^"]*\.js[^"]*"[^>]*>\s*</script>~i', '', $buf);
// 3) retirer le <script> Bootstrap CDN (on le charge déjà en bas de la page)
$buf = preg_replace('~<script[^>]+src="[^"]*bootstrap[^"]*bundle[^"]*\.js[^"]*"[^>]*>\s*</script>~i', '', $buf);
echo $buf; // garde <header> + tes scripts inline utiles
echo $buf; // garde <header> + tes scripts inline utiles
}
function t(array $translations, string $key, string $fallback = ''): string
{
$val = $translations[$key] ?? '';
if ($val === '') {
return $fallback;
}
$val = $translations[$key] ?? '';
if ($val === '') {
return $fallback;
}
return (string) $val;
return (string) $val;
}
// Lang HTML
$langHtml = preg_match('~^[a-z]{2}(-[A-Z]{2})?$~', (string) ($lang ?? '')) ? (string) $lang : 'ru';
?>
<!doctype html>
<html lang="<?php echo htmlspecialchars($langHtml, ENT_QUOTES, 'UTF-8')?>">
<html lang="<?php echo htmlspecialchars($langHtml, ENT_QUOTES, 'UTF-8') ?>">
<head>
<meta charset="UTF-8">
<title><?php echo htmlspecialchars($translations['seo_how_it_work_title'], ENT_QUOTES, 'UTF-8')?></title>
<meta name="description" content="<?php echo htmlspecialchars($translations['seo_how_it_work_desc'], ENT_QUOTES, 'UTF-8')?>">
<meta name="keywords" content="<?php echo htmlspecialchars($translations['seo_how_it_work_keywords'], ENT_QUOTES, 'UTF-8')?>">
<title><?php echo htmlspecialchars($translations['seo_how_it_work_title'], ENT_QUOTES, 'UTF-8') ?></title>
<meta name="description" content="<?php echo htmlspecialchars($translations['seo_how_it_work_desc'], ENT_QUOTES, 'UTF-8') ?>">
<meta name="keywords" content="<?php echo htmlspecialchars($translations['seo_how_it_work_keywords'], ENT_QUOTES, 'UTF-8') ?>">
<meta name="author" content="Uslugi.fr">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="<?= asset('/includes/site_style.css') ?>">
<link rel="stylesheet" href="<?= asset('/includes/custom_style.css') ?>">
<link rel="stylesheet" href="<?= asset('/includes/mobil_style.css') ?>">
<link rel="stylesheet" href="<?php echo asset('/includes/site_style.css') ?>">
<link rel="stylesheet" href="<?php echo asset('/includes/custom_style.css') ?>">
<link rel="stylesheet" href="<?php echo asset('/includes/mobil_style.css') ?>">
<style>
.howitworks { --brand:#38378B; --mint:#06FFA8; --text:#111; --muted:#6b7280; --card:#fff; --border:#e5e7eb; }
.howitworks { font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color:var(--text); }
@@ -135,9 +135,9 @@
</head>
<body>
<?php if (is_client_logged_in()): ?>
<?php
require_once __DIR__ . '/public/includes/init_pr_cl.php';
include_header_clean(__DIR__ . '/public/includes/header.php'); ?>
<?php
require_once __DIR__ . '/public/includes/init_pr_cl.php';
include_header_clean(__DIR__ . '/public/includes/header.php'); ?>
<?php else: ?>
<header class="site-header">
<div class="container">
@@ -157,8 +157,8 @@
</div>
<nav class="header-actions">
<a class="btn-login" href="/connexion.php">
<span class="d-sm-none"><?php echo htmlspecialchars($translations['btn_se_connecter'] ?? 'Connexion', ENT_QUOTES, 'UTF-8')?></span>
<span class="d-none d-sm-inline"><?php echo htmlspecialchars($translations['ja_spec'] ?? 'Je suis spécialiste', ENT_QUOTES, 'UTF-8')?></span>
<span class="d-sm-none"><?php echo htmlspecialchars($translations['btn_se_connecter'] ?? 'Connexion', ENT_QUOTES, 'UTF-8') ?></span>
<span class="d-none d-sm-inline"><?php echo htmlspecialchars($translations['ja_spec'] ?? 'Je suis spécialiste', ENT_QUOTES, 'UTF-8') ?></span>
</a>
<div class="dropdown">
@@ -168,15 +168,15 @@
data-bs-toggle="dropdown"
data-bs-auto-close="true"
aria-expanded="false"
aria-label="<?php echo htmlspecialchars(t($translations, 'howitworks_help_aria', 'Help'), ENT_QUOTES, 'UTF-8')?>">
aria-label="<?php echo htmlspecialchars(t($translations, 'howitworks_help_aria', 'Help'), ENT_QUOTES, 'UTF-8') ?>">
?
</button>
<ul class="dropdown-menu dropdown-menu-end shadow help-menu menu-panel">
<li><a href="/how-it-work.php"><?php echo htmlspecialchars($translations['kak_rabotaet'] ?? 'Как это работает', ENT_QUOTES, 'UTF-8')?></a></li>
<li><a href="/about.php"><?php echo htmlspecialchars($translations['pro_nas'] ?? 'О нас', ENT_QUOTES, 'UTF-8')?></a></li>
<li><a href="/faq.php"><?php echo htmlspecialchars($translations['faq'] ?? 'FAQ', ENT_QUOTES, 'UTF-8')?></a></li>
<li><a href="/contact.php"><?php echo htmlspecialchars($translations['nam_pisat'] ?? 'Написать нам', ENT_QUOTES, 'UTF-8')?></a></li>
<li><a href="/how-it-work.php"><?php echo htmlspecialchars($translations['kak_rabotaet'] ?? 'Как это работает', ENT_QUOTES, 'UTF-8') ?></a></li>
<li><a href="/about.php"><?php echo htmlspecialchars($translations['pro_nas'] ?? 'О нас', ENT_QUOTES, 'UTF-8') ?></a></li>
<li><a href="/faq.php"><?php echo htmlspecialchars($translations['faq'] ?? 'FAQ', ENT_QUOTES, 'UTF-8') ?></a></li>
<li><a href="/contact.php"><?php echo htmlspecialchars($translations['nam_pisat'] ?? 'Написать нам', ENT_QUOTES, 'UTF-8') ?></a></li>
</ul>
</div>
@@ -193,111 +193,111 @@
<div class="wrap">
<div class="card" style="margin-bottom:18px;">
<h2><?php echo htmlspecialchars(t($translations, 'howitworks_short_title', 'How it works'), ENT_QUOTES, 'UTF-8')?></h2>
<h2><?php echo htmlspecialchars(t($translations, 'howitworks_short_title', 'How it works'), ENT_QUOTES, 'UTF-8') ?></h2>
<div class="hiw-steps">
<div class="step">
<div class="step-icon">📝</div>
<div>
<h3><?php echo htmlspecialchars(t($translations, 'howitworks_step1_title', 'Registration'), ENT_QUOTES, 'UTF-8')?></h3>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_step1_text', 'Create your account in minutes.'), ENT_QUOTES, 'UTF-8')?></p>
<h3><?php echo htmlspecialchars(t($translations, 'howitworks_step1_title', 'Registration'), ENT_QUOTES, 'UTF-8') ?></h3>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_step1_text', 'Create your account in minutes.'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</div>
<div class="step">
<div class="step-icon">🔎</div>
<div>
<h3><?php echo htmlspecialchars(t($translations, 'howitworks_step2_title', 'Choose a specialist'), ENT_QUOTES, 'UTF-8')?></h3>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_step2_text', 'Find an expert and pick a time.'), ENT_QUOTES, 'UTF-8')?></p>
<h3><?php echo htmlspecialchars(t($translations, 'howitworks_step2_title', 'Choose a specialist'), ENT_QUOTES, 'UTF-8') ?></h3>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_step2_text', 'Find an expert and pick a time.'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</div>
<div class="step">
<div class="step-icon">✉️</div>
<div>
<h3><?php echo htmlspecialchars(t($translations, 'howitworks_step3_title', 'Confirmation'), ENT_QUOTES, 'UTF-8')?></h3>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_step3_text', 'Receive an email confirmation and pay the specialist directly.'), ENT_QUOTES, 'UTF-8')?></p>
<h3><?php echo htmlspecialchars(t($translations, 'howitworks_step3_title', 'Confirmation'), ENT_QUOTES, 'UTF-8') ?></h3>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_step3_text', 'Receive an email confirmation and pay the specialist directly.'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</div>
<div class="step">
<div class="step-icon">🎥</div>
<div>
<h3><?php echo htmlspecialchars(t($translations, 'howitworks_step4_title', 'Online consultation'), ENT_QUOTES, 'UTF-8')?></h3>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_step4_text', 'Happens on our website via Jitsi.'), ENT_QUOTES, 'UTF-8')?></p>
<h3><?php echo htmlspecialchars(t($translations, 'howitworks_step4_title', 'Online consultation'), ENT_QUOTES, 'UTF-8') ?></h3>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_step4_text', 'Happens on our website via Jitsi.'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</div>
</div>
</div>
<div class="card">
<h2><?php echo htmlspecialchars(t($translations, 'howitworks_long_title', 'How uslugi.fr works'), ENT_QUOTES, 'UTF-8')?></h2>
<h2><?php echo htmlspecialchars(t($translations, 'howitworks_long_title', 'How uslugi.fr works'), ENT_QUOTES, 'UTF-8') ?></h2>
<p class="hiw-intro">
<?php echo htmlspecialchars(t($translations, 'howitworks_long_intro', 'We built the website to help you find a trusted Russian-speaking specialist in France and get a consultation easily.'), ENT_QUOTES, 'UTF-8')?>
<?php echo htmlspecialchars(t($translations, 'howitworks_long_intro', 'We built the website to help you find a trusted Russian-speaking specialist in France and get a consultation easily.'), ENT_QUOTES, 'UTF-8') ?>
</p>
<ul class="hiw-list">
<li class="hiw-item">
<div class="dot">1</div>
<div>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item1_title', 'Registration'), ENT_QUOTES, 'UTF-8')?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item1_text', 'Create your personal account in minutes.'), ENT_QUOTES, 'UTF-8')?></p>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item1_title', 'Registration'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item1_text', 'Create your personal account in minutes.'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="hiw-item">
<div class="dot">2</div>
<div>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item2_title', 'Choose a specialist'), ENT_QUOTES, 'UTF-8')?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item2_text', 'In the catalog: lawyers, notaries, consultants, psychologists and translators. Each specialist has a calendar with available dates and times.'), ENT_QUOTES, 'UTF-8')?></p>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item2_title', 'Choose a specialist'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item2_text', 'In the catalog: lawyers, notaries, consultants, psychologists and translators. Each specialist has a calendar with available dates and times.'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="hiw-item">
<div class="dot">3</div>
<div>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item3_title', 'Booking'), ENT_QUOTES, 'UTF-8')?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item3_text', 'Pick a time and receive an email confirmation.'), ENT_QUOTES, 'UTF-8')?></p>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item3_title', 'Booking'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item3_text', 'Pick a time and receive an email confirmation.'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="hiw-item">
<div class="dot">4</div>
<div>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item4_title', 'Payment'), ENT_QUOTES, 'UTF-8')?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item4_text', 'Pay the specialist directly — we do not take any commission.'), ENT_QUOTES, 'UTF-8')?></p>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item4_title', 'Payment'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item4_text', 'Pay the specialist directly — we do not take any commission.'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="hiw-item">
<div class="dot">5</div>
<div>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item5_title', 'Chat'), ENT_QUOTES, 'UTF-8')?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item5_text', 'Before the consultation, you can уточнить детали in chat with the expert.'), ENT_QUOTES, 'UTF-8')?></p>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item5_title', 'Chat'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item5_text', 'Before the consultation, you can уточнить детали in chat with the expert.'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="hiw-item">
<div class="dot">6</div>
<div>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item6_title', 'Online meeting'), ENT_QUOTES, 'UTF-8')?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item6_text', 'The consultation takes place via Jitsi on our website — just open the link.'), ENT_QUOTES, 'UTF-8')?></p>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item6_title', 'Online meeting'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item6_text', 'The consultation takes place via Jitsi on our website — just open the link.'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="hiw-item">
<div class="dot">7</div>
<div>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item7_title', 'Cancellation'), ENT_QUOTES, 'UTF-8')?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item7_text', 'If plans change, each specialist has their own cancellation policy.'), ENT_QUOTES, 'UTF-8')?></p>
<h4><?php echo htmlspecialchars(t($translations, 'howitworks_item7_title', 'Cancellation'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?php echo htmlspecialchars(t($translations, 'howitworks_item7_text', 'If plans change, each specialist has their own cancellation policy.'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
</ul>
<div class="callout">
<strong><?php echo htmlspecialchars(t($translations, 'howitworks_goal_label', 'Our goal:'), ENT_QUOTES, 'UTF-8')?></strong>
<?php echo htmlspecialchars(t($translations, 'howitworks_goal_text', 'Connect you with the right Russian-speaking specialist in France and make everything simple and convenient.'), ENT_QUOTES, 'UTF-8')?>
<strong><?php echo htmlspecialchars(t($translations, 'howitworks_goal_label', 'Our goal:'), ENT_QUOTES, 'UTF-8') ?></strong>
<?php echo htmlspecialchars(t($translations, 'howitworks_goal_text', 'Connect you with the right Russian-speaking specialist in France and make everything simple and convenient.'), ENT_QUOTES, 'UTF-8') ?>
</div>
</div>
@@ -309,7 +309,7 @@
<footer class="site-footer">
<div class="container">
<p><?php echo $translations['copyr']?></p>
<p><?php echo $translations['copyr'] ?></p>
</div>
</footer>