<?php
$servername = "localhost";
$database = "u645251767_stesbn";
$username = "u645251767_stesbn";
$password = "Stesbn@2025";


// Koneksi
$conn = mysqli_connect($servername, $username, $password, $database);
if (!$conn) {
    die("Koneksi gagal: " . mysqli_connect_error());
}

// Ambil data biaya formulir
$formulirQuery = "SELECT * FROM setting WHERE jenis_set = 'biaya formulir'";
$formulirResult = mysqli_query($conn, $formulirQuery);
$formulir = [];
while ($row = mysqli_fetch_assoc($formulirResult)) {
    $key = strtoupper(trim($row['nama_set']));
    $formulir[$key] = $row['nilai_set'];
}

// Mapping kategori ke kode formulir
$kategori_to_formulir = [
    'Diploma' => 'D3',
    'Sarjana' => 'S1',
    'Magister' => 'S2',
    'Kelas Karyawan' => 'S1',
    'Kelas Reguler' => 'S1'
];

// Ambil data biaya
$query = "SELECT * FROM biaya ORDER BY biaya_awal ASC";
$result = mysqli_query($conn, $query);
$groups = [];
while ($row = mysqli_fetch_assoc($result)) {
    $key = $row['biaya_awal'] . '-' . $row['biaya_spp'];
    if (!isset($groups[$key])) {
        $groups[$key] = [
            'kategori' => $row['kategori'],
            'biaya_awal' => $row['biaya_awal'],
            'biaya_spp' => $row['biaya_spp'],
            'jurusan' => []
        ];
    }
    $groups[$key]['jurusan'][] = $row['jurusan'];
}

// Ambil data nama kampus
$kampusQuery = "SELECT * FROM setting WHERE jenis_set = 'kampus'";
$kampusResult = mysqli_query($conn, $kampusQuery);
$kampusData = [];
while ($row = mysqli_fetch_assoc($kampusResult)) {
    $kampusData[$row['nama_set']] = $row['nilai_set'];
}
$namaKampus = $kampusData['nama kampus'] ?? 'Nama Kampus Tidak Ditemukan';

// Ambil data sosial media
$sosmedQuery = "SELECT * FROM setting WHERE jenis_set IN ('fb', 'ig')";
$sosmedResult = mysqli_query($conn, $sosmedQuery);
$sosmedLinks = [];
while ($row = mysqli_fetch_assoc($sosmedResult)) {
    $sosmedLinks[strtolower($row['nama_set'])] = $row['nilai_set'];
}

// Waktu
date_default_timezone_set('Asia/Jakarta');
$tgl_time = date("Y-m-d h:i:sa");
?>

<!DOCTYPE html>
<html lang="en">

<head>
        <!-- Meta tags -->
        <meta charset="utf-8">
        <meta name="description"
            content="Sekolah Tinggi Ekonomi Syariah Bhakti Nugraha atau dikelas STESBN merupakan kampus dengan jurusan s1 perbankan syariah dan s1 manajemen yang berada di tangerang selatan dengan biaya murah terjangkau dan jam kuliah sabtu minggu." />
        <meta name="keywords"
            content="Kelas karyawan, Kuliah karyawan, stesbn, kampus yappera, kampus syariah jakarta, kampus manajemen di tangsel, kampus tangsel, s1 perbankan syariah, biaya kuliah kampus stesbn, sekolah tinggi ekonomi syariah bhakti nugraha, s1 manajemen" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="google-site-verification" content="--6vJJLs1uQPRQ-ePd_xAqk9wU2f7hRUCy8DqF9VDsA" />
    
        <meta property="og:title" content="STES Bhakti Nugraha (Kelas Karyawan)">
        <meta property="og:type" content="website">
        <meta property="og:url" content="https://stesbn.info">
        <meta property="og:image" content="https://stesbn.info/images/background/hero1.png" />
        <meta property="og:description"
            content="Sekolah Tinggi Ekonomi Syariah Bhakti Nugraha atau dikelas STESBN merupakan kampus dengan jurusan s1 perbankan syariah dan s1 manajemen yang berada di tangerang selatan dengan biaya murah terjangkau dan jam kuliah sabtu minggu.">
        <meta name="twitter:card" content="summary_large_image">
        <meta name="twitter:creator" content="@_kuliahkaryawan">
        <meta name="twitter:site" content="@_kuliahkaryawan">
        <meta name="twitter:title" content="STES Bhakti Nugraha (Kelas Karyawan)">
        <meta name="twitter:description"
            content="Sekolah Tinggi Ekonomi Syariah Bhakti Nugraha atau dikelas STESBN merupakan kampus dengan jurusan s1 perbankan syariah dan s1 manajemen yang berada di tangerang selatan dengan biaya murah terjangkau dan jam kuliah sabtu minggu.">
        <meta name="twitter:domain" content="https://stesbn.info">
        <meta name="twitter:image:src" content="https://stesbn.info/images/background/hero1.png">
    
        <meta name="author" content="Kuliah Karyawan Team" />
        <meta http-equiv="cache-control" content="public" />
        <meta name="application-name" content="STES Bhakti Nugraha | Kuliah Karyawan K2" />

    <link rel="apple-touch-icon" sizes="57x57" href="https://stesbn.info//images/favicons/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="https://stesbn.info//images/favicons/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="https://stesbn.info//images/favicons/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="https://stesbn.info//images/favicons/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="https://stesbn.info//images/favicons/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="https://stesbn.info//images/favicons/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="https://stesbn.info//images/favicons/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="https://stesbn.info//images/favicons/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="https://stesbn.info//images/favicons/apple-icon-180x180.png">
    <link rel="icon" type="image/png" sizes="192x192"  href="https://stesbn.info//images/favicons/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="https://stesbn.info//images/favicons/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="96x96" href="https://stesbn.info//images/favicons/favicon-96x96.png">
    <link rel="icon" type="image/png" sizes="16x16" href="https://stesbn.info//images/favicons/favicon-16x16.png">
    <link rel="manifest" href="https://stesbn.info//images/favicons/manifest.json">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="https://stesbn.info//images/favicons/ms-icon-144x144.png">
    <meta name="theme-color" content="#ffffff">
        
        
    <!-- Disable tap highlight on IE -->
    <meta name="msapplication-tap-highlight" content="no" />

    <link href="./main.97292821.css" rel="stylesheet" />
