Remove Ioncube and License stuff

This commit is contained in:
Andreas Palm 2024-04-18 12:48:03 +02:00
parent d155c99bfc
commit 57e79d442c
24 changed files with 65 additions and 1421 deletions

View File

@ -44,14 +44,6 @@ class Bootstrap
/** @var LegacyApplication $app */
$app = $container->get('LegacyApplication');
if (!class_exists('License')) {
$test = dirname(__DIR__, 3) . '/phpwf/plugins/class.license.php';
$file = new SplFileInfo($test);
if ($file->isFile()) {
include $test;
}
}
return new EnvironmentConfigProvider(new License(), $app->Conf);
return new EnvironmentConfigProvider($app->Conf);
}
}

View File

@ -34,11 +34,6 @@ final class EnvironmentConfig
*/
private $userdataDirectoryPath;
/**
* @var array|null $ioncubeSystemInformation
*/
private $ioncubeSystemInformation;
/**
* @param string $databaseHost
* @param string $databaseName
@ -46,7 +41,6 @@ final class EnvironmentConfig
* @param string $databasePassword
* @param int $databasePort
* @param string $userdataDirectoryPath
* @param array $ioncubeSystemInformation
*/
public function __construct(
string $databaseHost,
@ -54,8 +48,7 @@ final class EnvironmentConfig
string $databaseUser,
string $databasePassword,
int $databasePort,
string $userdataDirectoryPath,
?array $ioncubeSystemInformation
string $userdataDirectoryPath
) {
$this->databaseHost = $databaseHost;
$this->databaseName = $databaseName;
@ -63,7 +56,6 @@ final class EnvironmentConfig
$this->databasePassword = $databasePassword;
$this->databasePort = $databasePort;
$this->userdataDirectoryPath = $userdataDirectoryPath;
$this->ioncubeSystemInformation = $ioncubeSystemInformation;
}
/**
@ -113,121 +105,4 @@ final class EnvironmentConfig
{
return $this->userdataDirectoryPath;
}
/**
* @return ?array
*/
public function getIoncubeSystemInformation(): ?array
{
return $this->ioncubeSystemInformation;
}
/**
* @return bool
*/
public function isSystemHostedOnCloud(): bool
{
return !empty($this->ioncubeSystemInformation['iscloud']['value']);
}
/**
* @return bool
*/
public function isSystemFlaggedAsDevelopmentVersion(): bool
{
return !empty($this->ioncubeSystemInformation['isdevelopmentversion']['value']);
}
/**
* @return bool
*/
public function isSystemFlaggedAsTestVersion(): bool
{
return !empty($this->ioncubeSystemInformation['testlizenz']['value']);
}
/**
* @return int
*/
public function getMaxUser(): int
{
if (!isset($this->ioncubeSystemInformation['maxuser']['value'])) {
return 0;
}
return (int)$this->ioncubeSystemInformation['maxuser']['value'];
}
/**
* @return int
*/
public function getMaxLightUser(): int
{
if (!isset($this->ioncubeSystemInformation['maxlightuser']['value'])) {
return 0;
}
return (int)$this->ioncubeSystemInformation['maxlightuser']['value'];
}
/**
* @return int|null
*/
public function getExpirationTimeStamp(): ?int
{
if (!isset($this->ioncubeSystemInformation['expdate']['value'])) {
return 0;
}
return (int)$this->ioncubeSystemInformation['expdate']['value'];
}
/**
* @param string $name
*
* @return string|null
*/
public function getValueOfSpecificIoncubeSystemInformation(string $name): ?string
{
if ($this->ioncubeSystemInformation === null) {
return null;
}
if (array_key_exists($name, $this->ioncubeSystemInformation)) {
return $this->ioncubeSystemInformation[$name]['value'];
}
return null;
}
/**
* @return array
*/
public function getSystemFallbackEmailAddresses(): array
{
$emailAddresses = [];
$mailAddressSelfBuyCustomer = (string)$this->getValueOfSpecificIoncubeSystemInformation('buyemail');
if ($mailAddressSelfBuyCustomer !== '') {
$emailAddresses[] = $mailAddressSelfBuyCustomer;
}
$mailAddressCustomerLicence = (string)$this->getValueOfSpecificIoncubeSystemInformation('emaillicence');
if ($mailAddressCustomerLicence !== ''
&& strpos($mailAddressCustomerLicence, '@') !== false
&& strpos($mailAddressCustomerLicence, '@xentral.com') === false
&& strpos($mailAddressCustomerLicence, '@xentral.biz') === false) {
$emailAddresses[] = $mailAddressCustomerLicence;
}
//in old licences email-address of customer can be insert in name instead email
$nameCustomerLicence = (string)$this->getValueOfSpecificIoncubeSystemInformation('namelicence');
if ($nameCustomerLicence !== ''
&& strpos($nameCustomerLicence, '@') !== false
&& strpos($nameCustomerLicence, '@xentral.com') === false
&& strpos($nameCustomerLicence, '@xentral.biz') === false) {
$emailAddresses[] = $nameCustomerLicence;
}
return $emailAddresses;
}
}

View File

