mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Improved Countries Breakdown by showing confirmed (by paper-QSL) and needed confirmed
This commit is contained in:
@@ -47,6 +47,7 @@ class Dashboard extends CI_Controller {
|
||||
$data['total_digi'] = $this->logbook_model->total_digi();
|
||||
|
||||
$data['total_countrys'] = $this->logbook_model->total_countrys();
|
||||
$data['total_countrys_confirmed'] = $this->logbook_model->total_countrys_confirmed();
|
||||
|
||||
$data['total_qsl_sent'] = $this->logbook_model->total_qsl_sent();
|
||||
$data['total_qsl_recv'] = $this->logbook_model->total_qsl_recv();
|
||||
|
||||
@@ -816,6 +816,17 @@ class Logbook_model extends CI_Model {
|
||||
return $query->num_rows();
|
||||
}
|
||||
|
||||
/* Return total number of countrys confirmed with paper QSL */
|
||||
function total_countrys_confirmed() {
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('Stations');
|
||||
$station_id = $CI->Stations->find_active();
|
||||
|
||||
$query = $this->db->query('SELECT DISTINCT (COL_COUNTRY) FROM '.$this->config->item('table_name').' WHERE station_id = '.$station_id.' AND COL_QSL_RCVD =\'Y\'');
|
||||
|
||||
return $query->num_rows();
|
||||
}
|
||||
|
||||
function api_search_query($query) {
|
||||
$time_start = microtime(true);
|
||||
$results = $this->db->query($query);
|
||||
|
||||
@@ -105,10 +105,17 @@
|
||||
<td>Worked</td>
|
||||
<td><?php echo $total_countrys; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Confirmed</td>
|
||||
<td><?php echo $total_countrys_confirmed; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Needed</td>
|
||||
<td><?php $dxcc = 340 - $total_countrys; echo $dxcc; ?></td>
|
||||
<td><?php
|
||||
$dxcc = 340 - $total_countrys;
|
||||
$dxcc_cfm = 340 - $total_countrys_confirmed;
|
||||
echo $dxcc." (".$dxcc_cfm.")"; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user