</head>

<body>
    <!-- Add your content of header -->
    <header>
        <nav class="navbar navbar-inverse navbar-fixed-top" style="background-color: #8d8d8d;">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>

                <div class="navbar-collapse">
                    <button type="button" class="close" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <ul class="nav navbar-nav navbar-right">
                        <li><a href="./">Beranda</a></li>
                        <li><a target="_blank" href="https://pendaftaran.stesbn.info">Pendaftaran Online</a></li>
                        <li><a href="#biaya">Biaya Kuliah</a></li>
                        <li><a href="https://kontak.kuliahkaryawan.net/?biayakuliah.stesbn.info">Kontak</a></li>
                    </ul>

                </div>
            </div>
        </nav>
    </header>

    <div class="section-container section-half-background-image-container">
        <div class="image-column" style="background-image: url('https://stesbn.info/storage/galleryFoto/aU6hBD01VlC5sWS2rw077ykopp13QiTTjQwLSxUr.jpg') ; background-size: 100%; "></div>
        
        <div class="container">
            <div class="row">
                <!-- <div class="section-label reveal">
            <p>STIP-AN</p>
          </div> -->
                 <div class="row align-items-center">
  <!-- Gambar besar di kiri -->
  <div class="col-md-6 text-center">
    <img 
      src="https://stesbn.info/images/logo/logo1.png" 
      alt="Logo Kampus" 
      style="max-width: 50%; height: auto;" 
    />
  </div>

  <!-- Teks di kanan -->
  <div class="col-md-6">
    <h3>
      <?= !empty($namaKampus) ? htmlspecialchars($namaKampus) : 'Data tidak tersedia' ?> K2
    </h3>

    <p>
      Keuntungan kuliah kelas karyawan yang kamu dapatkan di 
      <?= !empty($namaKampus) ? htmlspecialchars($namaKampus) : 'Data tidak tersedia' ?>, 
      kamu bisa kuliah sambil kerja dan menambah relasi serta peluang kerja. 
      Jam kuliahnya fleksibel dan tersedia juga kelas online.
      Jadi tunggu apalagi? Yuk segera daftar!
    </p>

    <p>
      <b>Baca Juga:</b> 
      <a href="https://stesbn.info/" target="_blank" style="color: blue;">
        Biaya Kuliah Kelas Karyawan Perbankan Syariah
      </a>
    </p>

    <p>
      <b>Baca Juga:</b> 
      <a href="https://umiba.info/" target="_blank" style="color: blue;">
        Biaya Kuliah Kelas Karyawan Manajemen
      </a>
    </p>

    <p>
      <b>Baca Juga:</b> 
      <a href="https://umiba.info/" target="_blank" style="color: blue;">
        Biaya Kuliah Kelas Karyawan Pasar Minggu
      </a>
    </p>
  </div>
</div>
            </div>
        </div>
    </div>

    <section id="biaya">
        <div class="section-container">
            <div class="container">
                <div class="row">
                    <div class="col-xs-12 col-md-12 section-container-spacer">
                        <h2 class="text-center">Jurusan di <?= !empty($namaKampus) ? htmlspecialchars($namaKampus) : 'Data tidak tersedia' ?></h2>
                    </div>
                </div>        
    <?php foreach ($groups as $group): ?>
    <div class="col-xs-6 col-md-4">
        <div class="fa-container text-center">
            <img src="https://stesbn.info/images/logo/logo1.png" width="80px" />
        </div>
        <h3 class="text-center">Kelas Karyawan</h3>
        <p class="text-center">
            <?php foreach ($group['jurusan'] as $jur): ?>
                <?= htmlspecialchars($jur) ?><br>
            <?php endforeach; ?>
        </p>
    </div>
