From bec80d5e683e972cae7d96d598acccfc563f3531 Mon Sep 17 00:00:00 2001 From: int2001 Date: Sat, 4 Oct 2025 05:03:03 +0000 Subject: [PATCH] Add (current) streak to motivation Banner --- application/controllers/Dashboard.php | 8 ++++++++ application/views/dashboard/index.php | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php index 8042a0950..ff8e0772e 100644 --- a/application/controllers/Dashboard.php +++ b/application/controllers/Dashboard.php @@ -91,6 +91,7 @@ class Dashboard extends CI_Controller { $this->load->model('cat'); $this->load->model('vucc'); + $this->load->model('dayswithqso_model'); $data['radio_status'] = $this->cat->recent_status(); @@ -100,6 +101,13 @@ class Dashboard extends CI_Controller { $data['month_qsos'] = $this->logbook_model->month_qsos($logbooks_locations_array); $data['year_qsos'] = $this->logbook_model->year_qsos($logbooks_locations_array); + $rawstreak=$this->dayswithqso_model->getAlmostCurrentStreak(); + if (is_array($rawstreak)) { + $data['current_streak']=$rawstreak['highstreak']; + } else { + $data['current_streak']=0; + } + // Load Countries Breakdown data into array $CountriesBreakdown = $this->logbook_model->total_countries_confirmed($logbooks_locations_array); diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index 68658285e..668ac87fe 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -177,7 +177,12 @@ function getDistance($distance) {