<!DOCTYPE html>
<html lang="en">
<!--begin::Head-->

<head>
    <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/head2.php';?>

    <title>Trang Chủ |
        <?=$lxtdev['ten_web'];?>
    </title>
    <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/nav.php';?>
    <?php
    # dichvumoon.com - fb.com/dichvumoon.MMO
# dichvumoon.com - fb.com/dichvumoon.MMO
 $web = mysqli_fetch_assoc($ketnoi->query("SELECT COUNT(*) FROM `lich_su_tao_web` WHERE `username`='" . $user['username'] . "' ")) ['COUNT(*)']; 
 $code = mysqli_fetch_assoc($ketnoi->query("SELECT COUNT(*) FROM `lich_su_mua_code` WHERE `username`='" . $user['username'] . "' ")) ['COUNT(*)'];
  $logo = mysqli_fetch_assoc($ketnoi->query("SELECT COUNT(*) FROM `ls_logo` WHERE `username`='" . $user['username'] . "' ")) ['COUNT(*)'];
  $domain = mysqli_fetch_assoc($ketnoi->query("SELECT COUNT(*) FROM `history_domain` WHERE `username`='" . $user['username'] . "' ")) ['COUNT(*)'];
  $subdomain = mysqli_fetch_assoc($ketnoi->query("SELECT COUNT(*) FROM `history_domain` WHERE `username`='" . $user['username'] . "' ")) ['COUNT(*)'];
   $cron = mysqli_fetch_assoc($ketnoi->query("SELECT COUNT(*) FROM `list_cron` WHERE `username`='" . $user['username'] . "' ")) ['COUNT(*)'];
  $hosting = mysqli_fetch_assoc($ketnoi->query("SELECT COUNT(*) FROM `lich_su_mua_host` WHERE `username`='" . $user['username'] . "' ")) ['COUNT(*)'];
 $tongdv = $domain + $web + $code + $logo + $subdomain + $cron + $hosting ;
 ?>


</head>


