<?php
$title = 'Dịch Vụ Uy Tín - ' . $DVR->site('site_ten');
$body['header'] = '
';
$body['footer'] = '

';
require_once __DIR__ . '/../../../core/is_user.php';
require_once __DIR__ . '/header.php';
require_once __DIR__ . '/nav.php';
//CheckLogin();
?>
<div id="main" class="main">
        <div class="section-gap section-shield section-intro">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <div class="section-heading">
                        <div class="title">
                          </i>QUỸ BẢO HIỂM ADMIN</i>
                        </div>
                        <div class="line" bis_skin_checked="1"></div>
                        <br>
                  <div class="col-12">
                    <div class="row align-items-center justify-content-center">
                        <div class="col-lg-12">
                    <ul class="nav nav-tabs tab-theme" role="tablist">
                                <li class="nav-item">
                                <a class="nav-link" data-toggle="tab" href="#cate-index" role="tab" aria-controls <p class=""><b>⚠️ <u>LƯU Ý KHI GIAO DỊCH</u>:</b> Hãy luôn tuân thủ <b><a href="" target="_blank">Nội Quy Giao Dịch</a></b>. Để tránh gặp Fake, Scam. Bạn nhớ Copy "<b>Link BH</b>, <b>Link fb ad</b>, <b>Sđt</b>, <b>Stk</b>" gửi vào <b><a href="<?=$DVR->site('link_box_telegram');?>" id="linktelegram" target="_blank" rel="noopener noreferrer">Gr Check Real, Fake, Scam</a></b>. Bot tele sẽ tự động kiểm tra và trả lời ...!</p>
                                    </a>
                                </li>
                                </a>
                                </li>
                                </a>
                                </li>
                                </a>
                                </li>
                                </a>
                                </li>
                                </a>
                                </li>
                                <div class="col-12">
                                    <div class="subtitle">
                                        Ấn Vào "Tab Dịch Vụ" Để Lọc Admin !!!
                                    </div>
                                    <div class="line" bis_skin_checked="1"></div>
                                </div>
                                <div class="col-12">
                            <ul class="nav nav-tabs tab-theme" role="tablist">
                        <li class="nav-item">
                            <a id="all-tab" class="nav-link active" data-toggle="tab" href="#cate-index" role="tab" aria-controls="cate-index" aria-selected="true">
                                Tất cả
                            </a>
                        </li>
<?php $i=0; foreach ($DVR->get_list("SELECT * FROM `category` ORDER BY `id` desc") as $cate) {?>
                                <li class="nav-item">
                                    <a class="nav-link" data-toggle="tab" href="#cate-<?=$cate['id'];?>" role="tab" aria-controls="cate-<?=$cate['id'];?>" aria-selected="false">
                                        <?=ucfirst($cate['code']);?>
                                    </a>
                                </li>
<?php } ?>                                                                    
                            </ul>
                                </div>
                        </div>
                    </div>
                </div>
                                                            
                            
                    
                <div class="col-12">
                    <div class="tab-content">
                        <div class="tab-pane fade active show" id="cate-index" role="tabpanel" aria-labelledby="cate-index-tab">
<?php $i=0; foreach ($DVR->get_list("SELECT * FROM `category` ORDER BY id asc") as $lmg) {?>
                                           <div class="shield-inner" >                                    
                                        <div class="shield-list">
                                            <div class="shield-title">
                                                <i class="fa-solid fa-star fa-spin" <font style="color: var(--primary-color);"></i>
                                                <?=$lmg['code'];?>
                                                <i class="fa-solid fa-star fa-spin" <font style="color: var(--primary-color);"></i>
                                            </div>
<?php $i=1; foreach ($DVR->get_list("SELECT * FROM `gdv` ORDER BY id asc") as $check) {
    if($check['dich_vu'] == $lmg['code']) {
?>
                                                    <div class="shield-item">
                                                        <a href="HTTPS://<?=$_SERVER['HTTP_HOST']?>/admin/<?=$check['code'];?>" class="shield-item_link">
                                                            <img src="<?=$check['image']?>" alt="">
                                                            <?=($i++);?>. <?=$check['name']?>
                                                        </a>
                                                    </div>
    <?php  } } ?>                                                
                                        </div>
                                    </div>
                                    <?php } ?>
                        </div>
                       <?php $i=0; foreach ($DVR->get_list("SELECT * FROM `category` ORDER BY `id` desc") as $cate) {?>
                        <div class="tab-pane fade" id="cate-<?=$cate['id'];?>" role="tabpanel" aria-labelledby="cate-<?=$cate['id'];?>-tab">
                            <div class="shield-inner ut"  >       
                                <div class="shield-list">
                                    <div class="shield-title">
                                        <i class="fa-solid fa-star fa-spin" <font style="color: var(--primary-color);"></i>
                                        <?=$cate['code'];?>
                                        <i class="fa-solid fa-star fa-spin" <font style="color: var(--primary-color);"></i>
                                    </div>
                                <?php
                                $i=1;
                                $catee = $cate['code'];
                                foreach ($DVR->get_list("SELECT * FROM `gdv` WHERE `dich_vu` = '$catee' ORDER BY `id` asc") as $userr) {?>   
                                    <div class="shield-item">
                                        <a href="/trust-services/<?=$userr['code'];?>" class="shield-item_link">
                                            <img src="<?=$userr['image'];?>" alt="" />
                                            <?=($i++); ?>. 
                                            <?=$userr['name']?>
                                        </a>
                                    </div>
                                <?PHP } ?>    
                                </div>
                            </div>
                        </div>
                        <?PHP } ?>                         
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
document.querySelectorAll('.nav-link').forEach(tab => {
    tab.addEventListener('click', () => {
        const dvcc = tab.getAttribute('data-dvcc'); 
        document.querySelectorAll('.shield-item').forEach(profile => {
            const profileDvcc = profile.getAttribute('data-dvcc');

            if (dvcc === 'all' || profileDvcc === dvcc) {
                profile.style.display = 'block';
            } else {
                profile.style.display = 'none';
            }
        });
    });
});
    const allTab = document.getElementById('all-tab');
    allTab.addEventListener('click', () => {
        // Hiển thị tất cả các hồ sơ
        document.querySelectorAll('.shield-item').forEach(profile => {
            profile.style.display = 'block';
        });
    });
</script>
<?php require_once __DIR__ . '/footer.php'; ?>