CMXX - Multisite setup

This commit is contained in:
“VeLiTi”
2025-03-13 12:07:18 +01:00
parent 0b78fa4827
commit 0d6f75704b
26 changed files with 3471 additions and 206 deletions

4
.gitignore vendored
View File

@@ -7,6 +7,8 @@ marketing/
firmware/
log/
assets/images/products/
settings/config.php
settings/config_redirector.php
settings/settings.php
variable_scan.php
settings/veliti/config_redirector.php
settings/veliti/settings.php

View File

@@ -14,7 +14,7 @@ $input = stream_get_contents($post_data_curl);
//------------------------------------------
require_once './assets/functions.php';
include './settings/settings.php';
include './settings/config.php';
include './settings/config_redirector.php';
//------------------------------------------
// Header security - enabled via config

View File

@@ -46,7 +46,7 @@ require dirname(__FILE__).'/mail/Exception.php';
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++
function send_mail($to, $subject, $message, $attachment, $attachment_name){
include_once dirname(__FILE__,2).'/settings/config.php';
include_once dirname(__FILE__,2).'/settings/config_redirector.php';
$mail = new PHPMailer();
$mail->CharSet = 'UTF-8';
@@ -250,6 +250,9 @@ function template_header($title, $selected = 'assets', $selected_child = 'view')
$icon_image = icon_image;
$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');
$user = ucfirst($_SESSION['username']);
if (filter_var($user, FILTER_VALIDATE_EMAIL)){
$user = substr($user, 0, strpos($user, "@"));
@@ -286,7 +289,7 @@ echo <<<EOT
<meta name="viewport" content="width=device-width,minimum-scale=1">
<title>$title</title>
<link rel="icon" type="image/png" href="$icon_image">
<link href="./style/admin.css" rel="stylesheet" type="text/css">
<link href="$custom_css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="./style/leaflet.css" />
<link href="./assets/fontawesome/css/fontawesome.css" rel="stylesheet" />
<link href="./assets/fontawesome/css/brands.css" rel="stylesheet" />
@@ -891,7 +894,7 @@ function getWhereclauselvl2($table_name,$permission,$partner,$method){
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function getProfile($profile, $permission){
include_once dirname(__FILE__,2).'/settings/config.php';
include_once dirname(__FILE__,2).'/settings/config_redirector.php';
if ($profile != ''){
$profile = (defined($profile)) ? constant($profile) : standard_profile;
@@ -2124,7 +2127,7 @@ function uploadrequest($key){
// debuglog
//------------------------------------------
function debuglog($error){
include_once dirname(__FILE__,2).'/settings/config.php';
include_once dirname(__FILE__,2).'/settings/config_redirector.php';
$test = $error.PHP_EOL;
$filelocation = dirname(__FILE__,2).'/log/log_'.date('d').'.txt';
error_log($test, 3, $filelocation);
@@ -3871,7 +3874,6 @@ function createGiftCart($pdo, $orderID, $giftcard_categoryID,$accounthierarchy){
//=======================================
// findGitCommitHash
//=======================================
function findShortGitCommitHash($string) {
// Step 1: Find all hexadecimal sequences
preg_match_all('/[0-9a-f]+/i', $string, $matches);
@@ -3910,3 +3912,46 @@ function compareCommitCodes($stringA, $stringB) {
// Case 4: Neither has commit code
return "";
}
//=======================================
// Function to find the first existing view
//=======================================
function findExistingView($viewsArray, $defaultView, $ignoreViews) {
foreach ($viewsArray as $view) {
$file_to_check = $view.'.php';
if (in_array($view, $ignoreViews)) {
continue;
}
if (file_exists($file_to_check)) {
return $view;
}
}
// If no view exists, return the default
return $defaultView;
}
//=======================================
// Function to find the domain
//=======================================
function getDomainName($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;
}
}

View File

@@ -3,7 +3,7 @@ define('secure_34563$52', true);
include_once './assets/functions.php';
include_once './settings/settings.php';
include_once './settings/config.php';
include_once './settings/config_redirector.php';
if (debug && debug_id == $_SESSION['id']){
ini_set('display_errors', '1');

View File

@@ -15,7 +15,6 @@ if (isAllowed('dashboard',$_SESSION['profile'],$_SESSION['permission'],'R') ===
header('location: index.php');
exit;
}
//Return QueryTotal from API
$api_url = '/v1/equipments/totals=';
$query_total_equipment = ioServer($api_url,'');

View File

@@ -53,13 +53,15 @@ $responses = ioServer($api_url,'');
if (!empty($responses)){$responses = decode_payload($responses);}else{$responses = null;}
//Return QueryTotal from API
$api_url = '/v1/equipments/'.$GET_VALUES.'&totals=';
$total_url = ((!empty($GET_VALUES) && $GET_VALUES !='') ? '&totals=' : 'totals=' );
$api_url = '/v1/equipments/'.$GET_VALUES.$total_url;
$query_total = ioServer($api_url,'');
//Decode Payload
if (!empty($query_total)){$query_total = decode_payload($query_total);}else{$query_total = null;}
//Get Products related to assets
$api_url = '/v1/equipments/'.$GET_VALUES.'&products=';
$product_url = ((!empty($GET_VALUES) && $GET_VALUES !='') ? '&products=' : 'products=' );
$api_url = '/v1/equipments/'.$GET_VALUES.$product_url;
$query_products = ioServer($api_url,'');
//Decode Payload
if (!empty($query_products)){$query_products = decode_payload($query_products);}else{$query_products = null;}

View File

@@ -4,9 +4,11 @@ define('secure_admin_342642', true);
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
//=====================================
//INCLUDE CONSTANTS
include dirname(__FILE__).'/settings/config.php';
//=====================================
include dirname(__FILE__).'/settings/config_redirector.php';
if (debug && debug_id == $_SESSION['id']){
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
@@ -17,7 +19,10 @@ if (debug && debug_id == $_SESSION['id']){
include dirname(__FILE__).'/assets/functions.php';
include dirname(__FILE__).'/settings/settings.php';
//=====================================
//TRANSLATION FILE LOCATION
//=====================================
if (isset($_GET['language']) && $_GET['language'] !=''){
//INCLUDE LANGUAGE FILE
$api_file_language = './settings/translations/translations_'.strtoupper($_GET['language']).'.php';
@@ -31,6 +36,9 @@ if (isset($_GET['language']) && $_GET['language'] !=''){
//DEFINE LANGUAGE
$_SESSION['country_code'] = 'US';
}
//REMOVE FROM GET TO AVOID THAT LANGUAGE IS USED IN GET_VALUES FUNCTION
unset($_GET['language']);
}
elseif(isset($_SESSION['country_code'])){
$api_file_language = './settings/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
@@ -45,8 +53,9 @@ elseif(isset($_SESSION['country_code'])){
//DEFINE LANGUAGE
$_SESSION['country_code'] = 'US';
}
//=====================================
// Determine the base URL
//=====================================
$base_url = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === 'on' || $_SERVER['HTTPS'] === 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ? 'https' : 'http';
$base_url .= '://' . rtrim($_SERVER['HTTP_HOST'], '/');
$base_url .= $_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443 || strpos($_SERVER['HTTP_HOST'], ':') !== false ? '' : ':' . $_SERVER['SERVER_PORT'];
@@ -54,6 +63,9 @@ $base_url .= '/' . ltrim(substr(str_replace('\\', '/', realpath(__DIR__)), strle
define('base_url', rtrim($base_url, '/') . '/');
//=====================================
//CHECK USER SESSION
//=====================================
if (!isset($_SESSION['loggedin'])) {
header('location: login.php');
die();
@@ -65,15 +77,27 @@ if (isset($_GET['page']) && $_GET['page'] == 'logout') {
die();
}
// Page is set to home (home.php) by default, so when the visitor visits that will be the page they see.
$page = isset($_GET['page']) && file_exists($_GET['page'] . '.php') ? $_GET['page'] : 'dashboard';
//=====================================
//DEFINE WHERE TO SEND THE USER TO. GET first assigned view in the profile if not available use dashboard
//=====================================
$allowed_views = explode(',',$_SESSION['profile']);
$ignoreViews = ['profile','assets','sales'];
$allowed_views = findExistingView($allowed_views, 'dashboard', $ignoreViews);
//=====================================
//FORWARD THE USER TO THE CORRECT PAGE
//=====================================
$page = isset($_GET['page']) && file_exists($_GET['page'] . '.php') ? $_GET['page'] : $allowed_views;
// Output error variable
$error = '';
// Include the requested page
include $page . '.php';
//=====================================
//debuglog
//=====================================
if (debug){
$message = $date.';'.json_encode($_GET).';'.$_SESSION['username'];
debuglog($message);

187
login.php
View File

@@ -2,9 +2,13 @@
include './assets/functions.php';
include './settings/settings.php';
include './settings/config.php';
include './settings/config_redirector.php';
include_once './settings/translations/translations_US.php';
//=========================================
//GET DOMAIN FOR CORRECT STYLING AND SETTINGS
$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');
// Check if the user is already logged in, if yes then redirect him to welcome page
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
@@ -87,181 +91,12 @@ echo'
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<title>'.site_title.'</title>
<link rel="shortcut icon" href="'.icon_image.'" type="image/x-icon" />
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: "Open Sans", Helvetica, sans-serif;
accent-color: '.color.';
}
body {
background-color: #fff;
font-family: sans-serif;
}
.logon {
margin: 0;
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
}
#imagelogon {
background-image: url('.icon_image.');
background-repeat: no-repeat;
opacity: inherit;
width: 85px;
height: 150px;
margin: 0 auto;
position: relative;
top: 87px;
-webkit-filter: drop-shadow(5px 5px 5px #222);
filter: drop-shadow(5px 5px 5px #222);
}
.login-box{
width: 350px;
height: 330px;
background-color:'.color.';
padding: 55px 30px;
border-radius: 10px;
text-align: center;
-webkit-box-shadow: 10px 10px 5px -4px rgba(0,0,0,0.75);
-moz-box-shadow: 10px 10px 5px -4px rgba(0,0,0,0.75);
box-shadow: 10px 10px 5px -4px rgba(0,0,0,0.75);
}
.login-box h1{
font-weight: 500;
color: #fff;
}
.login-box input[type="text"],
.login-box input[type="password"]{
width: 75%;
margin-bottom: 10px;
}
.login-box input[type="text"],
.login-box input[type="password"]{
border-radius: 10px;
//background: transparent;
border: none;
outline: none;
border: 2px solid '.color_accent.';
font-size: 13px;
height: 40px;
text-align: center;
transition: 0.27s;
}
.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus{
width: 80%;
border-color:#6fd653;
}
.login-box input[type="submit"]{
width: 60%;
border: none;
outline: none;
background: '.color_accent.';
padding: 10px 0;
border-radius: 10px;
color: #ffffff;
font-weight: 500;
text-transform: uppercase;
cursor: pointer;
margin-bottom: 20px;
position: relative;
bottom: -12px;
font-style: italic;
}
.login-box input[type="submit"]:hover{
background:#6FD653;
transition: .2s;
}
.login-box input[type="submit"]:focus{
transform: scaleX(1.1);
}
.login-box a {
text-decoration: none;
font-size: 12px;
color: #00bcd4;
}
.login-box a:hover{
color: #6FD653;
}
#reset a {
text-decoration: none;
font-size: 10px;
color: #00bcd4;
}
#reset {
margin-top: -10px;
}
#message p {
font-size: 15px;
color: #ffffff;;
}
/* Slide 5 */
.slider-checkbox {
width: 3em;
height: 1.5em;
margin: 20px auto;
}
.slider-checkbox * {
transition: 250ms;
box-sizing: border-box;
}
.slider-checkbox input[type="checkbox"] {
display: none;
}
.slider-checkbox label {
display: inline-block;
width: 100%;
height: 95%;
background: '.color.';
border-radius: 0.7em;
padding-top: 0.2em;
padding-left: 0.2em;
}
.slider-checkbox span {
display: inline-block;
width: 1em;
height: 1em;
background: #FFF;
border: none;
border-radius: 2em;
}
.slider-checkbox input[type="checkbox"]:checked ~ label {
background: #93ed49;
padding-left: 1.7em;
}
</style>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<title>'.site_title.'</title>
<link rel="shortcut icon" href="'.icon_image.'" type="image/x-icon" />
<link href="'.$custom_css.'" rel="stylesheet" type="text/css">
</head>
<body style="background-color:'.color_accent.';background-image: url(./assets/images/emergencyplug-auto-in-licht.jpg);
background-position: center center;background-size: 100% 100%; min-height: 100vh;background-repeat: no-repeat;">
<body>
';
//Maintenance mode notification message
@@ -279,7 +114,7 @@ echo'
<div id="imagelogon"></div>
<div class="login-box">
<small style="color:#fff;">'.site_title.'</small>
<h1>Customer Portal</h1>
<h1>'.site_name.'</h1>
';
if (maintenance_mode)

View File

@@ -75,7 +75,7 @@ $view .= ' <div class="msg success">
}
$view .= '
<div class="content-header responsive-flex-column pad-top-5">
<a href="index.php?page=pricelists_manage" class="btn">'.($button_create_pricelist ?? '').'</a>
<a href="index.php?page=pricelists_manage" class="btn">'.($button_create_pricelist ?? 'Create pricelist').'</a>
<form action="" method="get">
<input type="hidden" name="page" value="pricelists">
<div class="search">

View File

@@ -61,7 +61,7 @@ $view = '
<div class="title">
<i class="fa-solid fa-box-open"></i>
<div class="txt">
<h2>'.($products_attributes_h2 ?? '').' ('.$query_total.')</h2>
<h2>'.($products_attributes_h2 ?? 'Product Attributes').' ('.$query_total.')</h2>
<p>'.($products_attributes_p ?? '').'</p>
</div>
</div>
@@ -76,7 +76,7 @@ $view .= ' <div class="msg success">
}
$view .= '
<div class="content-header responsive-flex-column pad-top-5">
<a href="index.php?page=products_attributes_manage" class="btn">'.($button_create_products_attribute ?? '').'</a>
<a href="index.php?page=products_attributes_manage" class="btn">'.($button_create_products_attribute ?? 'Create attribute').'</a>
<form action="" method="get">
<input type="hidden" name="page" value="products_attributes">
<div class="search">
@@ -122,7 +122,7 @@ $view .= '
<td>'.${'general_status_'.$response['group_status']}.'</td>
<td>'.(${$response['group_name']} ?? $response['group_name']).'</td>
<td>'.(${$response['group_name_internal']} ?? $response['group_name_internal']).'</td>
<td>'.${'general_form_'.$response['group_type']}.'</td>
<td>'.(${'general_form_'.$response['group_type']} ?? $response['group_type'] ).'</td>
<td class="responsive-hidden">'.getRelativeTime($response['created']).'</td>
<td><a href="index.php?page=products_attributes_manage&rowID='.$response['rowID'].'" class="btn_link">'.$general_view .'</a></td>
</tr>';

View File

@@ -201,9 +201,9 @@ $view .='<div class="content-block tab-content active">
<div class="form responsive-width-100">
<label for="">'.($products_attributes_group_type ?? 'Type').'</label>
<select name="group_type">
<option value="0" '.($products_attributes['group_type']==0?' selected':'').'>'.$general_form_0.'</option>
<option value="1" '.($products_attributes['group_type']==1?' selected':'').'>'.$general_form_1.'</option>
<option value="2" '.($products_attributes['group_type']==2?' selected':'').'>'.$general_form_2.'</option>
<option value="0" '.($products_attributes['group_type']==0?' selected':'').'>'.($general_form_0 ?? 'Radiobutton').'</option>
<option value="1" '.($products_attributes['group_type']==1?' selected':'').'>'.($general_form_1 ?? 'Checkbox').'</option>
<option value="2" '.($products_attributes['group_type']==2?' selected':'').'>'.($general_form_2 ?? 'Dropdown').'</option>
</select>
</div>
<div class="form responsive-width-100">

View File

@@ -1,7 +1,7 @@
<?php
include './assets/functions.php';
include './settings/settings.php';
include './settings/config.php';
include './settings/config_redirector.php';
//GET BROWSER LANGUAGE
$lang = strtoupper(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2));
@@ -280,7 +280,7 @@ background-position: center center;background-size: 100% 100%; min-height: 100vh
<div class="register">
<h4>'.$register_4_completed.'</h4>
<p>'.$register_message_4.'</p>
<p>'.$register_message_4.' '.software_update_user.'/'.software_update_pw.'</b></p>
<h4>'.$register_5_details.'</h4>';
foreach($message_return as $return_message){
echo'

View File

@@ -2,7 +2,7 @@
include './assets/functions.php';
include './settings/settings.php';
include './settings/config.php';
include './settings/config_redirector.php';
include_once './settings/translations/translations_US.php';
// Check if the user is already logged in, if yes then redirect him to welcome page

View File

@@ -1,7 +1,7 @@
<?php
defined(page_security_key) or exit;
// Configuration file
$file = './settings/config.php';
$file = './settings/config_redirector.php';
//Check if allowed
if (isAllowed('settings',$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
@@ -93,7 +93,7 @@ if (isset($_POST['submit']) && !empty($_POST)) {
$v = in_array(strtolower($v), ['true', 'false']) ? strtolower($v) : '\'' . $v . '\'';
$contents = preg_replace('/define\(\'' . $k . '\'\, ?(.*?)\)/s', 'define(\'' . $k . '\',' . $v . ')', $contents);
}
file_put_contents('./settings/config.php', $contents);
file_put_contents('./settings/config_redirector.php', $contents);

55
settings/config.php Normal file
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',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');

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',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');

View File

@@ -0,0 +1,27 @@
<?php
/*Standard*/
define('standard_profile','dashboard,profile,equipments,equipment,histories,history,firmwaretool,products_software,servicereports,servicereport,application');
/*Superuser*/
define('superuser_profile','dashboard,profile,assets,equipments,equipment,equipment_manage,equipment_manage_edit,equipments_mass_update,histories,history,history_manage,firmwaretool,products,products_versions,products_software,product,product_manage,servicereports,servicereport,admin,partners,partner,users,user,user_manage,marketing,application');
/*Admin*/
define('admin_profile','dashboard,profile,buildtool,sales,accounts,account,contracts,contract,contract_manage,cartests,cartest,cartest_manage,assets,equipments,equipment,equipment_healthindex,equipment_data,equipment_manage,equipment_manage_edit,equipments_mass_update,histories,history,history_manage,firmwaretool,rmas,rma,rma_manage,rma_history,rma_history_manage,buildtool,products,products_versions,products_software,product,product_manage,servicereports,servicereport,admin,partners,partner,users,user,user_manage,communications,communication,communication_send,marketing,reporting,report_build,report_contracts_billing,report_healthindex,changelog,application');
/*AdminPlus*/
define('adminplus_profile','dashboard,profile,buildtool,sales,accounts,account,contracts,contract,contract_manage,billing,cartests,cartest,cartest_manage,assets,equipments,equipment,equipment_healthindex,equipment_data,equipment_manage,equipment_manage_edit,equipments_mass_update,histories,history,history_manage,firmwaretool,rmas,rma,rma_manage,rma_history,rma_history_manage,buildtool,products,products_versions,products_software,products_attributes,products_attributes_items,products_attributes_manage,products_configurations,products_categories,products_media,product,product_manage,pricelists,pricelists_items,pricelists_manage,catalog,categories,category,discounts,discount,shipping,shipping_manage,servicereports,servicereport,admin,partners,partner,users,user,user_manage,communications,communication,communication_send,marketing,reporting,report_build,report_contracts_billing,report_healthindex,report_usage,config,settings,logfile,changelog,language,translations,translations_details,translation_manage,media,media_manage,application,maintenance,uploader,profiles,vin,shopping_cart,checkout,placeorder,taxes,transactions,transactions_items,invoice,order,orders,identity');
/*Build*/
define('build','dashboard,profile,buildtool,firmwaretool,buildtool,products_software,application');
/*Commerce*/
define('commerce','dashboard,profile,products,products_versions,products_software,products_attributes,products_attributes_items,products_attributes_manage,products_configurations,products_categories,products_media,product,product_manage,pricelists,pricelists_items,pricelists_manage,catalog,categories,category,discounts,discount,shipping,shipping_manage,admin,partners,partner,users,user,user_manage,translations,translations_details,translation_manage,media,media_manage,application,uploader,shopping_cart,checkout,placeorder,taxes,transactions,transactions_items,invoice,order,orders,identity');
/*Distribution*/
define('distribution','dashboard,profile,assets,equipments,equipment,equipment_manage,equipment_manage_edit,equipments_mass_update,histories,history,history_manage,firmwaretool,products,products_versions,products_software,product,product_manage,servicereports,servicereport,admin,partners,partner,users,user,user_manage,marketing,application');
/*Firmware*/
define('firmware','firmwaretool,products_software,application');
/*Garage*/
define('garage','dashboard,profile,cartests,cartest,cartest_manage,products_versions,application');
/*Interface*/
define('interface','contracts,contract,equipments,equipment_manage,firmwaretool,products_versions,products_software,users,application');
/*Service*/
define('service','dashboard,profile,assets,equipments,equipment,equipment_manage,histories,history,history_manage,firmwaretool,products_software,servicereports,servicereport,admin,partners,partner,users,user,user_manage,marketing,application');
/*Other*/
define('other','dashboard,profile,assets,equipments,equipment,equipment_manage,histories,history,history_manage,firmwaretool,products_software,servicereports,servicereport,admin,partners,partner,marketing,application');
?>

BIN
style/.DS_Store vendored Normal file

Binary file not shown.

172
style/admin_login.css Normal file
View File

@@ -0,0 +1,172 @@
* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: "Open Sans", Helvetica, sans-serif;
accent-color: #005655c2;
}
body {
background-color: #fff;
font-family: sans-serif;
background-color:#2FAC66;
background-image: url(/assets/images/emergencyplug-auto-in-licht.jpg);
background-position: center center;
background-size: 100% 100%;
min-height: 100vh;
background-repeat: no-repeat;
}
.logon {
margin: 0;
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
}
#imagelogon {
background-image: url(/assets/images/TSS-logo3.png);
background-repeat: no-repeat;
opacity: inherit;
width: 85px;
height: 150px;
margin: 0 auto;
position: relative;
top: 87px;
-webkit-filter: drop-shadow(5px 5px 5px #222);
filter: drop-shadow(5px 5px 5px #222);
}
.login-box{
width: 350px;
height: 330px;
background-color:#005655c2;
padding: 55px 30px;
border-radius: 10px;
text-align: center;
-webkit-box-shadow: 10px 10px 5px -4px rgba(0,0,0,0.75);
-moz-box-shadow: 10px 10px 5px -4px rgba(0,0,0,0.75);
box-shadow: 10px 10px 5px -4px rgba(0,0,0,0.75);
}
.login-box h1{
font-weight: 500;
color: #fff;
}
.login-box input[type="text"],
.login-box input[type="password"]{
width: 75%;
margin-bottom: 10px;
}
.login-box input[type="text"],
.login-box input[type="password"]{
border-radius: 10px;
//background: transparent;
border: none;
outline: none;
border: 2px solid #2FAC66;
font-size: 13px;
height: 40px;
text-align: center;
transition: 0.27s;
}
.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus{
width: 80%;
border-color:#6fd653;
}
.login-box input[type="submit"]{
width: 60%;
border: none;
outline: none;
background: #2FAC66;
padding: 10px 0;
border-radius: 10px;
color: #ffffff;
font-weight: 500;
text-transform: uppercase;
cursor: pointer;
margin-bottom: 20px;
position: relative;
bottom: -12px;
font-style: italic;
}
.login-box input[type="submit"]:hover{
background:#6FD653;
transition: .2s;
}
.login-box input[type="submit"]:focus{
transform: scaleX(1.1);
}
.login-box a {
text-decoration: none;
font-size: 12px;
color: #00bcd4;
}
.login-box a:hover{
color: #6FD653;
}
#reset a {
text-decoration: none;
font-size: 10px;
color: #00bcd4;
}
#reset {
margin-top: -10px;
}
#message p {
font-size: 15px;
color: #ffffff;;
}
/* Slide 5 */
.slider-checkbox {
width: 3em;
height: 1.5em;
margin: 20px auto;
}
.slider-checkbox * {
transition: 250ms;
box-sizing: border-box;
}
.slider-checkbox input[type="checkbox"] {
display: none;
}
.slider-checkbox label {
display: inline-block;
width: 100%;
height: 95%;
background: #005655c2;
border-radius: 0.7em;
padding-top: 0.2em;
padding-left: 0.2em;
}
.slider-checkbox span {
display: inline-block;
width: 1em;
height: 1em;
background: #FFF;
border: none;
border-radius: 2em;
}
.slider-checkbox input[type="checkbox"]:checked ~ label {
background: #93ed49;
padding-left: 1.7em;
}

BIN
style/veliti/.DS_Store vendored Normal file

Binary file not shown.

BIN
style/veliti/VeLiTi-Logo2.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
style/veliti/VeLiTi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

2877
style/veliti/veliti.css Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

View File

@@ -0,0 +1,172 @@
* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: "Open Sans", Helvetica, sans-serif;
accent-color: #005655c2;
}
body {
background-color: #fff;
font-family: sans-serif;
background-color:#0b1054;
background-image: url(veliti_intro.png);
background-position: center center;
background-size: 100% 100%;
min-height: 100vh;
background-repeat: no-repeat;
}
.logon {
margin: 0;
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
}
#imagelogon {
background-image: url(VeLiTi-Logo2.png);
background-repeat: no-repeat;
opacity: inherit;
width: 85px;
height: 150px;
margin: 0 auto;
position: relative;
top: 87px;
-webkit-filter: drop-shadow(5px 5px 5px #222);
filter: drop-shadow(5px 5px 5px #222);
}
.login-box{
width: 350px;
height: 330px;
background-color:#344fd5c2;
padding: 55px 30px;
border-radius: 10px;
text-align: center;
-webkit-box-shadow: 10px 10px 5px -4px rgba(0,0,0,0.75);
-moz-box-shadow: 10px 10px 5px -4px rgba(0,0,0,0.75);
box-shadow: 10px 10px 5px -4px rgba(0,0,0,0.75);
}
.login-box h1{
font-weight: 500;
color: #fff;
}
.login-box input[type="text"],
.login-box input[type="password"]{
width: 75%;
margin-bottom: 10px;
}
.login-box input[type="text"],
.login-box input[type="password"]{
border-radius: 10px;
//background: transparent;
border: none;
outline: none;
border: 2px solid #0b1054;
font-size: 13px;
height: 40px;
text-align: center;
transition: 0.27s;
}
.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus{
width: 80%;
border-color:#ececec;
}
.login-box input[type="submit"]{
width: 60%;
border: none;
outline: none;
background: #0b1054;
padding: 10px 0;
border-radius: 10px;
color: #ffffff;
font-weight: 500;
text-transform: uppercase;
cursor: pointer;
margin-bottom: 20px;
position: relative;
bottom: -12px;
font-style: italic;
}
.login-box input[type="submit"]:hover{
background:#ececec;
transition: .2s;
}
.login-box input[type="submit"]:focus{
transform: scaleX(1.1);
}
.login-box a {
text-decoration: none;
font-size: 12px;
color: #00bcd4;
}
.login-box a:hover{
color: #ececec;
}
#reset a {
text-decoration: none;
font-size: 10px;
color: #00bcd4;
}
#reset {
margin-top: -10px;
}
#message p {
font-size: 15px;
color: #ffffff;;
}
/* Slide 5 */
.slider-checkbox {
width: 3em;
height: 1.5em;
margin: 20px auto;
}
.slider-checkbox * {
transition: 250ms;
box-sizing: border-box;
}
.slider-checkbox input[type="checkbox"] {
display: none;
}
.slider-checkbox label {
display: inline-block;
width: 100%;
height: 95%;
background: #005655c2;
border-radius: 0.7em;
padding-top: 0.2em;
padding-left: 0.2em;
}
.slider-checkbox span {
display: inline-block;
width: 1em;
height: 1em;
background: #FFF;
border: none;
border-radius: 2em;
}
.slider-checkbox input[type="checkbox"]:checked ~ label {
background: #93ed49;
padding-left: 1.7em;
}

View File

@@ -1,7 +1,7 @@
<?php
include './assets/functions.php';
include './settings/settings.php';
include './settings/config.php';
include './settings/config_redirector.php';
include_once './settings/translations/translations_US.php';
if (isset($_GET['email'])){