<?php
if(isset($_GET['code']))
{
    $row = $DVR->get_row(" SELECT * FROM `gdv` WHERE `code` = '".check_string($_GET['code'])."'  ");
    if(!$row)
    {
        die('<script type="text/javascript">if(!alert("Không tồn tại!")){window.history.back().location.reload();}</script>');
    }
}
else
{
    die('<script type="text/javascript">if(!alert("Không tồn tại!")){window.history.back().location.reload();}</script>');
}
$title = "[ ADMIN ] Administrator VietNam BH | " . $row['name'];
$body['header'] = '';
$body['footer'] = '';
require_once __DIR__ . '/../../../core/is_user.php';
require_once __DIR__ . '/head_profile.php';
require_once __DIR__ . '/nav.php';
//CheckLogin();
?>
<div id="main" class="main">
        <div class="section-gap section-profile">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-md-12 col-lg-10">
                    <div class="profile-inner">
                        <div class="profile-avatar">
                            <img src="<?=$row['image'];?>" alt="">
                        </div>
                        <div class="profile-title">
                            <?=$row['name'];?> <img src="https://i.imgur.com/pdF33Fl.gif" alt="Đã Xác Minh" style="height: 30px;">
                        </div>
                        <div class="profile-buttons" bis_skin_checked="1">
                            
                            
                            <div class="btn-checkmess btn-checkmess_hidden" bis_skin_checked="1">
                                <a href="https://facebook.com/<?=$row['id_fb'];?>/" class="btn btn-linear"><i class="fab fa-facebook-square"></i>Check Facebook</a>

                                <a href="javascript:void(0)" class="description-hidden">
                                                                       <span>Ấn vào "Check Facebook" nhắn tin cho GDV để chắc chắn rằng bạn đang giao dịch với Real</span>
                                    <button>
                                        Ok
                                    </button>
                                </a>
                                <div class="description-overlay" bis_skin_checked="1"></div>
                            </div>
                            
                            <a href="<?= $DVR->site('link_box_telegram'); ?>"/ class="btn btn-linear"><i class="fab fa-telegram"></i>Bot Auto Check</a>

                        </div>
                        
                        
                        <div class="profile-boxs" >
                            <div class="row row-col-15">
                                <div class="col-md-6">
                                    <div class="profile-box"  style="border: 1.5px solid var(--primary-color);border-radius: 10px;-moz-border-radius: 24px;-webkit-border-radius:20px;">
                                        <div class="profile-box_content">
                                            <div class="profile-box_content__title">
                                                 Thông tin liên Hệ :
                                                <ul class="pl-3 mb-0">
                                            </div>
                                            <div class="profile-box_content__list">
                                                <p>
                                                    <span>
                                                        <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Facebook_Logo_%282019%29.png/1200px-Facebook_Logo_%282019%29.png" alt="">
                                                    </span>
                                                    Check Facebook:
                                                    <a href="https://fb.com/<?=$row['id_fb'];?>" target="_blank">
                                                        <?=$row['id_fb'];?>
                                                    </a>
                                                    
                                                </p>
                                                <p>
                                                    <span>
                                                        <img src="https://cdn.haitrieu.com/wp-content/uploads/2022/01/Logo-Zalo-Arc.png" alt="https://cdn.haitrieu.com/wp-content/uploads/2022/01/Logo-Zalo-Arc.png">
                                                    </span>
                                                    Check Zalo:
                                                    <a href="https://zalo.me/<?=$row['sdt'];?>/" target="_blank">
                                                        <?=$row['sdt'];?>
                                                    </a>
                                                    
                                                </p>
                                                <p>
                                                <span>
                                                        <img src="https://i.imgur.com/6yUbPAX.png" alt"dichvuright"
                                                    </span>
                                                    Check Tele:
                                                    <a href="https://t.me/<?=$row['telegram'];?>/" target="_blank">
                                                        <?=$row['telegram'];?>
                                                    </a>
                                                </p>
                                                <p>    
                                                <span>
                                                        <img src="https://i.imgur.com/aCqiDxC.png" alt="Google Chrome Logo">
                                                   </span>
                                                   Website:
                                                  <a href="https://<?=$row['website'];?>/">
                                                   <?=$row['website']; ?>
                                                  </a>

                                                        </a>

                                                    </p>
                                            </div>
                                            <div class="profile-box_content__image">

