<?php
$servername = "localhost";
$database = "u645251767_stiesp";
$username = "u645251767_stiesp";
$password = "Stiesp@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'
];

// 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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="Kelas karyawan, Kuliah karyawan, sties purwakarta, biaya kuliah kampus di purwakarta, kampus kelas karyawan purwakarta, kelas karyawan purwakarta, kelas fleksibel sties, kampus murah, S1 Ekonomi Syariah dan S1 Perbankan Syariah, kelas karyawan fleksibel, pendaftaran online, kampus syariah di purwakarta" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="STIES Indonesia salah satu Perguruan Tinggi Swasta Terbaik dan rekomendasi kampus murah di Kota Purwakarta, tersedia kelas karyawan dan elearning atau kelas jarak jauh/online dengan biaya murah dan terjangkau cukup Rp 600.000/Bulan dengan jurusan s1 Ekonomi Syariah dan s1 Perbankan Syariah." />
    
    <title>STIES Indonesia Purwakarta (Kelas Karyawan)</title>
    <meta property="og:title" content="STIES Indonesia (Kelas Karyawan)">
    <meta property="og:type" content="website">
    <meta property="og:url" content="https://sties-purwakarta.info">
    <meta property="og:image" content="https://sties-purwakarta.info/images/fb-ogimage.png" />
    <meta property="og:image:width" content="1200" />
    <meta property="og:image:height" content="630" />
    <meta property="og:description" content="STIES Indonesia salah satu Perguruan Tinggi Swasta Terbaik dan rekomendasi kampus murah di Kota Purwakarta, tersedia kelas karyawan dan elearning atau kelas jarak jauh/online dengan biaya murah dan terjangkau cukup Rp 600.000/Bulan dengan jurusan s1 Ekonomi Syariah dan s1 Perbankan Syariah.">
    <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="STIES Indonesia (Kelas Karyawan)">
    <meta name="twitter:description" content="STIES Indonesia salah satu Perguruan Tinggi Swasta Terbaik dan rekomendasi kampus murah di Kota Purwakarta, tersedia kelas karyawan dan elearning atau kelas jarak jauh/online dengan biaya murah dan terjangkau cukup Rp 600.000/Bulan dengan jurusan s1 Ekonomi Syariah dan s1 Perbankan Syariah.">
    <meta name="twitter:domain" content="https://sties-purwakarta.info">
    <meta name="twitter:image:src" content="https://sties-purwakarta.info/images/twitter-og.png">
    <meta name="author" content="Kuliah Karyawan Team" />
    <meta http-equiv="cache-control" content="public" />
    <meta name="application-name" content="STIES Purwakarta| Kuliah Karyawan K2" />
    <meta name="msapplication-TileColor" content="#9800CB" />
    <meta name="msapplication-TileImage" content="https://sties-purwakarta.info/assets/favicons/mstile-144x144.png" />
    <meta name="msapplication-square70x70logo" content="https://sties-purwakarta.info/assets/favicons/mstile-70x70.png" />
    <meta name="msapplication-square150x150logo" content="https://sties-purwakarta.info/assets/favicons/mstile-150x150.png" />
    <meta name="msapplication-wide310x150logo" content="https://sties-purwakarta.info/assets/favicons/mstile-310x150.png" />
    <meta name="msapplication-square310x310logo" content="https://sties-purwakarta.info/assets/favicons/mstile-310x310.png" />
    <meta name="theme-color" content="#9800CB" />

    <link rel="apple-touch-icon" sizes="57x57" href="https://sties-purwakarta.info//images/favicons/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="https://sties-purwakarta.info//images/favicons/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="https://sties-purwakarta.info//images/favicons/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="https://sties-purwakarta.info//images/favicons/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="https://sties-purwakarta.info//images/favicons/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="https://sties-purwakarta.info//images/favicons/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="https://sties-purwakarta.info//images/favicons/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="https://sties-purwakarta.info//images/favicons/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="https://sties-purwakarta.info//images/favicons/apple-icon-180x180.png">
    <link rel="icon" type="image/png" sizes="192x192"  href="https://sties-purwakarta.info//images/favicons/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="https://sties-purwakarta.info//images/favicons/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="96x96" href="https://sties-purwakarta.info//images/favicons/favicon-96x96.png">
    <link rel="icon" type="image/png" sizes="16x16" href="https://sties-purwakarta.info//images/favicons/favicon-16x16.png">
    <link rel="manifest" href="https://sties-purwakarta.info//images/favicons/manifest.json">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="https://sties-purwakarta.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.sties-purwakarta.info">Pendaftaran Online</a></li>
                        <li><a href="#biaya">Biaya Kuliah</a></li>
                        <li><a href="https://kontak.kuliahkaryawan.net/?biayakuliah.sties-purwakarta.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://sties-purwakarta.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="col-md-6 col-md-offset-6 text-column">
                    <!-- <imgsrc="https://asset.kuliahkaryawan.net/repository-logo/15-512x512-1673341101.webp"
              width="60px"
            /> -->
                    <h3><?= !empty($namaKampus) ? htmlspecialchars($namaKampus) : 'Data tidak tersedia' ?> K2</h3>
                    <!--<p>Content</p>-->
                    <p>
                        Keuntungan kuliah kelas karyawan yang kamu dapatkan di <?= !empty($namaKampus) ? htmlspecialchars($namaKampus) : 'Data tidak tersedia' ?> , kamu bisa kuliah sambil
                        kerja dan kamu dapat menambah relasi dan peluang kerjamu, Jam kuliah nya fleksibel, Dan kamu
                        juga bisa mengikuti kelas online. Jadi tunggu apalagi? yuk segera daftarkan diri kamu
                        di <?= !empty($namaKampus) ? htmlspecialchars($namaKampus) : 'Data tidak tersedia' ?> .
                    </p>
                    <p>
                        <b>Baca Juga :</b> <a target="_blank" href="https://stesbn.info/" style="color: blue">Biaya
                            Kuliah Kelas Karyawan Perbankan Syariah</a>
                    </p>
                    <p>
                        <b>Baca Juga :</b> <a target="_blank" target="_blank" href="https://umiba.info/" style="color: blue">Biaya Kuliah Kelas Karyawan Manajemen</a>
                    </p>
                    <p>
                        <b>Baca Juga :</b> <a target="_blank" href="https://umiba.info/" style="color: blue">Biaya
                            Kuliah Kelas Karyawan Pasar Minggu</a>
                    </p>
                </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://sties-purwakarta.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 150.000';
    ?>
    <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">
                    <h4><?= !empty($namaKampus) ? htmlspecialchars($namaKampus) : 'Data tidak tersedia' ?> K2</h4>
                    <!-- <p>
              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sit
              amet consectetur dolor
            </p> -->
                </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>