diff --git a/api/v1/authorization.php b/api/v1/authorization.php
index f21c28c..f728739 100644
--- a/api/v1/authorization.php
+++ b/api/v1/authorization.php
@@ -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;
diff --git a/api/v1/post/profile.php b/api/v1/post/profile.php
index 03de6ab..27215c2 100644
--- a/api/v1/post/profile.php
+++ b/api/v1/post/profile.php
@@ -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,'','');
}
}
diff --git a/api/v1/post/users.php b/api/v1/post/users.php
index 998caf7..69d4d4c 100644
--- a/api/v1/post/users.php
+++ b/api/v1/post/users.php
@@ -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
diff --git a/api/v2/authorization.php b/api/v2/authorization.php
index 490b8c1..37395d4 100644
--- a/api/v2/authorization.php
+++ b/api/v2/authorization.php
@@ -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;
diff --git a/api/v2/post/users.php b/api/v2/post/users.php
index 1bb09ef..fba231a 100644
--- a/api/v2/post/users.php
+++ b/api/v2/post/users.php
@@ -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 {
//------------------------------------------
diff --git a/assets/functions.php b/assets/functions.php
index d6e4f4c..65bb611 100644
--- a/assets/functions.php
+++ b/assets/functions.php
@@ -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)){
diff --git a/style/soveliti/.DS_Store b/custom/soveliti/.DS_Store
similarity index 91%
rename from style/soveliti/.DS_Store
rename to custom/soveliti/.DS_Store
index 5008ddf..b787189 100644
Binary files a/style/soveliti/.DS_Store and b/custom/soveliti/.DS_Store differ
diff --git a/custom/soveliti/mail/email_template_firmware.php b/custom/soveliti/mail/email_template_firmware.php
new file mode 100644
index 0000000..6583b6a
--- /dev/null
+++ b/custom/soveliti/mail/email_template_firmware.php
@@ -0,0 +1,99 @@
+
+
+
+
+
+ ' . $subject . '
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ' . $firmware_header . ',
+
+
+ '.$firmware_text.'
+
+
+ '.$firmware_text_closure.'
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ Kind regards,
+
+
+ Service team
+
+ |
+
+
+
+
+
+
+ '.$consent.'
+
+
+ |
+
+
+
+';
\ No newline at end of file
diff --git a/custom/soveliti/mail/email_template_new.php b/custom/soveliti/mail/email_template_new.php
new file mode 100644
index 0000000..8d37c51
--- /dev/null
+++ b/custom/soveliti/mail/email_template_new.php
@@ -0,0 +1,102 @@
+
+
+
+
+
+ ' . $subject . '
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ' . $newuser_header . ',
+
+
+ '.$newuser_text.' '.$newuser_credential_text_1.''.$post_content['username'].'
+
+
+ '.$newuser_credential_text_2.'
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+ ' . $newuser_closure . '
+
+
+ Kind regards,
+
+
+ Service team
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+';
\ No newline at end of file
diff --git a/custom/soveliti/mail/email_template_reset.php b/custom/soveliti/mail/email_template_reset.php
new file mode 100644
index 0000000..d727c07
--- /dev/null
+++ b/custom/soveliti/mail/email_template_reset.php
@@ -0,0 +1,99 @@
+
+
+
+
+
+ ' . $subject . '
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ' . $changeuser_header . ',
+
+
+ '.$changeuser_text.'
+
+
+ '.$changeuser_credential_text_1 .'
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+ ' . $changeuser_closure . '
+
+
+ Kind regards,
+
+
+ Service team
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+';
\ No newline at end of file
diff --git a/custom/soveliti/mail/email_template_software.php b/custom/soveliti/mail/email_template_software.php
new file mode 100644
index 0000000..5584192
--- /dev/null
+++ b/custom/soveliti/mail/email_template_software.php
@@ -0,0 +1,98 @@
+'.software_update_user.' and password '.software_update_pw.' to login';
+$register_user_closure = 'This is a generic account and cannot be changed.';
+
+//------------------------------------------
+// Content Email
+//------------------------------------------
+$subject = $register_user_subject;
+
+$message = '
+
+
+
+
+
+ ' . $subject . '
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ' . $register_user_header . ',
+
+
+ '.$register_user_text.'
+
+
+ '.$register_user_credential_text.'
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+ ' . $register_user_closure . '
+
+
+ Kind regards,
+
+
+ Service team
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+';
\ No newline at end of file
diff --git a/settings/soveliti/settingsmenu.php b/custom/soveliti/settings/settingsmenu.php
similarity index 100%
rename from settings/soveliti/settingsmenu.php
rename to custom/soveliti/settings/settingsmenu.php
diff --git a/settings/soveliti/settingsprofiles.php b/custom/soveliti/settings/settingsprofiles.php
similarity index 100%
rename from settings/soveliti/settingsprofiles.php
rename to custom/soveliti/settings/settingsprofiles.php
diff --git a/custom/soveliti/settings/soveliti_config.php b/custom/soveliti/settings/soveliti_config.php
new file mode 100644
index 0000000..7a55d84
--- /dev/null
+++ b/custom/soveliti/settings/soveliti_config.php
@@ -0,0 +1,55 @@
+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';
\ No newline at end of file
diff --git a/custom/soveliti/style/SoVeLiTi.png b/custom/soveliti/style/SoVeLiTi.png
new file mode 100644
index 0000000..5572acc
Binary files /dev/null and b/custom/soveliti/style/SoVeLiTi.png differ
diff --git a/style/soveliti/VeLiTi-Logo2.png b/custom/soveliti/style/VeLiTi-Logo2.png
similarity index 100%
rename from style/soveliti/VeLiTi-Logo2.png
rename to custom/soveliti/style/VeLiTi-Logo2.png
diff --git a/style/soveliti/VeLiTi.png b/custom/soveliti/style/VeLiTi.png
similarity index 100%
rename from style/soveliti/VeLiTi.png
rename to custom/soveliti/style/VeLiTi.png
diff --git a/style/soveliti/soveliti.css b/custom/soveliti/style/soveliti.css
similarity index 99%
rename from style/soveliti/soveliti.css
rename to custom/soveliti/style/soveliti.css
index 095e662..45c346a 100644
--- a/style/soveliti/soveliti.css
+++ b/custom/soveliti/style/soveliti.css
@@ -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%;
diff --git a/style/soveliti/soveliti_login.css b/custom/soveliti/style/soveliti_login.css
similarity index 100%
rename from style/soveliti/soveliti_login.css
rename to custom/soveliti/style/soveliti_login.css
diff --git a/style/soveliti/soveliti_reset.css b/custom/soveliti/style/soveliti_reset.css
similarity index 100%
rename from style/soveliti/soveliti_reset.css
rename to custom/soveliti/style/soveliti_reset.css
diff --git a/style/soveliti/veliti_intro.png b/custom/soveliti/style/veliti_intro.png
similarity index 100%
rename from style/soveliti/veliti_intro.png
rename to custom/soveliti/style/veliti_intro.png
diff --git a/login.php b/login.php
index db6244f..0e87162 100644
--- a/login.php
+++ b/login.php
@@ -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){
diff --git a/reset.php b/reset.php
index 2f7ad21..8779679 100644
--- a/reset.php
+++ b/reset.php
@@ -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 = '';
diff --git a/settings/config_redirector.php b/settings/config_redirector.php
index 2681fd8..b5a86bc 100644
--- a/settings/config_redirector.php
+++ b/settings/config_redirector.php
@@ -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;
?>
\ No newline at end of file
diff --git a/settings/settings_redirector.php b/settings/settings_redirector.php
index 30303df..124df62 100644
--- a/settings/settings_redirector.php
+++ b/settings/settings_redirector.php
@@ -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;
?>
\ No newline at end of file