<img src="https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=https://www.facebook.com/<?=$row['id_fb'];?>" class="img-fluid" alt="">


                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="profile-box"  style="border: 1.5px solid var(--primary-color);border-radius: 10px;-moz-border-radius: 24px;-webkit-border-radius:20px;">
                                        <div class="profile-box_content">
                                            <div class="profile-box_content__title">
                                                Quỹ Bảo Hiểm <?=$DVR->site('site_ten');?> 
                                            </div>
                                            <div class="profile-box_content__desc">Từ Ngày<strong class="text-danger"> <?= $row['ngay']; ?></strong>
                                                Khách hàng sẽ được <strong class="text-success"><?= $site_tenweb; ?></strong> bảo hiểm an toàn giao dịch với số
                                                tiền trong quỹ bảo hiểm
                                                <strong class="text-danger"><?= format_cash($row['money']); ?> VND</strong> của <strong class="text-danger"><?= $row['name']; ?></strong></p>
                                            </div>
                                            <div class="profile-box_content__image">
                                                <img src="<?= $DVR->site('anh_profile'); ?>" alt="Đã Xác Minh" style="height: 140px;">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                     <div class="profile-boxs"  style="border: 1.5px solid var(--primary-color);border-radius: 10px;-moz-border-radius: 24px;">
                        <div class="profile-box profile-box_nopr">
                                <div class="profile-box_content">
                                    <div class="profile-box_content__title">
                             Vui lòng kiểm tra kỹ thông tin trước khi giao dịch tránh
                                        Fake:
                                    </div>
                                    <div class="profile-box_content__subtitle">
</div>
     <ul class='pl-3 mb-0'>
<?php 
$lines = explode("\n", $row['ngan_hang']);
$stk = explode("\n", $row['stk']); 
$logos = [];

if (!empty($lines) && !empty($stk)) {
    foreach ($lines as $line) {
        $short_name_to_check = trim($line);
        if (!empty($short_name_to_check)) {
            $api_logos = $DVR->get_list("SELECT * FROM `api_logo` ");
            foreach ($api_logos as $api) {
                if ($short_name_to_check == $api['shortName']) {
                    $logos[$short_name_to_check] = $api['logo'];
                    break;
                }
            }
        }
    }
}

foreach ($lines as $index => $line) {
    $short_name_to_check = trim($line);
    if (!empty($short_name_to_check) && isset($logos[$short_name_to_check]) && isset($stk[$index])) {
        $stk_bank = trim($stk[$index]);
        $logo_url = $logos[$short_name_to_check];
        echo "<li class='oo9gr5id' dir='auto'>
                  <img src='$logo_url' height='15'> 
                  <b>$short_name_to_check</b> :
                  <a href='tel:$stk_bank'>$stk_bank</a> 
                  <a href='javascript:void(0)' class='copy-text' data-text='$stk_bank'>
                      <i class='fas fa-copy' onclick=\"showMessage('Copy Thành Công ', 'success')\"></i>
                  </a>
              </li>";
    }
}
?>
</ul>
    <div class="profile-box_content">
    <div class="profile-box_content__subtitle">
        Dịch Vụ Cung Cấp :
</div>
 <ul class="pl-3 mb-0">
                                        
                                        <?php
                                        $atm = $row['dichvucungcap'];
                                        $delimiters = array("|");
                                        $atm = str_replace($delimiters, $delimiters[0], $atm);
                                        $arrKeyword= explode($delimiters[0], $atm);
                                        foreach ($arrKeyword as $key)
                                        {
                                           echo '<li class="oo9gr5id" dir="auto">'.$key.'</li>';
                                        }
                                        ?>
     
                                    </ul>
        </div>
        <p><strong>Lưu Ý:</strong> Tránh trường hợp Nick Fake, Ảnh Fake, Link Fake, Rửa
                                            Tiền…. Người dùng hãy nhớ Chát đúng Facebook, Gọi đúng SĐT, Chuyển khoản
                                            đúng những STK có ở trong trong link bảo hiểm này Admin cam kết bạn sẽ
                                            an toàn trong mọi giao dịch..!!!</p>
        </div>
        </div>

