<?php
include "koneksi.php";

$data = mysqli_query($conn, "SELECT * FROM profil_pesantren LIMIT 1");
$profil = mysqli_fetch_assoc($data);
?>

<!DOCTYPE html>
<html lang="id">
<head>
  <meta charset="UTF-8">
  <title>Profil Pondok Pesantren</title>
  <link rel="stylesheet" href="assets/style.css">
</head>
<body>

<!-- NAVBAR -->
<div class="navbar">
  <div class="logo">Pondok Pesantren</div>
  <ul class="menu">
    <li><a href="index.php">Beranda</a></li>
    <li><a href="profil.php" class="active">Profil</a></li>
    <li><a href="login.php" class="btn-login">Login</a></li>
  </ul>
</div>

<!-- PROFIL CONTENT -->
<div class="dashboard">
  <h1><?= $profil['nama_pondok']; ?></h1>
  <p><strong>Alamat:</strong> <?= $profil['alamat']; ?></p>
  <p><strong>Tahun Berdiri:</strong> <?= $profil['tahun_berdiri']; ?></p>
  <p><strong>Pimpinan:</strong> <?= $profil['pimpinan']; ?></p>

  <br>

  <div class="card">
    <h3>Visi</h3>
    <p><?= nl2br($profil['visi']); ?></p>
  </div>

  <br>

  <div class="card">
    <h3>Misi</h3>
    <p><?= nl2br($profil['misi']); ?></p>
  </div>

  <br>

  <div class="card">
    <h3>Sejarah</h3>
    <p><?= nl2br($profil['sejarah']); ?></p>
  </div>
</div>

</body>
</html>
