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: popup.php
<?php include_once '../koneksi.php'; session_start(); if (!isset($_SESSION['kode_admin'])) { echo ' <script> alert("Terjadi kesalahan, harap masuk kembali!"); window.location.replace("'.$alamat_admin.'keluar.php"); </script>'; exit; } /* ======================== SET PATH FOLDER BENAR ======================== */ // Path absolut server (AMAN) $upload_path = $_SERVER['DOCUMENT_ROOT'] . "/uploads/popup/"; // Path untuk tampilkan gambar di browser $upload_url = "/uploads/popup/"; // Buat folder jika belum ada if (!is_dir($upload_path)) { mkdir($upload_path, 0777, true); } /* ======================== PROSES UPLOAD ======================== */ if (isset($_POST['upload'])) { if ($_FILES['gambar']['error'] == 0) { $nama_file = $_FILES['gambar']['name']; $tmp = $_FILES['gambar']['tmp_name']; $ext = strtolower(pathinfo($nama_file, PATHINFO_EXTENSION)); $allowed = ['jpg','jpeg','png','webp']; if (in_array($ext, $allowed)) { $nama_baru = time().'_'.rand(1000,9999).'.'.$ext; if (move_uploaded_file($tmp, $upload_path.$nama_baru)) { mysqli_query($koneksi, "INSERT INTO tb_popup (gambar) VALUES ('$nama_baru')"); echo "<script>alert('Upload berhasil');window.location='popup';</script>"; exit; } else { echo "Gagal pindahkan file. Cek permission folder."; } } else { echo "Format file tidak didukung!"; } } else { echo "File tidak terkirim!"; } } /* ======================== PROSES HAPUS ======================== */ if (isset($_GET['hapus'])) { $id = intval($_GET['hapus']); $upload_path = "../uploads/popup/"; $query = mysqli_query($koneksi, "SELECT * FROM tb_popup WHERE id='$id'"); $data = mysqli_fetch_array($query); if ($data) { $file = $upload_path . $data['gambar']; if (file_exists($file)) { unlink($file); } mysqli_query($koneksi, "DELETE FROM tb_popup WHERE id='$id'"); } echo "<script> alert('Gambar berhasil dihapus'); window.location='popup'; </script>"; exit; } ?> <div class="container"> <h4>Upload Gambar Popup</h4> <!-- FORM UPLOAD --> <form method="POST" enctype="multipart/form-data"> <div class="form-group mb-3"> <label>Upload Gambar</label> <input type="file" name="gambar" class="form-control" required> </div> <button type="submit" name="upload" class="btn btn-primary"> Upload </button> </form> <hr> <h5>Daftar Popup</h5> <div class="row"> <?php $query = mysqli_query($koneksi, "SELECT * FROM tb_popup ORDER BY id DESC"); while ($data = mysqli_fetch_array($query)) { ?> <div class="col-md-4 mb-4"> <div style="border:1px solid #ddd; padding:10px; text-align:center;"> <img src="<?php echo $upload_url.$data['gambar']; ?>" style="width:100%; height:200px; object-fit:cover; border-radius:8px;"> <br><br> <a href="?halaman=popup&hapus=<?php echo $data['id']; ?>" class="btn btn-danger btn-sm" onclick="return confirm('Yakin ingin hapus gambar ini?')"> Hapus </a> </div> </div> <?php } ?> </div> </div>
SIMPAN PERUBAHAN