<?php endforeach; ?>
</div>
            </div>
        </div>
    </section>
   

    <section id="biaya">
        <div class="section-container">
            <div class="container">
                <div class="row">
                    <div class="col-xs-12 col-md-12 section-container-spacer">
                        <h2 class="text-center">Biaya Kuliah di <?= !empty($namaKampus) ? htmlspecialchars($namaKampus) : 'Data tidak tersedia' ?></h2>
                    </div>
                </div>
                <div class="row">
    <!-- Contoh program studi dalam bentuk card -->
    
    <?php foreach ($groups as $group): ?>
    <?php
        $formulir_key = $kategori_to_formulir[$group['kategori']] ?? '';
        $biaya_formulir = $formulir[$formulir_key] ?? 'Rp 0';
    ?>
    <div class="col-md-4 mb-4">
        <div class="card h-100 text-center">
            <div class="card-body">
                <h5 class="card-title"><?= implode(', ', $group['jurusan']) ?></h5>
                <p class="card-text">
                    Biaya Pendaftaran: <b><?= $biaya_formulir ?></b><br>
                    Biaya Awal Masuk: <b>Rp <?= number_format($group['biaya_awal'], 0, ',', '.') ?></b><br>
                    Termasuk: Angs 1 UKT + Biaya Almamater + KTM + PKKMB<br>
                    Biaya Kuliah: <b>Rp <?= number_format($group['biaya_spp'], 0, ',', '.') ?></b> /bulan flat sampai lulus
                </p>
            </div>
        </div>
    </div>
<?php endforeach; ?>

    
    
    
</div>
            </div>
        </div>
    </section>

    <!-- <div class="">
      <div class="container-fluid">
        <div class="row map-container">
          <div id="map"></div>
          <div class="col-xs-10 col-md-4 contact-block-container reveal">
            <div class="row">
              <div class="col-xs-12 col-sm-6">
                <h3>Phone</h3>
                <p>+ 123 45 67 890</p>

                <h3>E-mail</h3>
                <p>hello@email.com</p>
              </div>

              <div class="col-xs-12 col-sm-6">
                <h3>Address</h3>
                <p>42 rue rouelle 75015, Paris</p>

                <h3>Open hours</h3>
                <p>Mon - Fri : 9AM - 5PM</p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div> -->



    <script>
        document.addEventListener("DOMContentLoaded", function(event) {
            googleMapInit();
            scrollToAnchor();
            scrollRevelation("reveal");
        });
    </script>

    <footer class="footer-container white-text-container" style="background-color: #8d8d8d;">
        <div class="container">
            <div class="row">
                <div class="col-md-4 text-center">
  <h4>
    <?= !empty($namaKampus) ? htmlspecialchars($namaKampus) : 'Data tidak tersedia' ?> K2
  </h4>
  <img src="https://stesbn.info/images/logo/logo1.png" width="80px" alt="Logo Kampus" />
</div>

                <div class="col-md-4">
                    <h4>Do you like ? Share this !</h4>
                    <div>
                        <p>
                            <a href="<?= htmlspecialchars($sosmedLinks['instagram'] ?? '#') ?>" target="_blank" class="fa-icon" title="">
                                <i class="fa fa-instagram" aria-hidden="true"></i>
                            </a>
                            <a href="<?= htmlspecialchars($sosmedLinks['facebook'] ?? '#') ?>" target="_blank" class="fa-icon" title="">
                                <i class="fa fa-facebook" aria-hidden="true"></i>
                            </a>
                            <a href="https://twitter.com/_kuliahkaryawan" target="_blank" class="fa-icon" title="">
                                <i class="fa fa-twitter" aria-hidden="true"></i>
                            </a>
                        </p>
                    </div>
                    <div>
                        <p>
                            <small>Copyright © 2022 CV. Edukasi Indonesia Jaya (Edunesia)
                            </small>
                        </p>
                    </div>
                </div>

                <div class="col-md-4">
                    <h4>Subscribe to newsletter</h4>

                    <div class="form-group">
                        <div class="input-group">
                            <input type="text" class="form-control footer-input-text" />
                            <div class="input-group-btn">
                                <button type="button" class="btn btn-default btn-newsletter">
                                    OK
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </footer>
    <script src="https://code.jquery.com/jquery-1.6.4.js"></script>
        <script>
            $.getJSON(
                "https://kuliahkaryawan.net/api/BiayaUpri/1",
                function (data) {
                    let biayaPendaftaranS1 = `${data.biaya_pendaftaran_s1}`;
                    $(".biayaPendaftaranS1").html(biayaPendaftaranS1);
                    
                    let biayaAwalS1 = `${data.biaya_awal_s1}`;
                    $(".biayaAwalS1").html(biayaAwalS1);
                    
        		    let biayaBulananS1 = `${data.biaya_bulanan_s1}`;
                    $(".biayaBulananS1").html(biayaBulananS1);
                    
                    
                }
            ); 
        </script>

    <script src='https://www.google.com/recaptcha/api.js'></script>
    <script>
        document.addEventListener("DOMContentLoaded", function(event) {
            navbarToggleSidebar();
        });
    </script>

    <script type="text/javascript" src="./main.faaf51f9.js"></script>
</body>

</html>