<?php
require_once __DIR__ . '/../includes/db.php';
require_once __DIR__ . '/../includes/functions.php';
$db = get_db();
$row = $db->query("SELECT * FROM visimisi WHERE id=1")->fetch(PDO::FETCH_ASSOC);
include '_header.php';
?>
<div class="container py-4">
  <h1 class="mb-4">Visi & Misi Sekolah</h1>
  <div class="card mb-4 p-4">
    <h4>Visi</h4>
    <div class="mb-3 border rounded bg-light p-3">
      <?php echo $row && !empty($row['visi']) ? $row['visi'] : '<em>Belum diisi</em>'; ?>
    </div>
    <h4>Misi</h4>
    <div class="border rounded bg-light p-3">
      <?php echo $row && !empty($row['misi']) ? $row['misi'] : '<em>Belum diisi</em>'; ?>
    </div>
  </div>
</div>
<?php include '_footer.php'; ?>
