<html lang="en" dir="ltr">
<script src="chrome-extension://nebnhfamliijlghikdgcigoebonmoibm/addToWindow.js"></script>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" href="../assets/img/logo.png" type="image/x-icon">
    <link rel="shortcut icon" href="../assets/img/logo.png" type="image/x-icon">
    <title>Linkar | Admin Panel</title>
    <!-- Google font-->
    <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
    <!-- Font Awesome-->
    <link rel="stylesheet" type="text/css" href="assets/css/fontawesome.css">
    <!-- ico-font-->
    <link rel="stylesheet" type="text/css" href="assets/css/icofont.css">
    <!-- Themify icon-->
    <link rel="stylesheet" type="text/css" href="assets/css/themify.css">
    <!-- Feather icon-->
    <link rel="stylesheet" type="text/css" href="assets/css/feather-icon.css">
    <link rel="stylesheet" type="text/css" href="assets/css/animate.css">
    <!-- Plugins css start-->
    <link rel="stylesheet" type="text/css" href="assets/css/date-picker.css">
    <link rel="stylesheet" type="text/css" href="assets/css/owlcarousel.css">
    <link rel="stylesheet" type="text/css" href="assets/css/prism.css">
    <link rel="stylesheet" type="text/css" href="assets/css/whether-icon.css">
    <link rel="stylesheet" type="text/css" href="assets/css/pe7-icon.css">
    <link rel="stylesheet" type="text/css" href="assets/css/ionic-icon.css">
    <!-- Plugins css Ends-->
    <!-- Bootstrap css-->
    <link rel="stylesheet" type="text/css" href="assets/css/bootstrap.css">
    <!-- App css-->
    <link rel="stylesheet" type="text/css" href="assets/css/style.css">
    <link id="color" rel="stylesheet" href="assets/css/color-5.css" media="screen">
    <!-- Responsive css-->
    <link rel="stylesheet" type="text/css" href="assets/css/responsive.css">
</head>

<body class="light-only" main-theme-layout="box-layout">


    <?php
    // Include file koneksi.php
    include 'koneksi.php';

    // Query untuk menghitung jumlah data pada tabel 'trx'
    $query = "SELECT COUNT(*) as jumlah FROM trx Where statusp = 2";
    $result = $pdo->query($query);
    $row = $result->fetch(PDO::FETCH_ASSOC);

    // Mengambil nilai jumlah data dan mengalikannya dengan 200
    $pendapatan = $row['jumlah'] * 200;



    // Query untuk menghitung jumlah data pada tabel 'trx'
    $query = "SELECT COUNT(*) as jumlah FROM vouchers";
    $result = $pdo->query($query);
    $row = $result->fetch(PDO::FETCH_ASSOC);
    $vouchers = $row['jumlah'];


    $query = "SELECT COUNT(*) as jumlah FROM hargapasca";
    $result = $pdo->query($query);
    $row = $result->fetch(PDO::FETCH_ASSOC);
    $hargapasca = $row['jumlah'];

    $jumlahproducts = $hargapasca +  $vouchers;

    $query = "SELECT COUNT(*) as jumlah FROM users";
    $result = $pdo->query($query);
    $row = $result->fetch(PDO::FETCH_ASSOC);
    $jumlahusers = $row['jumlah'];

    $query = "SELECT COUNT(*) as jumlah FROM trx";
    $result = $pdo->query($query);
    $row = $result->fetch(PDO::FETCH_ASSOC);
    $jumlahtransaksi = $row['jumlah'];




    // Mengambil nilai jumlah data dan mengalikannya dengan 200

    // Menampilkan jumlah data di dalam elemen HTML

    ?>



    <!-- Loader starts-->

    <!-- Loader ends-->
    <!-- page-wrapper Start-->
    <div class="page-wrapper">
        <!-- Page Header Start-->

        <!-- Page Header Ends                              -->
        <!-- Page Body Start-->
        <div class="page-body-wrapper">
            <!-- Page Sidebar Start-->
            <?php
            include "menu.php";
            ?>

























            <!-- BODY START -->

            <div class="page-body" style="margin-top: -10px;">
                <div class="container-fluid" style="margin-top: 50px;">
                    <div class="page-header">
                        <div class="row">
                            <div class="col-lg-6 main-header">
                                <h2>General <span>Admin </span></h2>
                                <h6 class="mb-0">admin panel</h6>
                            </div>

                        </div>
                    </div>
                </div>
                <!-- Container-fluid starts-->
                <div class="container-fluid general-widget">
                    <div class="row">
          
                        <div class="col-xl-6 xl-100 box-col-12">
                            <!-- ini hih isi -->
                        </div>
                    </div>
                </div>
                <!-- Container-fluid Ends-->
            </div>


            <!-- BODY END -->



            <?php
            include "footer.php";
            ?>


</body>

</html>