<?php
/* Smarty version 5.7.0, created on 2026-02-09 09:55:01
  from 'file:views/projet_display.tpl' */

/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
  'version' => '5.7.0',
  'unifunc' => 'content_6989aef59222c5_05723018',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '858273afeea443d46db5cb9b3c1c67988eba5ded' => 
    array (
      0 => 'views/projet_display.tpl',
      1 => 1770628836,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
))) {
function content_6989aef59222c5_05723018 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?>


<?php 
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_9176586226989aef5913c31_97339576', "content");
$_smarty_tpl->getInheritance()->endChild($_smarty_tpl, "views/layout.tpl", $_smarty_current_dir);
}
/* {block "content"} */
class Block_9176586226989aef5913c31_97339576 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\projetphp\\views';
?>

<main class="container mt-5 py-5">

    <!-- Message après l'envoi d'email -->
    <?php if ((true && (true && null !== ($_GET['mail'] ?? null))) && $_GET['mail'] === 'ok') {?>
        <div class="alert alert-success">Email envoyé avec succès.</div>
    <?php } elseif ((true && (true && null !== ($_GET['mail'] ?? null))) && $_GET['mail'] === 'fail') {?>
        <div class="alert alert-danger">Erreur lors de l'envoi de l'email.</div>
    <?php }?>

    <div class="row g-4">

        <!-- Contenu principal du projet -->
        <div class="col-lg-8">

            <h1 class="fw-bold"><?php echo $_smarty_tpl->getValue('objProject')->getTitle();?>
</h1>

            <p class="text-muted">
                <?php echo $_smarty_tpl->getValue('arrProject')['category_name'] ?? 'Général';?>

            </p>

            <div class="mb-4 shadow-sm">
                <img src=".<?php echo $_smarty_tpl->getValue('objProject')->getThumbnail();?>
"
                     class="img-fluid rounded w-100">
            </div>

            <div class="bg-light p-4 rounded mb-4">
                <h4 class="border-bottom pb-2">Description</h4>
                <p class="lead"><?php echo $_smarty_tpl->getValue('objProject')->getDescription();?>
</p>

                <div class="mt-4">
                    <?php echo nl2br((string) $_smarty_tpl->getValue('objProject')->getContent(), (bool) 1);?>

                </div>
            </div>

            <!-- Formulaire qui envoie la demande au contrôleur (sendEmail) -->
            <div class="card shadow-sm p-4 mb-5">
                <form method="post" action="index.php?ctrl=project&action=sendEmail">

                    <input type="hidden" name="project_id"
                           value="<?php echo $_smarty_tpl->getValue('objProject')->getId();?>
">

                    <input type="email" name="to_email"
                           class="form-control mb-3"
                           placeholder="Adresse email" required>

                    <button type="submit" class="btn btn-primary w-100">
                        Envoyer par email
                    </button>

                </form>
            </div>

        </div>

        <!-- Sidebar : informations du créateur -->
        <div class="col-lg-4">
            <div class="card text-center shadow-sm p-4">

                <img src=".<?php echo $_smarty_tpl->getValue('objProject')->getUser_image();?>
"
                     class="rounded-circle mb-3 mx-auto"
                     style="width:100px;height:100px;object-fit:cover;">

                <h5><?php echo $_smarty_tpl->getValue('objProject')->getCreatorName();?>
</h5>

                <p class="text-muted small">
                    Publié le <?php echo $_smarty_tpl->getValue('objProject')->getCreation_date();?>

                </p>

                <button class="btn btn-primary">Contacter le talent</button>

            </div>
        </div>

    </div>
</main>
<?php
}
}
/* {/block "content"} */
}
