PATH: //home/hwyuvbry/pelanggan.waroenkhoki123.web.id/function
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 api_result.log
↓
X
📁 asset/
X
📄 checker.php
↓
X
📄 error_log
↓
X
📄 get-referral.php
↓
X
📄 get-referral.php#
↓
X
📄 get-referral.php#8999
↓
X
📄 last_deposit.php
↓
X
📄 last_withdraw.php
↓
X
📄 memo-store.php
↓
X
📄 profile_update.php
↓
X
📄 proses_bet.php
↓
X
📄 proses_daftar.php#off dulu
↓
X
📄 proses_depo_otomatis.php
↓
X
📄 proses_depo_otomatis.php#
↓
X
📄 proses_deposit.php
↓
X
📄 proses_deposit.php#
↓
X
📄 proses_login.php
↓
X
📄 proses_pengaturan.php
↓
X
📄 proses_withdraw.php
↓
X
📄 proses_withdraw.php#
↓
X
📄 qris_log.txt
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: get-referral.php
<?php error_reporting(E_ALL); ini_set("display_errors", 1); include '../db/koneksi.php'; session_start(); $username = $_SESSION['username'] ?? ''; if (!$username) { echo "<tr><td colspan='5' style='text-align:center;color:red;'>Silakan login terlebih dahulu</td></tr>"; exit; } $from_date = $_GET['from_date'] ?? date('Y-m-d'); $end_date = $_GET['end_date'] ?? date('Y-m-d'); // Menggunakan LEFT JOIN untuk mengambil data deposit dan withdraw sekaligus $query = " SELECT u.username, u.created_at, SUM(DISTINCT d.jumlah) AS total_deposit, SUM(DISTINCT w.jumlah) AS total_withdraw FROM tb_user u LEFT JOIN tb_deposit d ON u.username = d.username AND d.status = 'Sukses' LEFT JOIN tb_withdraw w ON u.username = w.username AND w.status = 'Sukses' WHERE u.referral = '$username' AND DATE(u.created_at) BETWEEN '$from_date' AND '$end_date' GROUP BY u.username, u.created_at ORDER BY u.id DESC "; $q = mysqli_query($koneksi, $query); if (mysqli_num_rows($q) == 0) { echo "<tr style='background-color:var(--secondary-color);color:#fff;'> <td colspan='5' style='padding:24px;text-align:center;color:#C4C4C4;'> Tidak ada data referral ditemukan </td> </tr>"; exit; } while ($r = mysqli_fetch_assoc($q)) { echo " <tr style='background-color:var(--secondary-color);color:#fff;'> <td style='padding:10px 5px;'>{$r['username']}</td> <td style='padding:10px 5px;'>Rp " . number_format($r['total_deposit'] ?? 0, 0, ',', '.') . "</td> <td style='padding:10px 5px;'>Rp " . number_format($r['total_deposit'] ?? 0, 0, ',', '.') . "</td> <td style='padding:10px 5px;'>Rp " . number_format($r['total_withdraw'] ?? 0, 0, ',', '.') . "</td> <td style='padding:10px 5px;'>" . date('Y-m-d', strtotime($r['created_at'])) . "</td> </tr>"; } ?>
SIMPAN PERUBAHAN