From f852c0516af44d087b1c29314c66e3ca512ab3c0 Mon Sep 17 00:00:00 2001 From: Oleg Barykin Date: Sat, 14 Mar 2026 11:36:51 +0100 Subject: [PATCH] Ajout specialiste.php choisir_abb.php --- choisir_abb.php | 96 +++++++++++----------- index.php | 2 +- public/lang/fr.php | 5 +- public/lang/ru.php | 5 +- specialiste.php | 200 +++++++++++++++++++++++++-------------------- 5 files changed, 171 insertions(+), 137 deletions(-) diff --git a/choisir_abb.php b/choisir_abb.php index 8265e44..fdda35b 100644 --- a/choisir_abb.php +++ b/choisir_abb.php @@ -1,35 +1,36 @@ , pas de , pas de form Stripe) -require_once __DIR__ . '/../includes/bootstrap_global.php'; + // /choisir_abb.php (BLOC EMBED - pas de , pas de , pas de form Stripe) + require_once __DIR__ . '/../includes/bootstrap_global.php'; -// Abonnement gratuit (id=1) -$FREE_PLAN_ID = 1; + // Abonnement gratuit (id=1) + $FREE_PLAN_ID = 1; -// (Optionnel) Déjà utilisé ? -> on retire le gratuit -$hasUsedFree = false; -$praticien_id = (int)($_SESSION['praticien_id'] ?? 0); // si tu as déjà un id en session, sinon 0 + // (Optionnel) Déjà utilisé ? -> on retire le gratuit + $hasUsedFree = false; + $praticien_id = (int) ($_SESSION['praticien_id'] ?? 0); // si tu as déjà un id en session, sinon 0 -if ($praticien_id > 0) { - $sql = "SELECT 1 + if ($praticien_id > 0) { + $sql = "SELECT 1 FROM paiement WHERE praticien_id = ? AND abonnement_id = ? AND (statut IS NULL OR statut <> 'échoué') LIMIT 1"; - $st = $pdo->prepare($sql); - $st->execute([$praticien_id, $FREE_PLAN_ID]); - $hasUsedFree = (bool)$st->fetchColumn(); -} + $st = $pdo->prepare($sql); + $st->execute([$praticien_id, $FREE_PLAN_ID]); + $hasUsedFree = (bool) $st->fetchColumn(); + } -// Abonnements actifs -$stmt = $pdo->query("SELECT * FROM abonnement WHERE actif = 1 ORDER BY prix ASC, duree_jours ASC"); -$abonnements = $stmt->fetchAll(PDO::FETCH_ASSOC); + // Abonnements actifs + $stmt = $pdo->query("SELECT * FROM abonnement WHERE actif = 1 ORDER BY prix ASC, duree_jours ASC"); + $abonnements = $stmt->fetchAll(PDO::FETCH_ASSOC); -if ($hasUsedFree) { - $abonnements = array_values(array_filter($abonnements, fn($ab) => (int)$ab['id'] !== 1)); -} + if ($hasUsedFree) { + $abonnements = array_values(array_filter($abonnements, fn($ab) => (int) $ab['id'] !== 1)); + } -function h($s){ return htmlspecialchars((string)$s, ENT_QUOTES, 'UTF-8'); } + function h($s) + {return htmlspecialchars((string) $s, ENT_QUOTES, 'UTF-8');} ?>
-

-

+

+

