show nicer numberformat for total qsos and show also number of users

This commit is contained in:
HB9HIL
2024-09-16 00:57:27 +02:00
parent 1c0a6d5750
commit 8d4b99dd04
3 changed files with 12 additions and 1 deletions

View File

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

View File

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

View File

@@ -70,7 +70,11 @@
</tr>
<tr>
<td><?= __("Total QSO on this instance"); ?></td>
<td><?php echo $qso_total . ' QSOs'; ?></td>
<td><?php echo number_format($qso_total, 0, '.', '\'') . ' QSOs'; ?></td>
</tr>
<tr>
<td><?= __("Total User"); ?></td>
<td><?php echo $users_total . ' User'; ?></td>
</tr>
</table>
</div>