diff --git a/application/controllers/dashboard.php b/application/controllers/dashboard.php index 3c79f08a..0d8872c7 100644 --- a/application/controllers/dashboard.php +++ b/application/controllers/dashboard.php @@ -39,6 +39,7 @@ class Dashboard extends CI_Controller { $data['total_qsl_sent'] = $this->logbook_model->total_qsl_sent(); $data['total_qsl_recv'] = $this->logbook_model->total_qsl_recv(); + $data['total_qsl_requested'] = $this->logbook_model->total_qsl_requested(); $data['total_bands'] = $this->logbook_model->total_bands(); diff --git a/application/libraries/Clublog.php b/application/libraries/Clublog.php new file mode 100644 index 00000000..7ca5ddaa --- /dev/null +++ b/application/libraries/Clublog.php @@ -0,0 +1,13 @@ +db->query('SELECT DISTINCT (COL_QSL_SENT) AS band, count(COL_QSL_SENT) AS count FROM '.$this->config->item('table_name').' WHERE COL_QSL_SENT = "R" GROUP BY band'); + + $row = $query->row(); + + if($row == null) { + return 0; + } else { + return $row->count; + } + } + function total_qsl_recv() { $query = $this->db->query('SELECT DISTINCT (COL_QSL_RCVD) AS band, count(COL_QSL_RCVD) AS count FROM '.$this->config->item('table_name').' WHERE COL_QSL_RCVD = "Y" GROUP BY band'); diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index b67ae98c..eb9551a6 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -124,15 +124,18 @@
Total QSOs | +QSOs | +|
Total | ||
QSOs This Year | +This Year | |
QSOs This Month | +This Month | |
Countrys Worked | +Countrys | +|
Worked | ||
Needed | ++ | |
QSL Cards Sent | +QSL Cards | +|
Sent | ||
QSL Cards Received | +Received | |
Requested | ++ |