<body id="kt_app_body" data-kt-app-layout="light-sidebar" data-kt-app-header-fixed="true"
    data-kt-app-sidebar-enabled="true" data-kt-app-sidebar-fixed="true" data-kt-app-sidebar-hoverable="true"
    data-kt-app-sidebar-push-header="true" data-kt-app-sidebar-push-toolbar="true"
    data-kt-app-sidebar-push-footer="true" data-kt-app-toolbar-enabled="true" class="app-default">
    <!--begin::Theme mode setup on page load-->
    <script>var defaultThemeMode = "light"; var themeMode; if (document.documentElement) { if (document.documentElement.hasAttribute("data-bs-theme-mode")) { themeMode = document.documentElement.getAttribute("data-bs-theme-mode"); } else { if (localStorage.getItem("data-bs-theme") !== null) { themeMode = localStorage.getItem("data-bs-theme"); } else { themeMode = defaultThemeMode; } } if (themeMode === "system") { themeMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } document.documentElement.setAttribute("data-bs-theme", themeMode); }</script>
    <!--end::Theme mode setup on page load-->
    <!--begin::App-->
    <div class="d-flex flex-column flex-root app-root" id="kt_app_root">
        <!--begin::Page-->
        <div class="app-page flex-column flex-column-fluid" id="kt_app_page">
            <!--begin::Header-->

            <!--end::Header-->
            <!--begin::Wrapper-->
            <div class="app-wrapper flex-column flex-row-fluid" id="kt_app_wrapper">
                <!--begin::Sidebar-->
                <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/sider.php';?>
                <!--end::sidebar menu-->
                <!--begin::Footer-->

                <!--end::Footer-->
            </div>
            <!--end::Sidebar-->
            <!--begin::Main-->
            <div class="app-main flex-column flex-row-fluid" id="kt_app_main">
                <!--begin::Content wrapper-->
                <div class="d-flex flex-column flex-column-fluid">
                    <!--begin::Toolbar-->
                    <div id="kt_app_toolbar" class="app-toolbar py-3 py-lg-6">
                        <!--begin::Toolbar container-->
                        <div id="kt_app_toolbar_container" class="app-container container-fluid d-flex flex-stack">
                            <!--begin::Page title-->
                            <div class="page-title d-flex flex-column justify-content-center flex-wrap me-3">
                                <!--begin::Title-->
                                <h1
                                    class="page-heading d-flex text-dark fw-bold fs-3 flex-column justify-content-center my-0">
                                    Trang Chủ</h1>
                                <!--end::Title-->
                                <!--begin::Breadcrumb-->
                                <ul class="breadcrumb breadcrumb-separatorless fw-semibold fs-7 my-0 pt-1">
                                    <!--begin::Item-->
                                    <li class="breadcrumb-item text-muted">
                                        <a href="/" class="text-muted text-hover-primary">Home</a>
                                    </li>
                                    <!--end::Item-->
                                    <!--begin::Item-->
                                    <li class="breadcrumb-item">
                                        <span class="bullet bg-gray-400 w-5px h-2px"></span>
                                    </li>
                                    <!--end::Item-->
                                    <!--begin::Item-->
                                    <li class="breadcrumb-item text-muted">Bảng Tính</li>
                                    <!--end::Item-->
                                </ul>
                                <!--end::Breadcrumb-->
                            </div>
                            <!--end::Page title-->
                            <!--begin::Actions-->
                            <div class="d-flex align-items-center gap-2 gap-lg-3">
                                <!--begin::Filter menu-->
                                <a href="#" class="btn btn-sm fw-bold btn-primary" data-bs-toggle="modal"
                                    data-bs-target="#kt_modal_create_app">
                                    <?=tien($user['money']);?>đ
                                </a>
                                <!--end::Primary button-->
                            </div>
                            <!--end::Actions-->
                        </div>
                        <!--end::Toolbar container-->
                    </div>
                    <!--end::Toolbar-->
                    <!--begin::Content-->
                    <div id="kt_app_content" class="app-content flex-column-fluid">
                <!--begin::Content container-->
                <div id="kt_app_content_container" class="app-container container-fluid">
                            <!--begin::Row-->

                            
					<?php if(isset($_SESSION['session'])){ ?>
					
					<div class="row gy-5 g-xl-8">
                <div class="modal fade" tabindex="-1" id="kt_modal_stacked_1" style="display: none;" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-header">
                        <h3 class="modal-title">Thông báo</h3>
        
                        <!--begin::Close-->
                        <div class="btn btn-icon btn-sm btn-active-light-primary ms-2" data-bs-dismiss="modal" aria-label="Close">
                            <i class="ki-duotone ki-cross fs-1"><span class="path1"></span><span class="path2"></span></i>
                        </div>
                        <!--end::Close-->
                    </div>
        
                    <div class="modal-body">
                                            </div>
        
                    <div class="modal-footer">
                        <button type="button" class="btn btn-light" data-bs-dismiss="modal">Close</button>
                    </div>
                </div>
            </div>
        </div>
        

        <div class="col-md-3 mb-4">
            <div class="card card-animate">
                <div class="card-body">
                    <div class="d-flex justify-content-between">
                        <div>
                            <p class="fw-medium text-muted mb-0">Tổng Tiền </p>
                            <h2 class="mt-4 ff-secondary fw-semibold"><span class="counter-value"><?=tien($user['money']);?>đ</span></h2>
                            <p class="mb-0 text-muted text-truncate"><span class="badge bg-light text-success mb-0"> Số Dư </span></p>
                        </div>
                        <div>
                            <div class="avatar-sm flex-shrink-0">
                                <span class="avatar-title bg-info-subtle rounded-circle fs-2">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-users text-info">
                                        <path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
                                        <circle cx="9" cy="7" r="4"></circle>
                                        <path d="M23 21v-2a4 4 0 0 0-3-3.87"></path>
                                        <path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
                                    </svg>
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-3 mb-4">
            <div class="card card-animate">
                <div class="card-body">
                    <div class="d-flex justify-content-between">
                        <div>
                            <p class="fw-medium text-muted mb-0">Tổng Nạp</p>
                            <h2 class="mt-4 ff-secondary fw-semibold">
                                <span class="counter-value"><?=tien($user['tong_nap']);?>đ</span>
                            </h2>
                            <p class="mb-0 text-muted text-truncate"><span class="badge bg-light text-danger mb-0">Tổng Nạp</span></p>
                        </div>
                        <div>
                            <div class="avatar-sm flex-shrink-0">
                                <span class="avatar-title bg-info-subtle rounded-circle fs-2">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-activity text-info">
                                        <polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>
                                    </svg>
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-3 mb-4">
            <div class="card card-animate">
                <div class="card-body">
                    <div class="d-flex justify-content-between">
                        <div>
                            <p class="fw-medium text-muted mb-0">Đã Sử Dụng</p>
                            <h2 class="mt-4 ff-secondary fw-semibold">
                                <span class="counter-value" data-target="3"><?=tien($user['tong_nap']-$user['money']);?>đ</span>
                            </h2>
                            <p class="mb-0 text-muted text-truncate"><span class="badge bg-light text-danger mb-0">Đã Sử Dụng</span></p>
                        </div>
                        <div>
                            <div class="avatar-sm flex-shrink-0">
                                <span class="avatar-title bg-info-subtle rounded-circle fs-2">
                                   <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link text-info">
                                        <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
                                        <polyline points="15 3 21 3 21 9"></polyline>
                                        <line x1="10" y1="14" x2="21" y2="3"></line>
                                    </svg> 
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-3 mb-4">
            <div class="card card-animate">
                <div class="card-body">
                    <div class="d-flex justify-content-between">
                        <div>
                            <p class="fw-medium text-muted mb-0">Dịch Vụ Đang Sử Dùng </p>
                            <h2 class="mt-4 ff-secondary fw-semibold"><span class="counter-value"><?=$tongdv;?> Dịch Vụ</span></h2>
                            <p class="mb-0 text-muted text-truncate"><span class="badge bg-light text-success mb-0">Dịch Vụ Đang Dùng</span></p>
                        </div>
                        <div>
                            <div class="avatar-sm flex-shrink-0">
                                <span class="avatar-title bg-info-subtle rounded-circle fs-2">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clock text-info">
                                        <circle cx="12" cy="12" r="10"></circle>
                                        <polyline points="12 6 12 12 16 14"></polyline>
                                    </svg>
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
   </div>
    </br>
    
    
									
                                <?php }?>
                                
                      

    
    <script>
