CMXX - Custom folder

This commit is contained in:
“VeLiTi”
2025-03-31 15:48:42 +02:00
parent 8e0a21f80b
commit 2245297a7d
26 changed files with 585 additions and 13 deletions

View File

@@ -37,7 +37,8 @@ if ($stmt->rowCount() == 1) {
$stmt = $pdo->prepare($sql);
$stmt->execute([$resetkey,$user_data['id']]);
//STEP 2- Send to user
include_once './assets/mail/email_template_reset.php';
$mail_location = (file_exists($_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_reset.php') ? $_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_reset.php' : './assets/mail/email_template_reset.php');
include_once $mail_location;
send_mail($user_data['email'],$subject,$message,'','');
//STEP 3- Update Login count
$login_attempt = $user_data['login_count'] + 1;

View File

@@ -42,7 +42,8 @@ $owner_user = (($user_data['username'] == $username)? 1 : 0);
$stmt = $pdo->prepare($sql);
$stmt->execute([$resetkey,$username,$id]);
//STEP 3 - Send to user
include_once './assets/mail/email_template_reset.php';
$mail_location = (file_exists($_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_reset.php') ? $_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_reset.php' : './assets/mail/email_template_reset.php');
include_once $mail_location;
send_mail($user_data['email'],$subject,$message,'','');
}
}

View File

@@ -120,7 +120,8 @@ $location_new = (($post_content['location'] != '' && $post_content['location'] !
$stmt = $pdo->prepare($sql);
$stmt->execute([$resetkey,$username,$id]);
//STEP 3 - Send to user
include_once './assets/mail/email_template_reset.php';
$mail_location = (file_exists($_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_reset.php') ? $_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_reset.php' : './assets/mail/email_template_reset.php');
include_once $mail_location;
send_mail($user_data['email'],$subject,$message,'','');
}
@@ -238,7 +239,8 @@ elseif ($command == 'insert' && isAllowed('user',$profile,$permission,'C') === 1
$stmt->execute($execute_input);
//STEP 2- Send to user
include_once './assets/mail/email_template_new.php';
$mail_location = (file_exists($_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_new.php') ? $_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_new.php' : './assets/mail/email_template_new.php');
include_once $mail_location;
send_mail($post_content['email'],$subject,$message,'','');
} else {
//Encrypt results

View File

@@ -38,7 +38,8 @@ if ($stmt->rowCount() == 1) {
$stmt = $pdo->prepare($sql);
$stmt->execute([$resetkey,$user_data['id']]);
//STEP 2- Send to user
include_once './assets/mail/email_template_reset.php';
$mail_location = (file_exists($_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_reset.php') ? $_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_reset.php' : './assets/mail/email_template_reset.php');
include_once $mail_location;
send_mail($user_data['email'],$subject,$message,'','');
//STEP 3- Update Login count
$login_attempt = $user_data['login_count'] + 1;

View File

@@ -119,7 +119,8 @@ $location_new = ((isset($post_content['location']) && $post_content['location']
$stmt = $pdo->prepare($sql);
$stmt->execute([$resetkey,$username,$id]);
//STEP 3 - Send to user
include_once './assets/mail/email_template_reset.php';
$mail_location = (file_exists($_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_reset.php') ? $_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_reset.php' : './assets/mail/email_template_reset.php');
include_once $mail_location;
send_mail($user_data['email'],$subject,$message,'','');
}
@@ -262,7 +263,8 @@ elseif ($command == 'insert' && isAllowed('user',$profile,$permission,'C') === 1
$stmt->execute($execute_input);
//STEP 2- Send to user
include_once './assets/mail/email_template_new.php';
$mail_location = (file_exists($_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_new.php') ? $_SERVER['DOCUMENT_ROOT'].'/custom/'.$domain.'/mail/email_template_new.php' : './assets/mail/email_template_new.php');
include_once $mail_location;
send_mail($post_content['email'],$subject,$message,'','');
} else {
//------------------------------------------

View File

@@ -251,7 +251,7 @@ function template_header($title, $selected = 'assets', $selected_child = 'view')
$admin_links = menu($selected,$selected_child);
$domain = getDomainName($_SERVER['SERVER_NAME']);
$custom_css = (file_exists(dirname(__FILE__,2).'/style/'.$domain.'/'.$domain.'.css') ? './style/'.$domain.'/'.$domain.'.css' : './style/admin.css');
$custom_css = (file_exists(dirname(__FILE__,2).'/custom/'.$domain.'/style/'.$domain.'.css') ? './custom/'.$domain.'/style/'.$domain.'.css' : './style/admin.css');
$user = ucfirst($_SESSION['username']);
if (filter_var($user, FILTER_VALIDATE_EMAIL)){

View File

@@ -0,0 +1,99 @@
<?php
defined($security_key) or exit;
//------------------------------------------
// Content Email
//------------------------------------------
$firmare_subject = 'CustomerPortal - Firmware update available';
$firmware_header = 'Dear customer';
$firmware_text = 'According to our records on or more of your products can benefit from a firmware update.';
$firmware_text_closure = 'For more information please refer to our Customer Portal or contact your supplier.';
$consent = 'unscribe';
//------------------------------------------
// Content Email
//------------------------------------------
$subject = $firmare_subject;
$message = '
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>' . $subject . '</title>
<style>
@media screen and (max-width: 600px) {
.content {
width: 100% !important;
display: block !important;
padding: 10px !important;
}
.header, .body, .footer {
padding: 20px !important;
}
}
</style>
</head>
<body style="font-family: Arial, sans-serif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="padding: 20px;">
<table class="content" width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse; border: 1px solid #cccccc;">
<!-- Header -->
<tr>
<td class="header" style="background-color:#005655; padding: 40px; text-align: center; color: white; font-size: 24px;">
CustomerPortal
</td>
</tr>
<!-- Body -->
<tr>
<td class="body" style="padding: 40px; text-align: left; font-size: 16px; line-height: 1.6;">
' . $firmware_header . ',
<br>
<br>
'.$firmware_text.'
<br>
<br>
'.$firmware_text_closure.'
</td>
</tr>
<!-- Call to action Button -->
<tr>
<td style="padding: 0px 40px 0px 40px; text-align: center;">
<!-- CTA Button -->
<table cellspacing="0" cellpadding="0" style="margin: auto;">
<tr>
<td align="center" style="background-color: #008685; padding: 10px 20px; border-radius: 5px;">
<a href="https://' . $portalURL . '" target="_blank" style="color: #ffffff; text-decoration: none; font-weight: bold;">Goto Portal</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="body" style="padding: 40px; text-align: left; font-size: 16px; line-height: 1.6;">
<br>
Kind regards,
<br>
<br>
Service team
<br>
</td>
</tr>
<!-- Footer -->
<tr>
<td class="footer" style="background: url(\'https://'.$portalURL.emaillogo.'\');background-position: center center;background-repeat:no-repeat;background-size:contain;background-color: #005655; padding: 40px;">
</td>
</tr>
<tr>
<a style="text-decoration: none;font-size: 10px;color: #00bcd4;" href="https://'.$portalURL.'/unscribe.php?email='.$to.'">'.$consent.'</a>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>';

View File

@@ -0,0 +1,102 @@
<?php
defined($security_key) or exit;
//------------------------------------------
// Content Reset Email
//------------------------------------------
$newuser_subject = 'CustomerPortal user created';
$newuser_header = 'Dear CustomerPortal user';
$newuser_text = 'Your administrator has provided access to the CustomerPortal.';
$newuser_credential_text_1 = 'Your account has been created with username ';
$newuser_credential_text_2 = 'Please click the button below to complete your registration.';
$newuser_closure = 'For security reasons this link is only active for 10 minutes.';
//------------------------------------------
// Content Reset Email
//------------------------------------------
$subject = $newuser_subject;
$message = '
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>' . $subject . '</title>
<style>
@media screen and (max-width: 600px) {
.content {
width: 100% !important;
display: block !important;
padding: 10px !important;
}
.header, .body, .footer {
padding: 20px !important;
}
}
</style>
</head>
<body style="font-family: Arial, sans-serif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="padding: 20px;">
<table class="content" width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse; border: 1px solid #cccccc;">
<!-- Header -->
<tr>
<td class="header" style="background-color:#005655; padding: 40px; text-align: center; color: white; font-size: 24px;">
CustomerPortal
</td>
</tr>
<!-- Body -->
<tr>
<td class="body" style="padding: 40px; text-align: left; font-size: 16px; line-height: 1.6;">
' . $newuser_header . ',
<br>
<br>
'.$newuser_text.' '.$newuser_credential_text_1.'<b>'.$post_content['username'].'</b>
<br>
<br>
'.$newuser_credential_text_2.'
</td>
</tr>
<!-- Call to action Button -->
<tr>
<td style="padding: 0px 40px 0px 40px; text-align: center;">
<!-- CTA Button -->
<table cellspacing="0" cellpadding="0" style="margin: auto;">
<tr>
<td align="center" style="background-color: #008685; padding: 10px 20px; border-radius: 5px;">
<a href="https://' . $portalURL . '/reset.php?resetkey='.$resetkey.'" target="_blank" style="color: #ffffff; text-decoration: none; font-weight: bold;">Reset Password</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="body" style="padding: 40px; text-align: left; font-size: 16px; line-height: 1.6;">
' . $newuser_closure . '
<br>
<br>
Kind regards,
<br>
<br>
Service team
<br>
<br>
</td>
</tr>
<!-- Footer -->
<tr>
<td class="footer" style="background: url(\'https://'.$portalURL.emaillogo.'\');background-position: center center;background-repeat:no-repeat;background-size:contain;background-color: #005655; padding: 40px;">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
';

View File

@@ -0,0 +1,99 @@
<?php
defined($security_key) or exit;
//------------------------------------------
// Content Reset Email
//------------------------------------------
$changeuser_subject = 'CustomerPortal - password reset requested';
$changeuser_header = 'Dear CustomerPortal user';
$changeuser_text = 'A password reset has been requested for your account.';
$changeuser_credential_text_1 = 'Please click the button below to reset the password of your CustomerPortal account.';
$changeuser_closure = 'For security reasons this link is only active for 10 minutes.';
//------------------------------------------
// Content Reset Email
//------------------------------------------
$subject = $changeuser_subject;
$message = '
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>' . $subject . '</title>
<style>
@media screen and (max-width: 600px) {
.content {
width: 100% !important;
display: block !important;
padding: 10px !important;
}
.header, .body, .footer {
padding: 20px !important;
}
}
</style>
</head>
<body style="font-family: Arial, sans-serif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="padding: 20px;">
<table class="content" width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse; border: 1px solid #cccccc;">
<!-- Header -->
<tr>
<td class="header" style="background-color:#005655; padding: 40px; text-align: center; color: white; font-size: 24px;">
CustomerPortal
</td>
</tr>
<!-- Body -->
<tr>
<td class="body" style="padding: 40px; text-align: left; font-size: 16px; line-height: 1.6;">
' . $changeuser_header . ',
<br>
<br>
'.$changeuser_text.'
<br>
<br>
'.$changeuser_credential_text_1 .'
</td>
</tr>
<!-- Call to action Button -->
<tr>
<td style="padding: 0px 40px 0px 40px; text-align: center;">
<!-- CTA Button -->
<table cellspacing="0" cellpadding="0" style="margin: auto;">
<tr>
<td align="center" style="background-color: #008685; padding: 10px 20px; border-radius: 5px;">
<a href="https://' . $portalURL . '/reset.php?resetkey='.$resetkey.'" target="_blank" style="color: #ffffff; text-decoration: none; font-weight: bold;">Reset Password</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="body" style="padding: 40px; text-align: left; font-size: 16px; line-height: 1.6;">
' . $changeuser_closure . '
<br>
<br>
Kind regards,
<br>
<br>
Service team
<br>
<br>
</td>
</tr>
<!-- Footer -->
<tr>
<td class="footer" style="background: url(\'https://'.$portalURL.emaillogo.'\');background-position: center center;background-repeat:no-repeat;background-size:contain;background-color: #005655; padding: 40px;">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
';

View File

@@ -0,0 +1,98 @@
<?php
defined($security_key) or exit;
//------------------------------------------
// Content Email
//------------------------------------------
$register_user_subject = 'CustomerPortal - Registration';
$register_user_header = 'Dear customer';
$register_user_text = 'Thanks for your registration. Based on your product registration we herewith provide you access to our online firmware update capability';
$register_user_credential_text = 'To update your product click on the button below and use username <b>'.software_update_user.'</b> and password <b>'.software_update_pw.'</b> to login';
$register_user_closure = 'This is a generic account and cannot be changed.';
//------------------------------------------
// Content Email
//------------------------------------------
$subject = $register_user_subject;
$message = '
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>' . $subject . '</title>
<style>
@media screen and (max-width: 600px) {
.content {
width: 100% !important;
display: block !important;
padding: 10px !important;
}
.header, .body, .footer {
padding: 20px !important;
}
}
</style>
</head>
<body style="font-family: Arial, sans-serif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="padding: 20px;">
<table class="content" width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse; border: 1px solid #cccccc;">
<!-- Header -->
<tr>
<td class="header" style="background-color:#005655; padding: 40px; text-align: center; color: white; font-size: 24px;">
CustomerPortal
</td>
</tr>
<!-- Body -->
<tr>
<td class="body" style="padding: 40px; text-align: left; font-size: 16px; line-height: 1.6;">
' . $register_user_header . ',
<br>
<br>
'.$register_user_text.'
<br>
<br>
'.$register_user_credential_text.'
</td>
</tr>
<!-- Call to action Button -->
<tr>
<td style="padding: 0px 40px 0px 40px; text-align: center;">
<!-- CTA Button -->
<table cellspacing="0" cellpadding="0" style="margin: auto;">
<tr>
<td align="center" style="background-color: #008685; padding: 10px 20px; border-radius: 5px;">
<a href="https://' . $portalURL . '" target="_blank" style="color: #ffffff; text-decoration: none; font-weight: bold;">Goto Portal</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="body" style="padding: 40px; text-align: left; font-size: 16px; line-height: 1.6;">
' . $register_user_closure . '
<br>
<br>
Kind regards,
<br>
<br>
Service team
<br>
</td>
</tr>
<!-- Footer -->
<tr>
<td class="footer" style="background: url(\'https://'.$portalURL.emaillogo.'\');background-position: center center;background-repeat:no-repeat;background-size:contain;background-color: #005655; padding: 40px;">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
';

View File

@@ -0,0 +1,55 @@
<?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',false);
/* 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');

View File

@@ -0,0 +1,112 @@
<?php
//------------------------------------------
//EXCEPTION LIST
//------------------------------------------
$serialnumber_exceptions = array("22050695","22110095");
//------------------------------------------
// Security
//------------------------------------------
$security_key = 'secure_34563$52';
//------------------------------------------
// Base color
//------------------------------------------
$color = '#005655';//'#0b1054';
$color_accent = '#2FAC66'; //'#ececec';
//------------------------------------------
// Database settings
//------------------------------------------
require '/var/www/vhosts/veliti.nl/settings/portalsettings-acc.php';
//------------------------------------------
// Menusetup & settings
//------------------------------------------
require 'settingsmenu.php';
//------------------------------------------
// API BaseUrl
//------------------------------------------
$baseurl = 'https://'.$_SERVER['SERVER_NAME'].'/api.php'; //URL of API
$portalURL = $_SERVER['SERVER_NAME'];
//------------------------------------------
// Equipmentdetails
//------------------------------------------
$servicedate = date("Y-m-d", strtotime("-365 days"));
$warrantydate = date("Y-m-d", strtotime("-365 days"));
$warranty_extended = date("Y-m-d", strtotime("+365 days"));
$date = date('Y-m-d H:i:s');
$curYear = date("Y", time());
$curMonth = date("m", time());
$curQuarter = (int)ceil($curMonth / 3);
$curdateObj = DateTime::createFromFormat('!m', $curMonth);
$curMonth_name = $curdateObj->format('F');
//------------------------------------------
//History Type
//------------------------------------------
$type1 = 'General';
$type2 = 'Customer';
$type3 = 'Service';
$type4 = 'Testing';
$type5 = 'Data';
$type6 = 'Other';
$type7 = 'Internal';
$type8 = 'Ignore';
$type9 = 'Warranty';
$type10 = 'Contract';
$type11 = 'Warranty-Expired';
$type12 = 'Contract-Expired';
$type13 = "Order";
$type14 = "ServiceReport";
$type15 = "SRIncluded";
$type16 = "Notes";
$type17 = "Visual";
$HistoryType_1 = 'Bootloader';
$HistoryType_2 = 'Firmware';
$HistoryType_3 = 'SerialNumber';
$HistoryType_4 = 'Visual_Test';
$HistoryType_5 = 'Maintenance_Test';
$HistoryType_6 = 'Assembly_Test';
$HistoryType_7 = 'ProductNumber';
$HistoryType_8 = 'Visual';
$HistoryType_9 = 'ServiceReport';
//------------------------------------------
//Permissions CRUD
//------------------------------------------
$permission_4 = 'CRUD'; //Admin+
$permission_3 = 'CRUD'; //Admin
$permission_2 = 'CRU'; //SuperUser
$permission_1 = 'CRU'; //CreateUpdate
$permission_0 = 'R'; //Readonly
$permissionlabel1 = 'Permission';
$permission1 = 'Superuser'; #1
$permission2 = 'Create & Update'; #2
$permission3 = 'read-only'; // #3
$permission4 = 'Admin'; //#4
$permission5 = 'Admin+'; // #5
$settingslabel1 = 'profile';
$setting1 = 'firmware'; //Fix
$setting2 = 'service';
$setting3 = 'build'; //Fix
$setting4 = 'distribution';
$setting5 = '';
$setting6 = '';
$setting7 = ''; //Fix
$setting8 = 'interface';
//------------------------------------------
//Partners
//------------------------------------------
$partnertype1 = 'SalesID';
$partnertype2 = 'SoldTo';
$partnertype3 = 'ShipTo';
$partnertype4 = 'Location';
$partnertype5 = 'Section';

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -116,7 +116,7 @@ aside {
}
aside h1 {
background: url("VeLiTi.png");
background: url("SoVeLiTi.png");
background-position: center center;
background-repeat: no-repeat;
background-size: 50%;

View File

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 167 KiB

View File

@@ -44,7 +44,7 @@ if(isset($_SESSION['country_code'])){
//=========================================
$domain = getDomainName($_SERVER['SERVER_NAME']);
$custom_css = (file_exists(dirname(__FILE__).'/style/'.$domain.'/'.$domain.'_login.css') ? './style/'.$domain.'/'.$domain.'_login.css' : './style/admin_login.css');
$custom_css = (file_exists(dirname(__FILE__).'/custom/'.$domain.'/style/'.$domain.'_login.css') ? './custom/'.$domain.'/style/'.$domain.'_login.css' : './style/admin_login.css');
// Check if the user is already logged in, if yes then redirect him to welcome page
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){

View File

@@ -45,7 +45,7 @@ if(isset($_SESSION['country_code'])){
//=========================================
//GET DOMAIN FOR CORRECT STYLING AND SETTINGS
$domain = getDomainName($_SERVER['SERVER_NAME']);
$custom_css = (file_exists(dirname(__FILE__).'/style/'.$domain.'/'.$domain.'_reset.css') ? './style/'.$domain.'/'.$domain.'_reset.css' : './style/admin_reset.css');
$custom_css = (file_exists(dirname(__FILE__).'/custom/'.$domain.'/style/'.$domain.'_reset.css') ? './custom/'.$domain.'/style/'.$domain.'_reset.css' : './style/admin_reset.css');
// Define variables and initialize with empty values
$username = $password = '';

View File

@@ -25,7 +25,7 @@ function getDomain($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');
$config_location = ((file_exists(dirname(__FILE__,2).'/custom/'.$domain.'/settings/'.$domain.'_config.php')) ? dirname(__FILE__,2).'/custom/'.$domain.'/settings/'.$domain.'_config.php' : dirname(__FILE__).'/config.php');
include $config_location;
?>

View File

@@ -22,7 +22,7 @@
$domain = $hostname;
}
$settings_location = ((file_exists(dirname(__FILE__).'/'.$domain.'/'.$domain.'_settings.php')) ? dirname(__FILE__).'/'.$domain.'/'.$domain.'_settings.php' : dirname(__FILE__).'/settings.php');
$settings_location = ((file_exists(dirname(__FILE__,2).'/custom/'.$domain.'/style/'.$domain.'_settings.php')) ? dirname(__FILE__,2).'/custom/'.$domain.'/style/'.$domain.'_settings.php' : dirname(__FILE__).'/settings.php');
include $settings_location;
?>