CMXX - Multisite config

This commit is contained in:
“VeLiTi”
2025-03-13 12:25:59 +01:00
parent 0d6f75704b
commit 116cdcd745
5 changed files with 42 additions and 60 deletions

View File

@@ -0,0 +1,31 @@
<?php
//=========================================
//REDIRECTOR TO CONFIG FILE BASED ON DOMAIN
//=========================================
function getDomain($hostname) {
// Extract the domain parts
$parts = explode('.', $hostname);
$count = count($parts);
// For hostnames with enough parts to have a subdomain (at least 3 parts)
if ($count >= 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;
?>

View File

@@ -1,55 +0,0 @@
<?php
require 'settingsprofiles.php';
// This will change the title on the website
define('site_name','Customer Portal');
define('site_name_footer','Total Safety Solutions');
// This will change the title on browser TAB
define('site_title','Total Safety Solutions');
//Scriptversion
define('script_version','v1');
//Enable VeLiTi-issue mgt
define('veliti_cim',true);
//Enable VeLiTi-analytics
define('veliti_analytics',false);
//Rewrite rule
define('rewrite_url',true);
define('news','');
//maintenance_mode
define('maintenance_mode_communication',false);
define('maintenance_mode_notification','Notice: Portal not accessible due to maintenance on May 15th between 12.00 - 13.00 CET.');
define('maintenance_mode',false);
define('maintenance_mode_text','System in maintenance');
define('debug',true);
define('debug_id','1');
/*Security*/
// Page security
define('page_security_key','secure_admin_342642');
define('cronjob_number','25');
define('header_security',true);
/* Email */
// The from email that will appear on the customer's order details email
define('mail_from','CustomerPortal');
// Your email
define('email','CustomerPortal@veliti.nl');
//Additional phpmailer-settings
define('email_host_name','veliti.nl');
define('email_reply_to','info@gewoonlekkerspaans.nl');
define('email_outgoing_pw','306yc%X5f');
define('email_outgoing_port','587');
define('email_outgoing_security','ssl');
/*Appearance*/
//Icon
define('icon_image','/assets/images/TSS-logo3.png');
define('color','#005655c2');
define('color_accent','#2FAC66');
define('emaillogo','/assets/images/TSSemail.png');
/*Default Users*/
define('software_update_user','EMP-updater');
define('software_update_pw','EMP-updater');
define('interface_user','interface@test.nl');
define('interface_pw','test1234');