diff --git a/install/multi.php b/install/multi.php new file mode 100644 index 00000000..c3a6bada --- /dev/null +++ b/install/multi.php @@ -0,0 +1,276 @@ + $id, + 'name' => $name, + 'host' => $host, + 'database' => $db, + 'prefix' => $prefix, + 'status' => $newRegistry[$id]['status'] ?? 'defined', + 'created_at' => $newRegistry[$id]['created_at'] ?? date('c'), + ]; + } + + if ($error === '') { + if (!tz_multi_registry_write($registryFile, $newRegistry)) { + $error = 'Nu pot scrie registry.json. Verifica permisiunile directorului instances/.'; + } else { + $registry = $newRegistry; + $message = 'Instanțele au fost definite. Acum configurează fiecare server și pornește pașii de instalare.'; + } + } +} + +$selected = strtolower(trim((string) ($_GET['instance'] ?? ''))); +if ($selected !== '' && !isset($registry[$selected])) { + $selected = ''; +} + +$serverCount = isset($_POST['server_count']) ? max(1, min(100, (int) $_POST['server_count'])) : max(1, count($registry)); +if ($serverCount < 1) { + $serverCount = 1; +} +?> + + +
+ +O singură instalare TravianZ, mai multe lumi izolate. Fiecare instanță are propriul config.php, database, runtime și marker installed.
Nu există încă instanțe. Definește cel puțin un server mai sus.
+ + $instance): ?> ++ DB: =htmlspecialchars($instance['database'], ENT_QUOTES, 'UTF-8')?> + Prefix: =htmlspecialchars($instance['prefix'], ENT_QUOTES, 'UTF-8')?> + Status: =htmlspecialchars($instance['status'] ?? 'defined', ENT_QUOTES, 'UTF-8')?> +
+