<?php
include("../session.php");
function convertString($string)
{
    // Ubah semua huruf menjadi huruf kecil
    $string = strtolower($string);
    // Ubah huruf pertama menjadi huruf besar
    $convertedString = ucfirst($string);

    return $convertedString;
}
function maskAccountNumber($accountNumber)
{
    $length = strlen($accountNumber);
    // Jika panjang string lebih dari 4
    if ($length > 4) {
        // Ambil 4 karakter terakhir
        $last4 = substr($accountNumber, -4);
        // Buat string yang disensor dengan x
        $masked = str_repeat('x', $length - 4) . $last4;
    } else {
        // Jika panjang string 4 atau kurang, tampilkan apa adanya
        $masked = $accountNumber;
    }
    return $masked;
}
$akun = $sbs['akun'];
$accountNumber = $sbs['no_rek'];
$pemilik = $sbs['pemilik'];
    // Query untuk memeriksa apakah ada data bank dengan nomor rekening
    $sql_banks = mysqli_query($conn, "SELECT * FROM `tb_bank` WHERE no_rek = '$accountNumber' ") or die(mysqli_error($conn));

    if (mysqli_num_rows($sql_banks) > 0) {
        // Ambil data bank
        $bankData = mysqli_fetch_assoc($sql_banks);
        
        // Periksa apakah nomor rekening kosong atau tidak ada
        if (empty($bankData['no_rek'])) {
            // Jika nomor rekening kosong, redirect ke halaman form bank
            echo '<script>
                    alert("Anda belum memiliki nomor rekening. Anda akan dialihkan ke halaman form bank dalam 5 detik.");
                    setTimeout(function() {
                        window.location.href = "/bank/account";
                    }, 100); // 5000 ms = 5 detik
                  </script>';
            exit();
        } else {
            // Jika nomor rekening ada, lanjutkan dengan proses data yang diperlukan
            // Misalnya, tampilkan informasi atau proses lebih lanjut
        }
    } else {
        // Jika tidak ada data bank untuk userID, mungkin Anda perlu menangani kasus ini juga
        echo '<script>
                alert("Data bank tidak ditemukan. Anda akan dialihkan ke halaman form bank dalam 5 detik.");
                setTimeout(function() {
                    window.location.href = "/bank/account";
                }, 100); // 5000 ms = 5 detik
              </script>';
        exit();
    }
?>
<!DOCTYPE html>
<html id="feProdAWS05" lang="id">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1, minimum-scale=1,maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="description" content="<?php echo $deskripsi ?>">
    <meta name="keywords" content="<?php echo $keywords ?>">
    <link rel="canonical" href=<?php echo $urlweb ?>>
    <meta itemprop="name" content="<?php echo $pengumuman ?>" />
    <meta itemprop="description" content="<?php echo $deskripsi ?>" />
    <link rel="amphtml" href="<?php echo $urlweb; ?>" />
    <meta property="og:url" content=<?php echo $urlweb ?>>
    <meta property="og:type" content="website">
    <meta property="og:title" content="<?php echo $deskripsi ?>" />
    <meta property="og:description" content="<?php echo $deskripsi ?>" />
    <meta property="language" content="Indonesia" />
    <meta property="revisit-after" content="1 days" />
    <meta property="webcrawlers" content="all" />
    <meta property="rating" content="general" />
    <meta property="spiders" content="all" />
    <meta property="og:image" content="https://images.linkcdn.cloud/V2/00603/promotion/id/bonus-new-member-100-6610d0a29833a.webp">
    <title><?php echo $deskripsi ?></title>
    
    <link rel="icon" type="image/png" href="<?php echo $favicon;?>">

    <script async src="https://www.googletagmanager.com/gtag/js?id=G-JDM1P2DWX0"></script>
    <script>
        window.dataLayer = window.dataLayer || [];

        function gtag() {
            dataLayer.push(arguments);
        }
        gtag('js', new Date());

        gtag('config', 'G-JDM1P2DWX0');
    </script>
    <link rel="stylesheet" href="<?php echo $urlweb ?>/cxfteams/massages.css" media="screen" title="no title" charset="utf-8">
    <script src="<?php echo $urlweb ?>/cxfteams/massages.css"></script>
    <script src="https://cdn.zerosugar.monster/jquery-3.6.0.min.js"></script>

    <script>
        ! function(f, b, e, v, n, t, s) {
            if (f.fbq) return;
            n = f.fbq = function() {
                n.callMethod ?
                    n.callMethod.apply(n, arguments) : n.queue.push(arguments)
            };
            if (!f._fbq) f._fbq = n;
            n.push = n;
            n.loaded = !0;
            n.version = '2.0';
            n.queue = [];
            t = b.createElement(e);
            t.async = !0;
            t.src = v;
            s = b.getElementsByTagName(e)[0];
            s.parentNode.insertBefore(t, s)
        }(window, document, 'script',
            'https://connect.facebook.net/en_US/fbevents.js');
        fbq('init', '1135802207487558');
        fbq('track', 'PageView');
    </script>
    <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1135802207487558&ev=PageView&noscript=1" /></noscript>

    <link href="https://cdn.robotaset.com/assets/css/fonts.google.ubuntu.css" <link rel="preconnect" href="https://widget.robotaset.com">
