diff --git a/.gitignore b/.gitignore index 683cde9..ee3f642 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,8 @@ marketing/ firmware/ log/ assets/images/products/ -settings/config_redirector.php +settings/config.php settings/settings.php variable_scan.php -settings/veliti/config_redirector.php settings/veliti/settings.php +settings/veliti/veliti_config.php diff --git a/login.php b/login.php index 22dc620..8c3ec71 100644 --- a/login.php +++ b/login.php @@ -1,4 +1,6 @@ -= 3) { + // Return the second-to-last and third-to-last parts + return $parts[$count - 2]; + } + // For hostnames with just domain and TLD (2 parts) + else if ($count == 2) { + // Return just the domain part (without the TLD) + return $parts[0]; + } + // If it's a single part hostname + else { + return $hostname; + } +} + +$domain = getDomain($_SERVER['SERVER_NAME']); +$config_location = ((file_exists(dirname(__FILE__).'/'.$domain.'/'.$domain.'_config.php')) ? dirname(__FILE__).'/'.$domain.'/'.$domain.'_config.php' : dirname(__FILE__).'/config.php'); + +include $config_location; +?> \ No newline at end of file diff --git a/settings/veliti/config.php b/settings/veliti/config.php deleted file mode 100644 index 55e0b74..0000000 --- a/settings/veliti/config.php +++ /dev/null @@ -1,55 +0,0 @@ -