added Paper/eQSL/LoTW...

pull/394/head
Kim Huebel 2019-12-11 22:50:21 +01:00
rodzic 64894d0573
commit 024d4df010
3 zmienionych plików z 32 dodań i 8 usunięć

Wyświetl plik

@ -47,7 +47,9 @@ 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_countrys_confirmed_paper'] = $this->logbook_model->total_countrys_confirmed_paper();
$data['total_countrys_confirmed_eqsl'] = $this->logbook_model->total_countrys_confirmed_eqsl();
$data['total_countrys_confirmed_lotw'] = $this->logbook_model->total_countrys_confirmed_lotw();
$data['total_qsl_sent'] = $this->logbook_model->total_qsl_sent();
$data['total_qsl_recv'] = $this->logbook_model->total_qsl_recv();

Wyświetl plik

@ -817,7 +817,7 @@ class Logbook_model extends CI_Model {
}
/* Return total number of countrys confirmed with paper QSL */
function total_countrys_confirmed() {
function total_countrys_confirmed_paper() {
$CI =& get_instance();
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
@ -827,6 +827,28 @@ class Logbook_model extends CI_Model {
return $query->num_rows();
}
/* Return total number of countrys confirmed with eQSL */
function total_countrys_confirmed_eqsl() {
$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_EQSL_QSL_RCVD =\'Y\'');
return $query->num_rows();
}
/* Return total number of countrys confirmed with LoTW */
function total_countrys_confirmed_lotw() {
$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_LOTW_QSL_RCVD =\'Y\'');
return $query->num_rows();
}
function api_search_query($query) {
$time_start = microtime(true);
$results = $this->db->query($query);

Wyświetl plik

@ -106,16 +106,16 @@
<td><?php echo $total_countrys; ?></td>
</tr>
<tr>
<td>Confirmed</td>
<td><?php echo $total_countrys_confirmed; ?></td>
<td>Confirmed (paper/eQSL/LoTW)</td>
<td><?php
echo $total_countrys_confirmed_paper; ?>/<?php
echo $total_countrys_confirmed_eqsl; ?>/<?php
echo $total_countrys_confirmed_lotw; ?></td>
</tr>
<tr>
<td>Needed</td>
<td><?php
$dxcc = 340 - $total_countrys;
$dxcc_cfm = 340 - $total_countrys_confirmed;
echo $dxcc." (".$dxcc_cfm.")"; ?></td>
<td><?php $dxcc = 340 - $total_countrys; echo $dxcc; ?></td>
</tr>
<tr>