';
$version .= '
'.ACYM_NAME.' '.$currentLevel.' ';
if (version_compare($currentVersion, $latestVersion, '>=')) {
$version .= acym_tooltip(
[
'hoveredText' => ''.$currentVersion.'',
'textShownInTooltip' => acym_translation('ACYM_UP_TO_DATE'),
]
);
} elseif (!empty($latestVersion)) {
if ('wordpress' === ACYM_CMS) {
$downloadLink = admin_url().'update-core.php';
} else {
$downloadLink = ACYM_ACYMAILING_WEBSITE.'account/license/" target="_blank';
}
$version .= acym_tooltip(
[
'hoveredText' => ''.$currentVersion.'',
'textShownInTooltip' => acym_translationSprintf('ACYM_CLICK_UPDATE', $latestVersion),
'titleShownInTooltip' => acym_translation('ACYM_OLD_VERSION'),
'link' => $downloadLink,
]
);
}
$version .= '
';
$expirationDate = $this->config->get('expirationdate', 0);
if ((empty($expirationDate) || $expirationDate == -1) && empty($this->config->get('acymailer_apikey', ''))) return $version;
$version .= '';
if (acym_level(ACYM_ESSENTIAL) && ACYM_PRODUCTION) {
if ($expirationDate == -2) {
$version .= '
';
} elseif ($expirationDate < time()) {
$version .= acym_tooltip(
[
'hoveredText' => '
'.acym_translation('ACYM_SUBSCRIPTION_EXPIRED').'',
'textShownInTooltip' => acym_translation('ACYM_SUBSCRIPTION_EXPIRED_LINK'),
'link' => ACYM_ACYMAILING_WEBSITE.'account/license/',
]
);
} else {
$version .= '
'.acym_translationSprintf(
'ACYM_VALID_UNTIL',
acym_getDate($expirationDate, acym_translation('ACYM_DATE_FORMAT_LC4'))
).'
';
}
}
$creditRemainingSendingMethod = '';
acym_trigger('onAcymGetCreditRemainingSendingMethod', [&$creditRemainingSendingMethod, $reloading]);
if (!empty($creditRemainingSendingMethod)) {
$version .= '
'.$creditRemainingSendingMethod.'
';
}
$version .= '
';
return $version;
}
private function getCheckVersionButton(): string
{
if (ACYM_CMS == 'wordpress' && !acym_level(ACYM_ESSENTIAL)) {
return '';
}
$lastLicenseCheck = $this->config->get('lastlicensecheck', 0);
$time = time();
$checking = ($time > $lastLicenseCheck + 604800) ? $checking = '1' : '0';
if (empty($lastLicenseCheck)) $lastLicenseCheck = $time;
return acym_tooltip(
[
'hoveredText' => '',
'textShownInTooltip' => acym_translation('ACYM_LAST_CHECK').'