$(document).ready(function() {
    setTimeout(function() {
        $('#thong_bao').modal('show');
    }, 300);
});
</script>

<div class="modal" id="thong_bao" tabindex="-1">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <b> Thông Báo </b>
                	<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    
                </button>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div>
</div>
 <?=$lxtdev['thongbao'];?>
</div>
	</br>			
<div class="text-end mt-4">
    <button class="btn btn-dark" data-bs-dismiss="modal">Đóng 2 giờ </button>
    <button type="button"class="btn btn-primary" data-bs-dismiss="modal">Đóng</button>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
                <!--end::Content wrapper-->
                <!--begin::Footer-->
                </br>
                 </div>
                 <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/foot.php';?>
                <!--end::Footer-->
            </div>
            <!--end:::Main-->
        </div>
        <!--end::Wrapper-->
    </div>
    <!--end::Page-->
    </div>
    <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/thongbao.php';?>

<link rel="stylesheet" href="https://api.cmsnt.co/cdn/3041975/style.css">

<script src="https://api.cmsnt.co/cdn/3041975/script.js" defer></script>

</style>
</div>
</div>
<div class='widget HTML' data-version='2' id='HTML04'>
<div class='widget-content'>
<strong style="color: rgb(221, 0, 221); font-size: 16px; font-family: 'Rowdies';"><br />
&#8194;</strong><span style="color: rgb(218, 0, 0); font-size: 16px; font-family: 'Rowdies';" id="momk"></span>
                <script>
                    function star() {
                        setTimeout(function() {}, 3000);
                    }
 
                    function show_date_time() {
                        window.setTimeout("show_date_time()", 1000);
                        BirthDay = new Date("2024/01/13");
                        today = new Date();
                        timeold = (today.getTime() - BirthDay.getTime());
                        sectimeold = timeold / 1000
                        secondsold = Math.floor(sectimeold);
                        msPerDay = 24 * 60 * 60 * 1000
                        e_daysold = timeold / msPerDay
                        daysold = Math.floor(e_daysold);
                        e_hrsold = (daysold - e_daysold) * -24;
                        hrsold = Math.floor(e_hrsold);
                        e_minsold = (hrsold - e_hrsold) * -60;
                        minsold = Math.floor((hrsold - e_hrsold) * -60);
                        seconds = Math.floor((minsold - e_minsold) * -60);
                        momk.innerHTML = daysold + " ngày " + hrsold + " giờ " + minsold + " phút " + seconds + " giây";
                    }
                    show_date_time();
                </script><br />
               <br />
<div class='widget HTML' data-version='2' id='HTML1'>
<h3 class='title'>