Update notification reminder conditions to allow for more flexible configuration

This commit is contained in:
Focuslinkstech 2025-03-02 15:36:14 +01:00
parent 366ef73d57
commit d8dbe68f51

View File

@ -49,19 +49,19 @@ foreach ($d as $ds) {
} else {
$price = $p['price'];
}
if ($ds['expiration'] == $day7 && $config['notification_reminder_7day'] == 'yes') {
if ($ds['expiration'] == $day7 && $config['notification_reminder_7day'] !== 'no') {
try {
echo Message::sendPackageNotification($c, $p['name_plan'], $price, Lang::getNotifText('reminder_7_day'), $config['user_notification_reminder']) . "\n";
} catch (Exception $e) {
sendTelegram("Cron Reminder failed to send 7-day reminder to " . $ds['username'] . " Error: " . $e->getMessage());
}
} else if ($ds['expiration'] == $day3 && $config['notification_reminder_3day'] == 'yes') {
} else if ($ds['expiration'] == $day3 && $config['notification_reminder_3day'] !== 'no') {
try {
echo Message::sendPackageNotification($c, $p['name_plan'], $price, Lang::getNotifText('reminder_3_day'), $config['user_notification_reminder']) . "\n";
} catch (Exception $e) {
sendTelegram("Cron Reminder failed to send 3-day reminder to " . $ds['username'] . " Error: " . $e->getMessage());
}
} else if ($ds['expiration'] == $day1 && $config['notification_reminder_1day'] == 'yes') {
} else if ($ds['expiration'] == $day1 && $config['notification_reminder_1day'] !== 'no') {
try {
echo Message::sendPackageNotification($c, $p['name_plan'], $price, Lang::getNotifText('reminder_1_day'), $config['user_notification_reminder']) . "\n";
} catch (Exception $e) {