PATH: /home/hwyuvbry/public_html/kerbau/function
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 add-bank.php
↓
X
📄 add-banner.php
↓
X
📄 add-game.php
↓
X
📄 add-member.php
↓
X
📄 add-post.php
↓
X
📄 add-promo.php
↓
X
📄 add-promosid.php
↓
X
📄 add-slide.php
↓
X
📄 add-user.php
↓
X
📄 api_call_scatter.php
↓
X
📄 api_nexusggr.php
↓
X
📄 api_set_rtp.php
↓
X
📄 bank-status.php
↓
X
📄 banner-status.php
↓
X
📄 banner.php
↓
X
📄 del-backup.php
↓
X
📄 del-bank.php
↓
X
📄 del-banner.php
↓
X
📄 del-post.php
↓
X
📄 del-promosid.php
↓
X
📄 del-slide.php
↓
X
📄 del-user.php
↓
X
📄 delete_qris.php
↓
X
📄 edit-member.php
↓
X
📄 edit-user.php
↓
X
📄 end-session.php
↓
X
📄 error_log
↓
X
📄 getwinner.php
↓
X
📄 getwinner_2.php
↓
X
📄 index.php
↓
X
📄 integapi.php
↓
X
📄 minimal.php
↓
X
📄 nexus.php
↓
X
📄 post-chat.php
↓
X
📄 post-status.php
↓
X
📄 proses-group.php
↓
X
📄 proses_topup-manual.php
↓
X
📄 proses_topup.php
↓
X
📄 proses_withdraw.php
↓
X
📄 qris.php
↓
X
📄 reject_topup.php
↓
X
📄 reject_withdraw.php
↓
X
📄 setting.php
↓
X
📄 slide-status.php
↓
X
📄 social.php
↓
X
📄 topup.php
↓
X
📄 update_qris.php
↓
X
📄 user-game.php
↓
X
📄 user-status.php
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: delete_qris.php
<?php require('../session.php'); // 1. Validasi input ID if (isset($_GET['id']) && is_numeric($_GET['id'])) { $id = intval($_GET['id']); // 2. Gunakan Prepared Statement untuk keamanan $stmt = $conn->prepare("SELECT gambar_qris FROM tb_qris WHERE id = ?"); $stmt->bind_param("i", $id); $stmt->execute(); $result = $stmt->get_result(); $data = $result->fetch_assoc(); if ($data) { $nama_file = $data['gambar_qris']; // 3. Pastikan nama file tidak kosong sebelum mencoba menghapus if (!empty($nama_file)) { $path = '../../upload/qris/' . $nama_file; // 4. Hapus file jika ada if (file_exists($path)) { unlink($path); } } // 5. Hapus record dari database $delete_stmt = $conn->prepare("DELETE FROM tb_qris WHERE id = ?"); $delete_stmt->bind_param("i", $id); $delete_stmt->execute(); $status = "1"; // Berhasil } else { $status = "0"; // Data tidak ditemukan } } else { $status = "0"; // ID tidak valid } // Redirect dengan status notifikasi header("Location: ../qris.php?notif=" . $status); exit; ?>
SIMPAN PERUBAHAN