From 3ad075d3d653c5e54c0e6f52cccd3ff840b96ee1 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 23 May 2024 22:03:59 +0100 Subject: [PATCH] [Dashboard] QSO Today Notice now updates every 30 seconds This addresses #3116 --- application/controllers/Dashboard.php | 17 +++++++++++++++++ .../views/components/dashboard_todays_qsos.php | 11 +++++++++++ 2 files changed, 28 insertions(+) create mode 100644 application/views/components/dashboard_todays_qsos.php diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php index b9182213..f20a2874 100644 --- a/application/controllers/Dashboard.php +++ b/application/controllers/Dashboard.php @@ -188,6 +188,23 @@ class Dashboard extends CI_Controller } } + public function todays_qso_component() { + $this->load->model('user_model'); + + if ($this->user_model->validate_session() == 0) { + // User is not logged in + } else { + $this->load->model('logbook_model'); + $this->load->model('logbooks_model'); + } + + $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + $data['todays_qsos'] = $this->logbook_model->todays_qsos($logbooks_locations_array); + $this->load->view('components/dashboard_todays_qsos', $data); + + } + public function logbook_display_component() { $this->load->model('user_model'); diff --git a/application/views/components/dashboard_todays_qsos.php b/application/views/components/dashboard_todays_qsos.php new file mode 100644 index 00000000..2dfac0db --- /dev/null +++ b/application/views/components/dashboard_todays_qsos.php @@ -0,0 +1,11 @@ +
+ = 1) { ?> + + + + +
\ No newline at end of file