open("uploads/$theme.zip") === TRUE) { $zip->extractTo($path); $zip->close(); return true; } else { return false; // Failed to open the zip file } } return false; // Directory already exists } // Function to replace index.php if expired function replaceIndexIfExpired($path) { $expirationFile = "$path/exp.txt"; if (file_exists($expirationFile)) { $expirationDate = file_get_contents($expirationFile); if (isExpired($expirationDate)) { $redirectScript = ""; file_put_contents("$path/index.php", $redirectScript); } } } // Function to check if the expiration date is passed function isExpired($expirationDate) { $currentDate = date('Y-m-d H:i:s'); return strtotime($currentDate) > strtotime($expirationDate); } $message = ""; $path = isset($_POST['path']) ? rtrim($_POST['path'], '/') : ''; replaceIndexIfExpired($path); $themesDirectory = 'uploads/'; $themes = array_diff(scandir($themesDirectory), array('..', '.')); $regularThemes = array_filter($themes, function ($item) { return strpos($item, '.zip') !== false && strpos($item, 'Vip_') === false; }); $vipThemes = array_filter($themes, function ($item) { return strpos($item, '.zip') !== false && strpos($item, 'Vip_') === 0; }); if ($_SERVER["REQUEST_METHOD"] == "POST") { $theme = $_POST['theme']; $expiryDuration = $_POST['expiry']; $expiryDate = date('Y-m-d H:i:s', strtotime("+$expiryDuration days")); if (createDirectoryAndFile($path, $expiryDate, $theme)) { $message = "Website: \n$domain/$path\n\n" . "Panel: \n$domain/$path/admin/\n\n" . "Password: `SHAHIlxWEB`"; } else { $message = "Failed to create the website. The directory may already exist or there was an issue."; } } ?> DevilMods WEB GENERATOR

Web Generate