From 8d4b99dd04aae5528f69afdd9ceaf54032f5919d Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 16 Sep 2024 00:57:27 +0200 Subject: [PATCH] show nicer numberformat for total qsos and show also number of users --- application/controllers/Debug.php | 1 + application/models/Debug_model.php | 6 ++++++ application/views/debug/index.php | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/application/controllers/Debug.php b/application/controllers/Debug.php index 329fe0547..427a8f0d5 100644 --- a/application/controllers/Debug.php +++ b/application/controllers/Debug.php @@ -41,6 +41,7 @@ class Debug extends CI_Controller $data['stations'] = $this->Stations->all(); $data['qso_total'] = $this->Debug_model->count_all_qso(); + $data['users_total'] = $this->Debug_model->count_users(); $data['available_languages'] = $this->config->item('languages'); $data['qsos_with_no_station_id'] = $this->Logbook_model->check_for_station_id(); diff --git a/application/models/Debug_model.php b/application/models/Debug_model.php index eb14fe687..0082cb420 100644 --- a/application/models/Debug_model.php +++ b/application/models/Debug_model.php @@ -161,6 +161,12 @@ class Debug_model extends CI_Model return $query->row()->total; } + function count_users() { + $sql = 'SELECT COUNT(*) AS total FROM users;'; + $query = $this->db->query($sql); + return $query->row()->total; + } + function getMigrationVersion() { $this->db->select_max('version'); $query = $this->db->get('migrations'); diff --git a/application/views/debug/index.php b/application/views/debug/index.php index 7077382e4..b5bfe9b60 100644 --- a/application/views/debug/index.php +++ b/application/views/debug/index.php @@ -70,7 +70,11 @@ - + + + + +