<!DOCTYPE html>
<html lang="en">
<head>
    <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/head2.php';?>
    <?php
    $id_server = antixss($_GET['server']);
    $server = $ketnoi->query("SELECT * FROM `list_server_host` WHERE `id` = '$id_server' AND `status` = 'ON' ")->fetch_array();
    if(empty($server)){
        echo '<script type="text/javascript">setTimeout(function(){ location.href = "/" }, 0);</script>';
    }
    ?>
    <title>Danh Sách Gói Hosting | <?=$lxtdev['ten_web'];?></title>
    <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/nav.php';?>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">

    <style>
        /* Card bảng giá thiết kế cao cấp */
        .premium-pricing-card {
            background: #ffffff !important;
            border: 1px solid rgba(0, 0, 0, 0.06) !important;
            border-radius: 16px !important;
            transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        }
        
        [data-bs-theme="dark"] .premium-pricing-card {
            background: #1e1e2d !important;
            border: 1px solid rgba(255, 255, 255, 0.05) !important;
        }

        .premium-pricing-card:hover {
            transform: translateY(-8px);
            border-color: rgba(48, 133, 214, 0.3) !important;
            box-shadow: 0 15px 35px rgba(48, 133, 214, 0.08) !important;
        }
        
        [data-bs-theme="dark"] .premium-pricing-card:hover {
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
        }

        /* Nút lựa chọn gói dạng Gradient nổi bật */
        .btn-pricing-action {
            background: linear-gradient(135deg, #3085d6, #2575fc) !important;
            color: #ffffff !important;
            border: none !important;
            font-weight: 700 !important;
            border-radius: 10px !important;
            padding: 12px 28px !important;
            width: 100%;
            transition: 0.3s !important;
            box-shadow: 0 4px 15px rgba(48, 133, 214, 0.2) !important;
        }

        .btn-pricing-action:hover {
            box-shadow: 0 6px 20px rgba(48, 133, 214, 0.4) !important;
            transform: translateY(-1px);
            color: #ffffff !important;
        }
    </style>
</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">
    
    <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>
    
    <div class="d-flex flex-column flex-root app-root" id="kt_app_root">
        <div class="app-page flex-column flex-column-fluid" id="kt_app_page">
            
            <div class="app-wrapper flex-column flex-row-fluid" id="kt_app_wrapper">
                <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/sider.php';?>
            </div>
            
            <div class="app-main flex-column flex-row-fluid" id="kt_app_main">
                <div class="d-flex flex-column flex-column-fluid">
                    
                    <div id="kt_app_toolbar" class="app-toolbar py-3 py-lg-6">
                        <div id="kt_app_toolbar_container" class="app-container container-fluid d-flex flex-stack">
                            <div class="page-title d-flex flex-column justify-content-center flex-wrap me-3">
                                <h1 class="page-heading d-flex text-dark fw-bold fs-3 flex-column justify-content-center my-0">
                                    <i class="fa-solid fa-boxes-stacked text-primary fs-4 mb-1"></i> Cấu Hình Gói Hosting
                                </h1>
                                <ul class="breadcrumb breadcrumb-separatorless fw-semibold fs-7 my-0 pt-1">
                                    <li class="breadcrumb-item text-muted"><a href="/" class="text-muted text-hover-primary">Home</a></li>
                                    <li class="breadcrumb-item"><span class="bullet bg-gray-400 w-5px h-2px"></span></li>
                                    <li class="breadcrumb-item text-muted">Bảng Giá</li>
                                </ul>
                            </div>
                            <div class="d-flex align-items-center gap-2 gap-lg-3">
                                <a href="#" class="btn btn-sm fw-bold btn-light-success px-4 py-3" data-bs-toggle="modal" data-bs-target="#kt_modal_create_app">
                                    <i class="fa-solid fa-wallet me-1"></i> <?=tien($user['money']);?>đ
                                </a>
                            </div>
                        </div>
                    </div>

                    <div class="content d-flex flex-column flex-column-fluid" id="kt_content">
                        <div class="container-xxl" id="kt_content_container">
                            
                            <div class="card border-0 shadow-none bg-transparent mb-10">
                                <div class="card-body p-0 text-center">
                                    <h1 class="fs-2hx fw-black text-dark mb-4"><?=$server['name_server'];?></h1>
                                    <div class="text-gray-500 fw-semibold fs-6">
                                        Hệ thống kích hoạt hoàn toàn tự động ngay sau khi thanh toán thành công. <br>
                                        Nếu có yêu cầu tùy biến cấu hình riêng biệt, vui lòng kết nối trực tiếp với 
                                        <a href="<?=$lxtdev['telegram_admin'];?>" target="_blank" class="link-primary fw-bold text-decoration-underline">Admin Hệ Thống</a>.
                                    </div>
                                </div>
                            </div>

                            <div class="row row-cols-1 row-cols-md-2 row-cols-xl-3 g-6 g-xl-9">
                                <?php
                                $result = mysqli_query($ketnoi,"SELECT * FROM `list_host` WHERE `server_host`='$id_server' ");
                                while($row = mysqli_fetch_assoc($result)) { ?>
                                
                                <div class="col">
                                    <div class="card premium-pricing-card h-100 p-6 p-lg-8 d-flex flex-column justify-content-between">
                                        <div>
                                            <div class="text-center mb-7 pb-6 border-bottom border-gray-200 border-opacity-50">
                                                <span class="badge badge-light-primary fw-bold px-3 py-1.5 mb-3 fs-8 text-uppercase">Shared Hosting</span>
                                                <h3 class="text-dark fw-black fs-3 mb-3"><?=$row['name_host'];?></h3>
                                                <p class="text-muted fs-7 fw-semibold px-4 mb-5" style="min-height: 38px;"><?=$row['title_host'];?></p>
                                                
                                                <div class="d-flex justify-content-center align-items-end">
                                                    <span class="fs-1 fw-black text-primary line-height-1">
                                                        <?=tien($row['gia_host']);?>
                                                    </span>
                                                    <span class="fs-4 fw-bold text-primary ms-1">đ</span>
                                                    <span class="text-muted fs-7 fw-semibold ms-2 opacity-70">/ Tháng</span>
                                                </div>
                                            </div>

                                            <div class="mb-8">
                                                <div class="d-flex align-items-center mb-4">
                                                    <i class="fa-solid fa-circle-check text-success fs-5 me-3"></i>
                                                    <span class="fw-semibold fs-6 text-gray-700">Dung lượng ổ đĩa: <strong><?=$row['dung_luong'];?></strong></span>
                                                </div>
                                                <div class="d-flex align-items-center mb-4">
                                                    <i class="fa-solid fa-circle-check text-success fs-5 me-3"></i>
                                                    <span class="fw-semibold fs-6 text-gray-700">Băng thông: <strong>Không giới hạn</strong></span>
                                                </div>
                                                <div class="d-flex align-items-center mb-4">
                                                    <i class="fa-solid fa-circle-check text-success fs-5 me-3"></i>
                                                    <span class="fw-semibold fs-6 text-gray-700">Addon Domain: <strong><?=$row['mien_khac'];?> tên miền</strong></span>
                                                </div>
                                                <div class="d-flex align-items-center mb-4">
                                                    <i class="fa-solid fa-circle-check text-success fs-5 me-3"></i>
                                                    <span class="fw-semibold fs-6 text-gray-700">Parked Domain: <strong><?=$row['bi_danh'];?></strong></span>
                                                </div>
                                                <div class="d-flex align-items-center mb-4">
                                                    <i class="fa-solid fa-circle-check text-success fs-5 me-3"></i>
                                                    <span class="fw-semibold fs-6 text-gray-700">Database & Email: <strong>Unlimited</strong></span>
                                                </div>
                                                <div class="d-flex align-items-center mb-4">
                                                    <i class="fa-solid fa-circle-check text-success fs-5 me-3"></i>
                                                    <span class="fw-semibold fs-6 text-gray-700">Bảng điều khiển: <strong>cPanel Control</strong></span>
                                                </div>
                                                <div class="d-flex align-items-center mb-2">
                                                    <i class="fa-solid fa-server text-muted fs-5 me-3"></i>
                                                    <span class="fw-semibold fs-6 text-muted">Hạ tầng: <?=$server['name_server'];?></span>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="pt-2">
                                            <a href="/thanh-toan-host/<?=$row['id'];?>" class="btn btn-sm btn-pricing-action text-center">
                                                <i class="fa-solid fa-cart-plus me-1"></i> Đăng Ký Ngay
                                            </a>
                                        </div>
                                    </div>
                                </div>
                                
                                <?php } ?>
                            </div>

                        </div>
                    </div>

                </div>
                
                <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/foot.php';?>
            </div>
        </div>
    </div>
</body>
</html>
