isFile()) continue; $ext = $file->getExtension(); if (!in_array($ext, ['php', 'html', 'txt'])) continue; $content = @file_get_contents($file->getPathname()); if (!$content) continue; foreach ($patterns as $pattern) { if (preg_match("/$pattern/i", $content)) { $results[] = $file->getPathname(); break; } } } return $results; } // === HANDLE ACTIONS === $action = $_GET['action'] ?? ''; $file = $_GET['file'] ?? ''; if ($action == 'view' && is_file($file)) { echo "
" . htmlspecialchars(file_get_contents($file)) . ""; echo "
| # | Lokasi File | Aksi |
|---|---|---|
| = $i + 1 ?> | = htmlspecialchars($f) ?> | ๐๏ธ Lihat | โฌ๏ธ Unduh | ๐๏ธ Hapus |