<?php include('../_partials/top.php') ?>

<h1 class="page-header">Data Pelatih</h1>
<?php include('_partials/menu.php') ?>

<?php include('data-show.php') ?>

<h3>A. Data Pelatih</h3>
<table class="table table-striped">
<tr>
    <th>Foto</th>
    <td>:</td>
    <td>
      <?php 
        $foto = !empty($data_pelatih[0]['foto_pelatih']) ? $data_pelatih[0]['foto_pelatih'] : 'default.jpg';
      ?>
      <img src="../../uploads/<?php echo htmlspecialchars($foto); ?>" width="100" class="img-thumbnail">
    </td>
  </tr>
  <tr>
    <th width="20%">Nama Pelatih</th>
    <td width="1%">:</td>
    <td><?php echo $data_pelatih[0]['nama_pelatih'] ?></td>
  </tr>
  <tr>
    <th>Alamat</th>
    <td>:</td>
    <td><?php echo $data_pelatih[0]['alamat'] ?></td>
  </tr>
  <tr>
    <th>Asal Ranting</th>
    <td>:</td>
    <td><?php echo $data_pelatih[0]['asal_ranting'] ?></td>
  </tr>
</table>

<h3>B. Data Aplikasi</h3>
<table class="table table-striped">
  <tr>
    <th width="20%">Diinput oleh</th>
    <td width="1%">:</td>
    <td><?php echo $_SESSION['user']['nama_user'] ?></td>
  </tr>
  <tr>
    <th>Diinput</th>
    <td>:</td>
    <td><?php echo htmlspecialchars($data_pelatih[0]['created_at']); ?></td>
  </tr>
  <tr>
    <th>Diperbaharui</th>
    <td>:</td>
    <td><?php echo htmlspecialchars($data_pelatih[0]['updated_at']); ?></td>
  </tr>
</table>


<?php include('../_partials/bottom.php') ?>
