Files
maria_uslugi/about.php
T
2026-03-05 10:25:39 +01:00

281 lines
13 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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="<?= htmlspecialchars($langHtml, ENT_QUOTES, 'UTF-8') ?>">
<head>
<meta charset="UTF-8">
<title><?= htmlspecialchars($translations['seo_about_title'], ENT_QUOTES, 'UTF-8') ?></title>
<meta name="description" content="<?= htmlspecialchars($translations['seo_about_desc'], ENT_QUOTES, 'UTF-8') ?>">
<meta name="keywords" content="<?= htmlspecialchars($translations['seo_about_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') ?>">
<?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"><?= htmlspecialchars($translations['btn_se_connecter'] ?? 'Connexion', ENT_QUOTES, 'UTF-8') ?></span>
<span class="d-none d-sm-inline"><?= 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="<?= htmlspecialchars(t($translations, 'about_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"><?= htmlspecialchars($translations['kak_rabotaet'] ?? 'Как это работает', ENT_QUOTES, 'UTF-8') ?></a></li>
<li><a href="/about.php"><?= htmlspecialchars($translations['pro_nas'] ?? 'О нас', ENT_QUOTES, 'UTF-8') ?></a></li>
<li><a href="/faq.php"><?= htmlspecialchars($translations['faq'] ?? 'FAQ', ENT_QUOTES, 'UTF-8') ?></a></li>
<li><a href="/contact.php"><?= htmlspecialchars($translations['nam_pisat'] ?? 'Написать нам', ENT_QUOTES, 'UTF-8') ?></a></li>
</ul>
</div>
</nav>
</div>
</header>
<?php endif; ?>
<div class="main">
<div class="content">
<style>
/* Spécifique à la page About (complète ton style existant) */
.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); }
.howitworks .wrap { max-width: 980px; margin: 0 auto; padding: clamp(16px,4vw,32px); }
.howitworks .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);
}
.howitworks h2 {
font-size: clamp(24px, 5.2vw, 36px); line-height:1.2; margin: 0 0 16px;
}
.howitworks p { font-size: clamp(14px, 2.8vw, 16px); line-height:1.65; color: var(--muted); margin: 0 0 12px; }
.hiw-steps{ display:grid; gap:14px; grid-template-columns: 1fr; }
.about-grid{display:grid;gap:14px;grid-template-columns:1fr}
@media (min-width:780px){.about-grid{grid-template-columns:1fr 1fr}}
.about-list{list-style:none;padding:0;margin:8px 0 0;display:grid;gap:10px}
.about-item{display:flex;gap:12px;align-items:flex-start;background:#fafafa;border:1px solid #f0f1f4;border-radius:12px;padding:12px 14px}
.about-ico{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;border-radius:50%;
background: color-mix(in oklab, var(--brand) 12%, #fff);
border:2px solid color-mix(in oklab, var(--brand) 25%, #fff);
color:var(--brand);font-weight:700}
.about-item h4{margin:2px 0 4px;font-weight:600;color:#1f2937;font-size:clamp(15px,2.8vw,18px)}
.about-item p{margin:0}
.about-callout{border-left:6px solid var(--brand);background:color-mix(in oklab,var(--brand) 8%,#fff);
border-radius:12px;padding:14px 16px;margin-top:12px}
</style>
<section class="howitworks hiw-band">
<div class="wrap">
<div class="card" style="margin-bottom:18px;">
<h2><?= htmlspecialchars(t($translations, 'about_intro_title', 'About'), ENT_QUOTES, 'UTF-8') ?></h2>
<p><?= htmlspecialchars(t($translations, 'about_intro_text', 'uslugi.fr is a platform...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
<div class="about-grid">
<div class="card">
<h2><?= htmlspecialchars(t($translations, 'about_mission_title', 'Our mission'), ENT_QUOTES, 'UTF-8') ?></h2>
<ul class="about-list">
<li class="about-item">
<div class="about-ico">🤝</div>
<div>
<h4><?= htmlspecialchars(t($translations, 'about_mission_item1_title', 'Easy booking'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?= htmlspecialchars(t($translations, 'about_mission_item1_text', 'Book in a few clicks...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="about-item">
<div class="about-ico">🛡️</div>
<div>
<h4><?= htmlspecialchars(t($translations, 'about_mission_item2_title', 'Security'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?= htmlspecialchars(t($translations, 'about_mission_item2_text', 'Data privacy and Jitsi...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="about-item">
<div class="about-ico">⏱️</div>
<div>
<h4><?= htmlspecialchars(t($translations, 'about_mission_item3_title', 'Save time'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?= htmlspecialchars(t($translations, 'about_mission_item3_text', 'Calendar and online consults...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
</ul>
</div>
<div class="card">
<h2><?= htmlspecialchars(t($translations, 'about_platform_title', 'How the platform works'), ENT_QUOTES, 'UTF-8') ?></h2>
<ul class="about-list">
<li class="about-item">
<div class="about-ico">📚</div>
<div>
<h4><?= htmlspecialchars(t($translations, 'about_platform_item1_title', 'Specialists catalog'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?= htmlspecialchars(t($translations, 'about_platform_item1_text', 'Lawyers, notaries...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="about-item">
<div class="about-ico">🗓️</div>
<div>
<h4><?= htmlspecialchars(t($translations, 'about_platform_item2_title', 'Online booking'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?= htmlspecialchars(t($translations, 'about_platform_item2_text', 'Choose a time and get email confirmation...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="about-item">
<div class="about-ico">💬</div>
<div>
<h4><?= htmlspecialchars(t($translations, 'about_platform_item3_title', 'Chat before the session'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?= htmlspecialchars(t($translations, 'about_platform_item3_text', 'Ask details directly...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="about-item">
<div class="about-ico">🎥</div>
<div>
<h4><?= htmlspecialchars(t($translations, 'about_platform_item4_title', 'Video calls'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?= htmlspecialchars(t($translations, 'about_platform_item4_text', 'Meetings via Jitsi...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
</ul>
</div>
</div>
<div class="about-grid" style="margin-top:14px;">
<div class="card">
<h2><?= htmlspecialchars(t($translations, 'about_clients_title', 'For clients'), ENT_QUOTES, 'UTF-8') ?></h2>
<p><?= htmlspecialchars(t($translations, 'about_clients_text', 'Fast search and booking...'), ENT_QUOTES, 'UTF-8') ?></p>
<div class="about-callout">
<strong><?= htmlspecialchars(t($translations, 'about_clients_note_label', 'Important:'), ENT_QUOTES, 'UTF-8') ?></strong>
<?= htmlspecialchars(t($translations, 'about_clients_note_text', 'uslugi.fr helps you find...'), ENT_QUOTES, 'UTF-8') ?>
</div>
</div>
<div class="card">
<h2><?= htmlspecialchars(t($translations, 'about_specialists_title', 'For specialists'), ENT_QUOTES, 'UTF-8') ?></h2>
<p><?= htmlspecialchars(t($translations, 'about_specialists_text', 'Dashboard, calendar...'), ENT_QUOTES, 'UTF-8') ?></p>
<ul class="about-list">
<li class="about-item">
<div class="about-ico">🔒</div>
<div>
<h4><?= htmlspecialchars(t($translations, 'about_specialists_item1_title', 'Data is safe'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?= htmlspecialchars(t($translations, 'about_specialists_item1_text', 'Basic security practices...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
<li class="about-item">
<div class="about-ico">📈</div>
<div>
<h4><?= htmlspecialchars(t($translations, 'about_specialists_item2_title', 'Grow your audience'), ENT_QUOTES, 'UTF-8') ?></h4>
<p><?= htmlspecialchars(t($translations, 'about_specialists_item2_text', 'Visibility in the catalog...'), ENT_QUOTES, 'UTF-8') ?></p>
</div>
</li>
</ul>
</div>
</div>
<br>
<div class="card">
<h2><?= htmlspecialchars(t($translations, 'about_contact_title', 'Contact us'), ENT_QUOTES, 'UTF-8') ?></h2>
<p><?= htmlspecialchars(t($translations, 'about_contact_text', 'Have suggestions or questions? Write to us.'), ENT_QUOTES, 'UTF-8') ?></p>
<div class="text-start">
<a class="btn btn-danger" href="/contact.php" style="padding:12px 16px;border-radius:999px;">
<?= htmlspecialchars(t($translations, 'about_contact_btn', 'Write to us'), ENT_QUOTES, 'UTF-8') ?>
</a>
</div>
</div>
</div>
</section>
</div>
</div>
<footer class="site-footer">
<div class="container">
<p><?= $translations['copyr'] ?></p>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>