Version stable, aprelic, connexion CFRS et autres corrections

This commit is contained in:
Oleg Barykin committed 2026-04-17 20:18:11 +02:00
1 parent 865de8a976
commit e9d0010451
62 files changed
+17483 -7256

No files matched your search

+70 -48
View File
@@ -1,86 +1,113 @@
<?php
require_once __DIR__ . '/../includes/init_praticien.php';
require_once __DIR__ . '/../includes/init_praticien.php';
$id = $_SESSION['reference_id'] ?? null;
if (! $id) {
http_response_code(403);
exit('Forbidden');
}
$currentLang = $lang ?? 'ru';
if (! in_array($currentLang, ['ru', 'fr', 'en'], true)) {
$currentLang = 'ru';
}
// Base praticien
$stmt = $pdo->prepare("SELECT * FROM praticien WHERE id = ?");
$stmt->execute([$id]);
$praticien = $stmt->fetch();
// Récupérer les infos du praticien
$stmt = $pdo->prepare("SELECT * FROM praticien WHERE id = ?");
$stmt->execute([$_SESSION['reference_id'] ?? 0]);
$praticien = $stmt->fetch();
if (! $praticien) {
http_response_code(404);
exit(htmlspecialchars($translations['praticien_introuvable'] ?? 'Introuvable.'));
}
$id = $_SESSION['reference_id'] ?? null;
if (!$id) { http_response_code(403); exit('Forbidden'); }
require_once __DIR__ . '/../includes/header.php';
// Traduction courante
$stmtTr = $pdo->prepare("
SELECT *
FROM praticien_traduction
WHERE praticien_id = ? AND langue = ?
LIMIT 1
");
$stmtTr->execute([$id, $currentLang]);
$traduction = $stmtTr->fetch() ?: null;
// Valeurs affichées avec fallback
$nomAffiche = $traduction['nom_affiche'] ?? $praticien['nom'] ?? '';
$prenomAffiche = $traduction['prenom_affiche'] ?? $praticien['prenom'] ?? '';
$villeAffichee = $traduction['ville_affichee'] ?? $praticien['ville'] ?? '';
$titreAffiche = $traduction['titre'] ?? $praticien['titre'] ?? '';
$specialiteAffiche = $traduction['specialite'] ?? $praticien['specialite'] ?? '';
$presentationAffiche = $traduction['presentation'] ?? $praticien['presentation'] ?? '';
$dispoAffiche = $traduction['disponibilite'] ?? $praticien['disponibilite'] ?? '';
require_once __DIR__ . '/../includes/header.php';
?>
<div class="main1">
<div class="container py-5">
<div class="shadow p-4 rounded bg-light">
<h2 class="mb-4 text-center"><?= htmlspecialchars($translations['mes_infos_heading']) ?></h2>
<h2 class="mb-4 text-center"><?php echo htmlspecialchars($translations['mes_infos_heading']) ?></h2>
<div class="card-body">
<div class="row g-4 mb-3">
<!-- Colonne gauche -->
<div class="col-12 col-sm-6">
<p><strong><?= htmlspecialchars($translations['label_nom']) ?> :</strong>
<?= htmlspecialchars($praticien['nom'] ?? '') ?></p>
<p><strong><?php echo htmlspecialchars($translations['label_nom']) ?> :</strong>
<?php echo htmlspecialchars($nomAffiche) ?></p>
<p><strong><?= htmlspecialchars($translations['label_prenom']) ?> :</strong>
<?= htmlspecialchars($praticien['prenom'] ?? '') ?></p>
<p><strong><?php echo htmlspecialchars($translations['label_prenom']) ?> :</strong>
<?php echo htmlspecialchars($prenomAffiche) ?></p>
<p><strong><?= htmlspecialchars($translations['label_email']) ?> :</strong>
<?= htmlspecialchars($praticien['email'] ?? '') ?></p>
<p><strong><?php echo htmlspecialchars($translations['label_email']) ?> :</strong>
<?php echo htmlspecialchars($praticien['email'] ?? '') ?></p>
<p><strong><?= htmlspecialchars($translations['label_telephone']) ?> :</strong>
<?= htmlspecialchars($praticien['telephone'] ?? '') ?></p>
<p><strong><?php echo htmlspecialchars($translations['label_telephone']) ?> :</strong>
<?php echo htmlspecialchars($praticien['telephone'] ?? '') ?></p>
<div>
<strong><?= htmlspecialchars($translations['alt_photo']) ?> :</strong><br><br>
<?php if (!empty($praticien['photo'])): ?>
<strong><?php echo htmlspecialchars($translations['alt_photo']) ?> :</strong><br><br>
<?php if (! empty($praticien['photo'])): ?>
<img
src="/public/uploads/<?= htmlspecialchars($praticien['photo']) ?>"
alt="<?= htmlspecialchars($translations['alt_photo']) ?>"
src="/public/uploads/<?php echo htmlspecialchars($praticien['photo']) ?>"
alt="<?php echo htmlspecialchars($translations['alt_photo']) ?>"
class="img-fluid rounded-4 shadow"
style="max-width:230px;height:auto;">
<?php else: ?>
<span class="text-muted"><?= htmlspecialchars($translations['aucune_photo'] ?? 'Aucune photo') ?></span>
<span class="text-muted"><?php echo htmlspecialchars($translations['aucune_photo'] ?? 'Aucune photo') ?></span>
<?php endif; ?>
</div>
</div>
<!-- Colonne droite -->
<div class="col-12 col-sm-6">
<p><strong><?= htmlspecialchars($translations['placeholder_siret']) ?> :</strong>
<?= htmlspecialchars($praticien['siret'] ?? '') ?></p>
<p><strong><?php echo htmlspecialchars($translations['placeholder_siret']) ?> :</strong>
<?php echo htmlspecialchars($praticien['siret'] ?? '') ?></p>
<p><strong><?= htmlspecialchars($translations['label_specialite']) ?> :</strong>
<?= htmlspecialchars($praticien['specialite'] ?? '') ?></p>
<p><strong><?php echo htmlspecialchars($translations['label_specialite']) ?> :</strong>
<?php echo htmlspecialchars($specialiteAffiche) ?></p>
<!-- Ajout tarif et moyen de paiement -->
<p><strong><?= htmlspecialchars($translations['tarif_consultation']) ?> :</strong>
<?= htmlspecialchars($praticien['titre'] ?? '') ?></p>
<p><strong><?php echo htmlspecialchars($translations['tarif_consultation']) ?> :</strong>
<?php echo htmlspecialchars($titreAffiche) ?></p>
<p><strong><?= htmlspecialchars($translations['moyens_payement']) ?> :</strong>
<?= htmlspecialchars($praticien['disponibilite'] ?? '') ?></p>
<p><strong><?php echo htmlspecialchars($translations['moyens_payement']) ?> :</strong>
<?php echo htmlspecialchars($dispoAffiche) ?></p>
<p><strong><?= htmlspecialchars($translations['label_ville']) ?> :</strong>
<?= htmlspecialchars($praticien['ville'] ?? '') ?></p>
<p><strong><?php echo htmlspecialchars($translations['label_ville']) ?> :</strong>
<?php echo htmlspecialchars($villeAffichee) ?></p>
<p><strong><?= htmlspecialchars($translations['label_code_postal']) ?> :</strong>
<?= htmlspecialchars($praticien['code_postal'] ?? '') ?></p>
<p><strong><?php echo htmlspecialchars($translations['label_code_postal']) ?> :</strong>
<?php echo htmlspecialchars($praticien['code_postal'] ?? '') ?></p>
<p><strong><?= htmlspecialchars($translations['label_adresse']) ?> :</strong><br>
<?= nl2br(htmlspecialchars($praticien['adresse'] ?? '')) ?></p>
<p><strong><?php echo htmlspecialchars($translations['label_adresse']) ?> :</strong><br>
<?php echo nl2br(htmlspecialchars($praticien['adresse'] ?? '')) ?></p>
<p><strong><?= htmlspecialchars($translations['label_presentation']) ?> :</strong><br>
<?= nl2br(htmlspecialchars($praticien['presentation'] ?? '')) ?></p>
<p><strong><?php echo htmlspecialchars($translations['label_presentation']) ?> :</strong><br>
<?php echo nl2br(htmlspecialchars($presentationAffiche)) ?></p>
</div>
</div>
<div class="mt-4 text-center">
<a href="/public/praticien/modifier.php" class="btn btn-primary">
<?= htmlspecialchars($translations['btn_modifier_mes_infos']) ?>
<?php echo htmlspecialchars($translations['btn_modifier_mes_infos']) ?>
</a>
</div>
</div>
@@ -90,11 +117,6 @@ require_once __DIR__ . '/../includes/header.php';
<footer class="site-footer">
<div class="container">
<p><?= $translations['copyr'] ?></p>
<p><?php echo $translations['copyr'] ?></p>
</div>
</footer>
<?php
// Si ton header.php ouvre <body>, pense à fermer proprement dans footer.php.
// Si tu n'as pas de footer commun, laisse comme ça.
?>