Init Git Prod Mars 2026

This commit is contained in:
Oleg Barykin committed 2026-03-05 10:25:39 +01:00
commit d81efe93b1
362 files changed
+86627

No files matched your search

+371
View File
@@ -0,0 +1,371 @@
<?php
declare (strict_types = 1);
require_once __DIR__ . '/../includes/bootstrap_global.php';
// ===== 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;
}
if (! empty($_SESSION['client_id'])) {
return true;
}
if (! empty($_SESSION['reference_id']) && $role === 'client') {
return true;
}
if (! empty($_SESSION['user_id']) && $role === 'praticien') {
return true;
}
if (! empty($_SESSION['praticien_id'])) {
return true;
}
if (! empty($_SESSION['reference_id']) && $role === 'praticien') {
return true;
}
return false;
}
function include_header_clean(string $absPath): void
{
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);
// 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);
// 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
}
function t(array $translations, string $key, string $fallback = ''): string
{
$val = $translations[$key] ?? '';
if ($val === '') {
return $fallback;
}
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') ?>">
<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') ?>">
<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="<?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>
.faq-page { --brand:#38378B; --muted:#4b5563; --border:#e5e7eb; --card:#fff; }
.faq-wrap { max-width: 980px; margin: 0 auto; padding: clamp(16px,4vw,32px); font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.faq-card { background:var(--card); border:1px solid var(--border); border-radius:16px; box-shadow:0 8px 24px rgba(0,0,0,.06); padding: clamp(18px,3.6vw,28px); }
h1 { font-size: clamp(26px, 5.5vw, 38px); margin: 0 0 12px; }
.faq-intro { color: var(--muted); margin-bottom: 14px; }
.faq-block { margin-top: 18px; }
.faq-block h2 { font-size: clamp(18px, 3.6vw, 24px); margin: 0 0 10px; font-weight: 700; color: #38378B;}
.faq-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.faq-item { border:1px solid var(--border); border-radius:12px; background:#fff; overflow:hidden; }
.faq-q{
width: 100%; text-align: left; background: #fafafa; border: 0;
padding: 12px 14px; display:flex; align-items:center; justify-content:space-between;
font-weight:600; color:#1f2937; cursor:pointer;
}
.faq-q:focus { outline: 2px solid color-mix(in oklab, var(--brand) 45%, #fff); outline-offset: 2px; }
.faq-q .chev { transition: transform .2s ease; margin-left: 10px; }
.faq-q[aria-expanded="true"] .chev { transform: rotate(90deg); }
.faq-a { display:none; padding: 12px 14px; color:#111; }
.faq-a p { margin:0 0 8px; color:#374151; line-height:1.65; }
.faq-a a { color: var(--brand); text-decoration: none; border-bottom: 1px dashed color-mix(in oklab, var(--brand) 65%, #fff); }
.faq-a a:hover { text-decoration: underline; }
.site-header .brand img { max-width: 130px; }
.btn-pill { border-radius: 999px; }
</style>
<?php include_once __DIR__ . '/includes/tracking.php'; ?>
</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 else: ?>
<header class="site-header">
<div class="container">
<div class="header-left">
<div class="brand">
<a href="/index.php"><img src="/public/uploads/img/logo_u.png"
alt="uslugi.fr"
class="logo-mobile"></a>
<a href="/index.php"><img src="/public/uploads/img/logo.png"
alt="uslugi.fr"
class="logo-desktop"></a>
</div>
<div class="lang-switch">
<?php require __DIR__ . '/includes/menu_langue.php'; ?>
</div>
</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>
</a>
<div class="dropdown">
<button
class="btn btn-logo rounded-circle d-inline-flex align-items-center justify-content-center question-btn"
type="button"
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') ?>">
?
</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>
</ul>
</div>
</nav>
</div>
</header>
<?php endif; ?>
<main class="faq-page">
<div class="faq-wrap">
<div class="faq-card">
<!--<h1><?php echo htmlspecialchars(t($translations, 'faq_title', 'FAQ'), ENT_QUOTES, 'UTF-8') ?></h1>
<p class="faq-intro"><?php echo htmlspecialchars(t($translations, 'faq_intro', ''), ENT_QUOTES, 'UTF-8') ?></p>-->
<!-- ===== Block 1 ===== -->
<section class="faq-block" id="block1">
<h2><?php echo htmlspecialchars(t($translations, 'faq_block1_title', ''), ENT_QUOTES, 'UTF-8') ?></h2>
<ul class="faq-list">
<li class="faq-item">
<button class="faq-q" aria-expanded="false" aria-controls="a1" id="q1">
<?php echo htmlspecialchars(t($translations, 'faq_q1', '...'), ENT_QUOTES, 'UTF-8') ?>
<span class="chev">›</span>
</button>
<div class="faq-a" id="a1" role="region" aria-labelledby="q1">
<p><?php echo htmlspecialchars(t($translations, 'faq_a1', '...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="faq-item">
<button class="faq-q" aria-expanded="false" aria-controls="a2" id="q2">
<?php echo htmlspecialchars(t($translations, 'faq_q2', '...'), ENT_QUOTES, 'UTF-8') ?>
<span class="chev">›</span>
</button>
<div class="faq-a" id="a2" role="region" aria-labelledby="q2">
<p><?php echo htmlspecialchars(t($translations, 'faq_a2', '...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="faq-item">
<button class="faq-q" aria-expanded="false" aria-controls="a3" id="q3">
<?php echo htmlspecialchars(t($translations, 'faq_q3', '...'), ENT_QUOTES, 'UTF-8') ?>
<span class="chev">›</span>
</button>
<div class="faq-a" id="a3" role="region" aria-labelledby="q3">
<p><?php echo htmlspecialchars(t($translations, 'faq_a3', '...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="faq-item">
<button class="faq-q" aria-expanded="false" aria-controls="a4" id="q4">
<?php echo htmlspecialchars(t($translations, 'faq_q4', '...'), ENT_QUOTES, 'UTF-8') ?>
<span class="chev">›</span>
</button>
<div class="faq-a" id="a4" role="region" aria-labelledby="q4">
<p><?php echo htmlspecialchars(t($translations, 'faq_a4', '...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="faq-item">
<button class="faq-q" aria-expanded="false" aria-controls="a5" id="q5">
<?php echo htmlspecialchars(t($translations, 'faq_q5', '...'), ENT_QUOTES, 'UTF-8') ?>
<span class="chev">›</span>
</button>
<div class="faq-a" id="a5" role="region" aria-labelledby="q5">
<p><?php echo htmlspecialchars(t($translations, 'faq_a5', '...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="faq-item">
<button class="faq-q" aria-expanded="false" aria-controls="a6" id="q6">
<?php echo htmlspecialchars(t($translations, 'faq_q6', '...'), ENT_QUOTES, 'UTF-8') ?>
<span class="chev">›</span>
</button>
<div class="faq-a" id="a6" role="region" aria-labelledby="q6">
<p><?php echo htmlspecialchars(t($translations, 'faq_a6', '...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
</ul>
</section>
<!-- ===== Block 2 ===== -->
<section class="faq-block" id="block2">
<h2><?php echo htmlspecialchars(t($translations, 'faq_block2_title', ''), ENT_QUOTES, 'UTF-8') ?></h2>
<ul class="faq-list">
<li class="faq-item">
<button class="faq-q" aria-expanded="false" aria-controls="b1" id="qb1">
<?php echo htmlspecialchars(t($translations, 'faq_q7', '...'), ENT_QUOTES, 'UTF-8') ?>
<span class="chev">›</span>
</button>
<div class="faq-a" id="b1" role="region" aria-labelledby="qb1">
<p><?php echo htmlspecialchars(t($translations, 'faq_a7', '...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="faq-item">
<button class="faq-q" aria-expanded="false" aria-controls="b2" id="qb2">
<?php echo htmlspecialchars(t($translations, 'faq_q8', '...'), ENT_QUOTES, 'UTF-8') ?>
<span class="chev">›</span>
</button>
<div class="faq-a" id="b2" role="region" aria-labelledby="qb2">
<p>
<?php echo htmlspecialchars(t($translations, 'faq_a8_intro', '...'), ENT_QUOTES, 'UTF-8') ?>
<a href="/topics/immigration.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_immigration', 'Immigration'), ENT_QUOTES, 'UTF-8') ?></a>,
<a href="/topics/family.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_family', 'Family'), ENT_QUOTES, 'UTF-8') ?></a>,
<a href="/topics/jobs.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_jobs', 'Jobs'), ENT_QUOTES, 'UTF-8') ?></a>,
<a href="/topics/taxes.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_taxes', 'Taxes'), ENT_QUOTES, 'UTF-8') ?></a>,
<a href="/topics/health.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_health', 'Health'), ENT_QUOTES, 'UTF-8') ?></a>
<?php echo htmlspecialchars(t($translations, 'faq_a8_and', 'and'), ENT_QUOTES, 'UTF-8') ?>
<a href="/topics/business.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_business', 'Business'), ENT_QUOTES, 'UTF-8') ?></a>.
</p>
</div>
</li>
<li class="faq-item">
<button class="faq-q" aria-expanded="false" aria-controls="b3" id="qb3">
<?php echo htmlspecialchars(t($translations, 'faq_q9', '...'), ENT_QUOTES, 'UTF-8') ?>
<span class="chev">›</span>
</button>
<div class="faq-a" id="b3" role="region" aria-labelledby="qb3">
<p><?php echo htmlspecialchars(t($translations, 'faq_a9', '...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="faq-item">
<button class="faq-q" aria-expanded="false" aria-controls="b4" id="qb4">
<?php echo htmlspecialchars(t($translations, 'faq_q10', '...'), ENT_QUOTES, 'UTF-8') ?>
<span class="chev">›</span>
</button>
<div class="faq-a" id="b4" role="region" aria-labelledby="qb4">
<p>
<?php echo htmlspecialchars(t($translations, 'faq_a10_intro', '...'), ENT_QUOTES, 'UTF-8') ?>
<a href="/topics/immigration.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_immigration', 'Immigration'), ENT_QUOTES, 'UTF-8') ?></a>,
<a href="/topics/jobs.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_jobs', 'Jobs'), ENT_QUOTES, 'UTF-8') ?></a>
<?php echo htmlspecialchars(t($translations, 'faq_a10_or', 'or'), ENT_QUOTES, 'UTF-8') ?>
<a href="/topics/business.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_business', 'Business'), ENT_QUOTES, 'UTF-8') ?></a>.
</p>
</div>
</li>
<li class="faq-item">
<button class="faq-q" aria-expanded="false" aria-controls="b5" id="qb5">
<?php echo htmlspecialchars(t($translations, 'faq_q11', '...'), ENT_QUOTES, 'UTF-8') ?>
<span class="chev">›</span>
</button>
<div class="faq-a" id="b5" role="region" aria-labelledby="qb5">
<p>
<?php echo htmlspecialchars(t($translations, 'faq_a11_intro', '...'), ENT_QUOTES, 'UTF-8') ?>
<a href="/topics/taxes.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_taxes', 'Taxes'), ENT_QUOTES, 'UTF-8') ?></a>.
</p>
</div>
</li>
<li class="faq-item">
<button class="faq-q" aria-expanded="false" aria-controls="b6" id="qb6">
<?php echo htmlspecialchars(t($translations, 'faq_q12', '...'), ENT_QUOTES, 'UTF-8') ?>
<span class="chev">›</span>
</button>
<div class="faq-a" id="b6" role="region" aria-labelledby="qb6">
<p>
<?php echo htmlspecialchars(t($translations, 'faq_a12_intro', '...'), ENT_QUOTES, 'UTF-8') ?>
<a href="/topics/immigration.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_immigration', 'Immigration'), ENT_QUOTES, 'UTF-8') ?></a>,
<a href="/topics/family.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_family', 'Family'), ENT_QUOTES, 'UTF-8') ?></a>,
<a href="/topics/jobs.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_jobs', 'Jobs'), ENT_QUOTES, 'UTF-8') ?></a>,
<a href="/topics/taxes.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_taxes', 'Taxes'), ENT_QUOTES, 'UTF-8') ?></a>,
<a href="/topics/health.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_health', 'Health'), ENT_QUOTES, 'UTF-8') ?></a>,
<a href="/topics/business.php"><?php echo htmlspecialchars(t($translations, 'faq_topic_business', 'Business'), ENT_QUOTES, 'UTF-8') ?></a>.
<?php echo htmlspecialchars(t($translations, 'faq_a12_outro', ''), ENT_QUOTES, 'UTF-8') ?>
</p>
</div>
</li>
</ul>
</section>
<div class="mt-3 d-flex flex-wrap gap-2">
<a class="btn btn-primary btn-pill" href="/index.php"><?php echo htmlspecialchars(t($translations, 'faq_btn_find', 'Find a specialist'), ENT_QUOTES, 'UTF-8') ?></a>
</div>
</div>
</div>
</main>
<footer class="site-footer">
<div class="container">
<p><?php echo $translations['copyr'] ?></p>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script>
document.addEventListener('click', function(e){
const btn = e.target.closest('.faq-q');
if(!btn) return;
const expanded = btn.getAttribute('aria-expanded') === 'true';
const panelId = btn.getAttribute('aria-controls');
const panel = document.getElementById(panelId);
if(!panel) return;
btn.setAttribute('aria-expanded', expanded ? 'false' : 'true');
panel.style.display = expanded ? 'none' : 'block';
});
</script>
</body>
</html>