</div>
                        
              

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
    var qrButtons = document.querySelectorAll('.btn-qr');

    qrButtons.forEach(function (button) {
        button.addEventListener('click', function () {
            var nganhang = button.getAttribute('data-nganhang');
            var stk = button.getAttribute('data-stk');
            var modalNganhang = document.querySelector('.modal-nganhang');
            var modalStk = document.querySelector('.modal-stk');
            var qrImage = document.getElementById('img-qr');

            if (modalNganhang && modalStk) {
                modalNganhang.innerText = nganhang;
                modalStk.innerText = stk;
            }

            if (qrImage) {
                if (nganhang === "MOMO") {
                    qrImage.src = "https://chart.googleapis.com/chart?chs=500x500&cht=qr&chl=2|99|" + stk + "|||0|0|||transfer_myqr";
                } else {
                    qrImage.src = "https://img.vietqr.io/image/" + nganhang + "-" + stk + "-1tPF23Q.jpg";
                }
            }
        });
    });
});
       </script>
        <div id="global-modal" class="modal fade show" role="dialog" aria-modal="true" bis_skin_checked="1" style="padding-right: 16px; display: block;">
            <div class="modal-dialog" bis_skin_checked="1">
                <div class="modal-content" bis_skin_checked="1">
                    <div class="modal-header" bis_skin_checked="1">

                    </div>
                    <div class="modal-body" bis_skin_checked="1">

                        <p></p>
                        <p></p>
                        <h2 style="text-align: center; color: rgb(35, 35, 35);" open="" sans",="" sans-serif;="" text-align:="" center;"=""></h2>
                        <h1 style="padding: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: rb, sans-serif; font-size: 14px; text-align: center;">
                            <p style="padding: 0px; margin-right: 0px; margin-bottom: 7px; margin-left: 0px;"><span style="padding: 0px; margin: 0px;"><strong style="padding: 0px; margin: 0px;"><a href="<?= $DVR->site('link_box_telegram'); ?>" target="_blank" rel="noopener" style="padding: 0px; margin: 0px; transition: all 0.4s ease 0s;">
                                            <font color="<?= $DVR->site('color'); ?>">CHECK TRƯỚC KHI GIAO DỊCH</font>
                                        </a></strong></span></p>
                            <p style="color: rgb(60, 64, 67); padding: 0px; margin-right: 0px; margin-bottom: 7px; margin-left: 0px;"><span style="padding: 0px; margin: 0px; color: rgb(0, 0, 0);">Không BH cho các DV “<strong style="padding: 0px; margin: 0px;">Vi Phạm Pháp Luật</strong>“.</span></p>
                            <p style="color: rgb(60, 64, 67); padding: 0px; margin-right: 0px; margin-bottom: 7px; margin-left: 0px;"><span style="padding: 0px; margin: 0px; color: rgb(0, 0, 0);">Lưu ý&nbsp;<strong style="padding: 0px; margin: 0px;">“Nội Dung Chuyển Khoản”&nbsp;</strong><span style="padding: 0px; margin: 0px;">để tránh bị rửa tiền</span></span></p>
                            <p style="padding: 0px; margin-right: 0px; margin-bottom: 7px; margin-left: 0px;"><span style="padding: 0px; margin: 0px; background-color: rgb(255, 255, 255);">
                                    <font color="#ede728" style="">★&nbsp;★&nbsp;★&nbsp;★&nbsp;★</font>
                                </span></p>
                        </h1>
                        <h4 style="padding: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: rb, sans-serif; font-size: 14px; text-align: center;"><span style="padding: 0px; margin: 0px; transition: all 0.4s ease 0s;">

                                <button type="button" class="btn btn-danger" data-dismiss="modal">Đã Hiểu</button>

                            </span></h4>
                    </div>
                </div>
            </div>
        </div>
</script>

<?php require_once __DIR__ . '/footer.php'; ?>