204 lines
7.8 KiB
PHP
204 lines
7.8 KiB
PHP
<?php
|
|
require_once __DIR__ . '/../public/includes/lang.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
|
|
}
|
|
|
|
// helper simple
|
|
function t(string $key, string $fallback = ''): string
|
|
{
|
|
global $translations;
|
|
return (string) ($translations[$key] ?? $fallback);
|
|
}
|
|
?>
|
|
<!doctype html>
|
|
<html lang="<?php echo htmlspecialchars($lang ?? 'ru', ENT_QUOTES) ?>">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title><?php echo htmlspecialchars(t('seo_taxes_title'), ENT_QUOTES) ?></title>
|
|
<meta name="description" content="<?php echo htmlspecialchars(t('seo_taxes_desc'), ENT_QUOTES) ?>">
|
|
<meta name="keywords" content="<?php echo htmlspecialchars(t('seo_taxes_keywords'), ENT_QUOTES) ?>">
|
|
<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') ?>"> <!-- ta home -->
|
|
|
|
<link rel="stylesheet" href="<?php echo asset('/includes/mobil_style.css') ?>">
|
|
<style>
|
|
.topic { --brand:#38378B; --mint:#06FFA8; --text:#111; --muted:#4b5563; --card:#fff; --border:#e5e7eb; }
|
|
.topic { font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color:var(--text); }
|
|
.topic .wrap { max-width: 980px; margin: 0 auto; padding: clamp(16px,4vw,32px); }
|
|
.topic .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); }
|
|
.topic h1 { font-size: clamp(26px, 5.5vw, 38px); line-height:1.2; margin: 0 0 16px; }
|
|
.topic h2 { font-size: clamp(20px, 4.6vw, 26px); margin: 16px 0 10px; }
|
|
.topic p { font-size: clamp(14px, 2.8vw, 16px); line-height:1.65; color: var(--muted); margin: 0 0 12px; }
|
|
.topic ul { padding-left: 1.1rem; }
|
|
.topic .btn-index { border-radius: 999px; }
|
|
.toc { margin: 10px 0 16px; }
|
|
.toc a { display:inline-block; margin: 4px 8px 0 0; text-decoration:none; border:1px dashed var(--border); border-radius:999px; padding:6px 10px; color:#1f2937; }
|
|
.callout{ margin-top:16px; border-left:6px solid var(--brand);
|
|
background: color-mix(in oklab, var(--brand) 8%, #fff); border-radius:12px; padding:14px 16px; }
|
|
.faq dt{ font-weight:600; margin-top:10px; }
|
|
.faq dd{ margin-left:0; color:var(--muted); }
|
|
</style>
|
|
<?php include_once __DIR__ . '/../includes/tracking.php'; ?>
|
|
</head>
|
|
<body>
|
|
<!-- Header minimal (logo + actions) -->
|
|
<?php if (is_client_logged_in()): ?>
|
|
<?php include_header_clean(__DIR__ . '/../public/includes/header.php'); ?>
|
|
<?php else: ?>
|
|
<header class="site-header">
|
|
<div class="container d-flex justify-content-between align-items-center py-2">
|
|
<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="d-flex align-items-center gap-2">
|
|
<a class="btn-login" href="/connexion.php">
|
|
<span class="d-sm-none"><?php echo t('btn_se_connecter') ?></span>
|
|
<span class="d-none d-sm-inline"><?php echo t('ja_spec') ?></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('aria_help_label'), ENT_QUOTES) ?>">
|
|
?
|
|
</button>
|
|
|
|
<!-- Menu compact -->
|
|
<ul class="dropdown-menu dropdown-menu-end shadow help-menu menu-panel">
|
|
<li><a href="/how-it-work.php"><?php echo t('kak_rabotaet') ?></a></li>
|
|
<li><a href="/about.php"><?php echo t('pro_nas') ?></a></li>
|
|
<li><a href="/faq.php"><?php echo t('faq') ?></a></li>
|
|
<li><a href="/contact.php"><?php echo t('nam_pisat') ?></a></li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
</header>
|
|
<?php endif; ?>
|
|
|
|
<main class="topic">
|
|
<div class="wrap">
|
|
<div class="card">
|
|
|
|
<h1><?php echo t('taxes_h1') ?></h1>
|
|
<p><?php echo t('taxes_intro') ?></p>
|
|
|
|
<div class="toc">
|
|
<a href="#decl"><?php echo t('taxes_toc_decl') ?></a>
|
|
<a href="#cot"><?php echo t('taxes_toc_cot') ?></a>
|
|
<a href="#ae"><?php echo t('taxes_toc_ae') ?></a>
|
|
<a href="#tva"><?php echo t('taxes_toc_tva') ?></a>
|
|
<a href="#help"><?php echo t('taxes_toc_help') ?></a>
|
|
</div>
|
|
|
|
<h2 id="decl"><?php echo t('taxes_h2_decl') ?></h2>
|
|
<p><?php echo t('taxes_p_decl') ?></p>
|
|
|
|
<h2 id="cot"><?php echo t('taxes_h2_cot') ?></h2>
|
|
<p><?php echo t('taxes_p_cot') ?></p>
|
|
|
|
<h2 id="ae"><?php echo t('taxes_h2_ae') ?></h2>
|
|
<p><?php echo t('taxes_p_ae') ?></p>
|
|
|
|
<h2 id="tva"><?php echo t('taxes_h2_tva') ?></h2>
|
|
<p><?php echo t('taxes_p_tva') ?></p>
|
|
|
|
<h2 id="help"><?php echo t('taxes_h2_help') ?></h2>
|
|
<p><?php echo t('taxes_p_help') ?></p>
|
|
|
|
<div class="callout">
|
|
<strong><?php echo t('taxes_tip_strong') ?></strong> <?php echo t('taxes_tip_text') ?>
|
|
</div>
|
|
|
|
<div class="mt-3 d-flex flex-wrap gap-2">
|
|
<a class="btn btn-primary btn-index" href="/index.php"><?php echo t('taxes_btn_find') ?></a>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<footer class="site-footer">
|
|
<div class="container">
|
|
<p><?php echo t('copyr') ?></p>
|
|
</div>
|
|
</footer>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|