Added Year to modal

This commit is contained in:
int2001
2025-03-10 15:24:38 +00:00
parent 995332a0a7
commit babb131beb
3 changed files with 8 additions and 2 deletions

View File

@@ -894,7 +894,7 @@
return $result->result();
}
public function sat_qsos($sat,$mode) {
public function sat_qsos($sat,$year,$mode) {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->db->select('*, satellite.displayname AS sat_displayname');
@@ -908,6 +908,10 @@
$this->db->or_where('COL_SUBMODE', $mode);
$this->db->group_end();
}
if (($year ?? 'All') != 'All') {
$this->db->where('COL_TIME_ON >=',date($year.'-01-01 00:00:00'));
$this->db->where('COL_TIME_ON <=',date($year.'-12-31 23:59:59'));
}
$this->db->where_in($this->config->item('table_name').'.station_id', $logbooks_locations_array);
$this->db->order_by("COL_TIME_ON desc, COL_PRIMARY_KEY desc");
$this->db->limit(500);