123 lines
5.0 KiB
PHP
123 lines
5.0 KiB
PHP
<?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();
|
|
|
|
if (! $praticien) {
|
|
http_response_code(404);
|
|
exit(htmlspecialchars($translations['praticien_introuvable'] ?? 'Introuvable.'));
|
|
}
|
|
|
|
// 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"><?php echo htmlspecialchars($translations['mes_infos_heading']) ?></h2>
|
|
|
|
<div class="card-body">
|
|
<div class="row g-4 mb-3">
|
|
<div class="col-12 col-sm-6">
|
|
<p><strong><?php echo htmlspecialchars($translations['label_nom']) ?> :</strong>
|
|
<?php echo htmlspecialchars($nomAffiche) ?></p>
|
|
|
|
<p><strong><?php echo htmlspecialchars($translations['label_prenom']) ?> :</strong>
|
|
<?php echo htmlspecialchars($prenomAffiche) ?></p>
|
|
|
|
<p><strong><?php echo htmlspecialchars($translations['label_email']) ?> :</strong>
|
|
<?php echo htmlspecialchars($praticien['email'] ?? '') ?></p>
|
|
|
|
<p><strong><?php echo htmlspecialchars($translations['label_telephone']) ?> :</strong>
|
|
<?php echo htmlspecialchars($praticien['telephone'] ?? '') ?></p>
|
|
|
|
<div>
|
|
<strong><?php echo htmlspecialchars($translations['alt_photo']) ?> :</strong><br><br>
|
|
<?php if (! empty($praticien['photo'])): ?>
|
|
<img
|
|
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"><?php echo htmlspecialchars($translations['aucune_photo'] ?? 'Aucune photo') ?></span>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-12 col-sm-6">
|
|
<p><strong><?php echo htmlspecialchars($translations['placeholder_siret']) ?> :</strong>
|
|
<?php echo htmlspecialchars($praticien['siret'] ?? '') ?></p>
|
|
|
|
<p><strong><?php echo htmlspecialchars($translations['label_specialite']) ?> :</strong>
|
|
<?php echo htmlspecialchars($specialiteAffiche) ?></p>
|
|
|
|
<p><strong><?php echo htmlspecialchars($translations['tarif_consultation']) ?> :</strong>
|
|
<?php echo htmlspecialchars($titreAffiche) ?></p>
|
|
|
|
<p><strong><?php echo htmlspecialchars($translations['moyens_payement']) ?> :</strong>
|
|
<?php echo htmlspecialchars($dispoAffiche) ?></p>
|
|
|
|
<p><strong><?php echo htmlspecialchars($translations['label_ville']) ?> :</strong>
|
|
<?php echo htmlspecialchars($villeAffichee) ?></p>
|
|
|
|
<p><strong><?php echo htmlspecialchars($translations['label_code_postal']) ?> :</strong>
|
|
<?php echo htmlspecialchars($praticien['code_postal'] ?? '') ?></p>
|
|
|
|
<p><strong><?php echo htmlspecialchars($translations['label_adresse']) ?> :</strong><br>
|
|
<?php echo nl2br(htmlspecialchars($praticien['adresse'] ?? '')) ?></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">
|
|
<?php echo htmlspecialchars($translations['btn_modifier_mes_infos']) ?>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer class="site-footer">
|
|
<div class="container">
|
|
<p><?php echo $translations['copyr'] ?></p>
|
|
</div>
|
|
</footer>
|