Login screen with overview graphics

This commit is contained in:
Xenomporio 2022-06-29 11:26:50 +02:00
parent d14ebb0174
commit 8479cf30b0
4 changed files with 429 additions and 467 deletions

View File

@ -1,430 +1,430 @@
<?php <?php
/* /*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE **** **** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
* *
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019 * Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
* *
* This file is licensed under the Embedded Projects General Public License *Version 3.1. * This file is licensed under the Embedded Projects General Public License *Version 3.1.
* *
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis * You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version. * to obtain the text of the corresponding license version.
* *
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE **** **** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/ */
?> ?>
<?php <?php
/* Author: Benedikt Sauter, sauter@ibat.de, 2007 /* Author: Benedikt Sauter, sauter@ibat.de, 2007
* Player for PHP Applications * Player for PHP Applications
*/ */
class Player { class Player {
public $DefautTemplates; public $DefautTemplates;
public $DefautTheme; public $DefautTheme;
/** @var erpooSystem $app the application object */ /** @var erpooSystem $app the application object */
public $app; public $app;
function __construct() function __construct()
{ {
$this->DefautTemplates="defaulttemplates"; $this->DefautTemplates="defaulttemplates";
$this->DefautTheme="default"; $this->DefautTheme="default";
} }
function SetDefaultTemplates($path) function SetDefaultTemplates($path)
{ {
} }
function SetDefaultTheme($path) function SetDefaultTheme($path)
{ {
} }
public function BuildNavigation() public function BuildNavigation()
{ {
if(!WithGUI() || !method_exists($this->app->Page,'CreateNavigation') || !method_exists('erpAPI','Navigation')) { if(!WithGUI() || !method_exists($this->app->Page,'CreateNavigation') || !method_exists('erpAPI','Navigation')) {
return; return;
} }
$this->app->Page->CreateNavigation($this->app->erp->Navigation()); $this->app->Page->CreateNavigation($this->app->erp->Navigation());
} }
public function Run($sessionObj) public function Run($sessionObj)
{ {
$this->app = $sessionObj->app; $this->app = $sessionObj->app;
// play application only when layer 2 said that its ok // play application only when layer 2 said that its ok
if(!$sessionObj->GetCheck()) { if(!$sessionObj->GetCheck()) {
if($sessionObj->reason=='PLEASE_LOGIN') if($sessionObj->reason=='PLEASE_LOGIN')
{ {
$module = 'welcome'; $module = 'welcome';
$action = 'login'; $action = 'login';
$this->app->Secure->GET['module']='welcome'; $this->app->Secure->GET['module']='welcome';
$this->app->Secure->GET['action']='login'; $this->app->Secure->GET['action']='login';
} }
} else { } else {
$hasModuleAndAction = !empty($this->app->Secure->GET['module']) && !empty($this->app->Secure->GET['action']); $hasModuleAndAction = !empty($this->app->Secure->GET['module']) && !empty($this->app->Secure->GET['action']);
if($hasModuleAndAction && if($hasModuleAndAction &&
$this->app->Secure->GET['module'] === 'artikel' && $this->app->Secure->GET['action'] === 'thumbnail') { $this->app->Secure->GET['module'] === 'artikel' && $this->app->Secure->GET['action'] === 'thumbnail') {
/** @var Artikel $obj */ /** @var Artikel $obj */
$obj = $this->app->loadModule('artikel'); $obj = $this->app->loadModule('artikel');
if(!empty($obj) && method_exists($obj, 'ArtikelThumbnailCache')) { if(!empty($obj) && method_exists($obj, 'ArtikelThumbnailCache')) {
$obj->ArtikelThumbnailCache(); $obj->ArtikelThumbnailCache();
} }
} }
elseif($hasModuleAndAction && elseif($hasModuleAndAction &&
$this->app->Secure->GET['module'] === 'wiki' && $this->app->Secure->GET['action'] === 'getfile') { $this->app->Secure->GET['module'] === 'wiki' && $this->app->Secure->GET['action'] === 'getfile') {
/** @var Wiki $obj */ /** @var Wiki $obj */
$obj = $this->app->loadModule('wiki'); $obj = $this->app->loadModule('wiki');
if(!empty($obj) && method_exists($obj, 'WikiGetFileCache')) { if(!empty($obj) && method_exists($obj, 'WikiGetFileCache')) {
$obj->WikiGetFileCache(); $obj->WikiGetFileCache();
} }
} }
if (!empty($this->app->Secure->GET['module']) && !empty($this->app->Secure->GET['action']) && if (!empty($this->app->Secure->GET['module']) && !empty($this->app->Secure->GET['action']) &&
in_array($this->app->Secure->GET['module'],['backup', 'systemtemplates']) && $this->app->Secure->GET['action'] === 'readstatus'){ in_array($this->app->Secure->GET['module'],['backup', 'systemtemplates']) && $this->app->Secure->GET['action'] === 'readstatus'){
$sessionFile = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'backup' . DIRECTORY_SEPARATOR . 'session.txt'; $sessionFile = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'backup' . DIRECTORY_SEPARATOR . 'session.txt';
if(file_exists($sessionFile) && ((string) $bckSession = file_get_contents($sessionFile)) && trim($bckSession) === session_id()){ if(file_exists($sessionFile) && ((string) $bckSession = file_get_contents($sessionFile)) && trim($bckSession) === session_id()){
$obj = $this->app->loadModule($this->app->Secure->GET['module']); $obj = $this->app->loadModule($this->app->Secure->GET['module']);
$obj->ReadStatus(); $obj->ReadStatus();
} }
} }
// Get actual commands from URL // Get actual commands from URL
$module = $this->app->Secure->GetGET('module','module'); $module = $this->app->Secure->GetGET('module','module');
$action = $this->app->Secure->GetGET('action','module'); $action = $this->app->Secure->GetGET('action','module');
if($module =='') { if($module =='') {
$module = 'welcome'; $module = 'welcome';
$action = 'main'; $action = 'main';
} }
if($this->app->erp->isIoncube() && method_exists($this->app->erp, 'IoncubeProperty') if($this->app->erp->isIoncube() && method_exists($this->app->erp, 'IoncubeProperty')
&& WithGUI() && !(($module=='welcome' && $action=='upgrade') || $module=='' || ($module=='welcome' && $action=='start'))) && WithGUI() && !(($module=='welcome' && $action=='upgrade') || $module=='' || ($module=='welcome' && $action=='start')))
{ {
if(method_exists('erpAPI','Ioncube_getMaxUser')) if(method_exists('erpAPI','Ioncube_getMaxUser'))
{ {
$maxuser = erpAPI::Ioncube_getMaxUser(); $maxuser = erpAPI::Ioncube_getMaxUser();
}elseif(method_exists($this->app->erp, 'IoncubegetMaxUser')) }elseif(method_exists($this->app->erp, 'IoncubegetMaxUser'))
{ {
$maxuser = $this->app->erp->IoncubegetMaxUser(); $maxuser = $this->app->erp->IoncubegetMaxUser();
}else{ }else{
$maxuser = 0; $maxuser = 0;
} }
if(method_exists('erpAPI','Ioncube_getMaxLightusers')) if(method_exists('erpAPI','Ioncube_getMaxLightusers'))
{ {
$maxlightuser = erpAPI::Ioncube_getMaxLightusers(); $maxlightuser = erpAPI::Ioncube_getMaxLightusers();
}else{ }else{
$maxlightuser = 0; $maxlightuser = 0;
} }
if($maxuser) if($maxuser)
{ {
$anzuser2 = 0; $anzuser2 = 0;
if($maxlightuser > 0) { if($maxlightuser > 0) {
$anzuser2 = (int)$this->app->DB->Select("SELECT count(DISTINCT u.id) FROM `user` u WHERE activ = 1 AND type = 'lightuser' "); $anzuser2 = (int)$this->app->DB->Select("SELECT count(DISTINCT u.id) FROM `user` u WHERE activ = 1 AND type = 'lightuser' ");
$anzuser = (int)$this->app->DB->Select("SELECT count(id) FROM `user` WHERE activ = 1 AND not isnull(hwtoken) AND hwtoken <> 4") - $anzuser2; $anzuser = (int)$this->app->DB->Select("SELECT count(id) FROM `user` WHERE activ = 1 AND not isnull(hwtoken) AND hwtoken <> 4") - $anzuser2;
$anzuserzeiterfassung = (int)$this->app->DB->Select("SELECT count(*) from user where activ = 1 AND hwtoken = 4 AND type != 'lightuser'"); $anzuserzeiterfassung = (int)$this->app->DB->Select("SELECT count(*) from user where activ = 1 AND hwtoken = 4 AND type != 'lightuser'");
}else{ }else{
$anzuser = $this->app->DB->Select("SELECT count(*) from user where activ = 1 AND hwtoken <> 4 "); $anzuser = $this->app->DB->Select("SELECT count(*) from user where activ = 1 AND hwtoken <> 4 ");
$anzuserzeiterfassung = (int)$this->app->DB->Select("SELECT count(*) from user where activ = 1 AND hwtoken = 4"); $anzuserzeiterfassung = (int)$this->app->DB->Select("SELECT count(*) from user where activ = 1 AND hwtoken = 4");
} }
$maxmitarbeiterzeiterfassung = $this->app->erp->ModulVorhanden('mitarbeiterzeiterfassung')?$maxuser:0; $maxmitarbeiterzeiterfassung = $this->app->erp->ModulVorhanden('mitarbeiterzeiterfassung')?$maxuser:0;
if($anzuser > $maxuser if($anzuser > $maxuser
|| ( || (
($anzuser + $anzuserzeiterfassung + $anzuser2) > ($anzuser + $anzuserzeiterfassung + $anzuser2) >
$maxmitarbeiterzeiterfassung + $maxuser + $maxlightuser $maxmitarbeiterzeiterfassung + $maxuser + $maxlightuser
) )
|| (($anzuser + $anzuserzeiterfassung) > $maxmitarbeiterzeiterfassung + $maxuser) || (($anzuser + $anzuserzeiterfassung) > $maxmitarbeiterzeiterfassung + $maxuser)
) { ) {
if(!(($module == 'welcome' && if(!(($module == 'welcome' &&
($action=='info' || $action == 'start' || $action == 'logout' || $action == '' || $action == 'main')) || ($action=='info' || $action == 'start' || $action == 'logout' || $action == '' || $action == 'main')) ||
($module == 'einstellungen' && ($action == 'list' || $action == '')) || ($module == 'einstellungen' && ($action == 'list' || $action == '')) ||
$module == 'benutzer' $module == 'benutzer'
)) ))
{ {
if($this->app->erp->RechteVorhanden('benutzer','list')) if($this->app->erp->RechteVorhanden('benutzer','list'))
{ {
$module = 'benutzer'; $module = 'benutzer';
$action = 'list'; $action = 'list';
if($maxlightuser > 0){ if($maxlightuser > 0){
$error = 'Es existieren mehr aktive Benutzer als Ihre Lizenz erlaubt: Benutzer ' . ($anzuser + $anzuser2) . ($maxlightuser > 0 ? ' (davon ' . $anzuser2 . ' Light-User)' : '') . ' von ' . ($maxuser + $maxlightuser) . ($maxlightuser > 0 ? ' (' . $maxlightuser . ' Light-User)' : ''); $error = 'Es existieren mehr aktive Benutzer als Ihre Lizenz erlaubt: Benutzer ' . ($anzuser + $anzuser2) . ($maxlightuser > 0 ? ' (davon ' . $anzuser2 . ' Light-User)' : '') . ' von ' . ($maxuser + $maxlightuser) . ($maxlightuser > 0 ? ' (' . $maxlightuser . ' Light-User)' : '');
}else{ }else{
$error = 'Es existieren mehr aktive Benutzer als Ihre Lizenz erlaubt: Benutzer ' . ($anzuser + $anzuser2) . ($maxlightuser > 0 ? ' (davon ' . $anzuser2 . ' Zeiterfassungs-User)' : '') . ' von ' . ($maxuser + $anzuser2) . ($anzuser2 > 0 ? ' (' . $anzuser2 . ' Zeiterfassungs-User)' : ''); $error = 'Es existieren mehr aktive Benutzer als Ihre Lizenz erlaubt: Benutzer ' . ($anzuser + $anzuser2) . ($maxlightuser > 0 ? ' (davon ' . $anzuser2 . ' Zeiterfassungs-User)' : '') . ' von ' . ($maxuser + $anzuser2) . ($anzuser2 > 0 ? ' (' . $anzuser2 . ' Zeiterfassungs-User)' : '');
} }
$error = '<div class="error">'.$error.'</div>'; $error = '<div class="error">'.$error.'</div>';
$this->app->Tpl->Add('MESSAGE', $error); $this->app->Tpl->Add('MESSAGE', $error);
$this->app->Secure->GET['msg'] = $this->app->erp->base64_url_encode($error); $this->app->Secure->GET['msg'] = $this->app->erp->base64_url_encode($error);
}else{ }else{
$module = 'welcome'; $module = 'welcome';
$action = 'info'; $action = 'info';
} }
$this->app->Secure->GET['module'] = $module; $this->app->Secure->GET['module'] = $module;
$this->app->Secure->GET['action'] = $action; $this->app->Secure->GET['action'] = $action;
} }
} }
} }
if(method_exists('erpAPI','Ioncube_Property')) if(method_exists('erpAPI','Ioncube_Property'))
{ {
$deaktivateonexp = erpAPI::Ioncube_Property('deaktivateonexp'); $deaktivateonexp = erpAPI::Ioncube_Property('deaktivateonexp');
}else{ }else{
$deaktivateonexp = $this->app->erp->IoncubeProperty('deaktivateonexp'); $deaktivateonexp = $this->app->erp->IoncubeProperty('deaktivateonexp');
} }
if($deaktivateonexp) if($deaktivateonexp)
{ {
if(method_exists('erpAPI','Ioncube_HasExpired')) if(method_exists('erpAPI','Ioncube_HasExpired'))
{ {
$IoncubeHasExpired = erpAPI::Ioncube_HasExpired(); $IoncubeHasExpired = erpAPI::Ioncube_HasExpired();
}elseif(method_exists($this->app->erp, 'IoncubeHasExpired')) }elseif(method_exists($this->app->erp, 'IoncubeHasExpired'))
{ {
$IoncubeHasExpired = $this->app->erp->IoncubeHasExpired(); $IoncubeHasExpired = $this->app->erp->IoncubeHasExpired();
}else{ }else{
$IoncubeHasExpired = false; $IoncubeHasExpired = false;
} }
}else{ }else{
$IoncubeHasExpired = false; $IoncubeHasExpired = false;
} }
if($deaktivateonexp && $IoncubeHasExpired if($deaktivateonexp && $IoncubeHasExpired
&& !(($module == 'welcome' && $action='logout') || ($module == 'welcome' && $action='start') || ($module == 'welcome' && $action='main')) && !(($module == 'welcome' && $action='logout') || ($module == 'welcome' && $action='start') || ($module == 'welcome' && $action='main'))
) )
{ {
$module = 'welcome'; $module = 'welcome';
$action = 'info'; $action = 'info';
$this->app->Secure->GET['module'] = $module; $this->app->Secure->GET['module'] = $module;
$this->app->Secure->GET['action'] = $action; $this->app->Secure->GET['action'] = $action;
} }
} }
} }
if($action!="list" && $action!="css" && $action!="logo" && $action!="poll" && $module!="ajax" && $module!="protokoll" && $action!="thumbnail"){ if($action!="list" && $action!="css" && $action!="logo" && $action!="poll" && $module!="ajax" && $module!="protokoll" && $action!="thumbnail"){
$this->app->erp->Protokoll(); $this->app->erp->Protokoll();
} }
$id = $this->app->Secure->GetGET('id'); $id = $this->app->Secure->GetGET('id');
$lid = $this->app->Secure->GetGET('lid'); $lid = $this->app->Secure->GetGET('lid');
if($module !== 'welcome' && $action !== 'poll' && $module !== 'ajax'){ if($module !== 'welcome' && $action !== 'poll' && $module !== 'ajax'){
if(($module !== 'artikel' || $action !== 'thumbnail') if(($module !== 'artikel' || $action !== 'thumbnail')
&& ($module !== 'wiki' || $action !== 'getfile') && ($module !== 'wiki' || $action !== 'getfile')
&& $action !== 'editable' && $action !== 'positionen'){ && $action !== 'editable' && $action !== 'positionen'){
$this->app->Laender($module, $action, $id, $lid); $this->app->Laender($module, $action, $id, $lid);
} }
} }
// plugin instanzieren // plugin instanzieren
// start module // start module
if(file_exists(dirname(__DIR__).'/www/pages/'.$module.'.php')){ if(file_exists(dirname(__DIR__).'/www/pages/'.$module.'.php')){
if(file_exists(dirname(__DIR__).'/www/pages/'.$module.'_custom.php')){ if(file_exists(dirname(__DIR__).'/www/pages/'.$module.'_custom.php')){
include_once dirname(__DIR__).'/www/pages/'.$module.'.php'; include_once dirname(__DIR__).'/www/pages/'.$module.'.php';
include_once dirname(__DIR__).'/www/pages/'.$module.'_custom.php'; include_once dirname(__DIR__).'/www/pages/'.$module.'_custom.php';
//create dynamical an object //create dynamical an object
$constr = strtoupper($module[0]) . substr($module, 1) . 'Custom'; $constr = strtoupper($module[0]) . substr($module, 1) . 'Custom';
if(class_exists($constr)) if(class_exists($constr))
{ {
$myApp = new $constr($this->app); $myApp = new $constr($this->app);
}else{ }else{
$constr = strtoupper($module[0]) . substr($module, 1); $constr = strtoupper($module[0]) . substr($module, 1);
if(class_exists($constr)) if(class_exists($constr))
{ {
$myApp = new $constr($this->app); $myApp = new $constr($this->app);
} }
elseif(file_exists(dirname(__DIR__).'/www/pages/'.$module.'.php')){ elseif(file_exists(dirname(__DIR__).'/www/pages/'.$module.'.php')){
include dirname(__DIR__).'/www/pages/'.$module.'.php'; include dirname(__DIR__).'/www/pages/'.$module.'.php';
if(class_exists($constr)){ if(class_exists($constr)){
$myApp = new $constr($this->app); $myApp = new $constr($this->app);
} }
} }
} }
if(method_exists($constr, 'AllowedVersion') && isset($this->app->User) && $this->app->User && method_exists($this->app->User, 'GetType') && $this->app->User->GetType() == 'admin') if(method_exists($constr, 'AllowedVersion') && isset($this->app->User) && $this->app->User && method_exists($this->app->User, 'GetType') && $this->app->User->GetType() == 'admin')
{ {
$r2 = new ReflectionMethod($constr, 'AllowedVersion'); $r2 = new ReflectionMethod($constr, 'AllowedVersion');
if($r2->isStatic()) if($r2->isStatic())
{ {
$allowed = $constr::AllowedVersion(); $allowed = $constr::AllowedVersion();
include(dirname(__DIR__) . '/version.php'); include(dirname(__DIR__) . '/version.php');
if((isset($allowed['max']) && ((float)$allowed['max'] < (float)$version_revision)) if((isset($allowed['max']) && ((float)$allowed['max'] < (float)$version_revision))
|| ||
(isset($allowed['versionen']) && ( (isset($allowed['versionen']) && (
(is_array($allowed['versionen']) && !in_array($version_revision, $allowed['versionen'])) (is_array($allowed['versionen']) && !in_array($version_revision, $allowed['versionen']))
|| (!is_array($allowed['versionen']) && $allowed['versionen'] != $version_revision) || (!is_array($allowed['versionen']) && $allowed['versionen'] != $version_revision)
)) ))
) )
{ {
$title = 'Inkompatibilität festgestellt'; $title = 'Inkompatibilität festgestellt';
$message = 'Die Datei '.$module."_custom.php".' auf Ihrem System, ist nicht für Ihre Version geeignet'; $message = 'Die Datei '.$module."_custom.php".' auf Ihrem System, ist nicht für Ihre Version geeignet';
/** @var \Xentral\Modules\SystemNotification\Gateway\NotificationGateway $notifyGateway */ /** @var \Xentral\Modules\SystemNotification\Gateway\NotificationGateway $notifyGateway */
$notifyGateway = $this->app->Container->get('NotificationGateway'); $notifyGateway = $this->app->Container->get('NotificationGateway');
if (!$notifyGateway->hasDuplicatedMessage($this->app->User->GetID(), $title, $message)) { if (!$notifyGateway->hasDuplicatedMessage($this->app->User->GetID(), $title, $message)) {
/** @var \Xentral\Modules\SystemNotification\Service\NotificationServiceInterface $notifyService */ /** @var \Xentral\Modules\SystemNotification\Service\NotificationServiceInterface $notifyService */
$notifyService = $this->app->Container->get('NotificationService'); $notifyService = $this->app->Container->get('NotificationService');
$notifyService->create($this->app->User->GetID(), 'warning', $title, $message); $notifyService->create($this->app->User->GetID(), 'warning', $title, $message);
} }
} }
} }
} }
} else { } else {
include_once(dirname(__DIR__)."/www/pages/".$module.".php"); include_once(dirname(__DIR__)."/www/pages/".$module.".php");
//create dynamical an object //create dynamical an object
$constr = strtoupper($module[0]) . substr($module, 1); $constr = strtoupper($module[0]) . substr($module, 1);
if(class_exists($constr))$myApp = new $constr($this->app); if(class_exists($constr))$myApp = new $constr($this->app);
} }
} }
else { else {
if(file_exists(dirname(__DIR__)."/www/pages/_gen/".$module.".php")){ if(file_exists(dirname(__DIR__)."/www/pages/_gen/".$module.".php")){
include_once(dirname(__DIR__)."/www/pages/_gen/".$module.".php"); include_once(dirname(__DIR__)."/www/pages/_gen/".$module.".php");
//create dynamical an object //create dynamical an object
$constr = "Gen" . strtoupper($module[0]) . substr($module, 1); $constr = "Gen" . strtoupper($module[0]) . substr($module, 1);
$myApp = new $constr($this->app); $myApp = new $constr($this->app);
} }
else { else {
if(file_exists(dirname(__DIR__)."/www/pages/_gen/".$module.".php")){ if(file_exists(dirname(__DIR__)."/www/pages/_gen/".$module.".php")){
include_once(dirname(__DIR__)."/www/pages/_gen/".$module.".php"); include_once(dirname(__DIR__)."/www/pages/_gen/".$module.".php");
//create dynamical an object //create dynamical an object
$constr = "Gen" . strtoupper($module[0]) . substr($module, 1); $constr = "Gen" . strtoupper($module[0]) . substr($module, 1);
$myApp = new $constr($this->app); $myApp = new $constr($this->app);
} }
} }
} }
$this->app->erp->RunHook('player_run_before_include_js_css'); $this->app->erp->RunHook('player_run_before_include_js_css');
/** @deprecated-block-start Wird später über den Installer eingebunden */ /** @deprecated-block-start Wird später über den Installer eingebunden */
if (class_exists('Xentral\Modules\SystemNotification\Bootstrap', true)) { if (class_exists('Xentral\Modules\SystemNotification\Bootstrap', true)) {
$javascript = forward_static_call(['Xentral\\Modules\\SystemNotification\\Bootstrap', 'registerJavascript']); $javascript = forward_static_call(['Xentral\\Modules\\SystemNotification\\Bootstrap', 'registerJavascript']);
foreach ($javascript as $cacheName => $jsFiles) { foreach ($javascript as $cacheName => $jsFiles) {
$this->app->ModuleScriptCache->IncludeJavascriptFiles($cacheName, $jsFiles); $this->app->ModuleScriptCache->IncludeJavascriptFiles($cacheName, $jsFiles);
} }
$stylesheets = forward_static_call(['Xentral\\Modules\\SystemNotification\\Bootstrap', 'registerStylesheets']); $stylesheets = forward_static_call(['Xentral\\Modules\\SystemNotification\\Bootstrap', 'registerStylesheets']);
foreach ($stylesheets as $cacheName => $cssFiles) { foreach ($stylesheets as $cacheName => $cssFiles) {
$this->app->ModuleScriptCache->IncludeStylesheetFiles($cacheName, $cssFiles); $this->app->ModuleScriptCache->IncludeStylesheetFiles($cacheName, $cssFiles);
} }
} }
if (class_exists('Xentral\Modules\Wizard\Bootstrap', true)) { if (class_exists('Xentral\Modules\Wizard\Bootstrap', true)) {
$javascript = forward_static_call(['Xentral\\Modules\\Wizard\\Bootstrap', 'registerJavascript']); $javascript = forward_static_call(['Xentral\\Modules\\Wizard\\Bootstrap', 'registerJavascript']);
foreach ($javascript as $cacheName => $jsFiles) { foreach ($javascript as $cacheName => $jsFiles) {
$this->app->ModuleScriptCache->IncludeJavascriptFiles($cacheName, $jsFiles); $this->app->ModuleScriptCache->IncludeJavascriptFiles($cacheName, $jsFiles);
} }
$stylesheets = forward_static_call(['Xentral\\Modules\\Wizard\\Bootstrap', 'registerStylesheets']); $stylesheets = forward_static_call(['Xentral\\Modules\\Wizard\\Bootstrap', 'registerStylesheets']);
foreach ($stylesheets as $cacheName => $cssFiles) { foreach ($stylesheets as $cacheName => $cssFiles) {
$this->app->ModuleScriptCache->IncludeStylesheetFiles($cacheName, $cssFiles); $this->app->ModuleScriptCache->IncludeStylesheetFiles($cacheName, $cssFiles);
} }
} }
if (class_exists('Xentral\\Widgets\\ClickByClickAssistant\\Bootstrap', true)) { if (class_exists('Xentral\\Widgets\\ClickByClickAssistant\\Bootstrap', true)) {
$this->app->ModuleScriptCache->IncludeWidgetNew('ClickByClickAssistant'); $this->app->ModuleScriptCache->IncludeWidgetNew('ClickByClickAssistant');
} }
if (class_exists('Xentral\\Widgets\\SuperSearch\\Bootstrap', true)) { if (class_exists('Xentral\\Widgets\\SuperSearch\\Bootstrap', true)) {
$this->app->ModuleScriptCache->IncludeWidgetNew('SuperSearch'); $this->app->ModuleScriptCache->IncludeWidgetNew('SuperSearch');
} }
/** @deprecated-block-end */ /** @deprecated-block-end */
$moduleClassName = strtoupper($module[0]) . substr($module, 1); $moduleClassName = strtoupper($module[0]) . substr($module, 1);
$this->app->ModuleScriptCache->IncludeModule($moduleClassName); $this->app->ModuleScriptCache->IncludeModule($moduleClassName);
$this->app->Tpl->Add('MODULESTYLESHEET', $this->app->ModuleScriptCache->GetStylesheetHtmlTags()); $this->app->Tpl->Add('MODULESTYLESHEET', $this->app->ModuleScriptCache->GetStylesheetHtmlTags());
$this->app->Tpl->Add('MODULEJAVASCRIPTHEAD', $this->app->ModuleScriptCache->GetJavascriptHtmlTags('head')); $this->app->Tpl->Add('MODULEJAVASCRIPTHEAD', $this->app->ModuleScriptCache->GetJavascriptHtmlTags('head'));
$this->app->Tpl->Add('MODULEJAVASCRIPTBODY', $this->app->ModuleScriptCache->GetJavascriptHtmlTags('body')); $this->app->Tpl->Add('MODULEJAVASCRIPTBODY', $this->app->ModuleScriptCache->GetJavascriptHtmlTags('body'));
$permission = true; $permission = true;
if(isset($myApp) && method_exists($myApp,'CheckRights'))$permission = $myApp->CheckRights(); if(isset($myApp) && method_exists($myApp,'CheckRights'))$permission = $myApp->CheckRights();
if(!$permission) if(!$permission)
{ {
if($this->app->User->GetID()<=0) if($this->app->User->GetID()<=0)
{ {
$this->app->erp->Systemlog("Keine gueltige Benutzer ID erhalten",1); $this->app->erp->Systemlog("Keine gueltige Benutzer ID erhalten",1);
@session_destroy(); @session_destroy();
echo str_replace('BACK',"index.php?module=welcome&action=login",$this->app->Tpl->FinalParse("permissiondenied.tpl")); echo str_replace('BACK',"index.php?module=welcome&action=login",$this->app->Tpl->FinalParse("permissiondenied.tpl"));
} }
else { else {
$this->app->erp->Systemlog("Fehlendes Recht",1); $this->app->erp->Systemlog("Fehlendes Recht",1);
echo str_replace('BACK',isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:'',$this->app->Tpl->FinalParse("permissiondenied.tpl")); echo str_replace('BACK',isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:'',$this->app->Tpl->FinalParse("permissiondenied.tpl"));
} }
exit; exit;
} }
$this->app->calledWhenAuth($this->app->User->GetType()); $this->app->calledWhenAuth($this->app->User->GetType());
if($this->app->BuildNavigation==true) if($this->app->BuildNavigation==true)
$this->BuildNavigation(); $this->BuildNavigation();
$this->app->endtime = microtime(); $this->app->endtime = microtime();
$right = $this->app->Secure->GetGET("right"); $right = $this->app->Secure->GetGET("right");
$tmpfirmendatenfkt = 'Firmendaten'; $tmpfirmendatenfkt = 'Firmendaten';
if(method_exists($this->app->erp,'TplFirmendaten'))$tmpfirmendatenfkt = 'TplFirmendaten'; if(method_exists($this->app->erp,'TplFirmendaten'))$tmpfirmendatenfkt = 'TplFirmendaten';
$firmenfarbehell = $this->app->erp->$tmpfirmendatenfkt("firmenfarbehell"); $firmenfarbehell = $this->app->erp->$tmpfirmendatenfkt("firmenfarbehell");
if($firmenfarbehell =="") if($firmenfarbehell =="")
$firmenfarbehell = "#3fbac9"; $firmenfarbehell = "#3fbac9";
$this->app->Tpl->Set('COLOR1',$firmenfarbehell); $this->app->Tpl->Set('COLOR1',$firmenfarbehell);
$this->app->calledBeforeFinish(); $this->app->calledBeforeFinish();
$this->app->Tpl->Set('JQUERYMIGRATESRC', './js/jquery/jquery-migrate-3.2.0.min.js'); $this->app->Tpl->Set('JQUERYMIGRATESRC', './js/jquery/jquery-migrate-3.2.0.min.js');
$this->app->Tpl->Set('TESTLIZENZABLAUF', ''); $this->app->Tpl->Set('TESTLIZENZABLAUF', '');
if($this->app->BuildNavigation==true) if($this->app->BuildNavigation==true)
{ {
if($right==1) if($right==1)
echo $this->app->Tpl->FinalParse('right.tpl'); echo $this->app->Tpl->FinalParse('right.tpl');
else else
{ {
if($module==='welcome' && $action==='login'){ if($module==='welcome' && $action==='login'){
if(is_file(dirname(__DIR__).'/www/themes/new/templates/loginslider.tpl')) { if(is_file(dirname(__DIR__).'/www/themes/new/templates/loginslider.tpl')) {
$this->app->Tpl->Set( $this->app->Tpl->Set(
'LOGINSLIDER', 'LOGINSLIDER',
file_get_contents(dirname(__DIR__).'/www/themes/new/templates/loginslider.tpl') file_get_contents(dirname(__DIR__).'/www/themes/new/templates/loginslider.tpl')
); );
} }
else{ else{
$this->app->Tpl->Set( $this->app->Tpl->Set(
'LOGINSLIDER', 'LOGINSLIDER',
'<div class="slide" style="background-image: url(\'./themes/new/templates/white-cup-filled-by-coffee.jpg\');"> '<div class="slide" style="background-image: url(\'./themes/new/images/login_screen_picture.jpg\');">
</div>' </div>'
); );
} }
$this->app->erp->RunHook('loginpage'); $this->app->erp->RunHook('loginpage');
echo $this->app->Tpl->FinalParse('loginpage.tpl'); echo $this->app->Tpl->FinalParse('loginpage.tpl');
} }
elseif($module==='welcome' && $action==='passwortvergessen'){ elseif($module==='welcome' && $action==='passwortvergessen'){
echo $this->app->Tpl->FinalParse('passwortvergessenpage.tpl'); echo $this->app->Tpl->FinalParse('passwortvergessenpage.tpl');
} }
else { else {
$this->app->erp->addFav(); $this->app->erp->addFav();
$this->app->erp->HelpIconAndTooltip(); $this->app->erp->HelpIconAndTooltip();
if( if(
($module !== 'welcome' ($module !== 'welcome'
|| ($action !== 'settings' && $action !== 'logout' && $action !== 'login' || ($action !== 'settings' && $action !== 'logout' && $action !== 'login'
&& $action !== 'start'&& $action !== 'startseite' && $action !== 'main' && $action !== 'start'&& $action !== 'startseite' && $action !== 'main'
) )
) )
&& ($isadminadmin = $this->app->acl->IsAdminadmin())) && ($isadminadmin = $this->app->acl->IsAdminadmin()))
{ {
header('Location: index.php?module=welcome&action=start'); header('Location: index.php?module=welcome&action=start');
exit; exit;
} }
$this->app->HeaderBoxen(); $this->app->HeaderBoxen();
if($this->app->erp->UserDevice()==='smartphone'){ if($this->app->erp->UserDevice()==='smartphone'){
echo $this->app->Tpl->FinalParse('page_smartphone.tpl'); echo $this->app->Tpl->FinalParse('page_smartphone.tpl');
} }
else{ else{
$this->app->Tpl->Set('VUEJS', 'vue.min.js'); $this->app->Tpl->Set('VUEJS', 'vue.min.js');
$this->app->erp->RunHook('before_final_parse_page'); $this->app->erp->RunHook('before_final_parse_page');
echo $this->app->Tpl->FinalParse('page.tpl'); echo $this->app->Tpl->FinalParse('page.tpl');
} }
} }
} }
} }
else { else {
if($this->app->PopupJS){ if($this->app->PopupJS){
echo $this->app->Tpl->FinalParse('popup_js.tpl'); echo $this->app->Tpl->FinalParse('popup_js.tpl');
} }
else{ else{
echo $this->app->Tpl->FinalParse('popup.tpl'); echo $this->app->Tpl->FinalParse('popup.tpl');
} }
} }
} }
} }

