<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1 class="m-0 text-dark">Home</h1>
                </div><!-- /.col -->
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <a href="?page=home">
                            <li class="breadcrumb-item">Home</li>
                        </a>
                    </ol>
                </div><!-- /.col -->
            </div><!-- /.row -->
            <marquee>
                <p class="text-center" style="font-size: 22px;"><i>Selamat Datang <?= $_SESSION['admin']['admin_nama'] ?></i></p>
            </marquee>
        </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->

    <!-- Main content -->
    <section class="content">
        <div class="container-fluid">
            <!-- Info boxes -->
            <div class="row">
                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box">

                        <span class="info-box-icon bg-info elevation-1">
                            <a href="?page=pages/admin/view">
                                <i class="fa fa-id-badge"></i>
                            </a>
                        </span>

                        <div class="info-box-content">
                            <span class="info-box-text">Admin</span>

                            <?php

                            $ambil = $koneksi->query("SELECT  COUNT(*) FROM tbl_admin");
                            $pecah = $ambil->fetch_assoc();

                            ?>

                            <span class="info-box-number">

                                <?= $pecah['COUNT(*)'] ?>

                            </span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>

                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box">

                        <span class="info-box-icon bg-info elevation-1">
                            <a href="?page=pages/guru/view">
                                <i class="fas fa-user"></i>
                            </a>
                        </span>

                        <div class="info-box-content">
                            <span class="info-box-text">Guru</span>

                            <?php

                            $ambil = $koneksi->query("SELECT  COUNT(*) FROM tbl_guru");
                            $pecah = $ambil->fetch_assoc();

                            ?>

                            <span class="info-box-number">

                                <?= $pecah['COUNT(*)'] ?>

                            </span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>

                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box">
                        <span class="info-box-icon bg-info elevation-1">
                            <a href="?page=pages/jurusan/view">
                                <i class="fa fa-university"></i>
                            </a>
                        </span>

                        <div class="info-box-content">
                            <span class="info-box-text">Jurusan</span>

                            <?php

                            $ambil = $koneksi->query("SELECT  COUNT(*) FROM tbl_jurusan");
                            $pecah = $ambil->fetch_assoc();

                            ?>

                            <span class="info-box-number">

                                <?= $pecah['COUNT(*)'] ?>

                            </span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>

                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box">
                        <span class="info-box-icon bg-info elevation-1">
                            <a href="?page=pages/berita/view">
                                <i class="fa fa-window-maximize"></i>
                            </a>
                        </span>

                        <div class="info-box-content">
                            <span class="info-box-text">Berita</span>

                            <?php

                            $ambil = $koneksi->query("SELECT  COUNT(*) FROM tbl_berita");
                            $pecah = $ambil->fetch_assoc();

                            ?>

                            <span class="info-box-number">

                                <?= $pecah['COUNT(*)'] ?>

                            </span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>

                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box">
                        <span class="info-box-icon bg-info elevation-1">
                            <a href="?page=pages/kategori/view">
                                <i class="fa fa-window-restore"></i>
                            </a>
                        </span>

                        <div class="info-box-content">
                            <span class="info-box-text">Kategori Berita</span>

                            <?php

                            $ambil = $koneksi->query("SELECT  COUNT(*) FROM tbl_kategori");
                            $pecah = $ambil->fetch_assoc();

                            ?>

                            <span class="info-box-number">

                                <?= $pecah['COUNT(*)'] ?>

                            </span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>

                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box">
                        <span class="info-box-icon bg-info elevation-1">
                            <a href="?page=pages/pengumuman/view">
                                <i class="fa fa-bullhorn"></i>
                            </a>
                        </span>

                        <div class="info-box-content">
                            <span class="">Pengumuman</span>

                            <?php

                            $ambil = $koneksi->query("SELECT  COUNT(*) FROM tbl_pengumuman");
                            $pecah = $ambil->fetch_assoc();

                            ?>

                            <span class="info-box-number">

                                <?= $pecah['COUNT(*)'] ?>

                            </span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>

                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box">
                        <span class="info-box-icon bg-info elevation-1">
                            <a href="?page=pages/profil/view">
                                <i class="fa fa-tags"></i>
                            </a>
                        </span>

                        <div class="info-box-content">
                            <span class="info-box-text">Profil</span>

                            <?php

                            $ambil = $koneksi->query("SELECT  COUNT(*) FROM tbl_Profil");
                            $pecah = $ambil->fetch_assoc();

                            ?>

                            <span class="info-box-number">

                                <?= $pecah['COUNT(*)'] ?>

                            </span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>

                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box">
                        <span class="info-box-icon bg-info elevation-1">
                            <a href="?page=pages/kategori_profil/view">
                                <i class="fa fa-tag"></i>
                            </a>
                        </span>

                        <div class="info-box-content">
                            <span class="info-box-text">Kategori Profil</span>

                            <?php

                            $ambil = $koneksi->query("SELECT  COUNT(*) FROM tbl_kdf");
                            $pecah = $ambil->fetch_assoc();

                            ?>

                            <span class="info-box-number">

                                <?= $pecah['COUNT(*)'] ?>

                            </span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>

                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box">
                        <span class="info-box-icon bg-info elevation-1">
                            <a href="?page=pages/galeri/view">
                                <i class="fa fa-file"></i>
                            </a>
                        </span>

                        <div class="info-box-content">
                            <span class="info-box-text">Galeri</span>

                            <?php

                            $ambil = $koneksi->query("SELECT  COUNT(*) FROM tbl_galeri");
                            $pecah = $ambil->fetch_assoc();

                            ?>

                            <span class="info-box-number">

                                <?= $pecah['COUNT(*)'] ?>

                            </span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>

                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box">
                        <span class="info-box-icon bg-info elevation-1"><i class="fa fa-cog"></i></span>
                        <div class="info-box-content">
                            <h3 id="jamDigital"></h3>
                            <span class="info-box-number">
                            </span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>


                <!-- fix for small devices only -->
                <div class="clearfix hidden-md-up"></div>
            </div>

        </div>

    </section>

</div>

<script>
    window.setTimeout("waktu()", 1000);



    function waktu() {
        var waktu = new Date()

        setTimeout("waktu()", 1000)

        var jam = waktu.getHours();
        var menit = waktu.getMinutes();
        var detik = waktu.getSeconds();

        var gabung = "" + jam + " : " + menit + ":" + detik + "";

        console.log(gabung);

        document.getElementById('jamDigital').innerHTML = gabung
    }
</script>