From db392d915df7957ceb8a6448f006ea6ec91b48db Mon Sep 17 00:00:00 2001 From: Tower Date: Thu, 16 Jul 2026 19:20:27 +0200 Subject: [PATCH] change new server ip environment --- BACKEND.code-workspace | 2 +- WEBROOT/controller/DataController.php | 30 ++------------------------ WEBROOT/controller/DatabaseConnect.php | 8 +------ 3 files changed, 4 insertions(+), 36 deletions(-) diff --git a/BACKEND.code-workspace b/BACKEND.code-workspace index c180fe0..269d35d 100644 --- a/BACKEND.code-workspace +++ b/BACKEND.code-workspace @@ -5,7 +5,7 @@ } ], "settings": { - "workbench.colorTheme": "Default Dark Modern", + "workbench.colorTheme": "Dark Modern", "workbench.colorCustomizations": { "activityBar.background": "#ff000075", "activityBar.foreground": "#000000", diff --git a/WEBROOT/controller/DataController.php b/WEBROOT/controller/DataController.php index 6bddc74..4bf980a 100644 --- a/WEBROOT/controller/DataController.php +++ b/WEBROOT/controller/DataController.php @@ -108,13 +108,7 @@ class getSpecificData { } public function getServerIP(): string { - $ServerIP = $_SERVER['SERVER_ADDR'] ?? 'Unbekannt'; - - if (in_array($ServerIP, ['Unbekannt', '0.0.0.0', '127.0.0.1'])) { - return "Lokal"; - } else { - return $ServerIP; - } + return $_SERVER['SERVER_ADDR'] ?? 'Unbekannt'; } public function getClientIP(): string @@ -166,27 +160,7 @@ class getSpecificData { } function getServerNode($ServerIP) { - $nodes = [ - 'node1' => '172.30.0.11', - 'node1' => '172.30.0.21', - - 'node2' => '172.30.0.12', - 'node2' => '172.30.0.22', - - 'node3' => '172.30.0.13', - 'node3' => '172.30.0.23', - - 'node4' => '172.30.0.14', - 'node4' => '172.30.0.24', - 'Lokal' => 'Lokal', - ]; - - foreach ($nodes as $node => $ip) { - if ($ServerIP == $ip) { - return $node; - break; - } - } + return $ServerIP; } function getClientStatus($ClientIP) { diff --git a/WEBROOT/controller/DatabaseConnect.php b/WEBROOT/controller/DatabaseConnect.php index 607f2d0..233cf6a 100644 --- a/WEBROOT/controller/DatabaseConnect.php +++ b/WEBROOT/controller/DatabaseConnect.php @@ -25,15 +25,9 @@ function db_connect() 'password' => 'bBHofurUJWKzPE8Z', 'database' => 'DEV', ], - 'error' => [ - 'hostaddr' => '10.233.1.244', - 'username' => 'error', - 'password' => 'bBHofurUJWKzPE8Z', - 'database' => 'DEV', - ] ]; - $enviroment = 'vpn'; + $enviroment = 'dev'; mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);