date, acym_getDateTimeFormat())); ?>
ip); ?>
action);
$translation = acym_translation($langKey);
echo esc_html($translation === $langKey ? $oneHistory->action : $translation);
if ($oneHistory->action === 'unsubscribed' && !empty($oneHistory->unsubscribe_reason)) {
if (is_numeric($oneHistory->unsubscribe_reason)) {
$index = $oneHistory->unsubscribe_reason - 1;
$reason = $data['unsubReasons'][$index] ?? $oneHistory->unsubscribe_reason;
} else {
$reason = $oneHistory->unsubscribe_reason;
}
echo '
'.esc_html($reason);
}
?>
data)) {
$historyData = explode("\n", $oneHistory->data);
$details = '
'.esc_html(acym_translation('ACYM_DETAILS')).'
';
if (!empty($oneHistory->mail_id)) {
$details .= ''.esc_html(acym_translation('ACYM_CAMPAIGN')).' : ';
$details .= esc_html($oneHistory->subject ?? '').' ( '.esc_html(acym_translation('ACYM_ID').' : '.$oneHistory->mail_id).' )
';
}
foreach ($historyData as $value) {
if (strpos($value, '::') === false) {
$details .= esc_html($value).'
';
continue;
}
[$part1, $part2] = explode('::', $value);
if (preg_match('#^[A-Z_]*$#', $part2)) {
$part2 = acym_translation($part2);
}
$details .= ''.esc_html(acym_translation($part1)).' : '.esc_html($part2).'
';
}
if ($oneHistory->action === 'unsubscribed') {
$details .= esc_html(acym_translation('ACYM_UNSUBSCRIBE_REASON'));
if (empty($oneHistory->unsubscribe_reason)) {
$details .= ' '.esc_html(acym_translation('ACYM_NO_REASON_SET_BY_USER'));
} else {
$reason = $data['historyClass']->getUnsubscribeReasonText($oneHistory->unsubscribe_reason);
$details .= ' '.esc_html($reason);
}
}
$details .= '';
acym_modal(
acym_translation('ACYM_VIEW_DETAILS'),
$details,
null,
['style' => 'word-break: break-word;'],
['class' => 'history_details'],
true,
false
);
}
?>
source)) {
$source = explode("\n", $oneHistory->source);
$details = '
'.esc_html(acym_translation('ACYM_SOURCE')).'
';
foreach ($source as $value) {
if (!strpos($value, '::')) continue;
[$part1, $part2] = explode('::', $value);
$details .= ''.esc_html($part1).' : '.esc_html($part2).'
';
}
$details .= '';
acym_modal(
acym_translation('ACYM_VIEW_SOURCE'),
$details,
null,
['style' => 'word-break: break-word;'],
['class' => 'history_details']
);
}
?>