PATH: /home/hwyuvbry/dear.waroenkhoki123.web.id/topadmin
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 .htaccess
↓
X
📄 Saldorespon.json
↓
X
📄 anggota.php
↓
X
📁 assets/
X
📄 bonus.php
↓
X
📄 bonus_floating.php
↓
X
📄 bukti_jp.php
↓
X
📄 bukti_jp.php#
↓
X
📄 check_data_changes.php
↓
X
📄 dasbor.php
↓
X
📄 deposit.php
↓
X
📄 error_log
↓
X
📄 footer.php
↓
X
📄 ikon_mengambang.php
↓
X
📄 import_games.php
↓
X
📄 index.php
↓
X
📄 keluar.php
↓
X
📄 kyc.php
↓
X
📄 masuk.php
↓
X
📄 masuk.php##
↓
X
📄 masuk_step_1.php
↓
X
📄 navbar.php
↓
X
📄 pemberitahuan.php
↓
X
📄 pengaturan.php
↓
X
📄 pengaturan.php#
↓
X
📄 popup.php
↓
X
📄 profil.php
↓
X
📄 promosi.php
↓
X
📄 refferal.php
↓
X
📄 rekening.php
↓
X
📄 saldo.php
↓
X
📄 saldobckup.php
↓
X
📄 sidebar.php
↓
X
📄 staff.php
↓
X
📄 tambah_anggota.php
↓
X
📄 tambah_bonus.php
↓
X
📄 tambah_bukti_jp.php
↓
X
📄 tambah_ikon_mengambang.php
↓
X
📄 tambah_promosi.php
↓
X
📄 tambah_rekening.php
↓
X
📄 tambah_rekening.php#
↓
X
📄 tambah_staff.php
↓
X
📄 test.php
↓
X
📄 ubah_anggota.php
↓
X
📄 ubah_bonus.php
↓
X
📄 ubah_bukti_jp.php
↓
X
📄 ubah_deposit.php
↓
X
📄 ubah_ikon_mengambang.php
↓
X
📄 ubah_kyc.php
↓
X
📄 ubah_promosi.php
↓
X
📄 ubah_rekening.php
↓
X
📄 ubah_saldo.php
↓
X
📄 ubah_staff.php
↓
X
📄 ubah_withdraw.php
↓
X
📄 verifikasi.php
↓
X
📄 wd.txt
↓
X
📄 withdraw.php
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: ubah_withdraw.php
<?php include_once '../koneksi.php'; include_once '../classes/diamond-telo.php'; include_once '../classes/APICONFIG.php'; if (!isset($_SESSION['kode_admin'])) { echo '<script> alert("Terjadi kesalahan, harap masuk kembali!"); window.location.replace("' . $alamat_admin . 'keluar.php"); </script>'; exit(); } if (isset($_GET['id_withdraw'])) { $id_withdraw = $_GET['id_withdraw']; $withdraw = mysqli_query($koneksi, "SELECT * FROM withdraw WHERE id_withdraw = '$id_withdraw'"); $data_withdraw = mysqli_fetch_array($withdraw); if (!$data_withdraw) { echo '<script>alert("Data withdraw tidak ditemukan!"); window.location.replace("' . $alamat_admin . 'withdraw");</script>'; exit(); } $id_anggota_withdraw = $data_withdraw['id_anggota_withdraw']; $jumlah_withdraw = $data_withdraw['jumlah_withdraw']; $status_withdraw = $data_withdraw['status_withdraw']; $anggota = mysqli_query($koneksi, "SELECT nama_pengguna_anggota FROM anggota WHERE id_anggota = '$id_anggota_withdraw'"); $data_anggota = mysqli_fetch_array($anggota); $nama_pengguna = $data_anggota['nama_pengguna_anggota']; } else { echo '<script> alert("Pilih withdraw yang ingin diubah!"); window.location.replace("' . $alamat_admin . 'withdraw"); </script>'; exit(); } if (isset($_POST['ubah_data'])) { $status_withdraw_2 = $_POST['status_withdraw']; if ($status_withdraw_2 == "disetujui") { $postData = [ "method" => "user_withdraw", "agent_code" => AGENT_CODE, "agent_token" => AGENT_TOKEN, "user_code" => $nama_pengguna, "amount" => floatval($jumlah_withdraw) ]; // Inisialisasi cURL $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, API_BASE_URL); // Hanya base URL tanpa tambahan /withdraw curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postData)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Content-Type: application/json" ]); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $apiResponse = json_decode($response, true); if ($httpCode == 200 && isset($apiResponse['status']) && $apiResponse['status'] == 1) { $ubah_data = mysqli_query($koneksi, "UPDATE withdraw SET status_withdraw = '$status_withdraw_2' WHERE id_withdraw = '$id_withdraw'"); if ($ubah_data) { echo '<script> alert("Withdraw berhasil diproses."); window.location.replace("' . $alamat_admin . 'withdraw"); </script>'; } else { echo "Gagal memperbarui database. Error: " . mysqli_error($koneksi); } } else { echo "Gagal memproses withdraw melalui API. Pesan: " . ($apiResponse['message'] ?? "Tidak diketahui"); } } else { $ubah_data = mysqli_query($koneksi, "UPDATE withdraw SET status_withdraw = '$status_withdraw_2' WHERE id_withdraw = '$id_withdraw'"); if ($ubah_data) { echo '<script> alert("Berhasil ubah data."); window.location.replace("' . $alamat_admin . 'withdraw"); </script>'; } else { echo "Gagal memperbarui database. Error: " . mysqli_error($koneksi); } } } elseif (isset($_POST['hapus_data'])) { $hapus_data = mysqli_query($koneksi, "DELETE FROM withdraw WHERE id_withdraw = '$id_withdraw'"); if ($hapus_data) { echo '<script> alert("Berhasil hapus data."); window.location.replace("' . $alamat_admin . 'withdraw"); </script>'; } else { echo "Gagal menghapus data. Error: " . mysqli_error($koneksi); } } ?> <div class="container-xxl flex-grow-1 container-p-y"> <div class="row gy-4 mb-4"> <div class="col-md-6"> <div class="fw-bold fs-4 text-center text-md-start">Withdraw</div> </div> <div class="col-md-6"> <div class="text-center text-md-end"> <a href="<?php echo $alamat_admin.'withdraw'; ?>" class="btn btn-sm btn-primary waves-effect waves-light"> <span class="tf-icons mdi mdi-chevron-double-left me-1"></span> Kembali </a> </div> </div> </div> <div class="card mb-4"> <h5 class="card-header">Ubah Data Withdraw</h5> <form method="post" class="card-body"> <div class="row g-3"> <div class="col-md-6"> <div class="form-floating form-floating-outline"> <input type="text" class="form-control" value="<?php echo $jumlah_withdraw; ?>" readonly disabled> <label>Jumlah</label> </div> </div> <div class="col-md-6"> <div class="form-floating form-floating-outline mb-4"> <?php if ($status_withdraw == "diproses") { ?> <select name="status_withdraw" class="form-select select2" required> <?php } else { ?> <select name="status_withdraw" class="form-select select2" required disabled> <?php } if ($status_withdraw == "diproses") { ?> <option value="diproses" selected>Diproses</option> <option value="dibatalkan">Dibatalkan</option> <option value="disetujui">Disetujui</option> <?php } else if ($status_withdraw == "dibatalkan") { ?> <option value="dibatalkan" selected>Dibatalkan</option> <option value="diproses">Diproses</option> <option value="disetujui">Disetujui</option> <?php } else if ($status_withdraw == "disetujui") { ?> <option value="disetujui" selected>Disetujui</option> <option value="dibatalkan">Dibatalkan</option> <option value="diproses">Diproses</option> <?php } ?> </select> <label>Status</label> </div> </div> </div> <div class="pt-4 text-end"> <button type="button" class="btn btn-danger waves-effect waves-light me-sm-3 me-1" data-bs-toggle="modal" data-bs-target="#hapus_data"> <span class="tf-icons mdi mdi-delete me-1"></span> Hapus </button> <button type="submit" name="ubah_data" class="btn btn-primary waves-effect waves-light"> <span class="tf-icons mdi mdi-content-save me-1"></span> Simpan </button> </div> </form> </div> </div> <!-- Modal Hapus Data --> <div class="modal fade" id="hapus_data" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h1 class="modal-title fs-5">Hapus Data</h1> <button type="button" class="btn-close" data-bs-dismiss="modal"></button> </div> <form method="post"> <div class="modal-body"> Yakin ingin menghapus data ini? </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Batal</button> <button type="submit" name="hapus_data" class="btn btn-danger">Hapus</button> </div> </form> </div> </div> </div>
SIMPAN PERUBAHAN