<link rel="preconnect" href="https://lb.robotaset.com">
<link rel="preconnect" href="https://cdn.robotaset.com" crossorigin="">
<link rel="dns-prefetch" href="//cdn.robotaset.com">
<link rel="preload" href="https://cdn.robotaset.com/assets/thirdparty/font-awesome/webfonts/fa-solid-900.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="icon" type="image/x-icon" href="<?php echo $logo ?>">
<link href="https://cdn.robotaset.com/assets/css/fonts.google.ubuntu.min.css" media="all" onload="this.media='all'" rel="stylesheet">
<link href="https://cdn.robotaset.com/assets/thirdparty/font-awesome/css/brands.min.css" media="all" onload="this.media='all'" rel="stylesheet">
<link href="https://cdn.robotaset.com/assets/thirdparty/font-awesome/css/regular.min.css" media="all" onload="this.media='all'" rel="stylesheet">
<link href="https://cdn.robotaset.com/assets/thirdparty/font-awesome/css/solid.min.css" media="all" onload="this.media='all'" rel="stylesheet">
<link href="https://cdn.robotaset.com/assets/thirdparty/font-awesome/css/fontawesome.min.css" media="all" onload="this.media='all'" rel="stylesheet">

<link href="https://cdn.robotaset.com/assets/thirdparty/owl-carousel/css/owl.carousel.min.css" rel="stylesheet">
	<link href="https://cdn.robotaset.com/assets/thirdparty/owl-carousel/css/owl.theme.default.min.css" rel="stylesheet">
