diff --git a/application/views/lotw_views/index.php b/application/views/lotw_views/index.php index a268fae36..63e36f263 100644 --- a/application/views/lotw_views/index.php +++ b/application/views/lotw_views/index.php @@ -43,6 +43,7 @@ + result() as $row) { ?> callsign; ?> @@ -60,7 +61,14 @@ if (isset($row->qso_end_date)) { $valid_qso_end = strtotime( $row->qso_end_date ); $new_valid_qso_end = date($this->config->item('qso_date_format'), $valid_qso_end ); - echo $new_valid_qso_end; + $qso_warning_date = date('Y-m-d H:i:s', strtotime($row->qso_end_date.'-30 days')); + if ($current_date > $row->qso_end_date) { + echo "".$new_valid_qso_end.""; + } else if ($current_date <= $row->qso_end_date && $current_date > $qso_warning_date) { + echo "".$new_valid_qso_end.""; + } else { + echo $new_valid_qso_end; + } } else { echo "n/a"; } ?> @@ -72,20 +80,29 @@ date_expires.'-30 days')); $valid_to = strtotime( $row->date_expires ); $new_valid_to = date($this->config->item('qso_date_format'), $valid_to ); - echo $new_valid_to; ?> + if ($current_date > $row->date_expires) { + echo "".$new_valid_to.""; + } else if ($current_date <= $row->date_expires && $current_date > $cert_warning_date) { + echo "".$new_valid_to.""; + } else { + echo $new_valid_to; + } ?> - - date_expires.'-30 days')); ?> - $row->date_expires) { ?> - - date_expires && $current_date > $warning_date) { ?> - + + date_expires && $current_date > $cert_warning_date) { ?> + - + + + $row->qso_end_date) { ?> + QSO end date exceeded + qso_end_date && $current_date > $qso_warning_date) { ?> +