<?php
$title = 'Hệ Thống Tố Cáo Lừa Đảo | ' . $DVR->site('title');
$body['header'] = '
';
$body['footer'] = '

';
require_once __DIR__ . '/../../../core/is_user.php';
require_once __DIR__ . '/header.php';
require_once __DIR__ . '/nav.php';
//CheckLogin();
$don = $DVR->get_row("SELECT COUNT(*) FROM `tocaoscam` WHERE `status` = 'scam' ") ['COUNT(*)'];
if(!empty($_GET['page']))
{
$page = check_string(intval($_GET['page']));}
else
{
    $page = 1;
}
$limit = 10;
$sourceCodes = $DVR->get_list("SELECT * FROM `tocaoscam` WHERE `status` = 'scam' ORDER BY id DESC");
$totalItems = count($sourceCodes);
$totalPages = ceil($totalItems / $limit);
$from = ($page - 1) * $limit;
$order_by = 'ORDER BY `id` DESC';
?>

<body class="" style=""> <div id="main" class="main">
    <div class="section-gap section-intro">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <div class="section-heading">
                        <div class="title text-center">
                            KIỂM TRA &amp; TỐ CÁO SCAMMER
                        </div>
                        <div class="line"></div>
                        <div class="desc text-center">
                            <p>Kiểm Tra <strong>"SĐT, STK Ngân Hàng, Tên..."</strong> Trước Khi Giao Dịch Bằng Cách Nhập Thông Tin Vào <strong>"Thanh Tìm Kiếm"</strong></p>
                            <a href="https://<?=$_SERVER['HTTP_HOST']?>/trust-services"><strong>"Check Ở Đây Trước Khi Giao Dịch"</strong></a>
                        </div>
                    </div>
                </div>
                <div class="col-12">
                    <div class="row align-items-center justify-content-center">
                        <div class="col-lg-6">
                            <form method="POST" action="/search/scam">
                    <div class="form-group position-relative">
                        <input type="text" class="form-control" name="scam"
                               placeholder="Nhập Sđt Ngân Hàng & Kiểm Tra ">
                                                           <button type="submit">
                            <i class="fa-solid fa-magnifying-glass"  style="color: red"></i>
                        </button>
                    </div>
                     <marquee><h6 style="color: #157DEC">Hiện Nay Có Rất Nhiều Website Giả Mạo Vui Lòng Check Kỹ Trước Khi Giao Dịch!</h6></marquee>
                                <div class="cscam text-center mb-3">
                                    <a href="/scam/create" class="btn-theme btn-theme_primary" style="color: white">
                        <b>GỬI TỐ CÁO LỪA ĐẢO</b>
                    </a>
                    <a href="/trust-services" class="btn-theme btn-theme_success" style="color: white">
                       <b>CHECK QUỸ BẢO HIỂM</b>
                                    </a>
                                </div>
                            </form>
                        </div>
                        <div class="col-lg-6">
                            <div class="text-center gif">
                                <img src="<?=$DVR->site('anhbia');?>" alt="ADMIN VIETNAM" class="w-100 img-fluid h-auto" alt="">
                            </div>
                        </div>
                    </div>
                </div>
                <br>
                <div class="col-12">
                        <div class="section-heading">
                    <div class="title">
                        <font  style="color: red"><?=$don; ?> SCAM BỊ TỐ CÁO: <?=date('d/m/Y'); ?></font>
                    </div>
                        </div>
<?php $i=0; foreach ($DVR->get_list("SELECT * FROM `tocaoscam` WHERE `status` = 'scam' $order_by LIMIT $from,$limit") as $row) {?>
                    
                            
                          
                      </div>
                      <div class="container">
                      <div class="scam-tn">
                    <div class="scam-list">
                    
                      <div class="scam-item d-flex align-items-center py-3 px-4 border bg-white" style="border-radius: 17px; margin-bottom: 9px">
                            <div class="scam-title" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
                                <span class="scam-title_icon">
                                    <iconify-icon icon="twemoji:warning" width="16" height="16"></iconify-icon>
                                </span>
                                <a href="/scams/<?=$row['code']; ?>.html" class="scam-title_link" style="color: black; margin-right: 1px;">
                                    <?=$row['username']; ?> -
                                </a>
                                <span class="scam-title_icon ml-2">
                                <i class="fas fa-money-bill-alt" style="color: #85bb65"></i> 
                                <a><strong><?=format_cash($row['money']); ?>đ</strong></a>
                                 </span>
                            </div>
                             <div class="scam-info ml-auto">
                                 <span class="scam-info_time">
                                    <iconify-icon icon="fluent-emoji:calendar" width="16" height="16"></iconify-icon>
                                    <?=$row['ngay']; ?></span>
                                    <span class="scam-info_phone">
                                  <iconify-icon icon="twemoji:bank" width="16" height="16"></iconify-icon>
                                    <?=$row['ngan_hang']; ?>: <?=$row['stk']; ?> </span>
                                <span class="scam-info_eye">
                                    <iconify-icon icon="carbon:view-filled" width="16" height="16"></iconify-icon>
                                    <?=$row['view']; ?>
                                </span>
                            </div>
                        </div>
                      </div>
                      </div>
                      
                      
                        
                        <?php
} ?>
                                                    
                                                                        </div>
                </div>
                <div class="section-pagination">
    <center>
        <ul class="pagination" role="navigation">
            <li class="page-item">
                <a class="page-link" href="?page=1" rel="prev" aria-label="Previous">‹</a>
            </li>
             <?php for ($i = 1; $i <= $totalPages; $i++) { ?>
            <?php if ($i === $page) { ?>
                <li class="page-item active">
                    <a class="page-link link" href="#"><?php echo $i; ?></a>
                </li>
            <?php } else if ($i <= 4 || $i > $totalPages - 4 || abs($i - $page) <= 1) { ?>
                <li class="page-item <?php if($i == $page) { echo'active';}?>">
                    <a class="page-link link" href="/admin/list-gdv?id=<?=$id;?>&username=<?=$username;?>&status=<?=$status;?>&role=<?=$role;?>&limit=<?=$limit;?>&shortByDate=&page=<?php echo $i; ?>"><?php echo $i; ?></a>
                </li>
            <?php } else if (abs($i - $page) === 2) { ?>
                <li class="page-item">
                    <a class="page-link link" href="">...</a>
                </li>
            <?php } ?>
        <?php } ?>
            <li class="page-item">
                <a href="?page=<?php echo $totalPages; ?>" class="page-link">›</a>
            </li>
        </ul>
    </center>
</div>
            </div>
        </div>
    </div>

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