2024/11/16 18:57:23 [error] 73370#73370: *21541 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Unsupported operand types: string / float in /var/www/fastuser/data/www/rapidreset.cfd/123/plans.php:92
Stack trace:
#0 /var/www/fastuser/data/www/rapidreset.cfd/123/plans.php(272): renderPlanCard()
#1 {main}
  thrown in /var/www/fastuser/data/www/rapidreset.cfd/123/plans.php on line 92" while reading upstream, client: 176.126.113.161, server: rapidreset.cfd, request: "GET /123/plans.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/rapidreset.cfd.sock:", host: "rapidreset.cfd", referrer: "https://rapidreset.cfd/123/"

```
<?php
session_start();
function getUsdRate() {
    $url = 'https://www.cbr.ru/scripts/XML_daily.asp?date_req=' . date('d/m/Y');
    $xml = simplexml_load_file($url);
    foreach ($xml->Valute as $valute) {
        if ($valute->CharCode == 'USD') {
            return (float)str_replace(',', '.', $valute->Value);
        }
    }
    return null;
}
$usdRate = getUsdRate();
// 'paymentOptions' => ['1 месяц' => '90', '2 месяца' => '180', '3 месяца' => '270']
$vps_plans = [
    'Promo | Пермь' => [
        ['title' => 'PROMO 1', 'price' => '1300', 'price_in' => 'month', 'features' => ['32 x Ryzen™ 9 9950X', '8GB DDR5 5600 МГц', '100GB NVMe', 'Unlimited Bandwidth', '100 Mbp/s', 'Full Root access', 'L4 DDoS Guard'], 'isPopular' => true],
        ['title' => 'PROMO 2', 'price' => '2400', 'price_in' => 'month', 'features' => ['32 x Ryzen™ 9 9950X', '16GB DDR5 5600 МГц', '200GB NVMe', 'Unlimited Bandwidth', '100 Mbp/s', 'Full Root access', 'L4 DDoS Guard'], 'isPopular' => true],
        ['title' => 'PROMO 3', 'price' => '4500', 'price_in' => 'month', 'features' => ['32 x Ryzen™ 9 9950X', '32GB DDR5 5600 МГц', '400GB NVMe', 'Unlimited Bandwidth', '100 Mbp/s', 'Full Root access', 'L4 DDoS Guard'], 'isPopular' => true],
    ],
    'Кемерово' => [
        ['title' => 'VPS 1', 'price' => '750', 'price_in' => 'month', 'features' => ['4 x Ryzen™ 9 7950X', '2GB DDR5 5600 МГц', '25GB NVMe', 'Unlimited Bandwidth', '100 Mbp/s', 'L4 DDoS Protection', 'Full Root access'], 'disadvantages' => ['DDoS not allowed']],
        ['title' => 'VPS 2', 'price' => '1000', 'price_in' => 'month', 'features' => ['4 x Ryzen™ 9 7950X', '4GB DDR5 5600 МГц', '50GB NVMe', 'Unlimited Bandwidth', '100 Mbp/s', 'L4 DDoS Protection', 'Full Root access'], 'disadvantages' => ['DDoS not allowed']],
        ['title' => 'VPS 3', 'price' => '1300', 'price_in' => 'month', 'features' => ['16 x Ryzen™ 9 7950X', '8GB DDR5 5600 МГц', '100GB NVMe', 'Unlimited Bandwidth', '100 Mbp/s', 'L4 DDoS Protection', 'Full Root access'], 'disadvantages' => ['DDoS not allowed'], 'isPopular' => true],
        ['title' => 'VPS 4', 'price' => '2400', 'price_in' => 'month', 'features' => ['16 x Ryzen™ 9 7950X', '16GB DDR5 5600 МГц', '200GB NVMe', 'Unlimited Bandwidth', '100 Mbp/s', 'L4 DDoS Protection', 'Full Root access'], 'disadvantages' => ['DDoS not allowed']],
        ['title' => 'VPS 5', 'price' => '4550', 'price_in' => 'month', 'features' => ['16 x Ryzen™ 9 7950X', '32GB DDR5 5600 МГц', '400GB NVMe', 'Unlimited Bandwidth', '100 Mbp/s', 'L4 DDoS Protection', 'Full Root access'], 'disadvantages' => ['DDoS not allowed']],
    ],
    'Нидерланды' => [
        ['title' => 'VPS 6', 'price' => '1500', 'price_in' => 'month', 'features' => ['4 x Xeon-E5v4', '8GB DDR4 3600 МГц', '500GB HDD', 'Unlimited Bandwidth', '100 Mbp/s', 'L4 DDoS Protection', 'Full Root access'], 'disadvantages' => ['DDoS not allowed']],
        ['title' => 'VPS 7 [forever]', 'price' => '23000', 'price_in' => 'forever', 'features' => ['16 x Ryzen™ 9 7950X', '2GB DDR5 5600 МГц', '25GB NVME', 'Unlimited Bandwidth', '100 Mbp/s', 'L4 DDoS Protection', 'Full Root access'], 'disadvantages' => ['DDoS not allowed']],
        ['title' => 'VPS 8 [forever]', 'price' => '33000', 'price_in' => 'forever', 'features' => ['16 x Ryzen™ 9 7950X', '8GB DDR5 5600 МГц', '100GB NVME', 'Unlimited Bandwidth', '100 Mbp/s', 'L4 DDoS Protection', 'Full Root access'], 'disadvantages' => ['DDoS not allowed']],
        ['title' => 'VPS 9 [forever]', 'price' => '65000', 'price_in' => 'forever', 'features' => ['16 x Ryzen™ 9 7950X', '16GB DDR5 5600 МГц', '200GB NVME', 'Unlimited Bandwidth', '100 Mbp/s', 'L4 DDoS Protection', 'Full Root access'], 'disadvantages' => ['DDoS not allowed']],
    ],
    'USA – Spokane, WA' => [
        ['title' => 'VPS 10', 'price' => '700', 'price_in' => 'month', 'features' => ['2 x Xeon® E5-2680v4', '2GB RAM', '20GB NVMe', '20TB Bandwidth', '1 Gbp/s', 'L4 DDoS Protection', 'Full Root access']],
        ['title' => 'VPS 11', 'price' => '1000', 'price_in' => 'month', 'features' => ['4 x Xeon® E5-2680v4', '4GB RAM', '40GB NVMe', '20TB Bandwidth', '1 Gbp/s', 'L4 DDoS Protection', 'Full Root access']],
        ['title' => 'VPS 12', 'price' => '2050', 'price_in' => 'month', 'features' => ['6 x Xeon® E5-2680v4', '8GB RAM', '160GB NVMe', '20TB Bandwidth', '1 Gbp/s', 'L4 DDoS Protection', 'Full Root access']],
        ['title' => 'VPS 13', 'price' => '3250', 'price_in' => 'month', 'features' => ['8 x Xeon® E5-2680v4', '16GB RAM', '240GB NVMe', '20TB Bandwidth', '1 Gbp/s', 'L4 DDoS Protection', 'Full Root access']],
        ['title' => 'VPS 14', 'price' => '5550', 'price_in' => 'month', 'features' => ['16 x Xeon® E5-2698v3', '32GB RAM', '320GB NVMe', '5TB Bandwidth', '10 Gbp/s', 'L4 DDoS Protection', 'Full Root access'], 'isPopular' => true],
    ],
];

$mc_plans = [
    'For Bungee' => [
        ['title' => 'Proxy 1', 'price' => '150', 'price_in' => 'month', 'features' => ['100% x Ryzen™ 9 7950X', '2.5GB RAM', '5GB NVMe', '1 порт', '1 бекап', '1 база данных', 'Неограниченные слоты', 'DDoS защита']],
        ['title' => 'Proxy 2', 'price' => '250', 'price_in' => 'month', 'features' => ['150% x Ryzen™ 9 7950X', '3GB RAM', '10GB NVMe', '1 порт', '1 бекап', '1 база данных', 'Неограниченные слоты', 'DDoS защита'], 'isPopular' => true],
        ['title' => 'Proxy 3', 'price' => '300', 'price_in' => 'month', 'features' => ['200% x Ryzen™ 9 7950X', '4GB RAM', '10GB NVMe', '1 порт', '2 бекап', '1 база данных', 'Неограниченные слоты', 'DDoS защита']],
    ],
    'For Game' => [
        ['title' => 'Game 1', 'price' => '399', 'price_in' => 'month', 'features' => ['300% x Ryzen™ 9 7950X', '6GB RAM', '15GB NVMe', '2 порт', '5 бекап', '3 база данных', 'Неограниченные слоты', 'DDoS защита']],
        ['title' => 'Game 2', 'price' => '550', 'price_in' => 'month', 'features' => ['450% x Ryzen™ 9 7950X', '8GB RAM', '20GB NVMe', '2 порт', '5 бекап', '3 база данных', 'Неограниченные слоты', 'DDoS защита']],
        ['title' => 'Game 3', 'price' => '650', 'price_in' => 'month', 'features' => ['550% x Ryzen™ 9 7950X', '12GB RAM', '30GB NVMe', '3 порт', '5 бекап', '5 база данных', 'Неограниченные слоты', 'DDoS защита'], 'isPopular' => true],
    ],
];

$dedicated_plans = [
    'Москва' => [
        ['title' => 'Dedicated 1', 'price' => '5500', 'price_in' => 'month', 'features' => ['Ryzen 7 4750[16c/32t]', '64GB DDR4 3600 МГц', '1 ТБ NVME', 'L4 protect', 'Full Root access', '5TB Bandwidth'], 'isPopular' => true],
        ['title' => 'Dedicated 2', 'price' => '5000', 'price_in' => 'month', 'features' => ['Core i7-7700K[4c/8t]', '16GB DDR4', '240GB SSD', '1 Gbp/s', 'L4 RS Media', 'Full Root access']],
        ['title' => 'Dedicated 3', 'price' => '5600', 'price_in' => 'month', 'features' => ['Core i7-8700K[6c/12t]', '32GB DDR4', '500GB SSD', '1 Gbp/s', 'L4 RS Media', 'Full Root access']],
    ],
];

$coding_plans = [
    ['title' => 'Coding 1', 'price' => '90', 'price_in' => 'month', 'features' => ['75% x Ryzen™ 9 7950X', '300MB RAM', '5GB NVMe', '2 портов', '1 бекапов', '3 баз данных']],
    ['title' => 'Coding 2', 'price' => '170', 'price_in' => 'month', 'features' => ['125% x Ryzen™ 9 7950X', '500MB RAM', '10GB NVMe', '2 портов', '3 бекапов', '5 баз данных']],
    ['title' => 'Coding 3', 'price' => '250', 'price_in' => 'month', 'features' => ['175% x Ryzen™ 9 7950X', '1GB RAM', '10GB NVMe', '3 портов', '5 бекапов', '5 баз данных'], 'isPopular' => true],
];

$webhosting_plans = [
    'Moscow' => [
        ['title' => 'WebHosting 1', 'price' => '200', 'paymentOptions' => ['1 month' => '200', '2 months' => '380', '3 months' => '540', '6 months' => '960', '1 year' => '1800'], 'price_in' => 'month', 'features' => ['5GB NVMe', '1 site', 'Panel: FastPanel', '5 Gbp/s (shared)', '10 databases', '5 FTP Accounts', '1 SFTP Account', 'Unlimited mail-domains'], 'disadvantages' => ['SSH']],
        ['title' => 'WebHosting 2', 'price' => '350', 'paymentOptions' => ['1 month' => '350', '2 months' => '665', '3 months' => '945', '6 months' => '1680', '1 year' => '3150'], 'price_in' => 'month', 'features' => ['10GB NVMe', '3 sites', 'Panel: FastPanel', '5 Gbp/s (shared)', '30 databases', '10 FTP Accounts', '5 SFTP Accounts', 'Unlimited mail-domains'], 'disadvantages' => ['SSH']],
        ['title' => 'WebHosting 3', 'price' => '700', 'paymentOptions' => ['1 month' => '700', '2 months' => '1330', '3 months' => '1890', '6 months' => '3360', '1 year' => '6300'], 'price_in' => 'month', 'features' => ['100GB NVMe', '100 sites', 'Panel: FastPanel', '5 Gbp/s (shared)', 'Unlimited databases', 'Unlimited FTP Accounts', 'Unlimited SFTP Accounts', 'Unlimited mail-domains', 'SSH'], 'isPopular' => true],
    ],
];

$antiddos_plans = [
    'CloudFlare' => [
        ['title' => 'Minecraft protection #1', 'price' => '500', 'paymentOptions' => ['1 month' => '500', '1 year' => '5000'], 'price_in' => 'month', 'features' => ['CloudFlare Proxy', 'Port: 25565', '1 Gbp/s (dedicated)']],
        ['title' => 'SSH protection #2', 'price' => '100', 'paymentOptions' => ['1 month' => '100', '1 year' => '900'], 'price_in' => 'month', 'features' => ['CloudFlare Proxy', 'Port: 22', '1 Gbp/s (dedicated)']],
        ['title' => 'RDP protection #3', 'price' => '600', 'paymentOptions' => ['1 month' => '600', '1 year' => '6000'], 'price_in' => 'month', 'features' => ['CloudFlare Proxy', 'Port: 3389', '1 Gbp/s (dedicated)']],
        ['title' => 'Pro Plan', 'price' => '500', 'paymentOptions' => ['1 month' => '500', '1 year' => '5000'], 'price_in' => 'month', 'features' => ['Pro Plan for your domain']],
        ['title' => 'Business Plan', 'price' => '800', 'paymentOptions' => ['1 month' => '800', '1 year' => '8000'], 'price_in' => 'month', 'features' => ['Business Plan for your domain']],
    ],
    'Other' => [
        ['title' => 'GRE Tunnel #1', 'price' => 'Out of stock', 'paymentOptions' => ['1 month' => '700', '1 year' => '7000'], 'price_in' => 'month', 'features' => ['CloudFlare Proxy', 'Port: 25565', '1 Mbp/s (dedicated)']],
    ],
];

function renderPlanCard($plan, $usdRate) {
    $priceInUsd = $usdRate ? round($plan['price'] / $usdRate, 2) : null;
    $popularClass = isset($plan['isPopular']) && $plan['isPopular'] ? 'border-4 border-blue-500 relative popular-plan' : '';
    $planId = uniqid();
    
    echo "<div x-data=\"{ 
        selectedPrice: '{$plan['price']}',
        selectedPeriod: '{$plan['price_in']}',
        selectedPeriodText: '{$plan['price_in']}',
        usdRate: $usdRate,
        updatePricing(price, period, periodText) {
            this.selectedPrice = price;
            this.selectedPeriod = period;
            this.selectedPeriodText = periodText;
        },
        get priceInUsd() {
            return this.usdRate ? (this.selectedPrice / this.usdRate).toFixed(2) : null;
        }
    }\" class='bg-gray-800 rounded-xl shadow-lg overflow-hidden transition-all duration-300 hover:shadow-2xl hover:-translate-y-1 transform $popularClass'>";
    
    if (isset($plan['isPopular']) && $plan['isPopular']) {
        echo "<div class='absolute top-0 right-0 bg-blue-500 text-white text-xs px-2 py-1 rounded-bl-lg'>Популярный</div>"; 
    }
    
    echo "<div class='p-6'>";
    echo "<h3 class='text-2xl font-bold mb-2 text-blue-400'>{$plan['title']}</h3>";
    echo "<div class='flex items-baseline mb-4'>";
    echo "<span class='text-4xl font-extrabold text-blue-500' x-text='selectedPrice'></span>";
    echo "<span class='text-xl font-medium text-gray-400 ml-1' x-text=\"'₽/' + selectedPeriodText\"></span>";
    
    if (isset($plan['paymentOptions'])) {
        echo "<div x-data='{ open: false }' class='relative inline-block text-left ml-4'>";
        echo "<div>";
        echo "<button @click='open = !open' :class=\"{'rotate-180 transition-transform': open}\" class='flex items-center text-gray-400 hover:text-blue-500 focus:outline-none arrow-button'>";
        echo "<svg class='w-6 h-6' fill='none' stroke='currentColor' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'></path></svg>";
        echo "</button>";
        echo "</div>";
        echo "<div x-show='open' @click.away='open = false' class='absolute right-0 z-10 mt-2 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5' role='menu' aria-orientation='vertical' aria-labelledby='menu-button' tabindex='-1'>";
        echo "<div class='py-1' role='none'>";
        foreach ($plan['paymentOptions'] as $period => $price) {
            $periodKey = strtolower(explode(' ', $period)[1]);
            echo "<button @click=\"updatePricing('$price', '$periodKey', '$period'); open = false\" class='block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100' role='menuitem'>{$period}: {$price} ₽</button>";
        }
        echo "</div></div>";
        echo "</div>";
    }
    
    echo "</div>";
    
    echo "<p class='text-gray-500 mb-6' x-show='priceInUsd'>≈ <span x-text='priceInUsd'></span>$/<span x-text='selectedPeriodText'></span></p>";
    
    echo "<ul class='space-y-3 mb-6'>";
    foreach ($plan['features'] as $feature) {
        echo "<li class='flex items-center text-gray-400'><svg class='w-5 h-5 mr-2 text-green-500' fill='none' stroke='currentColor' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 13l4 4L19 7'></path></svg>{$feature}</li>";
    }
    if (!empty($plan['disadvantages'])) {
        foreach ($plan['disadvantages'] as $disadvantage) {
            echo "<li class='flex items-center text-gray-400'><svg class='w-5 h-5 mr-2 text-red-500' fill='none' stroke='currentColor' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 18L18 6M6 6l12 12'></path></svg>{$disadvantage}</li>";
        }
    }
    echo "</ul>";
    echo "<a href='https://t.me/dana56_callbot' class='block w-full bg-blue-600 text-white text-center py-3 rounded-lg font-semibold hover:bg-blue-700 transition duration-300'>Выбрать план</a>";
    echo "</div>";
    echo "</div>";
}
?>
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CoGrid >> Тарифы</title>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="css/bew.css">
    <script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
    <script type="text/javascript">
        function googleTranslateElementInit() {
            new google.translate.TranslateElement({
                pageLanguage: 'ru',
                autoDisplay: false
            }, 'google_translate_element');
        }
    </script>
    <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</head>
<body class="bg-gradient-to-br from-gray-900 to-gray-800 text-gray-100 min-h-screen overflow-x-hidden" x-data="{ activeCategory: 'vps', activeSubcategory: null }">
    <div id="stars"></div>
    <div id="stars2"></div>
    <div id="stars3"></div>

    <header class="bg-gradient-to-r from-blue-900 to-purple-900 text-white py-6 px-4 fixed top-0 left-0 right-0 z-50 transition-all duration-300 ease-in-out" id="header">
        <nav class="container mx-auto flex justify-between items-center">
            <a href="/" class="text-2xl font-bold hover:text-blue-300 transition-colors duration-300">CoGrid</a>
            <ul class="flex space-x-6">
                <li><a href="index.php#services" class="hover:text-blue-300 transition-colors duration-300">Услуги</a></li>
                <li><a href="index.php#faq" class="hover:text-blue-300 transition-colors duration-300">FAQ</a></li>
                <li><a href="plans" class="hover:text-blue-300 transition-colors duration-300">Тарифы</a></li>
            </ul>
        </nav>
    </header>

    <main class="container mx-auto px-4 py-24">
        <section  class="hero container mx-auto px-4 py-20 text-center">
            <h1 class="text-5xl font-bold mb-6 animate-text-gradient bg-gradient-to-r from-teal-500 via-purple-500 to-orange-500 bg-clip-text text-transparent">Самые лучшие тарифы для вашего проекта</h1>
            <p class="text-2xl mb-8 text-blue-300 animate-pulse">Инновационные решения для вашего цифрового успеха</p>
        </section>
        
        <div class="flex justify-center mb-12 animate-fadeIn animation-delay-500 space-x-4">
            <button @click="activeCategory = 'vps'" :class="{ 'bg-blue-600 text-white': activeCategory === 'vps', 'bg-gray-700 text-blue-300': activeCategory !== 'vps' }" class="px-6 py-3 rounded-full transform hover:scale-105 transition duration-300 shadow-lg hover:shadow-xl focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50">VPS</button>
            <button @click="activeCategory = 'dedicated'" :class="{ 'bg-blue-600 text-white': activeCategory === 'dedicated', 'bg-gray-700 text-blue-300': activeCategory !== 'dedicated' }" class="px-6 py-3 rounded-full transform hover:scale-105 transition duration-300 shadow-lg hover:shadow-xl focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50">Dedicated</button>
            <button @click="activeCategory = 'webhosting'" :class="{ 'bg-blue-600 text-white': activeCategory === 'webhosting', 'bg-gray-700 text-blue-300': activeCategory !== 'webhosting' }" class="px-6 py-3 rounded-full transform hover:scale-105 transition duration-300 shadow-lg hover:shadow-xl focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50">WebHosting</button>
            <button @click="activeCategory = 'minecraft'" :class="{ 'bg-blue-600 text-white': activeCategory === 'minecraft', 'bg-gray-700 text-blue-300': activeCategory !== 'minecraft' }" class="px-6 py-3 rounded-full transform hover:scale-105 transition duration-300 shadow-lg hover:shadow-xl focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50">Minecraft</button>
            <button @click="activeCategory = 'coding'" :class="{ 'bg-blue-600 text-white': activeCategory === 'coding', 'bg-gray-700 text-blue-300': activeCategory !== 'coding' }" class="px-6 py-3 rounded-full transform hover:scale-105 transition duration-300 shadow-lg hover:shadow-xl focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50">Coding</button>
            <button @click="activeCategory = 'antiddos'" :class="{ 'bg-blue-600 text-white': activeCategory === 'antiddos', 'bg-gray-700 text-blue-300': activeCategory !== 'antiddos' }" class="px-6 py-3 rounded-full transform hover:scale-105 transition duration-300 shadow-lg hover:shadow-xl focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50">Anti-DDoS</button>
        </div>

        <div class="bg-gray-900 rounded-xl p-6 shadow-lg">
            <div x-show="activeCategory === 'vps'" class="animate-fadeIn">
                <?php foreach ($vps_plans as $location => $plans): ?>
                    <div class="mb-8">
                        <button @click="activeSubcategory = activeSubcategory === '<?php echo $location; ?>' ? null : '<?php echo $location; ?>'" class="w-full flex justify-between items-center bg-gray-800 text-blue-300 p-4 rounded-lg mb-4">
                            <span><?php echo $location; ?></span>
                            <svg :class="{ 'transform rotate-180': activeSubcategory === '<?php echo $location; ?>' }" class="w-5 h-5 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
                        </button>
                        <div x-show="activeSubcategory === '<?php echo $location; ?>'" x-transition:enter="transition ease-out duration-300" x-transition:enter-start="opacity-0 transform scale-95" x-transition:enter-end="opacity-100 transform scale-100" x-transition:leave="transition ease-in duration-200" x-transition:leave-start="opacity-100 transform scale-100" x-transition:leave-end="opacity-0 transform scale-95" class="grid gap-8 md:grid-cols-2 lg:grid-cols-3">
                            <?php foreach ($plans as $plan) renderPlanCard($plan, $usdRate); ?>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>

            <div x-show="activeCategory === 'minecraft'" class="animate-fadeIn">
                <?php foreach ($mc_plans as $location => $plans): ?>
                    <div class="mb-8">
                        <button @click="activeSubcategory = activeSubcategory === '<?php echo $location; ?>' ? null : '<?php echo $location; ?>'" class="w-full flex justify-between items-center bg-gray-800 text-blue-300 p-4 rounded-lg mb-4">
                            <span><?php echo $location; ?></span>
                            <svg :class="{ 'transform rotate-180': activeSubcategory === '<?php echo $location; ?>' }" class="w-5 h-5 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
                        </button>
                        <div x-show="activeSubcategory === '<?php echo $location; ?>'" x-transition:enter="transition ease-out duration-300" x-transition:enter-start="opacity-0 transform scale-95" x-transition:enter-end="opacity-100 transform scale-100" x-transition:leave="transition ease-in duration-200" x-transition:leave-start="opacity-100 transform scale-100" x-transition:leave-end="opacity-0 transform scale-95" class="grid gap-8 md:grid-cols-2 lg:grid-cols-3">
                            <?php foreach ($plans as $plan) renderPlanCard($plan, $usdRate); ?>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>

            <div x-show="activeCategory === 'dedicated'" class="animate-fadeIn">
                <?php foreach ($dedicated_plans as $location => $plans): ?>
                    <div class="mb-8">
                        <button @click="activeSubcategory = activeSubcategory === '<?php echo $location; ?>' ? null : '<?php echo $location; ?>'" class="w-full flex justify-between items-center bg-gray-800 text-blue-300 p-4 rounded-lg mb-4">
                            <span><?php echo $location; ?></span>
                            <svg :class="{ 'transform rotate-180': activeSubcategory === '<?php echo $location; ?>' }" class="w-5 h-5 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
                        </button>
                        <div x-show="activeSubcategory === '<?php echo $location; ?>'" x-transition:enter="transition ease-out duration-300" x-transition:enter-start="opacity-0 transform scale-95" x-transition:enter-end="opacity-100 transform scale-100" x-transition:leave="transition ease-in duration-200" x-transition:leave-start="opacity-100 transform scale-100" x-transition:leave-end="opacity-0 transform scale-95" class="grid gap-8 md:grid-cols-2 lg:grid-cols-3">
                            <?php foreach ($plans as $plan) renderPlanCard($plan, $usdRate); ?>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>

            <div x-show="activeCategory === 'webhosting'" class="animate-fadeIn">
                <?php foreach ($webhosting_plans as $location => $plans): ?>
                    <div class="mb-8">
                        <button @click="activeSubcategory = activeSubcategory === '<?php echo $location; ?>' ? null : '<?php echo $location; ?>'" class="w-full flex justify-between items-center bg-gray-800 text-blue-300 p-4 rounded-lg mb-4">
                            <span><?php echo $location; ?></span>
                            <svg :class="{ 'transform rotate-180': activeSubcategory === '<?php echo $location; ?>' }" class="w-5 h-5 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
                        </button>
                        <div x-show="activeSubcategory === '<?php echo $location; ?>'" x-transition:enter="transition ease-out duration-300" x-transition:enter-start="opacity-0 transform scale-95" x-transition:enter-end="opacity-100 transform scale-100" x-transition:leave="transition ease-in duration-200" x-transition:leave-start="opacity-100 transform scale-100" x-transition:leave-end="opacity-0 transform scale-95" class="grid gap-8 md:grid-cols-2 lg:grid-cols-3">
                            <?php foreach ($plans as $plan) renderPlanCard($plan, $usdRate); ?>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>

            <div x-show="activeCategory === 'antiddos'" class="animate-fadeIn">
                <?php foreach ($antiddos_plans as $location => $plans): ?>
                    <div class="mb-8">
                        <button @click="activeSubcategory = activeSubcategory === '<?php echo $location; ?>' ? null : '<?php echo $location; ?>'" class="w-full flex justify-between items-center bg-gray-800 text-blue-300 p-4 rounded-lg mb-4">
                            <span><?php echo $location; ?></span>
                            <svg :class="{ 'transform rotate-180': activeSubcategory === '<?php echo $location; ?>' }" class="w-5 h-5 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
                        </button>
                        <div x-show="activeSubcategory === '<?php echo $location; ?>'" x-transition:enter="transition ease-out duration-300" x-transition:enter-start="opacity-0 transform scale-95" x-transition:enter-end="opacity-100 transform scale-100" x-transition:leave="transition ease-in duration-200" x-transition:leave-start="opacity-100 transform scale-100" x-transition:leave-end="opacity-0 transform scale-95" class="grid gap-8 md:grid-cols-2 lg:grid-cols-3">
                            <?php foreach ($plans as $plan) renderPlanCard($plan, $usdRate); ?>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>

            <div x-show="activeCategory === 'coding'" class="animate-fadeIn">
                <div class="grid gap-8 md:grid-cols-2 lg:grid-cols-3">
                    <?php foreach ($coding_plans as $plan) renderPlanCard($plan, $usdRate); ?>
                </div>
            </div>
        </div>
    </main>

    <footer class="bg-gradient-to-r from-gray-900 to-blue-900 text-white py-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
                <div class="group">
                    <h3 class="text-2xl font-bold mb-4 group-hover:text-blue-400 transition-colors duration-300">Навигация</h3>
                    <a href="https://cogrid.cloud/" rel="noopener noreferrer" class="text-gray-400 hover:text-white transition-colors duration-300 flex items-center">
                        Главная
                    </a>
                    <a href="https://cogrid.cloud/plans" rel="noopener noreferrer" class="text-gray-400 hover:text-white transition-colors duration-300 flex items-center">
                        Тарифы
                    </a>
                    <a href="https://cogrid.cloud/terms" rel="noopener noreferrer" class="text-gray-400 hover:text-white transition-colors duration-300 flex items-center">
                        Пользовательское соглашение
                    </a>
                    <a href="https://cogrid.cloud/privacy" rel="noopener noreferrer" class="text-gray-400 hover:text-white transition-colors duration-300 flex items-center">
                        Политика конфиденциальности
                    </a>
                </div>
                <div class="group">
                    <h3 class="text-2xl font-bold mb-4 group-hover:text-blue-400 transition-colors duration-300">Контакты</h3>
                    <p class="text-gray-400 group-hover:text-gray-300 transition-colors duration-300">Email: <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS></p>
                    <p class="text-gray-400 group-hover:text-gray-300 transition-colors duration-300">Телефон: +7 (999) 123-45-67</p>
                </div>
                <div class="group">
                    <h3 class="text-2xl font-bold mb-4 group-hover:text-blue-400 transition-colors duration-300">Следите за нами</h3>
                    <a href="https://t.me/cogrid" target="_blank" rel="noopener noreferrer" class="text-gray-400 hover:text-white transition-colors duration-300 flex items-center">
                        <svg class="w-6 h-6 mr-2" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                            <path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm5.894 8.221l-1.97 9.28c-.145.658-.537.818-1.084.508l-3-2.21-1.446 1.394c-.14.18-.357.295-.6.295-.002 0-.003 0-.005 0l.213-3.054 5.56-5.022c.24-.213-.054-.334-.373-.121l-6.869 4.326-2.96-.924c-.64-.203-.654-.64.135-.954l11.566-4.458c.538-.196 1.006.128.832.941z"/>
                        </svg>
                        Telegram канал
                    </a>
                </div>
                <div class="group">
                    <div id="google_translate_element" class="mr-6"></div>
                </div>
            </div>
            <div class="mt-8 pt-8 border-t border-gray-800 text-center">
                <p class="text-gray-400">&copy; 2024 CoGrid Hosting Services. Все права защищены.</p>
            </div>
            
        </div>
    </footer>

    <script>
        const header = document.getElementById('header');
        let lastScrollTop = 0;

        window.addEventListener('scroll', () => {
            const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
            if (scrollTop > lastScrollTop) {
                header.style.transform = 'translateY(-100%)';
            } else {
                header.style.transform = 'translateY(0)';
            }
            lastScrollTop = scrollTop;
        });
    </script>
</body>
</html>
```