<?php
$page_title = 'Tambah Profil';
require_once __DIR__ . '/../../config/secure_bootstrap.php';
include __DIR__ . '/../includes/header.php';
?>

<div class="card">
  <div class="card-header">
    <i class="fas fa-plus-circle"></i> Tambah Profil
  </div>
  <div class="card-body">
    <form action="proses.php?action=tambah" method="POST" enctype="multipart/form-data">
      <div class="mb-3">
        <label class="form-label">Judul</label>
        <input type="text" name="judul" class="form-control" required>
      </div>

      <div class="mb-3">
        <label class="form-label">Slug (otomatis dari judul, bisa ubah manual)</label>
        <input type="text" name="slug" class="form-control" placeholder="contoh: visi-misi">
      </div>

      <div class="mb-3">
        <label class="form-label">Isi Profil</label>
        <textarea name="isi" class="form-control" rows="8" required></textarea>
      </div>

      <div class="mb-3">
        <label class="form-label">Gambar (opsional)</label>
        <input type="file" name="gambar" class="form-control" accept="image/*">
      </div>

      <div class="mb-3">
        <label class="form-label">Urutan Tampilan</label>
        <input type="number" name="urutan" class="form-control" value="0">
      </div>

      <div class="mb-3">
        <label class="form-label">Status</label>
        <select name="status" class="form-select">
          <option value="active">Aktif</option>
          <option value="inactive">Nonaktif</option>
        </select>
      </div>

      <button type="submit" class="btn btn-primary">
        <i class="fas fa-save"></i> Simpan
      </button>
      <a href="<?= $base_url ?>admin/profile.php" class="btn btn-secondary">Batal</a>
    </form>
  </div>
</div>

<?php include __DIR__ . '/../includes/footer.php'; ?>
