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

@@ -299,7 +299,8 @@ class Statistics extends CI_Controller {
$sat = str_replace('"', "", $this->security->xss_clean($this->input->post("Sat")));
$mode = str_replace('"', "", $this->security->xss_clean($this->input->post("Mode")));
$data['results'] = $this->stats->sat_qsos($sat,$mode);
$year = $this->security->xss_clean($this->input->post("Year"));
$data['results'] = $this->stats->sat_qsos($sat,$year,$mode);
$data['page_title'] = __("Log View")." - " . __("Satellite QSOs");
$data['filter'] = $sat;

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);

View File

@@ -818,6 +818,7 @@ function displaySatQsos(sat,mode) {
var ajax_data = ({
'Sat': sat,
'Mode': mode,
'Year': $("#yr option:selected").val(),
})
modalloading=true;
$.ajax({