PATH: //proc/self/cwd/function
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 deposit.php
↓
X
📄 deposit_asli.php
↓
X
📄 deposit_qris.php
↓
X
📄 edit-user.php
↓
X
📄 error_log
↓
X
📄 index.php
↓
X
📄 konfirmasi.php
↓
X
📄 password.php
↓
X
📄 post-chat.php
↓
X
📄 post-reg.php
↓
X
📄 reset-proses.php
↓
X
📄 session.php
↓
X
📄 step-1.php
↓
X
📄 taruhan4d.php
↓
X
📄 taruhancb.php
↓
X
📄 taruhancb2d.php
↓
X
📄 taruhancj.php
↓
X
📄 taruhancn.php
↓
X
📄 taruhandasar.php
↓
X
📄 taruhankembang.php
↓
X
📄 taruhanshio.php
↓
X
📄 taruhansilang.php
↓
X
📄 taruhantengah.php
↓
X
📄 transferBalanceBack.php
↓
X
📄 upload.php
↓
X
📄 withdraw.php
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: withdraw.php
<?php require_once('session.php'); require_once('../classes/class.nexusggr.php'); // API $currentPass = $u['pass']; $metode = $_POST['metode']; $nominal = preg_replace('/[^0-9]/', '', $_POST['nominal']); $usersID = $_POST['userID']; $password = mysqli_real_escape_string($conn, $_POST['password']); $nominal = (int)$nominal; /* ========================= AMBIL MINIMAL WITHDRAW ========================= */ $getMinimal = mysqli_query($conn,"SELECT minimal_wd FROM tb_minimal LIMIT 1"); $gm = mysqli_fetch_assoc($getMinimal); $minimal_wd = $gm['minimal_wd'] ?? 10000; /* ========================= DATA BANK USER ========================= */ $getBank = mysqli_query($conn,"SELECT * FROM tb_bank WHERE userID='$usersID' LIMIT 1"); $gb = mysqli_fetch_assoc($getBank); $catatan = $gb['akun'].' '.$gb['no_rek'].' a/n '.$gb['pemilik']; /* ========================= CEK SALDO USER ========================= */ $cekBalance = mysqli_query($conn,"SELECT active FROM tb_balance WHERE userID='$usersID'"); $cb = mysqli_fetch_assoc($cekBalance); $saldoAktif = (int)($cb['active'] ?? 0); /* ========================= GENERATE TRANSAKSI ========================= */ $kode_unik = substr(str_shuffle("1234567890"),0,3); $kd_transaksi = date('YmdHis').$kode_unik; $created_date = date('Y-m-d H:i:s'); /* ========================= VALIDASI PASSWORD ========================= */ if(!password_verify($password,$currentPass)){ header('Location:../m/withdraw.php?notif=3'); exit(); } /* ========================= VALIDASI MINIMAL WD ========================= */ if($nominal < $minimal_wd){ header("Location:../m/withdraw.php?notif=minimal"); exit(); } /* ========================= CEK SALDO CUKUP ========================= */ if($saldoAktif < $nominal){ header('Location:../m/withdraw.php?notif=4'); exit(); } /* ========================= CEK PENDING WD ========================= */ $cekPending = mysqli_query($conn," SELECT cuid FROM tb_transaksi WHERE jenis=2 AND userID='$usersID' AND status=0 "); if(mysqli_num_rows($cekPending) > 0){ header('Location:../m/withdraw.php?notif=5'); exit(); } /* ========================= AMBIL USERNAME API ========================= */ $getU = mysqli_query($conn,"SELECT user FROM tb_user WHERE cuid='$usersID'"); $gu = mysqli_fetch_assoc($getU); $username = $gu['user']; /* ========================= REQUEST API WITHDRAW ========================= */ $hasil = $FLASHERDEV->user_withdraw($username,$nominal); $statusAPI = strtoupper($hasil['msg'] ?? 'FAILED'); if($statusAPI !== 'SUCCESS'){ header('Location:../m/withdraw.php?notif=6'); exit(); } /* ========================= SIMPAN TRANSAKSI ========================= */ mysqli_query($conn," INSERT INTO tb_transaksi (kd_transaksi,date,transaksi,total,saldo,note,gameid,providerID,jenis,metode,pay_from,userID,status) VALUES ('$kd_transaksi','$created_date','Penarikan Dana','$nominal',0,'$catatan','','0','2','$metode','0','$usersID',0) "); /* ========================= UPDATE SALDO USER ========================= */ mysqli_query($conn," UPDATE tb_balance SET active = active - $nominal, pending = pending + $nominal WHERE userID='$usersID' "); /* ========================= SUKSES ========================= */ header('Location:../m/withdraw.php?notif=1'); exit(); ?>
SIMPAN PERUBAHAN