= __("Timeline"); ?>
session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/wavelog.php
$custom_date_format = $this->config->item('qso_date_format');
}
?>
input->post('award')) {
case 'dxcc': $result = write_dxcc_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $propmode, $this->input->post('award'), $selectedyear, $onlynew); break;
case 'was': $result = write_was_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $propmode, $this->input->post('award'), $selectedyear, $onlynew); break;
case 'iota': $result = write_iota_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $propmode, $this->input->post('award'), $selectedyear, $onlynew); break;
case 'waz': $result = write_waz_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $propmode, $this->input->post('award'), $selectedyear, $onlynew); break;
case 'vucc': $result = write_vucc_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $propmode, $this->input->post('award'), $selectedyear, $onlynew); break;
case 'waja': $result = write_waja_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $propmode, $this->input->post('award'), $selectedyear, $onlynew); break;
}
}
else {
echo '
' . __("Nothing found!") . '
';
}
?>
date ?? '1970-01-01 00:00:00'));
return $entry_year == $selectedyear; // Include only rows matching the year
}
return true; // Include all rows if $onlynew is not 1
});
}
function filter_timeline_array_vucc($timeline_array, $selectedyear, $onlynew) {
// Filter the timeline array
return array_filter($timeline_array, function($line) use ($selectedyear, $onlynew) {
if ($onlynew == "1") {
$entry_year = date('Y', strtotime($line['date'] ?? '1970-01-01 00:00:00')); // Use array key 'date'
return $entry_year == $selectedyear; // Include only rows matching the year
}
return true; // Include all rows if $onlynew is not 1
});
}
function write_dxcc_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $propmode, $award, $selectedyear, $onlynew) {
// Apply filtering to the timeline array
$filtered_timeline = filter_timeline_array($timeline_array, $selectedyear, $onlynew);
$i = count($filtered_timeline); // General counter for all entries
echo '