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

189
login.php
View File

@@ -2,10 +2,14 @@
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){
header("location: index.php");
@@ -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)