<link href="https://cdn.robotaset.com/assets/mobile/sitecss.min.css" rel="stylesheet">
<link href="https://cdn.robotaset.com/assets/tpl/d9eacbbc29/css/sitecss.min.css" media="all" onload="this.media='all'" rel="stylesheet">
<style>
/* Home Slider */
.home-slider{max-height:unset}
.home-slider-wrapper{width:100%;overflow:hidden;position:relative}
.home-slider.owl-carousel .item{width:100%;overflow:hidden}
.home-slider.owl-carousel img{max-height:unset;width:100%}
/* Pool Results */
.pool-result-wrapper{padding:1rem 0 1rem;min-height:155px}
/* Widget */
.widget-tab{min-height:270px}
/* Leaderboard*/
.card-leaderboard{min-height:260px}
/* Custom Page */
.custom-page .page-item li{border-right:none;display:inline-block}
.custom-page .page-item a{display:flex;padding:0 1.25rem;min-width:48px;min-height:40px;margin-bottom:1rem;border-radius:unset;align-items:center;border-right:1px solid #fff;font-size:1rem}
</style>
<style>.menu-body{padding-bottom:2rem}.game-links-section{padding:.5rem 1rem;margin-bottom:48px}.game-links-heading{color:#333;font-size:1.2rem;margin-bottom:1rem}.game-links-grid{display:flex;flex-wrap:wrap;gap:.5rem}.game-link{display:flex!important;align-items:center;padding:8px 12px;border:1px solid #ddd;border-radius:6px;background-color:#f9f9f9;text-decoration:none;color:#333;transition:background-color 0.2s ease,box-shadow 0.2s ease}.game-link i{margin-right:6px}.game-link:focus{outline:2px solid #333;outline-offset:2px;background-color:#eee;box-shadow:0 2px 5px rgb(0 0 0 / .1)}@media (hover:hover) and (pointer:fine){.game-link:hover{background-color:#eee;box-shadow:0 2px 5px rgb(0 0 0 / .1)}}</style>
<script>
	var validationMsg = {"alpha":"%s hanya boleh menggunakan abjad","alpha_dash":"%s hanya boleh menggunakan karakter abjad, angka, tanda garis bawah dan penghubung","alpha_numeric":"%s hanya boleh menggunakan abjad dan angka","alpha_numeric_spaces":"%s hanya boleh menggunakan abjad, angka dan spasi","alpha_quote_spaces":"%s hanya boleh menggunakan abjad, tanda petik satu dan spasi","alpha_spaces":"%s hanya boleh menggunakan abjad dan spasi","decimal":"%s harus menggunakan angka desimal","digit":"%s hanya boleh menggunakan digit","digit_no_zero":"%s hanya boleh menggunakan angka dan harus lebih besar dari nol","exact_length":"Panjang %s harus sama %d","greater_than":"%s harus lebih besar dari %d","greater_than_equal_to":"%s harus lebih besar atau sama dengan %d","integer":"%s harus menggunakan angka bulat","less_than":"%s harus kurang dari %d","less_than_equal_to":"%s harus kurang atau sama dengan %d","matches":"%s tidak cocok dengan %s","max_length":"Panjang %s tidak boleh melebihi %d karakter","min_length":"Panjang %s minimal harus %d karakter","is_numeric":"%s hanya boleh menggunakan angka","required":"%s wajib diisi","valid_captcha":"Kode captcha tidak valid","valid_email":"%s harus berisi alamat email yang valid","valid_referral":"Kode referral tidak valid"};
	var alertMsg = {"login_first":"Harap login terlebih dahulu!","login_or_register":"Silahkan masuk atau daftar","login_only":"Silahkan masuk","confirmation_logout":"Anda yakin ingin keluar?","confirmation_calibrate":"Anda yakin ingin menarik saldo dari game?","confirmation_activate_bonus":"Anda yakin ingin mengaktifkan bonus ini?","confirmation_claim_bonus":"Anda yakin ingin mengklaim bonus ini?","session_expired":"Sesi login Anda telah berakhir. Harap masuk kembali!","start_end_date_empty":"Tanggal awal dan tanggal akhir tidak boleh kosong!","start_date_is_greater":"Tanggal awal lebih besar dari tanggal akhir","commission_amount":"Komisi harus lebih dari atau sama dengan Rp 10.000","request_failed":"Permintaan gagal, silahkan coba kembali","retry":"Coba lagi","copy_success":"Berhasil menyalin","loading":"Memuat...","varq_confirm_success":"Maaf, tagihan Anda masih menunggu untuk dibayarkan.","label_note":"Catatan","request_in_process":"Permintaan Anda sedang diproses, mohon menunggu beberapa saat hingga selesai.","refno":"No. Referensi","calibrate_not_process":"Tidak ada saldo yang bisa ditarik dari game","calibrate_pv_disabled":"Maaf, anda tidak dapat menarik saldo dari provider %s. Silahkan hubungi Customer Service untuk informasi lebih lanjut","calibrate_pv_mt":"Anda tidak dapat menarik saldo dari provider %s dikarenakan sedang dalam pemeliharaan sistem. Silahkan coba kembali secara berkala.","pv_locked":"Terkunci","varq_confirm_failed":null};
</script>
<!-- Google Analytics Custom -->
		<script async="" src="https://www.googletagmanager.com/gtag/js?id=G-SLWGPZ8ZKZ"></script>
		<script>
		window.dataLayer = window.dataLayer || [];
		function gtag(){dataLayer.push(arguments);}
		gtag('js', new Date());
		gtag('config', 'G-SLWGPZ8ZKZ');
		</script>
	<script src="https://cdn.robotaset.com/assets/js/common/jquery-3.6.0.min.js"></script>
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&amp;display=swap" rel="stylesheet">
<style>
.messagebleft-container{transition:all 500ms ease;transition-property:top,right,bottom,left,opacity;font-family:Roboto,sans-serif;font-size:14px;min-height:14px;background-color:#d9dce6 !important;border: 2px solid rgb(255, 255, 255);border-radius: 6px;position:fixed;display:flex;justify-content:space-between;align-items:center;color:#fff;line-height:22px;padding:18px 24px;bottom:-100px;top:-100px;opacity:0;z-index:9999999999}.messagebleft-container .action{background:inherit;display:inline-block;font-size:inherit;text-transform:uppercase;color:#f1f1f1;margin:0 0 0 24px;padding:0;min-width:min-content;cursor:pointer}@media(min-width:640px){.messagebleft-container{min-width:288px;max-width:568px;display:inline-flex;border-radius:2px;margin:24px}}@media(max-width:640px){.messagebleft-container{left:0;right:0;width:100%}}.messagebleft-pos.bottom-center{bottom:auto!important;top:0;left:50%;transform:translate(-50%,0)}.messagebleft-pos.bottom-left{bottom:auto!important;top:0;left:0}.messagebleft-pos.bottom-right{top:auto!important;bottom:0;right:0}.messagebleft-pos.top-left{top:auto!important;top:0;left:0}.messagebleft-pos.top-center{top:auto!important;top:0;left:50%;transform:translate(-50%,0)}.messagebleft-pos.top-right{top:auto!important;top:0;right:0}@media(max-width:640px){.messagebleft-pos.bottom-center,.messagebleft-pos.top-center{left:0;transform:none}}
.seo-text {
   text-align: justify!important;
}

h1,
h2,
h3 {
   color: #F2A238!important;
   text-align: left!important;
}
table.slotgacor td, table.slotgacor th {
border: 1px solid #dc18ee;
font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
table.slotgacor tbody td {
font-size: 15px;
color: #F8F8FF	;
padding: 5px;
font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
table.slotgacor thead {
background: #7a4911;
font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
table.slotgacor thead th {
font-size: 17px;
color: #F8F8FF	;
text-align: center;
font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}.waButton{ display: none;}.waButton2{ display: none;}.waButton3{ display: none;}.waButton4{position:fixed; bottom:55px;
right :5px; z-index:100; width: 70px; height: 70px;}.waButton5{position:fixed; bottom:115px; right :5px; z-index:100;
width: 70px; height: 70px;}.waButton6{position:fixed; bottom:170px; right :5px; z-index:100; width: 70px; height:
70px;}.waButton9{display: none;}.waButton10{position:fixed; bottom:135px; left :5px; z-index:100; width: 70px; height:
70px;}.pool-result-wrapper{display:none;}.twin4{margin-right: 10px; width: 55px; height: 55px;}.twin3{margin-right:
10px; width: 55px; height: 55px;}.twin2{margin-right: 10px; width: 55px; height: 55px;}.twin1{margin-right: 10px; width:
55px; height: 55px;}.twin5{margin-right: 10px; width: 55px; height:
55px;}.description1{width:50%}.description2{width:100%}</style>


<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

        <script>
            $(document).ready(function() {
                $('.navbar-fixed').before(`
                    <div id="smart_banner" style="position: static; width: 100%; padding: 5px; font-family: Verdana, Arial, sans-serif; color: #fff; background: linear-gradient(to right, #1b1b1b 0%, #1b1b1b 50%, #1b1b1b 100%); height: inherit; transition: all 0.5s cubic-bezier(0, 1, 0.5, 1) 0s; overflow: hidden; display: flex; align-items: center; justify-content: space-between;">
                        <div class="app_icon" style="flex: 0 0 auto; width: 60px; margin: 0 10px;">
                            <img src="https://lexa69main.shop/upload/logos.gif" alt="DOWNLOAD APK <?php echo $instansi ?>" style="display: block; max-width: 100%;">
                        </div>
                        <div class="app_info" style="flex: 1; text-align: center; margin: 0 10px;">
                            <div class="app_title" style="font-size: 12px; font-weight: bold; color: #ffcc00;">APLIKASI <?php echo $instansi ?></div>
                            <div class="app_slogan" style="font-size: 12px; color: #FFF; letter-spacing: 1px;">Kini telah tersedia Aplikasi Android</div>
                        </div>
                        <div class="download_button" style="flex: 0 0 auto; margin: 0 10px;">
                            <a href="https://dwn.robotaset.com/apk/<?php echo $instansi ?>/<?php echo $instansi ?>.apk" target="_blank" title="Download Apk <?php echo $instansi ?>" class="btn btn-green" style="font-size: 10px; padding: 1px 4px; color: #000; background: linear-gradient(to bottom, #00f5f6 0%, #0b669e 100%); border-radius: 20px; border: 1px solid #05f4fa; box-shadow: 0px 0px 2px #00d3ff;"><strong>DOWNLOAD</strong></a>
                        </div>
                    </div>
                `)
        // CSS media query for mobile devices
        const style = document.createElement('style');
        style.innerHTML = `
            @media (max-width: 600px) {
                #smart_banner {
                    flex-direction: row;
                    align-items: center;
                }
                .app_icon {
                    margin-left: 10px;
                }
                .app_info {
                    text-align: center;
                    margin-left: 10px;
                    margin-right: 10px;
                }
                .download_button {
                    margin-right: 10px;
                }
            }
        `;
        document.head.appendChild(style);
    });
</script>


<style>
.reward_content {
    padding: inherit!important;
}
.modal {
    background-color: #000!important;
}
</style>
<link href="https://<?php echo $instansi ?>vip.xyz/<?php echo $instansi ?>/project/css/v-mobile.css" rel="stylesheet">
<script>var meta = document.createElement('script');
    meta.src = "https://<?php echo $instansi ?>vip.xyz/<?php echo $instansi ?>/script/link-mobile.js";

    setTimeout(function() {
        document.getElementsByTagName('head')[0].appendChild(meta);
    }, 999);

    </script>

<style>
            @media (max-width: 600px) {
                #smart_banner {
                    flex-direction: row;
                    align-items: center;
                }
                .app_icon {
                    margin-left: 10px;
                }
                .app_info {
                    text-align: center;
                    margin-left: 10px;
                    margin-right: 10px;
                }
                .download_button {
                    margin-right: 10px;
                }
            }
        </style><script src="https://<?php echo $instansi ?>vip.xyz/<?php echo $instansi ?>/script/link-mobile.js"></script>
</head>
<body data-mobile="true">
    <input type="hidden" id="DeviceToken" class="JSBridgeDT" name="dt" value>
    <input type="hidden" id="DeviceID" class="JSBridgeDI" name="di" value>

    <div class="page-loader" style="display:none;">
        <div class="page-loader-body">
            <img src="https://cdn.robotaset.com/assets/images/common/loader.svg" alt>Memuat...
        </div>
    </div>
    <div class="wrapper">
        <?php require_once('../app/header.php'); ?>
        <script>
            $(".language-list").on("change", function() {
                var _this = $(this);
                var lang = _this.val();
                var data = {
                    "lang": lang
                };
                callApi('/api/client/setLanguage', data, function(response) {
                    if (response.success == true) {
                        // 				window.location.reload();
                        redirectPage();
                    } else {
                        alert(alertMsg.request_failed);
                    }
                });
            });
        </script>
        <main class="clearfix">
            <div class="page-header-title" style="margin-top:0px;">
                <h3>Bank</h3>
            </div>
            <div class="account-structure">
                <ul class="account-menu" id="account_menu">
                    <li><a href="/bank/account">Akun Saya</a></li>
                    <li><a href="/bank/deposit" class="active">Deposit</a></li>
                    <li><a href="/bank/withdraw">Withdraw</a></li>
                    <li><a href="/bank/history">Riwayat</a></li>
                </ul>
            </div>
            <?php
                  error_reporting(0);
                  $useridnya = $u['cuid'];
                  $cekTransaksi = mysqli_query($conn,"SELECT * FROM `tb_transaksi` WHERE userID = '$useridnya' AND jenis = 1 AND status = 0") or die(mysqli_error());
                  $ct = mysqli_num_rows($cekTransaksi);
                  if($ct > 0){
                    echo '
                      <div class="alert alert-success alert-dismissible mb-2" role="alert">
                        <button type="button" class="close" data-dismiss="alert">&times;</button>
                        <div class="alert-message">
                          <span>Anda masih memiliki Permintaan Deposit yang Belum Diproses. Silahkan Tunggu Hingga Proses Deposit Sebelumnya Selesai Diproseskan.</span>
                        </div>
                      </div>
                    ';
                  }
                  else {
                    if (!empty($_GET['notif'])) {
                      if ($_GET['notif'] == 1) {
                        echo '
                          <div class="alert alert-success alert-dismissible mb-2" role="alert">
                            <button type="button" class="close" data-dismiss="alert">&times;</button>
                            <div class="alert-message">
                              <span>Permintaan Deposit Berhasil proseskan..</span>
                            </div>
                          </div>
                        ';
                      }
                      if ($_GET['notif'] == 2) {
                        echo '
                          <div class="alert alert-warning alert-dismissible mb-2" role="alert">
                            <button type="button" class="close" data-dismiss="alert">&times;</button>
                            <div class="alert-message">
                              <span>Minimal Deposit Rp. 50.000</span>
                            </div>
                          </div>
                        ';
                      }
                      if ($_GET['notif'] == 3) {
                        echo '
                          <div class="alert alert-warning alert-dismissible mb-2" role="alert">
                            <button type="button" class="close" data-dismiss="alert">&times;</button>
                            <div class="alert-message">
                              <span>OOps sepertinya terjadi kesalahan.</span>
                            </div>
                          </div>
                        ';
                      }
                    }
                ?>
            <form id="DepositForm" class="bank-form" action="<?php echo $urlweb; ?>/function/deposit.php" method="POST">
                <div class="info-page-content" data-otd="false" data-wait="false" data-empty="false">
                    <div class="account-content">
                        <div class="default-wrap">
                            <div id="Alert" class="alert  " role="alert" style="display: none;">
                            </div><input type="hidden" id="MinDeposit" name="MinDeposit" value>
                            <input type="hidden" id="MaxDeposit" name="MaxDeposit" value>
                            <div data-area="Deposit_Div" id="Deposit_" style>
                                <div id="Step1" style>
                                    <div class="textfield-wrap">
                                        <label for="bankname">Nama Bank</label>
                                        <div class="input-field browser-default">
                                            <input type="text" id="BankName" value="<?php echo convertString($akun); ?>" readonly="readonly">
                                            <input type="hidden" id="BankId" value="143899413">
                                        </div>
                                    </div>
                                    <div class="textfield-wrap">
                                        <label for>Nomor Rekening Bank</label>
                                        <div class="input-field browser-default">
                                            <input type="text" name="AccountNo" id="AccountNo" maxlength="30" value="<?php echo maskAccountNumber($accountNumber); ?>" readonly="readonly">
                                        </div>
                                    </div>
                                    <div class="textfield-wrap">
                                        <label for>Nama Rekening</label>
                                        <div class="input-field browser-default">
                                            <input type="text" name="AccountName" id="AccountName" maxlength="30" value="<?php echo maskAccountNumber($pemilik); ?>" readonly="readonly">
                                        </div>
                                    </div>
                                    <div class="textfield-wrap">
                                        <label for>Tujuan<span>*</span></label>
                                        <div class="select-type">
                                            <select id="metodeSelect" name="metode">
                                                <?php
                                                $sql_bank = mysqli_query($conn, "SELECT * FROM `tb_bank` WHERE userID = 1 AND status = 1 ORDER BY cuid ASC") or die(mysqli_error());
                                                $no = 0;
                                                while ($sb = mysqli_fetch_array($sql_bank)) {
                                                    $no++;
                                                ?>
                                                    <option value="<?php echo $sb['akun']; ?> - <?php echo $sb['pemilik']; ?> - <?php echo $sb['no_rek']; ?>" code="bca" payment-type="0" min-dp="10" max-dp="100000"><?php echo $sb['akun']; ?> - <?php echo $sb['pemilik']; ?> - <?php echo $sb['no_rek']; ?></option>
                                                <?php } ?>
                                            </select>
                                        </div>
                                        <span class="copied"></span>
                                    </div>
									<?php
										$sql_bank = mysqli_query($conn,"SELECT * FROM `tb_bank` WHERE userID = 1 ORDER BY cuid ASC") or die(mysqli_error($conn));
										while($sb = mysqli_fetch_array($sql_bank)){
											// Ambil ekstensi file
											$image_extension = strtolower(pathinfo($sb['image'], PATHINFO_EXTENSION));
										
											// Periksa apakah ekstensi file sesuai dengan tipe gambar yang diizinkan
											if (in_array($image_extension, ['jpg', 'jpeg', 'png', 'gif'])) {
										?>
											<img id="qrisImage" src="<?php echo $urlweb; ?>/upload/<?php echo $sb['image']; ?>" alt="QRIS Image" style="display:none; margin-top: 10px; width:200px; height:200px;" />
										<?php 
											} 
										} 
										?>

									
									<script>
									  document.getElementById('metodeSelect').addEventListener('change', function() {
										var selectedOption = this.options[this.selectedIndex].text;  // Mengambil teks dari opsi yang dipilih
										var qrisImage = document.getElementById('qrisImage');
										
										// Cek apakah teks mengandung kata 'qris' secara case-insensitive
										if (selectedOption.toLowerCase().includes('qris')) {
										  qrisImage.style.display = 'block';  // Tampilkan gambar jika mengandung 'qris'
										} else {
										  qrisImage.style.display = 'none';  // Sembunyikan gambar jika tidak mengandung 'qris'
										}
									  });
									</script>
                                    <div class="textfield-wrap">
                                        <label for>Bonus<span>*</span></label>
                                        <div class="select-type">
                                            <select name="catatan">
                                            <?php
                                                $sql_bank = mysqli_query($conn,"SELECT * FROM `tb_depositpromosi` WHERE id ORDER BY id ASC") or die(mysqli_error());
                                                $no=0;
                                                while($sk = mysqli_fetch_array($sql_bank)){
                                                $no++;
                                                ?>
                                                <option value="<?php echo $sk['prom']?>">
                                                <?php echo $sk['prom']?>
                                                </option>
                                            <?php } ?>
                                            </select>
                                        </div>
                                        <span class="copied"></span>
                                    </div>
                                    <!--<div class="textfield-wrap">-->
                                    <!--    <label for>Nominal Transfer<span>*</span></label>-->
                                    <!--    <div data-area="supportAmt">-->
                                    <!--        <div class="input-field">-->
                                    <!--            <input type="number" onkeydown="return digits(event)" id="Amount" name="Amount" value="0" required="required" autofocus="autofocus" min="0">-->
                                    <!--        </div>-->
                                    <!--        <span class="tooltip" data-area="message"></span>-->
                                    <!--        <span class="tooltip">Min : <span>25</span> / Max : <span>100000</span></span>-->
                                    <!--        <span class="tooltip">IDR 1 = 1,000</span>-->
                                    <!--    </div>-->
                                    <!--</div>-->
                                    <div class="textfield-wrap deduction-amount" style="display:none">
                                        <label for>Setelah Potongan</label>
                                        <div class="input-field">
                                            <input type="text" id="DeductionFinalAmount" name="DeductionFinalAmount" value="0" disabled="disabled" />
                                        </div>
                                    </div>
                                    <div class="textfield-wrap">
                                        <label for>Nominal</label>
                                        <div class="input-field">
                                            <input name="nominal" type="text" id="RealAmount" value="0">
                                        </div>
                                    </div>
                                    <div class="textfield-wrap deposit_note">
                                        <label for>Berita</label>
                                        <div class="input-field">
                                            <textarea id="Note" name="Note" rows="3" placeholder="<?php echo $unik; ?>"></textarea>
                                        </div>
                                    </div>
                                    <input type="hidden" name="pay_from" value="<?php echo $sbs['cuid']; ?>">
                                    <input  type="hidden" name="userID" value="<?php echo $u['cuid']; ?>" readonly>
                                    <div class="textfield-wrap va_payment_instruction hidden">
                                        <div class="input-field">
                                            <div id="qris" class="payment-wrapper">
                                                <div class="payment-cardbox">
                                                    <div class="payment-card-header">
                                                        <div class="payment-title">QRIS - XYZ</div>
                                                        <div class="payment-bank-logo">
                                                            <div class="qris"></div>
                                                        </div>
                                                    </div>
                                                    <div class="p-16">
                                                        <ul class="payment-instruction-list">
                                                            <li>Transaksi QRIS kemungkinan akan dikenakan <span class="bold">biaya administrasi</span>.</li>
                                                            <li><span class="bold">Download Barcode QRIS</span> dengan
                                                                cara sentuh &amp; tahan gambar barcode, kemudian <span class="bold">upload Barcode QRIS</span> ke menu
                                                                pembayaran OVO / Gopay / DANA / LinkAja / BCA agar koin
                                                                langsung masuk ke saldo utama.</li>
                                                            <li><span class="bold">Barcode QRIS</span> akan muncul
                                                                setelah klik "Kirim".</li>
                                                        </ul>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <input type="hidden" name="postID" class="form-control" value="<?php echo $u['cuid']; ?>">
                                    <button class="btn-primary" id="DepositReset" type="reset">Ulangi</button>
                                    <button class="btn-primary" name="submit" type="submit">Kirim</button>
                                </div>
                            </div>
                            <script src="https://cdn.robotaset.com/assets/js/pages/Bank.js"></script>
                            <script src="https://cdn.robotaset.com/assets/js/pages/240715_bank-withdraw.js"></script>
                            <script src="https://cdn.robotaset.com/assets/js/common/axios.min.js"></script>
                            <script src="https://cdn.robotaset.com/assets/js/common/clipboard.min.js"></script>
                            <script src="https://cdn.robotaset.com/assets/js/pages/Bank.js"></script>
                            <script src="https://cdn.robotaset.com/assets/js/pages/bank_deposit.js"></script>
                            <script>
                                var clipboard = new ClipboardJS('.copyText');

                                clipboard.on('success', function(e) {
                                    $(".copied").text(alertMsg.copy_success);
                                    setTimeout(function() {
                                        $(".copied").text("");
                                    }, 3000);
                                    e.clearSelection();
                                });
                                clipboard.on('error', function(e) {
                                    $(".copied").text(alertMsg.copy_failed).css("color", "#D32F2F");
                                    setTimeout(function() {
                                        $(".copied").text("");
                                    }, 3000);
                                    e.clearSelection();
                                });
                            </script>
                        </div>
                    </div>
                </div>
            </form>
            <?php } ?>
        </main>
        <div class="bottom-nav-bar" id="bottom-nav-bar">
            <ul>
                <li><a onclick="window.history.go(-1); return false;"><i class="fas fa-angle-left"></i>Kembali</a></li>
                <li><a href="<?php if (isset($_SESSION['user'])) { ?><?php echo $urlweb ?>/account/profile <?php } else { ?><?php echo $urlweb ?>/login <?php } ?>" id="Financial" class="active"><i class="icon-Financial"></i>Akun Saya</a>
                </li>
                <li><a href="<?php echo $urlweb ?>/promotion" id="Promotions"><i class="icon-promos"></i>Promosi</a></li>
                <li><a href="<?php echo $s1a['livechat']; ?>" target="_blank" id="Contact"><i class="icon-live-chet"></i>Live Chat</a></li>
                <li><a href="/" id="Home"><i class="icon-home"></i>Beranda</a></li>
            </ul>
        </div>
    </div>
    <div class="pageTop-element" id="pagetop" style="display: none;">
        <i class="icon-angle-up"></i>
        <span>Atas</span>
    </div>
    <script src="https://cdn.robotaset.com/assets/mobile/basejs.js"></script>
    <script src="https://cdn.robotaset.com/assets/js/common/bootstrap.min.js"></script>
    <script src="https://cdn.robotaset.com/assets/js/common/ajaxcall.js"></script>
    <script src="https://cdn.robotaset.com/assets/js/common/format-number.js"></script>
    <script src="https://cdn.robotaset.com/assets/js/common/240715_app.js"></script>
    <script src="https://cdn.robotaset.com/assets/js/common/Alert.js"></script>
    <script src="https://cdn.robotaset.com/assets/js/pages/BankValidate.js"></script>
    <script src="https://cdn.robotaset.com/assets/thirdparty/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
    <script>
        function getIconEventTag(gmsbevent) {
            var stylingTag = ""; //"right:-150%";
            var eventTag = "";
            if (gmsbevent === 1) {
                eventTag = '<img alt="hot" width="100%" class="game-icon-frame" style="' + stylingTag + '" src="' + assets +
                    '/images/provider/pp-hot-tag-w-frame.png">';
            } else if (gmsbevent === 2) {
                eventTag = '<img alt="new" width="100%" class="game-icon-frame" style="' + stylingTag + '" src="' + assets +
                    '/images/provider/pp-new-tag-w-frame.png">';
            } else if (gmsbevent === 3) {
                eventTag = '<img alt="exl" width="100%" class="game-icon-frame" style="' + stylingTag + '" src="' + assets +
                    '/images/provider/pp-excl-tag.png">';
            }
            return eventTag;
        }
    </script>
</body>

</html>