<?php include __DIR__ . '/../includes/header.php'; ?>
<link rel="stylesheet" href="<?php echo $base_url; ?>/assets/css/flagranking.css">
<?php
$currentPage = basename($_SERVER['PHP_SELF']);

function ranking_tab_class(array $pages, string $currentPage): string {
    return in_array($currentPage, $pages, true) ? ' active' : '';
}
?>

<body>
    <div class="ranking-list">
        <div class="mx-auto w-1200 lg:w-940 md:w-760 sm:w-full sm:bg-[#fff]">
            <div class="tab-box sm:mx-16"></div> 
            
            <div class="content">
                <div class="content-left">
                    <div class="list-box">
                        <div class="mb-20 flex h-36 items-center overflow-hidden rounded-2 bg-[#FEFAE7] px-20 text-14 leading-20 text-[#927D31] sm:mb-0">
                            <div direction="col" class="wiki_text_scroll">
                                <span class="text_warp" style="padding-right:0px;">※ Here are the browsing rankings in India on WikiFX, which may vary by region</span> 
                            </div>
                        </div>
           
                        <div class="tab-box sm:mx-16">
                            <section class="article-tab">
                                <div class="tab">
                                    <div class="tab-l tab-l-show">
                                        <div class="father-position jaf-0">
                                            <div class="position flex">
                                                <a class="span-link<?= ranking_tab_class(['flagranking.php'], $currentPage) ?>" href="<?php echo $base_url; ?>/ranking/flagranking.php"><span>Rankings</span></a>
                                                <a class="span-link<?= ranking_tab_class(['brandranking.php'], $currentPage) ?>" href="<?php echo $base_url; ?>/ranking/brandranking.php"><span>Brand Ranking</span></a>
                                                <a class="span-link<?= ranking_tab_class(['popularity.php'], $currentPage) ?>" href="<?php echo $base_url; ?>/ranking/popularity.php"><span>Popularity Ranking</span></a>
                                                <a class="span-link<?= ranking_tab_class(['blackranking.php'], $currentPage) ?>" href="<?php echo $base_url; ?>/ranking/blackranking.php"><span>Frauds</span></a>
                                                <a class="span-link<?= ranking_tab_class(['low-spreads.php'], $currentPage) ?>" href="<?php echo $base_url; ?>/ranking/low-spreads.php"><span>Spread Ranking</span></a>
                                            </div>
                                        </div>
                                    </div> 
                                </div> 
                            </section>
                        </div>
                        
                        <div class="sm:mx-16"></div>
                        
                        <?php include "../includes/brokerranking.php"; ?>
                    </div> 
                    
                    </div> 
                
                <div class="content-right">
                    <div class="title">Trader Safety Express</div> 
                    <div class="list-box">
                        <a href="<?php echo $base_url; ?>/avatrade.php?name=xm" target="_blank">
                            <img alt="XM" src="https://eimgjys.fxeyee.com/ico/0001461138/FXT0001461138_170305.png_wiki-template-global" dg="https://resources1.interface003.com/web20/img/default/20-20.png" loading="lazy" class="com-img" style="height:100%;">
                            XM
                        </a>
                        <a href="<?php echo $base_url; ?>/avatrade.php?name=avatrade" target="_blank">
                            <img alt="AvaTrade" src="https://eimgjys.fxeyee.com/ico/638524966772430100/FXT638524966772430100_419753.png_wiki-template-global" dg="https://resources1.interface003.com/web20/img/default/20-20.png" loading="lazy" class="com-img" style="height:100%;">
                            AvaTrade
                        </a>
                        <a href="<?php echo $base_url; ?>/avatrade.php?name=fxcm" target="_blank">
                            <img alt="FXCM" src="https://eimgjys.fxeyee.com/ico/0001698019/FXT_0001698019_100x100.png_wiki-template-global" dg="https://resources1.interface003.com/web20/img/default/20-20.png" loading="lazy" class="com-img" style="height:100%;">
                            FXCM
                        </a>
                        <a href="<?php echo $base_url; ?>/avatrade.php?name=exness" target="_blank">
                            <img alt="Exness" src="https://eimgjys.fxeyee.com/ico/638421411915938761/FXT638421411915938761_801538.png_wiki-template-global" dg="https://resources1.interface003.com/web20/img/default/20-20.png" loading="lazy" class="com-img" style="height:100%;">
                            Exness
                        </a>
                        <a href="<?php echo $base_url; ?>/avatrade.php?name=finowiz" target="_blank">
                            <img alt="FINOWIZ" src="https://eimgjys.fxeyee.com/ico/2257270373/FXT2257270373_297129.png_wiki-template-global" dg="https://resources1.interface003.com/web20/img/default/20-20.png" loading="lazy" class="com-img" style="height:100%;">
                            FINOWIZ
                        </a>
                        <a href="<?php echo $base_url; ?>/avatrade.php?name=botbro" target="_blank">
                            <img alt="BotBro" src="https://eimgjys.fxeyee.com/ico/1225957382/FXT1225957382_671125.png_wiki-template-global" dg="https://resources1.interface003.com/web20/img/default/20-20.png" loading="lazy" class="com-img" style="height:100%;">
                            BotBro
                        </a>
                        <a href="<?php echo $base_url; ?>/avatrade.php?name=starttrader" target="_blank">
                            <img alt="STARTRADER" src="https://eimgjys.fxeyee.com/ico/637853008755653991/FXT637853008755653991_593518.png_wiki-template-global" dg="https://resources1.interface003.com/web20/img/default/20-20.png" loading="lazy" class="com-img" style="height:100%;">
                            STARTRADER
                        </a>
                        <a href="<?php echo $base_url; ?>/avatrade.php?name=icmarketsglobals" target="_blank">
                            <img alt="IC Markets Global" src="https://eimgjys.fxeyee.com/ico/637576515574286814/FXT637576515574286814_667822.png_wiki-template-global" dg="https://resources1.interface003.com/web20/img/default/20-20.png" loading="lazy" class="com-img" style="height:100%;">
                            IC Markets Global
                        </a>
                        <a href="<?php echo $base_url; ?>/avatrade.php?name=vantage" target="_blank">
                            <img alt="Vantage" src="https://eimgjys.fxeyee.com/ico/637769787885521747/FXT637769787885521747_425825.png_wiki-template-global" dg="https://resources1.interface003.com/web20/img/default/20-20.png" loading="lazy" class="com-img" style="height:100%;">
                            Vantage
                        </a>
                        <a href="<?php echo $base_url; ?>/avatrade.php?name=fxtm" target="_blank">
                            <img alt="FXTM" src="https://eimgjys.fxeyee.com/ico/638678860542341398/FXT638678860542341398_670686.png_wiki-template-global" dg="https://resources1.interface003.com/web20/img/default/20-20.png" loading="lazy" class="com-img" style="height:100%;">
                            FXTM
                        </a>
                    </div>
                </div>
            </div>
        </div> 
        
        <div class="el-dialog__wrapper" style="display:none;">
            <div role="dialog" aria-modal="true" aria-label="All" class="el-dialog rankingList-dialog" style="margin-top:15vh;">
                <div class="el-dialog__header">
                    <span class="el-dialog__title">All</span>
                    <button type="button" aria-label="Close" class="el-dialog__headerbtn">
                        <i class="el-dialog__close el-icon el-icon-close"></i>
                    </button>
                </div>
            </div>
        </div>
    </div> 

    <section style="padding-bottom:0;">
        <?php include '../includes/footer.php'; ?> 
    </section>
</body>