View File

@ -66,17 +66,17 @@ body {
#login-slider-wrapper { #login-slider-wrapper {
width: 61.13%; width: 61.13%;
background: pink;
position: relative; position: relative;
} }
#login-slider { #login-slider {
position: fixed; position: fixed;
background: #4a738c;
width: 61.13%; width: 61.13%;
height: 100vh; height: 100vh;
} }
#login-slider .slide { #login-slider .slide {
height: 100vh; height: 100vh;
background-size: cover; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center center; background-position: center center;
position: relative; position: relative;

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 KiB

View File

@ -6,50 +6,12 @@
<title>Xenomporio - Login</title> <title>Xenomporio - Login</title>
<link id="shortcuticon" rel="shortcut icon" href="./themes/new/images/favicon/favicon.ico" type="image/x-icon"> <link id="shortcuticon" rel="shortcut icon" href="./themes/new/images/favicon/favicon.ico" type="image/x-icon">
<link id="favicon" rel="icon" href="./themes/new/images/favicon/favicon.ico" type="image/x-icon"> <link id="favicon" rel="icon" href="./themes/new/images/favicon/favicon.ico" type="image/x-icon">
<link rel="icon" href="./themes/new/images/favicon/favicon.gif" type="image/gif">
<link rel="icon" href="./themes/new/images/favicon/favicon.png" type="image/png">
<link rel="apple-touch-icon" href="./themes/new/images/favicon/apple-icon.png">
<link rel="apple-touch-icon" href="./themes/new/images/favicon/apple-icon-57x57.png" sizes="57x57">
<link rel="apple-touch-icon" href="./themes/new/images/favicon/apple-icon-60x60.png" sizes="60x60">
<link rel="apple-touch-icon" href="./themes/new/images/favicon/apple-icon-72x72.png" sizes="72x72">
<link rel="apple-touch-icon" href="./themes/new/images/favicon/apple-icon-76x76.png" sizes="76x76">
<link rel="apple-touch-icon" href="./themes/new/images/favicon/apple-icon-114x114.png" sizes="114x114">
<link rel="apple-touch-icon" href="./themes/new/images/favicon/apple-icon-120x120.png" sizes="120x120">
<link rel="apple-touch-icon" href="./themes/new/images/favicon/apple-icon-128x128.png" sizes="128x128">
<link rel="apple-touch-icon" href="./themes/new/images/favicon/apple-icon-144x144.png" sizes="144x144">
<link rel="apple-touch-icon" href="./themes/new/images/favicon/apple-icon-152x152.png" sizes="152x152">
<link rel="apple-touch-icon" href="./themes/new/images/favicon/apple-icon-180x180.png" sizes="180x180">
<link rel="apple-touch-icon" href="./themes/new/images/favicon/apple-icon-precomposed.png">
<link rel="icon" type="image/png" href="./themes/new/images/favicon/favicon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="./themes/new/images/favicon/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="./themes/new/images/favicon/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="./themes/new/images/favicon/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="./themes/new/images/favicon/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="./themes/new/images/favicon/favicon-160x160.png" sizes="160x160">
<link rel="icon" type="image/png" href="./themes/new/images/favicon/favicon-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="./themes/new/images/favicon/favicon-196x196.png" sizes="196x196">
<link rel="shortcut icon" href="./themes/new/images/favicon/android-icon-36x36.png" sizes="36x36">
<link rel="shortcut icon" href="./themes/new/images/favicon/android-icon-48x48.png" sizes="48x48">
<link rel="shortcut icon" href="./themes/new/images/favicon/android-icon-72x72.png" sizes="72x72">
<link rel="shortcut icon" href="./themes/new/images/favicon/android-icon-96x96.png" sizes="96x96">
<link rel="shortcut icon" href="./themes/new/images/favicon/android-icon-144x144.png" sizes="144x144">
<link rel="shortcut icon" href="./themes/new/images/favicon/android-icon-192x192.png" sizes="192x192">
<link rel="manifest" href="./themes/new/images/favicon/manifest.json">
<meta name="msapplication-TileImage" content="./themes/new/images/favicon/ms-icon-144x144.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-navbutton-color" content="#ffffff">
<meta name="application-name" content="Xenomporio ERP"/>
<meta name="msapplication-tooltip" content="Xenomporio ERP"/>
<meta name="apple-mobile-web-app-title" content="Xenomporio ERP"/>
<meta name="msapplication-config" content="./themes/new/images/favicon/browserconfig.xml"/>
<meta name="msapplication-square70x70logo" content="./themes/new/images/ms-icon-70x70.png">
<meta name="msapplication-square144x144logo" content="./themes/new/images/ms-icon-144x144.png">
<meta name="msapplication-square150x150logo" content="./themes/new/images/ms-icon-150x150.png">
<meta name="msapplication-square310x310logo" content="./themes/new/images/ms-icon-310x310.png">
<script type="text/javascript" src="./js/jquery/jquery-3.5.0.min.js"></script> <script type="text/javascript" src="./js/jquery/jquery-3.5.0.min.js"></script>
<script type="text/javascript" src="[JQUERYMIGRATESRC]"></script> <script type="text/javascript" src="[JQUERYMIGRATESRC]"></script>
<script src="themes/new/js/slick.min.js"></script>
<script src="themes/new/js/scripts_login.js"></script> <script src="themes/new/js/scripts_login.js"></script>
<link rel="stylesheet" href="themes/new/css/normalize.min.css?v=5"> <link rel="stylesheet" href="themes/new/css/normalize.min.css?v=5">
<link rel="stylesheet" href="themes/new/css/slick.css">
<link rel="stylesheet" href="themes/new/css/login_styles.css?v=3"> <link rel="stylesheet" href="themes/new/css/login_styles.css?v=3">
</head> </head>