@ -7,19 +7,14 @@ use License;
final class EnvironmentConfigProvider
{
/** @var License $license */
private $license;
/** @var Config $config */
private $config;
/**
* @param License $license
* @param Config $config
*/
public function __construct(License $license, Config $config)
public function __construct(Config $config)
{
$this->license = $license;
$this->config = $config;
}
@ -30,8 +25,7 @@ final class EnvironmentConfigProvider
{
$environmentConfig = new EnvironmentConfig(
$this->config->WFdbhost, $this->config->WFdbname, $this->config->WFdbuser,
$this->config->WFdbpass, $this->config->WFdbport, $this->config->WFuserdata,
(array)$this->license->getProperties()
$this->config->WFdbpass, $this->config->WFdbport, $this->config->WFuserdata
);
return $environmentConfig;

View File

@ -84,10 +84,6 @@ final class ErrorHandler
public function handleException($exception)
{
$title = null;
if ($this->isIoncubeError($exception)) {
$title = $this->handleIoncubeError($exception);
}
$data = new ErrorPageData($exception, $title);
$renderer = new ErrorPageRenderer($data);
header('HTTP/1.1 500 Internal Server Error');
@ -125,96 +121,4 @@ final class ErrorHandler
{
return in_array((int)$type, self::THROWABLE_ERROR_TYPES, true);
}
/**
* @param Throwable $exception
*
* @return bool
*/
private function isIoncubeError($exception)
{
if ((int)$exception->getCode() !== E_CORE_ERROR) {
return false;
}
if (strpos($exception->getMessage(), 'requires a license file.') !== false) {
return true;
}
if (strpos($exception->getMessage(), 'ionCube Encoder') !== false) {
return true;
}
return false;
}
/**
* @param Throwable $exception
*
* @return string|null
*/
private function handleIoncubeError($exception)
{
$file = $this->extractFileFromIoncubeError($exception);
if (empty($file)) {
return null;
}
if (!$this->isDeleteableFile($file)) {
return null;
}
@unlink($file);
if(is_file($file)) {
return sprintf('Es wurde eine alte Systemdatei gefunden die nicht manuell gelöscht werden konnte.
Bitte löschen Sie die Datei %s', $file);
}
return 'Es wurde eine alte Systemdatei gefunden und automatisch gelöscht.
Bitte führen Sie das Update nochmal durch dann sollte diese Meldung nicht mehr erscheinen.';
}
/**
* @param string $file
*
* @return bool
*/
private function isDeleteableFile(string $file)
{
if (!is_file($file)) {
return false;
}
$dir = dirname($file);
foreach (self::DELETE_FILE_FOLDERS as $folder) {
if (substr($dir, -strlen($folder)) === $folder) {
return true;
}
}
return false;
}
/**
* @example "<br>The encoded file <b>/var/www/xentral/www/pages/adresse.php</b> requires a license file.<br>"
* "The license file <b>/var/www/xentral/key.php</b> is corrupt."
*
* @param Throwable $exception
*
* @return string|null
*/
private function extractFileFromIoncubeError($exception)
{
$message = strip_tags($exception->getMessage());
$theFilePos = stripos($message, 'The File ');
if ($theFilePos === false) {
$theFilePos = strpos($message, 'The encoded file');
if ($theFilePos === false) {
return null;
}
$theFilePos += 16;
} else {
$theFilePos += 9;
}
$file = trim(substr($message, $theFilePos));
$file = explode(' ', $file);
return reset($file);
}
}

View File

@ -323,15 +323,6 @@ final class ErrorPageData implements JsonSerializable
'ldap' => function () {
return function_exists('ldap_connect');
},
'ioncube' => function () {
if (!function_exists('ioncube_loader_version')) {
return false;
}
$ioncubeMajorVersion = (int)@ioncube_loader_version();
return $ioncubeMajorVersion >= 5;
},
];
}

View File

@ -2,7 +2,7 @@
/*
* SPDX-FileCopyrightText: 2019 Xentral ERP Software GmbH, Fuggerstrasse 11, D-86150 Augsburg
* SPDX-FileCopyrightText: 2023 Andreas Palm
* SPDX-FileCopyrightText: 2023-2024 Andreas Palm
*
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
*/
@ -104,105 +104,7 @@ class Player {
$module = 'welcome';
$action = 'main';
}
if($this->app->erp->isIoncube() && method_exists($this->app->erp, 'IoncubeProperty')
&& WithGUI() && !(($module=='welcome' && $action=='upgrade') || $module=='' || ($module=='welcome' && $action=='start')))
{
if(method_exists('erpAPI','Ioncube_getMaxUser'))
{
$maxuser = erpAPI::Ioncube_getMaxUser();
}elseif(method_exists($this->app->erp, 'IoncubegetMaxUser'))
{
$maxuser = $this->app->erp->IoncubegetMaxUser();
}else{
$maxuser = 0;
}
if(method_exists('erpAPI','Ioncube_getMaxLightusers'))
{
$maxlightuser = erpAPI::Ioncube_getMaxLightusers();
}else{
$maxlightuser = 0;
}
if($maxuser)
{
$anzuser2 = 0;
if($maxlightuser > 0) {
$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;
$anzuserzeiterfassung = (int)$this->app->DB->Select("SELECT count(*) from user where activ = 1 AND hwtoken = 4 AND type != 'lightuser'");
}else{
$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");
}
$maxmitarbeiterzeiterfassung = $this->app->erp->ModulVorhanden('mitarbeiterzeiterfassung')?$maxuser:0;
if($anzuser > $maxuser
|| (
($anzuser + $anzuserzeiterfassung + $anzuser2) >
$maxmitarbeiterzeiterfassung + $maxuser + $maxlightuser
)
|| (($anzuser + $anzuserzeiterfassung) > $maxmitarbeiterzeiterfassung + $maxuser)
) {
if(!(($module == 'welcome' &&
($action=='info' || $action == 'start' || $action == 'logout' || $action == '' || $action == 'main')) ||
($module == 'einstellungen' && ($action == 'list' || $action == '')) ||
$module == 'benutzer'
))
{
if($this->app->erp->RechteVorhanden('benutzer','list'))
{
$module = 'benutzer';
$action = 'list';
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)' : '');
}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 = '<div class="error">'.$error.'</div>';
$this->app->Tpl->Add('MESSAGE', $error);
$this->app->Secure->GET['msg'] = $this->app->erp->base64_url_encode($error);
}else{
$module = 'welcome';
$action = 'info';
}
$this->app->Secure->GET['module'] = $module;
$this->app->Secure->GET['action'] = $action;
}
}
}
if(method_exists('erpAPI','Ioncube_Property'))
{
$deaktivateonexp = erpAPI::Ioncube_Property('deaktivateonexp');
}else{
$deaktivateonexp = $this->app->erp->IoncubeProperty('deaktivateonexp');
}
if($deaktivateonexp)
{
if(method_exists('erpAPI','Ioncube_HasExpired'))
{
$IoncubeHasExpired = erpAPI::Ioncube_HasExpired();
}elseif(method_exists($this->app->erp, 'IoncubeHasExpired'))
{
$IoncubeHasExpired = $this->app->erp->IoncubeHasExpired();
}else{
$IoncubeHasExpired = false;
}
}else{
$IoncubeHasExpired = false;
}
if($deaktivateonexp && $IoncubeHasExpired
&& !(($module == 'welcome' && $action='logout') || ($module == 'welcome' && $action='start') || ($module == 'welcome' && $action='main'))
)
{
$module = 'welcome';
$action = 'info';
$this->app->Secure->GET['module'] = $module;
$this->app->Secure->GET['action'] = $action;
}
}
}
}
if($action!="list" && $action!="css" && $action!="logo" && $action!="poll" && $module!="ajax" && $module!="protokoll" && $action!="thumbnail"){
$this->app->erp->Protokoll();

View File

@ -295,8 +295,6 @@ class Acl
/** @var EnvironmentConfig $environmentConfig */
$environmentConfig = $this->app->Container->get('EnvironmentConfig');
$mailAddresses = array_merge($mailAddresses, $environmentConfig->getSystemFallbackEmailAddresses());
return array_unique($mailAddresses);
}
@ -438,37 +436,24 @@ class Acl
if(!empty($serverLocation)) {
$server = rtrim($serverLocation,'/') . '?module=welcome&action=passwortvergessen&code=' . $code;
}
foreach(['default', 'fallback'] as $sentSetting) {
if($sentSetting === 'fallback') {
$db = $this->app->Conf->WFdbname;
if(
empty(erpAPI::Ioncube_Property('cloudemail'))
|| $this->app->erp->firmendaten[$db]['email'] === erpAPI::Ioncube_Property('cloudemail')
) {
break;
}
$this->app->erp->firmendaten[$db]['mailanstellesmtp'] = 1;
$this->app->erp->firmendaten[$db]['email'] = erpAPI::Ioncube_Property('cloudemail');
foreach ($emailAddresses as $email) {
$recipientMailAddress = $email;
$recipientName = $name;
if(empty($recipientMailAddress) || empty($recipientName)) {
continue;
}
foreach ($emailAddresses as $email) {
$recipientMailAddress = $email;
$recipientName = $name;
if(empty($recipientMailAddress) || empty($recipientName)) {
continue;
}
$mailContent = str_replace(['{NAME}', '{ANREDE}', '{URL}'], [$recipientName, $anrede, $server], $mailContent);
$mailContent = str_replace(['{NAME}', '{ANREDE}', '{URL}'], [$recipientName, $anrede, $server], $mailContent);
if(!$this->app->erp->isHTML($mailContent)){
$mailContent = str_replace("\r\n", '<br>', $mailContent);
}
$mailSuccessfullySent = $this->app->erp->MailSend(
$this->app->erp->GetFirmaMail(), $this->app->erp->GetFirmaAbsender(),
$recipientMailAddress, $recipientName, $mailSubject, $mailContent, '', 0, true, '', '', true
);
if($mailSuccessfullySent){
break 2;
}
if(!$this->app->erp->isHTML($mailContent)){
$mailContent = str_replace("\r\n", '<br>', $mailContent);
}
$mailSuccessfullySent = $this->app->erp->MailSend(
$this->app->erp->GetFirmaMail(), $this->app->erp->GetFirmaAbsender(),
$recipientMailAddress, $recipientName, $mailSubject, $mailContent, '', 0, true, '', '', true
);
if($mailSuccessfullySent){
break;
}
}
}

View File

@ -323,32 +323,10 @@ class erpooSystem extends Application
}
}
$isTestlizenz = !empty(erpAPI::Ioncube_Property('testlizenz'));
$isCloud = erpAPI::Ioncube_Property('iscloud');
$isDemo = $isTestlizenz && $isCloud;
$activateDoubleClick = false;
/** @var Dataprotection $dataProtectionModule */
$dataProtectionModule = $this->loadModule('dataprotection');
if($isCloud
&& $dataProtectionModule !== null
&& $dataProtectionModule->isGoogleAnalyticsActive()
){
$activateDoubleClick = true;
$this->Tpl->Add(
'SCRIPTJAVASCRIPT',
'<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-1088253-14"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(\'js\', new Date());
gtag(\'config\', \'UA-1088253-14\');
</script>');
$this->Tpl->Add('ADDITIONALCSPHEADER', ' www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com stats.g.doubleclick.net ');
}
if($dataProtectionModule !== null && $dataProtectionModule->isHubspotActive()) {
$activateDoubleClick = true;
$this->Tpl->Add(
@ -468,13 +446,6 @@ class erpooSystem extends Application
];*/
if(!empty(erpAPI::Ioncube_Property('testlizenz')) && $this->User->GetType() === 'admin'){
$possibleUserItems['Starte hier!'] = [
'link' => 'index.php?module=learningdashboard&action=list',
'type' => 'cta'
];
}
$userItems = '<div class="sidebar-list small-items separator-bottom">';
foreach($possibleUserItems as $title => $data){
@ -545,10 +516,7 @@ class erpooSystem extends Application
/** @var Dataprotection $obj */
$obj = $this->loadModule('dataprotection');
$showChat = method_exists('erpAPI','Ioncube_Property')
&& !empty(erpAPI::Ioncube_Property('chatactive'))
&& !empty(erpAPI::Ioncube_Property('chat'))
&& $obj !== null
$showChat = $obj !== null
&& method_exists($obj, 'isZenDeskActive')
&& $obj->isZenDeskActive();
@ -608,23 +576,8 @@ class erpooSystem extends Application
$this->Tpl->Set('FIXEDITEMS', $fixedItems);
$this->Tpl->Set('XENTRALVERSION', $version);
$this->Tpl->Set('SIDEBAR_CLASSES', $sidebarClasses);
$isDevelopmentVersion = method_exists('erpAPI','Ioncube_Property')
&& !empty(erpAPI::Ioncube_Property('isdevelopmentversion'));
if($isDevelopmentVersion) {
$this->Tpl->Add(
'SIDEBARLOGO',
@file_get_contents(__DIR__ . '/themes/new/templates/sidebar_development_version_logo.svg')
);
$this->Tpl->Add(
'SIDEBARLOGO',
'<img class="development" src="themes/new/templates/development_version_logo.png" alt="logo" />'
);
}
else{
// $this->Tpl->Add('SIDEBARLOGO', @file_get_contents(__DIR__ . '/themes/new/templates/sidebar_logo.svg'));
$this->Tpl->Add('SIDEBARLOGO','<div class="sidebar_logo">'.@file_get_contents(__DIR__ . '/themes/new/templates/sidebar_logo.svg').'</div>');
$this->Tpl->Add('SIDEBARLOGO','<div class="sidebar_icon_logo">'.@file_get_contents(__DIR__ . '/themes/new/templates/sidebar_icon_logo.svg').'</div>');
}
$this->Tpl->Add('SIDEBARLOGO','<div class="sidebar_logo">'.@file_get_contents(__DIR__ . '/themes/new/templates/sidebar_logo.svg').'</div>');
$this->Tpl->Add('SIDEBARLOGO','<div class="sidebar_icon_logo">'.@file_get_contents(__DIR__ . '/themes/new/templates/sidebar_icon_logo.svg').'</div>');
$this->Tpl->Parse('SIDEBAR', 'sidebar.tpl');
$this->Tpl->Parse('PROFILE_MENU', 'profile_menu.tpl');
@ -1342,41 +1295,6 @@ if (typeof document.hidden !== \"undefined\") { // Opera 12.10 and Firefox 18 an
$this->erp->SetKonfigurationValue('eproosystem_skipcheckuserdata', '1');
}
}
if(!$this->erp->ServerOK()) {
$serverlist = $this->erp->GetIoncubeServerList();
if(method_exists($this->erp, 'setSystemHealth')) {
$this->erp->setSystemHealth(
'server',
'ioncube',
'error',
'Die Ioncube-Lizenz ist nur g&uuml;ltig f&uuml;r folgene'.
(count($serverlist) == 1?'n':'').' Server: '.implode(', ',$serverlist)
);
}
}
else {
$expDays = erpAPI::Ioncube_ExpireInDays();
$testLicence = erpAPI::Ioncube_Property('testlizenz');
if(!$testLicence && $expDays !== false && $expDays < 14) {
$this->erp->setSystemHealth(
'server',
'ioncube',
'error',
sprintf(
'Die Lizenz am %s aus.',
erpAPI::Ioncube_ExpireDate()
)
);
}
else{
$this->erp->setSystemHealth(
'server',
'ioncube',
'ok',
''
);
}
}
if ($this->ModuleScriptCache->IsCacheDirWritable() === false) {
$this->erp->setSystemHealth(
'server',
@ -1823,21 +1741,6 @@ if (typeof document.hidden !== \"undefined\") { // Opera 12.10 and Firefox 18 an
$this->Tpl->Set('NACHCHATNACHRICHTENBOX','-->');
}
if(!empty(erpAPI::Ioncube_Property('testlizenz'))){
$upgradeButton = '<li id="upgrade-licence"><a href="./index.php?module=appstore&action=buy">'.
'<svg width="18" height="16" viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.47287 12.0104C2.04566 9.80074 1.66708 6.11981 3.59372 3.46237C5.52036 0.804943 9.13654 0.0202146 11.9914 1.64005" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M2.21273 11.9649C1.39377 13.3996 1.11966 14.513 1.58214 14.9761C2.2843 15.6776 4.48124 14.6858 7.02522 12.6684" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.93719 12.1581L7.52014 9.74109L12.8923 4.3689C13.3305 3.93091 13.8797 3.62049 14.481 3.47095L15.863 3.12392C16.0571 3.07558 16.2623 3.1325 16.4037 3.27392C16.5451 3.41534 16.602 3.62054 16.5537 3.8146L16.208 5.19732C16.0578 5.7984 15.7469 6.34731 15.3087 6.78527L9.93719 12.1581Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.51976 9.7409L5.54021 9.08128C5.44619 9.05019 5.37505 8.97252 5.35233 8.87613C5.32961 8.77974 5.35857 8.67847 5.42881 8.60867L6.11882 7.91866C6.7306 7.30697 7.63548 7.09343 8.45619 7.36706L9.53644 7.72625L7.51976 9.7409Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.93713 12.1584L10.5968 14.1386C10.6278 14.2326 10.7055 14.3038 10.8019 14.3265C10.8983 14.3492 10.9996 14.3203 11.0694 14.25L11.7594 13.56C12.3711 12.9482 12.5846 12.0434 12.311 11.2226L11.9518 10.1424L9.93713 12.1584Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
'.
'<span>Upgrade</span></a></li>';
$this->Tpl->Set('UPGRADELICENCECTA', $upgradeButton);
}
if(!$this->erp->ModulVorhanden('aufgaben') || !$this->erp->RechteVorhanden('aufgaben','list')) {
$this->Tpl->Set('AUFGABENVOR','<!--');
$this->Tpl->Set('AUFGABENNACH','-->');

View File

@ -56,7 +56,6 @@ class erpAPI
private static $license;
private $modulvorhandenlist = null;
private static $ioncubeproperties = null;
public static $lasttime = 0;
public $uebersetzungId;
@ -615,271 +614,6 @@ function Belegeexport($datei, $doctype, $doctypeid, $append = false, $optionen =
return [];
}
/**
* @deprecated
*
* @return bool
*/
function checkLicense()
{
return true;
}
// @refactor LicenceManager Komponente
final public function isIoncube()
{
if(empty(erpAPI::$license))
{
erpAPI::Ioncube_Property('');
}
return !empty(erpAPI::$license);
}
// @refactor LicenceManager Komponente
static function Ioncube_Property($key = '')
{
if(!class_exists('License'))
{
if(is_file(dirname(dirname(__DIR__)).'/phpwf/plugins/class.license.php'))
{
include(dirname(dirname(__DIR__)).'/phpwf/plugins/class.license.php');
}
}
if(class_exists('License'))
{
if(!erpAPI::$license) {
erpAPI::$license = new License();
}
}
if(erpAPI::$license) {
return erpAPI::$license->getProperty($key);
}
if(function_exists('ioncube_license_properties'))
{
if(!self::$ioncubeproperties) {
self::$ioncubeproperties = ioncube_license_properties();
}
$data = self::$ioncubeproperties;
if($data && is_array($data) && isset($data[$key]) && is_array($data[$key]) && isset($data[$key]['value'])) {
$value = $data[$key]['value'];
return $value;
}
}
return false;
}
// @refactor LicenceManager Komponente
static function Ioncube_getMaxUser()
{
return erpAPI::Ioncube_Property('maxuser');
}
// @refactor LicenceManager Komponente
static function Ioncube_getMaxLightusers()
{
return erpAPI::Ioncube_Property('maxlightuser');
}
// @refactor LicenceManager Komponente
static function Ioncube_getMaxLightusersRights()
{
$rechte = (int)erpAPI::Ioncube_Property('maxlightuserrights');
if($rechte < 5) {
$rechte = 30;
}
return $rechte;
}
// @refactor LicenceManager Komponente
static function Ioncube_BenutzervorlageAnzahlLightuser(&$app, $vorlage)
{
if(!isset($app->DB)) {
return;
}
return $app->DB->Select("SELECT count(id) FROM `user` WHERE activ = 1 AND type = 'lightuser' AND vorlage = '$vorlage'");
}
// @refactor LicenceManager Komponente
static function Ioncube_LightuserRechteanzahl($app, $id, $type = 'user')
{
if(!isset($app->DB)) {
return false;
}
if($type === 'vorlage') {
$id = $app->DB->Select("SELECT id FROM `uservorlage` WHERE bezeichnung <> '' AND bezeichnung = '".$app->DB->real_escape_string($id)."' LIMIT 1");
}
$id = (int)$id;
if($id <= 0) {
return false;
}
if($type === 'vorlage')
{
if(!$app->DB->Select("SELECT id FROM `uservorlage` WHERE id = '$id' LIMIT 1")) {
return false;
}
return $app->DB->Select("SELECT count(DISTINCT module, action) FROM `uservorlagerights` WHERE vorlage = '$id' AND permission = 1");
}
if(!$app->DB->Select("SELECT id FROM `user` WHERE id = '$id' LIMIT 1")) {
return false;
}
return $app->DB->Select("SELECT count(DISTINCT module, action) FROM `userrights` WHERE `user` = '$id' AND permission = 1");
}
// @refactor LicenceManager Komponente
static function Ioncube_HasExpired()
{
return erpAPI::Ioncube_Property('expdate') && (int)erpAPI::Ioncube_Property('expdate') < time();
}
// @refactor LicenceManager Komponente
static function Ioncube_ExpireInDays()
{
if(function_exists('ioncube_file_info'))
{
if(erpAPI::Ioncube_Property('expdate')) {
return round(((int)erpAPI::Ioncube_Property('expdate')-time())/86400);
}
}
return false;
}
// @refactor LicenceManager Komponente
static function Ioncube_BeforeExpire()
{
if(false === erpAPI::Ioncube_ExpireInDays()) {
return false;
}
return erpAPI::Ioncube_ExpireInDays() < 42;
}
// @refactor LicenceManager Komponente
static function Ioncube_ExpireDate($format = 'd.m.Y')
{
if(function_exists('ioncube_file_info'))
{
$dat = erpAPI::Ioncube_Property('expdate');
if(!$dat) {
return false;
}
return date($format,(int)$dat);
}
return false;
}
// @refactor LicenceManager Komponente
final function GetIoncubeServerList()
{
$ret = null;
$i = 1;
while($check = $this->IoncubeProperty('servername'.$i))
{
$ret[] = $check;
$i++;
}
return $ret;
}
// @refactor LicenceManager Komponente
/**
* @return bool
*/
final function ServerOK()
{
$servername = (isset($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME'] != '')?$_SERVER['SERVER_NAME']:(isset($_SERVER['HTTP_HOST'])?$_SERVER['HTTP_HOST']:'');
$serverlist = $this->GetIoncubeServerList();
if(!$serverlist) {
return true;
}
foreach($serverlist as $check) {
if($servername == $check) {
return true;
}
}
return false;
}
// @refactor LicenceManager Komponente
final function IoncubeProperty($key)
{
if(!class_exists('License'))
{
if(is_file(dirname(dirname(__DIR__)).'/phpwf/plugins/class.license.php'))
{
include(dirname(dirname(__DIR__)).'/phpwf/plugins/class.license.php');
}
}
if(class_exists('License'))
{
if(!erpAPI::$license)erpAPI::$license = new License();
}
if(erpAPI::$license)return erpAPI::$license->getProperty($key);
if(method_exists('erpAPI','Ioncube_Property'))return erpAPI::Ioncube_Property($key);
if(function_exists('ioncube_license_properties'))
{
$data = ioncube_license_properties();
if($data && isset($data[$key]) && isset($data[$key]['value']))return $data[$key]['value'];
}
return false;
}
// @refactor LicenceManager Komponente
final function IoncubegetMaxUser()
{
return $this->IoncubeProperty('maxuser');
}
// @refactor LicenceManager Komponente
final function IoncubeHasExpired()
{
if($this->IoncubeProperty('expdate'))
{
if((int)$this->IoncubeProperty('expdate') < time())return true;
}
return false;
if(function_exists('ioncube_license_has_expired'))return ioncube_license_has_expired();
return false;
}
// @refactor LicenceManager Komponente
final function IoncubeServerOK()
{
if(function_exists('ioncube_license_matches_server'))return ioncube_license_matches_server();
return true;
}
// @refactor LicenceManager Komponente
final function IoncubeExpireInDays()
{
if(function_exists('ioncube_file_info'))
{
if($this->IoncubeProperty('expdate'))return round(((int)$this->IoncubeProperty('expdate')-time())/86400);
}
return false;
}
// @refactor LicenceManager Komponente
final function IoncubeBeforeExpire()
{
if(false === $this->IoncubeExpireInDays())return false;
return $this->IoncubeExpireInDays() < 42;
}
// @refactor LicenceManager Komponente
final function IoncubeExpireDate($format = 'd.m.Y')
{
if(function_exists('ioncube_file_info'))
{
$dat = $this->IoncubeProperty('expdate');
if(!$dat) {
return false;
}
return date($format,(int)$dat);
}
return false;
}
/**
* @return array|null
*/
@ -892,127 +626,6 @@ function Belegeexport($datei, $doctype, $doctypeid, $append = false, $optionen =
return $this->appList[$this->app->Conf->WFdbname];
}
// @refactor LicenceManager Komponente
function ModuleBenutzeranzahlLizenzFehler($add = '', $typ = 'module', $vorlage = 0)
{
if(!method_exists($this->app->erp, 'IoncubeProperty')) {
return null;
}
if($typ === 'module')
{
if(strpos($add, 'shopimporter_') === 0) {
return null;
}
if($add === 'welcome' || $add === 'api' || $add === 'ajax') {
return null;
}
$anz = (int)$this->IoncubeProperty('moduleanzX'.str_replace('_','X',$add));
if($anz > 1) {
$anzadmin = (int)$this->app->DB->Select("SELECT count(id) FROM `user` WHERE activ = 1 AND type = 'admin'");
$rechte = (int)$this->app->DB->Select("SELECT count(u.i) FROM `user` u
INNER JOIN (SELECT DISTINCT `user` FROM `userrights` WHERE module = '$add' AND permission = 1) ur ON u.id = ur.`user`
WHERE activ = 1 AND type <> 'admin'
");
if($anzadmin + $rechte + 1 > $anz) {
return array('Error'=> 'Es '.($anz > 1?'sind':'ist').' nur '.$anz.' User f&uuml;r das Modul '.ucfirst($add).' lizenziert, es werden aber '.($anzadmin + $rechte + 1).' ben&ouml;tigt');
}
}
return null;
}
if($typ === 'vorlage' && $vorlage)
{
if(strpos($add, 'shopimporter_') === 0) {
return null;
}
if($add === 'welcome' || $add === 'api' || $add === 'ajax') {
return null;
}
$anz = (int)$this->IoncubeProperty('moduleanzX'.str_replace('_','X',$add));
if($anz > 1)
{
$anzadmin = (int)$this->app->DB->Select("SELECT count(id) FROM `user` WHERE activ = 1 AND type = 'admin'");
$bezeichnung = $this->app->DB->Select("SELECT bezeichnung FROM uservorlage WHERE id = '$vorlage' LIMIT 1");
if($bezeichnung == '') {
return null;
}
$rechte = (int)$this->app->DB->Select("SELECT count(u.i) FROM `user` u
INNER JOIN (SELECT DISTINCT `user` FROM `userrights` WHERE module = '$add' AND permission = 1) ur ON u.id = ur.`user`
WHERE activ = 1 AND type <> 'admin' AND vorlage != '".$this->app->DB->real_escape_string($bezeichnung)."'
");
$neueuser = (int)$this->app->DB->Select("SELECT count(u.id) FROM `user` u
WHERE activ = 1 AND type <> 'admin' AND vorlage = '".$this->app->DB->real_escape_string($bezeichnung)."'
");
if($anzadmin + $rechte + $neueuser > $anz) {
return array('Error'=> 'Es '.($anz > 1?'sind':'ist').' nur '.$anz.' User f&uuml;r das Modul '.ucfirst($add).' lizenziert, es werden aber '.($anzadmin + $rechte + $neueuser).' ben&ouml;tigt');
}
}
}
return null;
}
// @refactor LicenceManager Komponente
function OnlineshopsLizenzFehler($add = '')
{
if(!method_exists($this->app->erp, 'IoncubeProperty')) {
return false;
}
$shops = $this->app->DB->SelectArr("SELECT shoptyp,modulename FROM shopexport WHERE aktiv = 1 AND (shoptyp = 'intern' OR shoptyp = 'custom') AND modulename <> '' ORDER BY modulename");
if(!$shops) {
return false;
}
$counts = null;
foreach($shops as $shop)
{
if($shop['shoptyp'] === 'intern')
{
$modulename = $shop['modulename'];
}else{
if(preg_match_all('/(.*)\_(\d+).php/i',$shop['modulename'],$erg))
{
$modulename = $erg[1][0];
}else $modulename = '';
}
if($modulename != '')
{
if(!isset($counts[$modulename]))$counts[$modulename] = 0;
$counts[$modulename]++;
}
}
if($add != '')
{
if(substr($add,-4) === '.php')
{
if(preg_match_all('/(.*)\_(\d+).php/i',$add,$erg))
{
$add = $erg[1][0];
}else {
$add = '';
}
}
}
if($add != '')
{
if(!isset($counts[$add])) {
$counts[$add] = 0;
}
$counts[$add]++;
}
if($counts) {
foreach($counts as $k => $v) {
if($v <= 1) {
continue;
}
$anz = (int)$this->IoncubeProperty('moduleanzX'.str_replace('_','X',$k));
if($anz > 0 && $anz < $v) {
return array('Error'=> 'Es '.($anz > 1?'sind':'ist').' nur '.$anz.' Importer des Typs '.ucfirst(str_replace('shopimporter_','',$k)).' lizenziert');
}
}
}
return false;
}
function getApps()
{
/** @var Appstore $obj */
@ -6283,59 +5896,9 @@ title: 'Abschicken',
$this->modulvorhandenlist[$module] = false;
return false;
}
if(!$this->IoncubeProperty('modullizenzen')) {
$this->modulvorhandenlist[$module] = true;
return true;
}
if($module === 'chat') {
$this->modulvorhandenlist[$module] = true;
return true;
}
$apps = $this->getAppList();
$hasAppModuleProperty = !empty($apps[$module]) && isset($apps[$module]['Versionen']);
if($hasAppModuleProperty && (string)$apps[$module]['Versionen'] === '') {
$this->modulvorhandenlist[$module] = true;
return true;
}
$ablaufdatum = $this->IoncubeProperty('moduleablaufdatumX'.str_replace('_','X',$module));
if(!empty($ablaufdatum) && strtotime($ablaufdatum) < strtotime(date('Y-m-d'))) {
@unlink(__DIR__.$subdir.$modulefile.'.php');
$this->modulvorhandenlist[$module] = false;
return false;
}
if(!isset($apps[$module])) {
$this->modulvorhandenlist[$module] = true;
return true;
}
$version = $this->Version();
if($hasAppModuleProperty && strpos($apps[$module]['Versionen'], $version) !== false) {
$this->modulvorhandenlist[$module] = true;
return true;
}
if(!empty(erpAPI::Ioncube_Property('moduleX'.str_replace('_','X',$module)))) {
$this->modulvorhandenlist[$module] = true;
return true;
}
if($isModuleCronjob && !empty('moduleX'.str_replace('_','X',substr($module, 8)))) {
$this->modulvorhandenlist[$module] = true;
return true;
}
if(empty(erpAPI::Ioncube_Property('modulecheck'))) {
$this->modulvorhandenlist[$module] = true;
return true;
}
if($isModulePage && strpos($module, 'shopimporter_') === 0 && !empty($this->IoncubeProperty('newversion'))) {
$this->modulvorhandenlist[$module] = true;
return true;
}
$this->modulvorhandenlist[$module] = false;
return false;
$this->modulvorhandenlist[$module] = true;
return true;
}
// @refactor in UserPermission Komponente
@ -7901,14 +7464,7 @@ function SetCheckCronjob($value)
*/
public function CheckCronjob($checkMaintenance = true)
{
if(!empty(erpAPI::Ioncube_Property('isdevelopmentversion'))) {
if (empty($this->app->erp->GetKonfiguration('last_isdevelopmentversion'))) {
$this->app->erp->SetKonfigurationValue('last_isdevelopmentversion', '1');
$this->app->erp->SetKonfigurationValue('checkcronjob_deaktiviert', '1');
return false;
}
}
elseif (!empty($this->app->erp->GetKonfiguration('last_isdevelopmentversion'))) {
if (!empty($this->app->erp->GetKonfiguration('last_isdevelopmentversion'))) {
$this->app->erp->SetKonfigurationValue('last_isdevelopmentversion', '');
$this->app->erp->SetKonfigurationValue('checkcronjob_deaktiviert', '1');
return false;
@ -12095,22 +11651,6 @@ function SendPaypalFromAuftrag($auftrag, $test = false)
if($this->app->User->GetParameter('tooltipinline_autoopen')) {
$this->app->Tpl->Add('INLINEHELPOPEN', ' class="inlineautoopen" ');
}
$phone = str_replace(['-',' '],'', erpAPI::Ioncube_Property('phone_smb'));
if(empty($phone)) {
$this->app->Tpl->Set('BEFORESUPPORTPHONE', '<!--');
$this->app->Tpl->Set('AFTERSUPPORTPHONE', '-->');
}
else {
$this->app->Tpl->Set('SUPPORTPHONENUMBER', $phone);
$sipuid = $this->app->erp->ModulVorhanden('sipgate') && $this->app->erp->GetPlacetelSipuid();
if(!empty($sipuid)) {
$this->app->Tpl->Set('SIPGATEACTIVE', 1);
$this->app->Tpl->Set('SUPPORTPHONENUMBERLINK', '#');
}
else{
$this->app->Tpl->Set('SUPPORTPHONENUMBERLINK', 'tel://'.$phone);
}
}
$this->app->Tpl->Parse('PAGE','tooltipinline.tpl');
}

View File

@ -101,10 +101,7 @@ class Briefpapier extends SuperFPDF {
$hintergrund = $this->getStyleElement('hintergrund');
if(!empty(erpAPI::Ioncube_Property('isdevelopmentversion'))) {
$this->setDevelopmentVersionBackground();
}
elseif($this->app->erp->BriefpapierHintergrunddisable)
if($this->app->erp->BriefpapierHintergrunddisable)
{
}
else if($hintergrund=='logo')

View File

@ -305,10 +305,8 @@ class Appstore {
$ret['lightuser'] = (int)$art['menge'];
}
$maxUser = erpAPI::Ioncube_Property('maxuser');
$maxLightUser = erpAPI::Ioncube_Property('maxlightuser');
$ret['maxuser'] = (int)$maxUser;
$ret['maxlightuser'] = (int)$maxLightUser;
$ret['maxuser'] = 0;
$ret['maxlightuser'] = 0;
if(!empty($data['customerinfo'])) {
$ret = array_merge($ret, $data['customerinfo']);
$ret['customerinfo'] = $this->getCustomInfoHtml($data['customerinfo']);
@ -386,12 +384,12 @@ class Appstore {
'user' => 'Benutzeranzahl',
'agreement' => 'Einverständnis',
];
$isTestlizenz = !empty(erpAPI::Ioncube_Property('testlizenz'));
$isTestlizenz = false;
if(!$isTestlizenz) {
unset($mapping['agreement']);
$field = 'add_user';
$new = $data['user'];
$old = erpAPI::Ioncube_Property('maxuser');
$old = 0;
return $this->SendBuyInfo($field, $new, $old);
}
$error = [];
@ -808,8 +806,8 @@ class Appstore {
*/
private function isPossibleToChangeUser($type, $count)
{
$oldUser = (int)erpAPI::Ioncube_Property('maxuser');
$oldLightUser = (int)erpAPI::Ioncube_Property('maxlightuser');
$oldUser = 0;
$oldLightUser = 0;
$maxUser = $oldUser;
$maxLightUser = $oldLightUser;
if($type === 'user') {
@ -986,33 +984,6 @@ class Appstore {
];
}
protected function showUpdateMessage(): void
{
if(!$this->canBuy()) {
return;
}
if($this->app->User->GetType() !== 'admin') {
return;
}
$moduleForInfos = $this->getModulesForUpdateInfo();
if(empty($moduleForInfos)) {
return;
}
$this->app->Tpl->Set(
'MESSAGE',
'<div class="info">Es sind Module zum Herunterladen verfügbar. Sie können nun ein Update installieren.
<a target="_blank" href="update.php?rand='.sha1(uniqid('', true)).'"><input type="button" value="Update starten" /></a></div>'
);
}
/**
* @return bool
*/
public function canBuy(): bool
{
return method_exists('erpAPI', 'Ioncube_Property') && !empty(erpAPI::Ioncube_Property('canbuy'));
}
/**
* @param string $iban
*
@ -1070,30 +1041,6 @@ class Appstore {
return $mod === 1;
}
/**
* @param string $module
*
* @return bool
*/
public function isModulePossibleToBuy($module): bool
{
if(!$this->canBuy()) {
return false;
}
if($this->app->erp->ModulVorhanden($module)) {
return false;
}
$buyList = $this->getActualBuyList();
if(empty($buyList['modules']) || !is_array($buyList['modules'])) {
return false;
}
return in_array($module, $buyList['modules']);
//return !empty(erpAPI::Ioncube_Property('canbuymodule'.str_replace('_','X', $module)));
}
/**
* @param bool $intern
*
@ -1445,14 +1392,6 @@ class Appstore {
if(!isset($app['project_sensitive'])){
$app['project_sensitive'] = false;
}
$ablaufdatum = $this->app->erp->IoncubeProperty('moduleablaufdatumX'.str_replace('_','X',$key));
$test = $this->app->erp->IoncubeProperty('testmoduleX'.str_replace('_','X',$key));
if(!empty($ablaufdatum)) {
$app['ablaufdatum'] = $ablaufdatum;
}
if($test) {
$app['test'] = $test;
}
if($this->app->erp->ModulVorhanden($key, $withDeactivated)) {
if($app['Versionen'] == '' || $app['Versionen'] === 'ALL') {
$res['installiert'][] = $app;
@ -3865,16 +3804,14 @@ class Appstore {
],
);
if(empty(erpAPI::Ioncube_Property('disabledevelopmentprogram'))) {
$apps['developmentprogram'] = [
'Bezeichnung' => 'Development Programm',
'Link' => 'index.php?module=developmentprogram&action=list',
'Icon' => 'Icons_dunkel_25.gif',
'Versionen' => 'ENT',
'kategorie' => '{|System|}',
'beta' => false,
];
}
$apps['developmentprogram'] = [
'Bezeichnung' => 'Development Programm',
'Link' => 'index.php?module=developmentprogram&action=list',
'Icon' => 'Icons_dunkel_25.gif',
'Versionen' => 'ENT',
'kategorie' => '{|System|}',
'beta' => false,
];
if(!empty($this->app->Tpl) && method_exists($this->app->Tpl,'pruefeuebersetzung')) {
foreach($apps as $k => $v) {
@ -4245,52 +4182,7 @@ class Appstore {
$canUserTestModule = $this->app->erp->RechteVorhanden('appstore', 'testmodule');
if($canUserTestModule && $this->app->erp->isIoncube() && $this->app->Secure->GetPOST('testen')) {
$modul = $this->app->Secure->GetPOST('modul');
$get = $this->app->Secure->GetPOST('modulbestaetigen');
$json = false;
if($modul == '' && $get != '') {
$json = true;
$message = '';
if($module && !empty($module['kauf'])) {
foreach($module['kauf'] as $k => $v) {
if($v['md5'] === $get) {
$mods = $this->app->erp->getAppList();
foreach($mods as $k2 => $v2) {
if(md5($v2['Bezeichnung']) === $get) {
$modul = $k2;
break;
}
}
}
}
}
}
if($modul) {
$testapp = $modul;
if(is_file(dirname(__DIR__).'/update.php')) {
$result = '';
include_once dirname(__DIR__).'/update.php';
if($result === 'OK') {
$message = '<div class="info">Das Modul wurde zum Testen angefragt. Bitte ziehen Sie sich über den Update-Prozess in ca 10 Minuten ein Update. Sie erhalten mit diesem das Modul zum Testen.</div>';
if(!$json) {
$this->app->Tpl->Add('MESSAGE', $message);
}
}
else{
$message = '<div class="error">Es ist ein Fehler beim Senden der Anfrage aufgetreten: '.$result.'</div>';
if(!$json) {
$this->app->Tpl->Add('MESSAGE', $message);
}
}
}
}
if($json) {
return new JsonResponse(['html'=>$message]);
}
$this->clearCache();
}
elseif($canUserTestModule && !empty($get = $this->app->Secure->GetGET('get')) && !empty($module['kauf'])) {
if($canUserTestModule && !empty($get = $this->app->Secure->GetGET('get')) && !empty($module['kauf'])) {
foreach($module['kauf'] as $v) {
if($v['md5'] === $get) {
$mods = $this->app->erp->getAppList();
@ -4360,7 +4252,6 @@ class Appstore {
// Detail-Seite ausblenden
$this->app->Tpl->Set('APPSTOREDETAILSEITEAUSBLENDEN', 'display: none;');
$this->showUpdateMessage();
/** @var Welcome $welcome */
$welcome = $this->app->loadModule('welcome');

View File

@ -906,38 +906,6 @@ class Benutzer
if(is_numeric($user) && $module!='' && $action!='' && $value!='') {
$id = $this->app->DB->Select("SELECT id FROM userrights WHERE user='$user' AND module='$module' AND action='$action' LIMIT 1");
if($value && $this->app->erp->isIoncube() && method_exists('erpAPI','Ioncube_getMaxLightusersRights') && method_exists('erpAPI','Ioncube_LightuserRechteanzahl'))
{
$lightuser = $this->app->DB->Select("SELECT id FROM `user` WHERE id = '$user' AND type='lightuser' LIMIT 1");
if($lightuser)
{
$anzerlaubt = erpAPI::Ioncube_getMaxLightusersRights();
$anzvorhanden = erpAPI::Ioncube_LightuserRechteanzahl($this->app, $user);
if($anzvorhanden >= $anzerlaubt)
{
exit;
}
if($id)
{
if(!$this->app->DB->Select("SELECT permission FROM userrights WHERE id = '$id'"))exit;
}else{
if($anzvorhanden + 1 > $anzerlaubt)exit;
}
}
if($value && method_exists($this->app->erp, 'ModuleBenutzeranzahlLizenzFehler') && ($err = $this->app->erp->ModuleBenutzeranzahlLizenzFehler($module)))
{
if(isset($err['Error']))
{
if(is_array($err['Error']))
{
echo "Error".implode('<br />',$err['Error']);
}else{
echo "Error".$err['Error'];
}
}
exit;
}
}
if(is_numeric($id) && $id>0)
{
if($value=="1")

View File

@ -1,4 +1,4 @@
<?php
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
@ -10,8 +10,8 @@
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
*/
?>
<?php
use Xentral\Modules\SystemConfig\SystemConfigModule;
@ -80,8 +80,6 @@ class Dataprotection
$this->app->Location->execute('index.php?module=dataprotection&action=services');
}
$isDemo = !empty(erpAPI::Ioncube_Property('testlizenz'))
&& !empty(erpAPI::Ioncube_Property('iscloud'));
$google = $this->isGoogleAnalyticsActive();
$improvement = $this->isImprovementProgramActive();
$hubspot = $this->isHubspotActive();
@ -102,9 +100,7 @@ class Dataprotection
if($zendesk) {
$this->app->Tpl->Set('DATAPROTECTION_ZENDESK', ' checked="checked" ');
}
if(!$isDemo) {
$this->app->Tpl->Set('DISABLED_HUBSPOT', ' disabled="disabled" ');
}
$this->app->Tpl->Set('DISABLED_HUBSPOT', ' disabled="disabled" ');
$this->app->erp->MenuEintrag('index.php?module=dataprotection&action=list', 'Datenschutzerklärung');
$this->app->erp->MenuEintrag('index.php?module=dataprotection&action=services', 'Dienste');
@ -163,12 +159,6 @@ class Dataprotection
{
$hubspot = $this->systemConfigModule->tryGetValue('dataprotection', 'hubspot');
$isDemo = !empty(erpAPI::Ioncube_Property('testlizenz'))
&& !empty(erpAPI::Ioncube_Property('iscloud'));
if($hubspot === null) {
return $isDemo;
}
return $hubspot === '1';
}
}

View File

@ -126,7 +126,7 @@ class Einstellungen {
}
$this->app->erp->MenuEintrag('index.php?module=einstellungen&action=betaprogram', 'Beta Programm');
if(!empty(erpAPI::Ioncube_Property('isbetaactive'))) {
if(false) {
$this->app->Tpl->Set('BEFORESHOWIFBETADEACTIVATED', '<!--');
$this->app->Tpl->Set('AFTERSHOWIFBETADEACTIVATED', '-->');
}

View File

@ -1,4 +1,4 @@
<?php
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
@ -10,8 +10,8 @@
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
*/
?>
<?php
use Xentral\Components\Http\JsonResponse;
@ -124,12 +124,6 @@ class Learningdashboard
$initialSetupLesson->addTask(new Task($wizardService->getWizard('basic_settings', $userId)));
$initialSetupLesson->addTask(new Task($wizardService->getWizard('parts_list', $userId)));
/** @var EnvironmentConfig $environmentConfig */
$environmentConfig = $this->app->Container->get('EnvironmentConfig');
if($environmentConfig->isSystemFlaggedAsDevelopmentVersion() || $environmentConfig->isSystemFlaggedAsTestVersion()){
$initialSetupLesson->addTask(new Task($wizardService->getWizard('restore_factory_settings', $userId)));
}
$shopConnectionLesson = new Lesson('Shopanbindung');
$shopConnectionLesson->addTask(new Task($wizardService->getWizard('shopify', $userId)));
$shopConnectionLesson->addTask(new Task($wizardService->getWizard('amazon', $userId)));

View File

@ -1765,9 +1765,6 @@ INNER JOIN shopexport s ON
*/
public function createInternShop($auswahlmodul)
{
if($fehler = $this->app->erp->OnlineshopsLizenzFehler($auswahlmodul)) {
return ['success'=>false,'error'=>$fehler['Error']];
}
$bezeichnung = ucfirst(str_replace('shopimporter_','',$auswahlmodul));
$i = 1;
while($this->app->DB->Select("SELECT id FROM shopexport WHERE bezeichnung = '$bezeichnung' LIMIT 1")) {

View File

@ -989,57 +989,6 @@ class Supportapp Extends GenSupportapp {
}
}
/*
$updatedaten = $this->app->DB->SelectArr("SELECT w.*,
date_format(versionupdate,'%d.%m.%Y %H:%i:%s') as versionupdatede ,
date_format(ioncube_expdate,'%d.%m.%Y') as ioncube_expdatede,
datediff(ioncube_expdate,CURDATE()) as diff FROM wawisionsupport w WHERE adresse = '$kundenid' LIMIT 1");
if($updatedaten)
{
$updatedaten = reset($updatedaten);
$this->app->Tpl->Add('UPDATE_MODULLIST',str_replace(',',', ',$updatedaten['module']));
$revision = $updatedaten['revision'];
if($revision)$revision = '<a target="_blank" href="http://192.168.0.81/versionen/versionen.php?version='.$revision.'">'.$revision.'</a>';
$this->app->Tpl->Add('UPDATE_REVISION',$revision);
$this->app->Tpl->Add('UPDATE_MAXUSER', $updatedaten['ioncube_maxuser']);
$this->app->Tpl->Add('UPDATE_MAXLIGHTUSER', $updatedaten['ioncube_maxlightuser']);
$this->app->Tpl->Add('UPDATE_VERSIONUPATE', $updatedaten['versionupdatede']);
$this->app->Tpl->Add('UPDATE_ABLAUFAM',$updatedaten['ioncube_expdatede']);
$this->app->Tpl->Add('UPDATE_ABLAUFIN',$updatedaten['diff']);
$this->app->Tpl->Add('UPDATE_VERSIONSHINWEIS',$updatedaten['versionshinweis']);
$this->app->Tpl->Add('UPDATE_DEAKTIVIEREN', $updatedaten['ioncube_deaktivateonexp']?'ja':'nein');
$this->app->Tpl->Add('UPDATE_GESPERRT', $updatedaten['gesperrt']?'ja':'nein');
$this->app->Tpl->Add('UPDATE_TESTLIZENZ', $updatedaten['testlizenz']?'ja':'nein');
$this->app->Tpl->Add('UPDATE_CLOUD', $updatedaten['cloud']!=''?ucfirst($updatedaten['cloud']):'Kauf Erstvertrag');
if($updatedaten['module_custom']!='')
{
$this->app->Tpl->Add('UPDATEWARNUNG','<div class="error">Kundenspezifische Modifikationen vorhanden!</div>');
$module_custom = json_decode($updatedaten['module_custom']);
foreach($module_custom as $datei => $arr)
{
if(strpos($datei,'/download/') !== 0)
{
$this->app->Tpl->Add('UEBERLADENLISTE','<div >'.$datei.'');
//foreach($arr as $fkey => $arr2)
// {
// $this->app->Tpl->Add('UEBERLADENLISTE','<pre>'."\r\n...\r\n");
// foreach($arr2 as $v)$this->app->Tpl->Add('UEBERLADENLISTE',$v);
// $this->app->Tpl->Add('UEBERLADENLISTE',"\r\n...\r\n".'</pre><br /><br />');
//}
$this->app->Tpl->Add('UEBERLADENLISTE','</div>');
}
}
}
}*/
//$this->app->Tpl->Add('MODULEUPDATE');
$updates ='<table class="mkTable" cellpadding="0" cellspacing="0">
<tr>
<td>Datum</td>

View File

@ -719,7 +719,6 @@ class Systemhealth {
'max_upload' => 'Upload-Kapazit&auml;t',
'max_execution_time' => 'Scriptlauftzeit',
'userdata_writeable' => 'Schreibrechte in Userdata',
'ioncube' => 'Lizenz',
'tls1-2' => 'TLS v1.2',
],
'settings' => [

View File

@ -720,25 +720,6 @@ class Systemlog {
}
}
$typeToMessage['php-ssh2'] = (!empty($ret)?count($ret):0) - 1;
if(!function_exists('ioncube_loader_version')) {
$tmp['status'] = 'warning';
$tmp['text'] = 'Ioncube ist nicht installiert (Eine Installation ist trotzdem m&ouml;glich)';
$ret[] = $tmp;
}
else {
$ioncube_loader_version = ioncube_loader_version();
if($ioncube_loader_version[0]< 5 && $ioncube_loader_version[1] === '.') {
$tmp['status'] = 'warning';
$tmp['text'] = 'Die Ioncubeversion ist zu alt (Eine Installation ist trotzdem m&ouml;glich)';
$ret[] = $tmp;
}
else{
$tmp['status'] = 'ok';
$tmp['text'] = 'Ioncube verf&uuml;gbar';
$ret[] = $tmp;
}
}
$typeToMessage['ioncube'] = (!empty($ret)?count($ret):0) - 1;
$post_max_size = @ini_get('client_max_body_size');
if($post_max_size == ''){
$post_max_size = @ini_get('post_max_size');

View File

@ -2244,41 +2244,6 @@ $this->app->Tpl->Add('TODOFORUSER',"<tr><td width=\"90%\">".$tmp[$i]['aufgabe'].
$this->app->Tpl->Add('TAB1','OpenXE is free open source software under AGPL/EGPL license, based on <a href="https://xentral.com" target="_blank">Xentral®</a> by Xentral&nbsp;ERP&nbsp;Software&nbsp;GmbH.<br><br><div class="info"><img src="themes/new/images/Xentral_ERP_Logo-200.png"><br>Das Logo und der Link zur Homepage <a href="https://xentral.biz" target=\_blank\>https://xentral.biz</a> d&uuml;rfen nicht entfernt werden.</div><br>&copy; Copyright by OpenXE project & Xentral ERP Software GmbH Augsburg');
}
if($this->app->erp->isIoncube() && method_exists($this->app->erp, 'IoncubeProperty'))
{
if(method_exists('erpAPI','Ioncube_Property'))
{
$hinweis = erpAPI::Ioncube_Property('versionshinweis');
}else{
$hinweis = $this->app->erp->IoncubeProperty('versionshinweis');
}
if($hinweis){$hinweis = ' ('.$hinweis.')';}else{$hinweis = '';}
if(method_exists('erpAPI', 'Ioncube_HasExpired'))
{
$hasexpired = erpAPI::Ioncube_HasExpired();
}else{
$hasexpired = $this->app->erp->IoncubeHasExpired();
}
if(method_exists('erpAPI', 'Ioncube_ExpireDate'))
{
$expiredate = erpAPI::Ioncube_ExpireDate();
}else{
$expiredate = $this->app->erp->IoncubeExpireDate();
}
if($hasexpired && is_dir(dirname(dirname(__DIR__)).'/www_oss') && is_dir(dirname(dirname(__DIR__)) . '/phpwf_oss') && is_dir(dirname(dirname(__DIR__)) . '/phpwf_oss/types') && $this->app->User->GetType() == 'admin')
{
if(is_dir(dirname(dirname(__DIR__)).'/www_oss') && is_dir(dirname(dirname(__DIR__)) . '/phpwf_oss') && is_dir(dirname(dirname(__DIR__)) . '/phpwf_oss/types') && $this->app->User->GetType() == 'admin')
{
$this->app->Tpl->Add('TAB1','<form method="post"><div class="info">
<input type="checkbox" value="1" name="restoreoss" /> {|Wieder auf Open-Source Version wechseln|}<br />
Hinweis: Bitte sichern Sie wenn Sie eigene Quelltexte in Xentral hinterlegt haben diese gesondert. Es werden alle fremden Quelltextdateien entfernt.<br />
<input type="submit" style="margin:5px;" value="{|Jetzt auf Open-Source Version wechseln|}" /><div style="clear:both;"></div>
</div></form>');
}
}
}
$tmp = file_get_contents('../LICENSE');
$phpmailer = file_get_contents('../www/plugins/phpmailer/LICENSE');
@ -2288,109 +2253,6 @@ $this->app->Tpl->Add('TODOFORUSER',"<tr><td width=\"90%\">".$tmp[$i]['aufgabe'].
$this->app->Tpl->Add('TAB1','</td></tr>');
if($this->app->erp->isIoncube() && method_exists($this->app->erp, 'IoncubeProperty'))
{
$first = true;
if(method_exists('erpAPI','Ioncube_getMaxUser'))
{
$maxuser = erpAPI::Ioncube_getMaxUser();
}else{
$maxuser = $this->app->erp->IoncubegetMaxUser();
}
$maxlightuser = 0;
$maxlightuserrechte = 0;
$anzahllightuser = 0;
if(method_exists('erpAPI','Ioncube_getMaxLightusers') && method_exists('erpAPI','Ioncube_getMaxLightusersRights'))
{
$maxlightuser = erpAPI::Ioncube_getMaxLightusers();
$maxlightuserrechte = erpAPI::Ioncube_getMaxLightusersRights();
}
$mitarbeiterzeiterfassung = $this->app->erp->ModulVorhanden('mitarbeiterzeiterfassung')?$maxuser:0;
if($maxuser) {
$anzuser2 = 0;
if($maxlightuser > 0) {
$anzuser2 = (int)$this->app->DB->Select("SELECT count(DISTINCT u.id) FROM `user` u WHERE activ = 1 AND type = 'lightuser' ");
$anzahllightuser = $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'");
}else{
$anzuser = (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");
}
$userred = $anzuser > $maxuser
|| (
($anzuser + $anzuserzeiterfassung + $anzuser2) >
$mitarbeiterzeiterfassung + $maxuser + $maxlightuser
)
|| (($anzuser + $anzuserzeiterfassung) > $mitarbeiterzeiterfassung + $maxuser);
$this->app->Tpl->Add(
'TAB1',
'<tr><td><div' . ($userred ? ' style="color:red;" ' : '') . '>Benutzer ' .
($anzuser + $anzahllightuser + $anzuserzeiterfassung) .
($maxlightuser > 0 || $anzuserzeiterfassung > 0?' (davon ':'').
($maxlightuser > 0 ? $anzahllightuser . ' Light-User' : '') .
($maxlightuser > 0 && $anzuserzeiterfassung > 0?', ':'').
($anzuserzeiterfassung > 0 ? $anzuserzeiterfassung . ' Zeiterfassung-User' : '') .
($maxlightuser > 0 || $anzuserzeiterfassung > 0?')':'').
' von ' .
($maxuser + $maxlightuser + $mitarbeiterzeiterfassung) .
($maxlightuser > 0 || $mitarbeiterzeiterfassung > 0?' (davon ':'').
($maxlightuser > 0 ? $maxlightuser . ' Light-User' : '') .
($maxlightuser > 0 && $mitarbeiterzeiterfassung > 0?', ':'').
($mitarbeiterzeiterfassung > 0 ? $mitarbeiterzeiterfassung . ' Zeiterfassung-User' : '') .
($maxlightuser > 0 || $mitarbeiterzeiterfassung > 0?')':'').
'</div></td></tr>'
);
}
if(method_exists('erpAPI','Ioncube_Property'))
{
$hinweis = erpAPI::Ioncube_Property('versionshinweis');
}else{
$hinweis = $this->app->erp->IoncubeProperty('versionshinweis');
}
if($hinweis){
$hinweis = ' ('.$hinweis.')';
}else{
$hinweis = '';
}
if(method_exists('erpAPI', 'Ioncube_HasExpired'))
{
$hasexpired = erpAPI::Ioncube_HasExpired();
}else{
$hasexpired = $this->app->erp->IoncubeHasExpired();
}
if(method_exists('erpAPI', 'Ioncube_ExpireDate'))
{
$expiredate = erpAPI::Ioncube_ExpireDate();
}else{
$expiredate = $this->app->erp->IoncubeExpireDate();
}
if(method_exists('erpAPI', 'Ioncube_BeforeExpire'))
{
$ioncubebeforeexpire = erpAPI::Ioncube_BeforeExpire();
}else{
$ioncubebeforeexpire = $this->app->erp->IoncubeBeforeExpire();
}
if($hasexpired)
{
$first = false;
$this->app->Tpl->Add('TAB1','<tr><td><div style="color:red;">Ihre Lizenz ist am '.$expiredate.' abgelaufen'.$hinweis.'.</div></td></tr>');
} elseif($ioncubebeforeexpire) {
$first = false;
$this->app->Tpl->Add('TAB1','<tr><td><div style="color:red;">Ihre Lizenz l&auml;uft am '.$expiredate.' ab'.$hinweis.'.</div></td></tr>');
} elseif($expiredate) {
$first = false;
$this->app->Tpl->Add('TAB1','<tr><td><div>Die Lizenz l&auml;uft am '.$expiredate.' ab'.$hinweis.'.</div></td></tr>');
}
}
if(method_exists($this->app->erp, 'VersionsInfos'))
{
$ver = $this->app->erp->VersionsInfos();
@ -3117,8 +2979,6 @@ $this->app->Tpl->Add('TODOFORUSER',"<tr><td width=\"90%\">".$tmp[$i]['aufgabe'].
{
$userNames = [];
$members = [];
$needToPreventExampleImportFailure = !empty(erpAPI::Ioncube_Property('testlizenz'))
&& !empty(erpAPI::Ioncube_Property('iscloud'));
for($i = 0; $i < 5; $i++) {
$userName = $this->app->Secure->GetPOST('teamMemberName'.($i > 0?(string)$i:''));
if(empty($userName)) {
@ -3160,9 +3020,6 @@ $this->app->Tpl->Add('TODOFORUSER',"<tr><td width=\"90%\">".$tmp[$i]['aufgabe'].
)
);
$addressId = (int)$this->app->DB->GetInsertID();
if($needToPreventExampleImportFailure) {
$addressId = $this->ChangeAddressIdIfCollideWithExampleData($addressId);
}
$this->app->erp->AddRolleZuAdresse($addressId, 'Mitarbeiter', 'von', 'Projekt', $projectId);
$vorlage =
$this->app->DB->real_escape_string(
@ -3185,9 +3042,6 @@ $this->app->Tpl->Add('TODOFORUSER',"<tr><td width=\"90%\">".$tmp[$i]['aufgabe'].
)
);
$newUserId = (int)$this->app->DB->GetInsertID();
if($needToPreventExampleImportFailure){
$newUserId = $this->ChangeUserIdIfCollideWithExampleData($newUserId);
}
$this->app->erp->insertDefaultUserRights($newUserId);
if($vorlage !== '') {
$this->app->erp->AbgleichBenutzerVorlagen($newUserId);

View File

@ -794,50 +794,26 @@ class Zahlungsweisen {
}
}
if($this->app->erp->isIoncube() && $this->app->Secure->GetPOST('testen')) {
$modul = $this->app->Secure->GetPOST('modul');
if($modul) {
$testapp = $modul;
if(is_file(dirname(__DIR__).'/update.php')) {
$result = '';
include_once dirname(__DIR__).'/update.php';
if($result === 'OK') {
$this->app->Tpl->Add(
'MESSAGE',
'<div class="info">Das Modul wurde zum Testen angefragt. Bitte update xentral in
fr&uuml;hestens 10 Minuten um das Modul zu laden</div>'
);
}
else{
$this->app->Tpl->Add(
'MESSAGE',
'<div class="error">Es ist ein Fehler beim Updaten aufgetreten: '.$result.'</div>');
}
}
}
}
else{
$get = $this->app->Secure->GetGET('get');
if($get && $module){
if(isset($module['kauf'])){
foreach($module['kauf'] as $k => $v) {
if($v['md5'] == $get){
$mods = $this->app->erp->getAppList();
foreach($mods as $k2 => $v2) {
if(md5($v2['Bezeichnung']) == $get){
$this->app->Tpl->Add(
'MESSAGE',
'<div class="info">Bitte best&auml;tigen: <form method="POST" action="index.php?module=versandarten&action=create"><input type="hidden" name="modul" value="'.$k2.'" /><input type="submit" style="float:right;" value="Testmodul '.$v2['Bezeichnung'].' anfragen" name="testen" /></form></div>'
);
break;
}
$get = $this->app->Secure->GetGET('get');
if($get && $module){
if(isset($module['kauf'])){
foreach($module['kauf'] as $k => $v) {
if($v['md5'] == $get){
$mods = $this->app->erp->getAppList();
foreach($mods as $k2 => $v2) {
if(md5($v2['Bezeichnung']) == $get){
$this->app->Tpl->Add(
'MESSAGE',
'<div class="info">Bitte best&auml;tigen: <form method="POST" action="index.php?module=versandarten&action=create"><input type="hidden" name="modul" value="'.$k2.'" /><input type="submit" style="float:right;" value="Testmodul '.$v2['Bezeichnung'].' anfragen" name="testen" /></form></div>'
);
break;
}
}
}
}
}
}
$modullist = $this->getApps();
/** @var Appstore $appstore */
$appstore = $this->app->loadModule('appstore');

View File

@ -354,25 +354,6 @@
$ret[] = $tmp;
}
if(!function_exists('ioncube_loader_version'))
{
$tmp['status'] = 'warning';
$tmp['text'] = 'Ioncube ist nicht installiert (Eine Installation ist trotzdem m&ouml;glich)';
$ret[] = $tmp;
} else {
$ioncube_loader_version = ioncube_loader_version();
if($ioncube_loader_version[0]< 5 && $ioncube_loader_version[1] == '.')
{
$tmp['status'] = 'warning';
$tmp['text'] = 'Die Ioncubeversion ist zu alt (Eine Installation ist trotzdem m&ouml;glich)';
$ret[] = $tmp;
}else{
$tmp['status'] = 'ok';
$tmp['text'] = 'Ioncube verf&uuml;gbar';
$ret[] = $tmp;
}
}
if(!file_exists("../../database/struktur.sql"))
{
$tmp['status'] = 'error';

View File

@ -21,14 +21,6 @@
<div class="header-headlines">
<p>{|Hilfe & Ressourcen|}</p>
<strong>[INLINEHELPHEADING]</strong>
[BEFORESUPPORTPHONE]
<a class="inlinehelphonenumber" href="[SUPPORTPHONENUMBERLINK]" data-phonenumber="[SUPPORTPHONENUMBER]" data-sipgate="[SIPGATEACTIVE]">
<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M25.5 13C25.5 19.9036 19.9036 25.5 13 25.5C6.09644 25.5 0.5 19.9036 0.5 13C0.5 6.09644 6.09644 0.5 13 0.5C19.9036 0.5 25.5 6.09644 25.5 13Z" stroke="#2DCA73"/>
<path d="M18.3333 15.2053C17.1827 15.2053 16.0853 14.9547 15.0733 14.46C14.9147 14.384 14.7307 14.372 14.5627 14.4293C14.3947 14.488 14.2573 14.6107 14.18 14.7693L13.7 15.7627C12.26 14.936 11.0653 13.74 10.2373 12.3L11.232 11.82C11.392 11.7427 11.5133 11.6053 11.572 11.4373C11.6293 11.2693 11.6187 11.0853 11.5413 10.9267C11.0453 9.916 10.7947 8.81867 10.7947 7.66667C10.7947 7.29867 10.496 7 10.128 7H7.66667C7.29867 7 7 7.29867 7 7.66667C7 13.916 12.084 19 18.3333 19C18.7013 19 19 18.7013 19 18.3333V15.872C19 15.504 18.7013 15.2053 18.3333 15.2053Z" fill="#2DCA73"/>
</svg>
</a>
[AFTERSUPPORTPHONE]
</div>
</div>
[BEFOREINLINEMENU]

View File

@ -296,17 +296,6 @@ class WidgetShopexport extends WidgetGenShopexport
}
}
}
$err = null;
if($altedaten && $this->app->Secure->GetPOST('aktiv') && method_exists($this->app->erp, 'OnlineshopsLizenzFehler'))
{
if($err = $this->app->erp->OnlineshopsLizenzFehler($data['modulename']))
{
$this->app->DB->Update("UPDATE shopexport SET aktiv = '0' WHERE id = '$id' LIMIT 1");
$this->form->HTMLList['aktiv']->dbvalue = 0;
$this->form->HTMLList['aktiv']->htmlvalue = 0;
$this->app->User->SetParameter('shopexport_meldung', '<div class="error">'.$err['Error'].'</div>');
}
}
$this->app->erp->RunHook('shopexport_speichern',1, $id);
}
}else