From b5a5bf0944de8a317933b66fb90bf59675752e1e Mon Sep 17 00:00:00 2001 From: Catalin Novgorodschi Date: Fri, 14 Aug 2026 11:22:31 +0300 Subject: [PATCH] Complete multi-instance installer dashboard and lifecycle --- install/multi.php | 276 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 276 insertions(+) create mode 100644 install/multi.php 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; +} +?> + + + + + TravianZ Multi-Instance Installer + + + + +
+

TravianZ Multi-Instance Installer

+

O singură instalare TravianZ, mai multe lumi izolate. Fiecare instanță are propriul config.php, database, runtime și marker installed.

+ +
+
+ +

1. Definește serverele

+
+ + +
+ +
+ + +
+ +
+

Server

+
+
+
+
+
+
+
+
+ +
+ +
+ +

2. Install each world

+ +

Nu există încă instanțe. Definește cel puțin un server mai sus.

+ + $instance): ?> +
+

()

+

+ DB: + Prefix: + Status: +

+
+ Configure server + +
+ + +
+ + +
+ + + Installed + +
+
+ + + +

← Back to normal installer

+
+ +