- -
+ +
-
+
+
- +
diff --git a/index.php b/index.php index 72c9b1e..7eab3f2 100644 --- a/index.php +++ b/index.php @@ -107,7 +107,7 @@ - + diff --git a/public/lang/fr.php b/public/lang/fr.php index e619c8f..263f959 100644 --- a/public/lang/fr.php +++ b/public/lang/fr.php @@ -505,6 +505,7 @@ Cliquez simplement sur le lien pour vous connecter.
', 'etape2_label' => 'Choisissez un expert', 'etape3_label' => 'Prenez rendez-vous', 'plus_details' => 'Plus de détails >>', + 'uznat_bolche' => 'En savoir plus', 'plus_favorits' => '[Mémoriser]', // Profil praticien / avis @@ -1344,7 +1345,7 @@ Cliquez simplement sur le lien pour vous connecter.
', 'abb_description_1' => 'Essayez la plateforme gratuitement — sans engagement et sans carte bancaire.', 'abb_titre_2' => 'Forfait mensuel', - 'abb_description_2' => 'Accès complet à la plateforme pendant un mois. Formule flexible — possibilité de prolonger ou de suspendre à tout moment.', + 'abb_description_2' => 'Accès complet à la plateforme pendant un mois. Formule flexible — possibilité de suspendre à tout moment.', 'abb_titre_3' => 'Abonnement annuel', 'abb_description_3' => 'Économisez 25 € par an. Idéal pour les professionnels utilisant la plateforme de manière régulière.', @@ -1966,6 +1967,8 @@ Cliquez simplement sur le lien pour vous connecter.
', 'spec_benefit_online' => 'Consultations en ligne directement sur la plateforme', 'spec_benefit_articles' => 'Visibilité supplémentaire grâce aux publications d’experts', 'spec_benefit_russian_clients' => 'Accès à une clientèle russophone en France', + 'spec_invite_secretaire' => 'Invitez un secrétaire pour gérer l’agenda et l’organisation de plusieurs spécialistes.', + 'spec_suivi_clients' => 'Accédez à un espace dédié pour suivre vos clients et l’historique des rendez-vous.', 'spec_section_for_who_title' => 'À qui s’adresse la plateforme', diff --git a/public/lang/ru.php b/public/lang/ru.php index d496711..3aa1488 100644 --- a/public/lang/ru.php +++ b/public/lang/ru.php @@ -507,6 +507,7 @@ return [ 'etape2_label' => 'Чат со специалистом', 'etape3_label' => 'Видео связь', 'plus_details' => 'Подробнее>>', + 'uznat_bolche' => 'Узнать преимущества', 'plus_favorits' => '[Запомнить]', // Профиль врача / отзывы @@ -1353,7 +1354,7 @@ return [ 'abb_titre_1' => '7 дней бесплатно', 'abb_description_1' => 'Попробуйте платформу бесплатно — без обязательств и привязки к карте.', 'abb_titre_2' => 'Месячный пакет', - 'abb_description_2' => 'Полный доступ к платформе на месяц. Гибкий формат — можно продлить или приостановить в любой момент.', + 'abb_description_2' => 'Полный доступ к платформе на месяц. Гибкий формат — можно приостановить в любой момент.', 'abb_titre_3' => 'Годовая подписка', 'abb_description_3' => 'Экономия 25 € в год. Подходит для тех, кто работает на платформе стабильно.', 'abb_titre_4' => 'Пакет «Профи+»', @@ -1976,6 +1977,8 @@ return [ 'spec_benefit_online' => 'Проведение онлайн-консультаций прямо на платформе', 'spec_benefit_articles' => 'Дополнительная видимость через экспертные публикации', 'spec_benefit_russian_clients' => 'Привлечение русскоязычных клиентов во Франции', + 'spec_invite_secretaire' => 'Пригласите секретаря для управления расписанием и организацией работы нескольких специалистов.', + 'spec_suivi_clients' => 'Получите доступ к личному пространству для ведения клиентов и истории записей.', 'spec_section_for_who_title' => 'Для кого предназначена платформа', diff --git a/specialiste.php b/specialiste.php index aee787b..4bdb3c9 100644 --- a/specialiste.php +++ b/specialiste.php @@ -1,74 +1,98 @@ … - $buf = preg_replace('~]*>~i', '', $buf); - $buf = preg_replace('~]*>~i', '', $buf); + if (! empty($_SESSION['reference_id']) && $role === 'client') { + return true; + } - // 1) retirer … et ouverts/fermés - $buf = preg_replace('~]*>.*?~is', '', $buf); - $buf = preg_replace('~]*>~i', '', $buf); + if (! empty($_SESSION['user_id']) && $role === 'praticien') { + return true; + } - // 2) retirer les CSS “globaux” pour éviter d’écraser la home - $buf = preg_replace('~]+href="[^"]*(bootstrap[^"]*\.css|mobil_style\.css|site_style\.css|fonts\.googleapis)[^"]*"[^>]*>~i', '', $buf); + if (! empty($_SESSION['praticien_id'])) { + return true; + } - // 3) retirer le ~i', '', $buf); + if (! empty($_SESSION['reference_id']) && $role === 'praticien') { + return true; + } - echo $buf; // garde
+ tes scripts inline utiles -} + return false; + } -function t(array $translations, string $key, string $fallback = ''): string { - $val = $translations[$key] ?? ''; - if ($val === '') return $fallback; - return (string)$val; -} + function include_header_clean(string $absPath): void + { + global $translations, $lang; + ob_start(); + include $absPath; // /public/includes/header.php + $buf = ob_get_clean() ?: ''; -// Lang HTML -$langHtml = preg_match('~^[a-z]{2}(-[A-Z]{2})?$~', (string)($lang ?? '')) ? (string)$lang : 'ru'; + // 0) DOCTYPE + … + $buf = preg_replace('~]*>~i', '', $buf); + $buf = preg_replace('~]*>~i', '', $buf); + + // 1) retirer … et ouverts/fermés + $buf = preg_replace('~]*>.*?~is', '', $buf); + $buf = preg_replace('~]*>~i', '', $buf); + + // 2) retirer les CSS “globaux” pour éviter d’écraser la home + $buf = preg_replace('~]+href="[^"]*(bootstrap[^"]*\.css|mobil_style\.css|site_style\.css|fonts\.googleapis)[^"]*"[^>]*>~i', '', $buf); + + // 3) retirer le ~i', '', $buf); + + echo $buf; // garde
+ 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'; ?> - + - <?= htmlspecialchars($translations['seo_about_title'], ENT_QUOTES, 'UTF-8') ?> - - + <?php echo htmlspecialchars($translations['seo_about_title'], ENT_QUOTES, 'UTF-8') ?> + + - + - - - + + + - +