From 587a39ab837fb145663a710f00fbb092a7dc0f53 Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 26 Apr 2023 22:39:09 +0200 Subject: [PATCH 1/7] Show badge and hints about deleted DXCCs --- application/language/english/general_words_lang.php | 1 + application/language/german/general_words_lang.php | 1 + application/language/swedish/general_words_lang.php | 1 + application/models/Logbook_model.php | 2 ++ application/models/LotwCert.php | 2 +- application/models/Stations.php | 4 ++-- application/views/dashboard/index.php | 2 +- application/views/dxatlas/index.php | 2 +- application/views/kml/index.php | 2 +- application/views/logbooks/edit.php | 2 +- application/views/lookup/index.php | 2 +- application/views/lotw_views/index.php | 2 +- application/views/qso/edit_ajax.php | 6 +++++- application/views/qso/index.php | 6 +++++- application/views/station_profile/create.php | 3 ++- application/views/station_profile/edit.php | 3 ++- application/views/station_profile/index.php | 2 +- application/views/timeplotter/index.php | 6 +++--- application/views/view_log/partial/log_ajax.php | 2 +- application/views/view_log/qso.php | 6 +++--- 20 files changed, 36 insertions(+), 21 deletions(-) diff --git a/application/language/english/general_words_lang.php b/application/language/english/general_words_lang.php index 92aad195..1d716961 100644 --- a/application/language/english/general_words_lang.php +++ b/application/language/english/general_words_lang.php @@ -94,6 +94,7 @@ $lang['gen_hamradio_logbook'] = 'Logbook'; $lang['gen_hamradio_cq_zone'] = 'CQ Zone'; $lang['gen_hamradio_dxcc'] = 'DXCC'; +$lang['gen_hamradio_deleted_dxcc'] = 'deleted DXCC'; $lang['gen_hamradio_continent'] = 'Continent'; $lang['gen_hamradio_usa_state'] = 'USA State'; $lang['gen_hamradio_county_reference'] = 'USA County'; diff --git a/application/language/german/general_words_lang.php b/application/language/german/general_words_lang.php index 98e1138f..98168fa9 100644 --- a/application/language/german/general_words_lang.php +++ b/application/language/german/general_words_lang.php @@ -94,6 +94,7 @@ $lang['gen_hamradio_logbook'] = 'Logbuch'; $lang['gen_hamradio_cq_zone'] = 'CQ Zone'; $lang['gen_hamradio_dxcc'] = 'DXCC'; +$lang['gen_hamradio_deleted_dxcc'] = 'gelöschtes DXCC'; $lang['gen_hamradio_continent'] = 'Kontinent'; $lang['gen_hamradio_usa_state'] = 'USA-Staat'; $lang['gen_hamradio_county_reference'] = 'USA County'; diff --git a/application/language/swedish/general_words_lang.php b/application/language/swedish/general_words_lang.php index e8e76ce4..252532f6 100644 --- a/application/language/swedish/general_words_lang.php +++ b/application/language/swedish/general_words_lang.php @@ -94,6 +94,7 @@ $lang['gen_hamradio_logbook'] = 'Loggbok'; $lang['gen_hamradio_cq_zone'] = 'CQ Zone'; $lang['gen_hamradio_dxcc'] = 'DXCC'; +$lang['gen_hamradio_deleted_dxcc'] = 'struket DXCC'; $lang['gen_hamradio_usa_state'] = 'USA State'; $lang['gen_hamradio_county_reference'] = 'USA County'; $lang['gen_hamradio_iota_reference'] = 'IOTA Reference'; diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index aef9ca61..f8c8c02d 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1275,9 +1275,11 @@ class Logbook_model extends CI_Model { return array(); } + $this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*'); $this->db->from($this->config->item('table_name')); $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); + $this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left'); $this->db->where_in('station_profile.station_id', $logbooks_locations_array); $this->db->order_by(''.$this->config->item('table_name').'.COL_TIME_ON', "desc"); $this->db->order_by(''.$this->config->item('table_name').'.COL_PRIMARY_KEY', "desc"); diff --git a/application/models/LotwCert.php b/application/models/LotwCert.php index 2fbd8f5f..228ea6d1 100644 --- a/application/models/LotwCert.php +++ b/application/models/LotwCert.php @@ -12,7 +12,7 @@ class LotwCert extends CI_Model { */ function lotw_certs($user_id) { - $this->db->select('lotw_certs.lotw_cert_id as lotw_cert_id, lotw_certs.callsign as callsign, dxcc_entities.name as cert_dxcc, lotw_certs.qso_start_date as qso_start_date, lotw_certs.qso_end_date as qso_end_date, lotw_certs.date_created as date_created, lotw_certs.date_expires as date_expires, lotw_certs.last_upload as last_upload'); + $this->db->select('lotw_certs.lotw_cert_id as lotw_cert_id, lotw_certs.callsign as callsign, dxcc_entities.name as cert_dxcc, dxcc_entities.end as cert_dxcc_end, lotw_certs.qso_start_date as qso_start_date, lotw_certs.qso_end_date as qso_end_date, lotw_certs.date_created as date_created, lotw_certs.date_expires as date_expires, lotw_certs.last_upload as last_upload'); $this->db->where('user_id', $user_id); $this->db->join('dxcc_entities','lotw_certs.cert_dxcc_id = dxcc_entities.adif','left'); $this->db->order_by('cert_dxcc', 'ASC'); diff --git a/application/models/Stations.php b/application/models/Stations.php index 7eb47cfe..7ec18842 100644 --- a/application/models/Stations.php +++ b/application/models/Stations.php @@ -4,7 +4,7 @@ class Stations extends CI_Model { function all_with_count() { - $this->db->select('station_profile.*, dxcc_entities.name as station_country, count('.$this->config->item('table_name').'.station_id) as qso_total'); + $this->db->select('station_profile.*, dxcc_entities.name as station_country, dxcc_entities.end as dxcc_end, count('.$this->config->item('table_name').'.station_id) as qso_total'); $this->db->from('station_profile'); $this->db->join($this->config->item('table_name'),'station_profile.station_id = '.$this->config->item('table_name').'.station_id','left'); $this->db->join('dxcc_entities','station_profile.station_dxcc = dxcc_entities.adif','left'); @@ -24,7 +24,7 @@ class Stations extends CI_Model { } function all_of_user() { - $this->db->select('station_profile.*, dxcc_entities.name as station_country'); + $this->db->select('station_profile.*, dxcc_entities.name as station_country, dxcc_entities.end as dxcc_end'); $this->db->where('user_id', $this->session->userdata('user_id')); $this->db->join('dxcc_entities','station_profile.station_dxcc = dxcc_entities.adif','left'); return $this->db->get('station_profile'); diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index f4426314..12bf9a4a 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -23,7 +23,7 @@ function echo_table_col($row, $name) { case 'Mode': echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE . ''; break; case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo 'COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '';} if ($row->COL_STX_STRING) { echo 'COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '';} echo ''; break; case 'RSTR': echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo 'COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '';} if ($row->COL_SRX_STRING) { echo 'COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '';} echo ''; break; - case 'Country': echo '' . ucwords(strtolower(($row->COL_COUNTRY))) . ''; break; + case 'Country': echo '' . ucwords(strtolower(($row->COL_COUNTRY))); if ($row->end != NULL) echo ' '.$ci->lang->line('gen_hamradio_deleted_dxcc').'' . ''; break; case 'IOTA': echo '' . ($row->COL_IOTA) . ''; break; case 'SOTA': echo '' . ($row->COL_SOTA_REF) . ''; break; case 'WWFF': echo '' . ($row->COL_WWFF_REF) . ''; break; diff --git a/application/views/dxatlas/index.php b/application/views/dxatlas/index.php index 90935408..5038f9c2 100644 --- a/application/views/dxatlas/index.php +++ b/application/views/dxatlas/index.php @@ -62,7 +62,7 @@ foreach($dxcc as $d){ echo ''; } diff --git a/application/views/kml/index.php b/application/views/kml/index.php index 512d55c4..82b04e92 100644 --- a/application/views/kml/index.php +++ b/application/views/kml/index.php @@ -35,7 +35,7 @@ foreach($dxcc as $d){ echo ''; } diff --git a/application/views/logbooks/edit.php b/application/views/logbooks/edit.php index 97ea7999..1380b800 100644 --- a/application/views/logbooks/edit.php +++ b/application/views/logbooks/edit.php @@ -95,7 +95,7 @@ diff --git a/application/views/lookup/index.php b/application/views/lookup/index.php index fc839476..e09e8d15 100644 --- a/application/views/lookup/index.php +++ b/application/views/lookup/index.php @@ -16,7 +16,7 @@ foreach($dxcc as $d){ echo ''; } diff --git a/application/views/lotw_views/index.php b/application/views/lotw_views/index.php index 9bed8842..093fc766 100644 --- a/application/views/lotw_views/index.php +++ b/application/views/lotw_views/index.php @@ -44,7 +44,7 @@ result() as $row) { ?> callsign; ?> - cert_dxcc == '' ? '- NONE -' : ucfirst($row->cert_dxcc); ?> + cert_dxcc == '' ? '- NONE -' : ucfirst($row->cert_dxcc); if ($row->cert_dxcc_end != NULL) { echo ' '.$this->lang->line('gen_hamradio_deleted_dxcc').''; } ?> qso_start_date)) { $valid_qso_start = strtotime( $row->qso_start_date ); diff --git a/application/views/qso/edit_ajax.php b/application/views/qso/edit_ajax.php index a72584f2..ab82ebde 100644 --- a/application/views/qso/edit_ajax.php +++ b/application/views/qso/edit_ajax.php @@ -227,7 +227,11 @@ if ($qso->COL_DXCC == $d->adif) { echo " selected=\"selected\""; } - echo '>' . $d->prefix . ' - ' . $d->name . ''; + echo '>' . $d->prefix . ' - ' . ucwords(strtolower(($d->name))); + if ($d->Enddate != null) { + echo ' ('.$this->lang->line('gen_hamradio_deleted_dxcc').')'; + } + echo ''; } ?> diff --git a/application/views/qso/index.php b/application/views/qso/index.php index 65132bd9..291ea49d 100755 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -216,7 +216,11 @@ adif . '>' . $d->prefix . ' - ' . ucwords(strtolower(($d->name))) . ''; + echo ''; } ?> diff --git a/application/views/station_profile/create.php b/application/views/station_profile/create.php index cf1a9982..ad2fe1ff 100644 --- a/application/views/station_profile/create.php +++ b/application/views/station_profile/create.php @@ -46,7 +46,8 @@ diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index 0eae08c1..fa2468c2 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -65,7 +65,8 @@ diff --git a/application/views/station_profile/index.php b/application/views/station_profile/index.php index c16427e0..fcf7f3b6 100644 --- a/application/views/station_profile/index.php +++ b/application/views/station_profile/index.php @@ -59,7 +59,7 @@ station_profile_name;?>
station_callsign;?> - station_country == '' ? '- NONE -' : $row->station_country;?> + station_country == '' ? '- NONE -' : $row->station_country; if ($row->dxcc_end != NULL) { echo ' '.$this->lang->line('gen_hamradio_deleted_dxcc').''; } ?> station_gridsquare;?> station_active != 1) { ?> diff --git a/application/views/timeplotter/index.php b/application/views/timeplotter/index.php index 7fb28766..6e9cf2c1 100644 --- a/application/views/timeplotter/index.php +++ b/application/views/timeplotter/index.php @@ -21,9 +21,9 @@ num_rows() > 0) { foreach ($dxcc_list->result() as $dxcc) { - echo ''; } @@ -57,4 +57,4 @@
- \ No newline at end of file + diff --git a/application/views/view_log/partial/log_ajax.php b/application/views/view_log/partial/log_ajax.php index 9d5af8e0..e8807782 100644 --- a/application/views/view_log/partial/log_ajax.php +++ b/application/views/view_log/partial/log_ajax.php @@ -23,7 +23,7 @@ function echo_table_col($row, $name) { case 'Mode': echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE . ''; break; case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo 'COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '';} if ($row->COL_STX_STRING) { echo 'COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '';} echo ''; break; case 'RSTR': echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo 'COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '';} if ($row->COL_SRX_STRING) { echo 'COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '';} echo ''; break; - case 'Country': echo '' . ucwords(strtolower(($row->COL_COUNTRY))) . ''; break; + case 'Country': echo '' . ucwords(strtolower(($row->name))); if ($row->end != null) echo ' '.$ci->lang->line('gen_hamradio_deleted_dxcc').'' . ''; break; case 'IOTA': echo '' . ($row->COL_IOTA) . ''; break; case 'SOTA': echo '' . ($row->COL_SOTA_REF) . ''; break; case 'WWFF': echo '' . ($row->COL_WWFF_REF) . ''; break; diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index a837941d..13105df2 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -187,10 +187,10 @@ COL_SAT_MODE; ?> - COL_COUNTRY != null) { ?> + name != null) { ?> lang->line('general_word_country'); ?> - COL_COUNTRY)), "- (/"); ?> + name)), "- (/"); if ($row->end != null) { echo ' '.$this->lang->line('gen_hamradio_deleted_dxcc').''; } ?> @@ -411,7 +411,7 @@ station_country) { ?> Station Country - station_country)), "- (/"); ?> + station_country)), "- (/"); if ($row->end != null) echo ' '.$this->lang->line('gen_hamradio_deleted_dxcc').''; ?> From 4f882c43daf4169bd1447ffd2c4511aa5da5e9cd Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 27 Apr 2023 07:57:02 +0200 Subject: [PATCH 2/7] Adjust Capitalization --- application/language/english/general_words_lang.php | 2 +- application/language/german/general_words_lang.php | 2 +- application/language/swedish/general_words_lang.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/language/english/general_words_lang.php b/application/language/english/general_words_lang.php index 1d716961..a93002c7 100644 --- a/application/language/english/general_words_lang.php +++ b/application/language/english/general_words_lang.php @@ -94,7 +94,7 @@ $lang['gen_hamradio_logbook'] = 'Logbook'; $lang['gen_hamradio_cq_zone'] = 'CQ Zone'; $lang['gen_hamradio_dxcc'] = 'DXCC'; -$lang['gen_hamradio_deleted_dxcc'] = 'deleted DXCC'; +$lang['gen_hamradio_deleted_dxcc'] = 'Deleted DXCC'; $lang['gen_hamradio_continent'] = 'Continent'; $lang['gen_hamradio_usa_state'] = 'USA State'; $lang['gen_hamradio_county_reference'] = 'USA County'; diff --git a/application/language/german/general_words_lang.php b/application/language/german/general_words_lang.php index 98168fa9..f7dbeb42 100644 --- a/application/language/german/general_words_lang.php +++ b/application/language/german/general_words_lang.php @@ -94,7 +94,7 @@ $lang['gen_hamradio_logbook'] = 'Logbuch'; $lang['gen_hamradio_cq_zone'] = 'CQ Zone'; $lang['gen_hamradio_dxcc'] = 'DXCC'; -$lang['gen_hamradio_deleted_dxcc'] = 'gelöschtes DXCC'; +$lang['gen_hamradio_deleted_dxcc'] = 'Gelöschtes DXCC'; $lang['gen_hamradio_continent'] = 'Kontinent'; $lang['gen_hamradio_usa_state'] = 'USA-Staat'; $lang['gen_hamradio_county_reference'] = 'USA County'; diff --git a/application/language/swedish/general_words_lang.php b/application/language/swedish/general_words_lang.php index 252532f6..52172efd 100644 --- a/application/language/swedish/general_words_lang.php +++ b/application/language/swedish/general_words_lang.php @@ -94,7 +94,7 @@ $lang['gen_hamradio_logbook'] = 'Loggbok'; $lang['gen_hamradio_cq_zone'] = 'CQ Zone'; $lang['gen_hamradio_dxcc'] = 'DXCC'; -$lang['gen_hamradio_deleted_dxcc'] = 'struket DXCC'; +$lang['gen_hamradio_deleted_dxcc'] = 'Struket DXCC'; $lang['gen_hamradio_usa_state'] = 'USA State'; $lang['gen_hamradio_county_reference'] = 'USA County'; $lang['gen_hamradio_iota_reference'] = 'IOTA Reference'; From d735f0e456cd85de6ebc95c1851f6caef82c89c1 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 27 Apr 2023 08:12:09 +0200 Subject: [PATCH 3/7] Display station deleted DXCC correctly --- application/models/Logbook_model.php | 2 +- application/views/view_log/qso.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index f8c8c02d..eea89e04 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1291,7 +1291,7 @@ class Logbook_model extends CI_Model { } function get_qso($id) { - $this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, dxcc_entities_2.name as station_country'); + $this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, dxcc_entities_2.name as station_country, dxcc_entities_2.end as station_end'); $this->db->from($this->config->item('table_name')); $this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left'); $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id', 'left'); diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index 13105df2..c28aad90 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -411,7 +411,7 @@ station_country) { ?> Station Country - station_country)), "- (/"); if ($row->end != null) echo ' '.$this->lang->line('gen_hamradio_deleted_dxcc').''; ?> + station_country)), "- (/"); if ($row->station_end != null) echo ' '.$this->lang->line('gen_hamradio_deleted_dxcc').''; ?> From 97a026077e35b79ad5b437f7ce3a1c017fd75bad Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 27 Apr 2023 08:56:07 +0200 Subject: [PATCH 4/7] Fix query for grids and activated grids QSO list --- application/models/Logbook_model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index eea89e04..56f739b4 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -313,6 +313,7 @@ class Logbook_model extends CI_Model { $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); + $this->db->join('dxcc_entities', 'dxcc_entities.adif = '.$this->config->item('table_name').'.COL_DXCC', 'left outer'); switch ($type) { case 'DXCC': $this->db->where('COL_COUNTRY', $searchphrase); @@ -389,8 +390,9 @@ class Logbook_model extends CI_Model { $sql = 'SELECT COL_FREQ, COL_SOTA_REF, COL_OPERATOR, COL_IOTA, COL_VUCC_GRIDS, COL_STATE, COL_GRIDSQUARE, COL_PRIMARY_KEY, COL_CALL, COL_TIME_ON, COL_BAND, COL_SAT_NAME, COL_MODE, COL_SUBMODE, COL_RST_SENT, '; $sql .= 'COL_RST_RCVD, COL_STX, COL_SRX, COL_STX_STRING, COL_SRX_STRING, COL_COUNTRY, COL_QSL_SENT, COL_QSL_SENT_VIA, '; $sql .= 'COL_QSLSDATE, COL_QSL_RCVD, COL_QSL_RCVD_VIA, COL_QSLRDATE, COL_EQSL_QSL_SENT, COL_EQSL_QSLSDATE, COL_EQSL_QSLRDATE, '; - $sql .= 'COL_EQSL_QSL_RCVD, COL_LOTW_QSL_SENT, COL_LOTW_QSLSDATE, COL_LOTW_QSL_RCVD, COL_LOTW_QSLRDATE, COL_CONTEST_ID, station_gridsquare '; + $sql .= 'COL_EQSL_QSL_RCVD, COL_LOTW_QSL_SENT, COL_LOTW_QSLSDATE, COL_LOTW_QSL_RCVD, COL_LOTW_QSLRDATE, COL_CONTEST_ID, station_gridsquare, dxcc_entities.name as name, dxcc_entities.end as end '; $sql .= 'FROM '.$this->config->item('table_name').' JOIN `station_profile` ON station_profile.station_id = '.$this->config->item('table_name').'.station_id '; + $sql .= 'LEFT OUTER JOIN `dxcc_entities` ON dxcc_entities.adif = '.$this->config->item('table_name').'.COL_DXCC '; $sql .= 'WHERE '.$this->config->item('table_name').'.station_id IN (SELECT station_id from station_profile '; $sql .= 'WHERE station_gridsquare LIKE "%'.$searchphrase.'%") '; From a485d9e72e3a618c0c74afaeb65744ca29bbd329 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 27 Apr 2023 09:23:11 +0200 Subject: [PATCH 5/7] Show deleted DXCC badge in timeline --- application/models/Timeline_model.php | 2 ++ application/views/timeline/index.php | 27 ++++++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/application/models/Timeline_model.php b/application/models/Timeline_model.php index c3520e4d..99cb800d 100644 --- a/application/models/Timeline_model.php +++ b/application/models/Timeline_model.php @@ -217,6 +217,7 @@ class Timeline_model extends CI_Model $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); + $this->db->join('dxcc_entities', 'dxcc_entities.adif = '.$this->config->item('table_name').'.COL_DXCC'); if ($band != 'All') { if ($band == 'SAT') { @@ -240,6 +241,7 @@ class Timeline_model extends CI_Model case 'waz': $this->db->where('COL_CQZ', $querystring); break; case 'vucc': $this->db->group_start(); $this->db->like('COL_GRIDSQUARE', $querystring); $this->db->or_like('COL_VUCC_GRIDS',$querystring); $this->db->group_end();break; } + $this->db->order_by('COL_TIME_ON', 'DEsC'); return $this->db->get($this->config->item('table_name')); } diff --git a/application/views/timeline/index.php b/application/views/timeline/index.php index 42f94743..2ca3bc7d 100644 --- a/application/views/timeline/index.php +++ b/application/views/timeline/index.php @@ -106,15 +106,16 @@ # - Date + '.$ci->lang->line('general_word_date').' Prefix - Country - Deleted + '.$ci->lang->line('general_word_country').' + Status End Date Show QSOs @@ -129,7 +130,7 @@ function write_dxcc_timeline($timeline_array, $custom_date_format, $bandselect, ' . $line->prefix . ' ' . $line->col_country . ' '; - if (!empty($line->end)) echo 'Yes'; + if (!empty($line->end)) echo ''.$ci->lang->line('gen_hamradio_deleted_dxcc').''; echo ' ' . $line->end . ' adif . '","'. $bandselect . '","'. $modeselect . '","' . $award .'")>Show @@ -139,13 +140,14 @@ function write_dxcc_timeline($timeline_array, $custom_date_format, $bandselect, } function write_was_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $award) { + $ci =& get_instance(); $i = count($timeline_array); echo ' - - + + @@ -164,13 +166,14 @@ function write_was_timeline($timeline_array, $custom_date_format, $bandselect, $ } function write_iota_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $award) { + $ci =& get_instance(); $i = count($timeline_array); echo '
#DateState'.$ci->lang->line('general_word_date').''.$ci->lang->line('gen_hamradio_state').' Show QSOs
- - + + @@ -193,12 +196,13 @@ function write_iota_timeline($timeline_array, $custom_date_format, $bandselect, } function write_waz_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $award) { + $ci =& get_instance(); $i = count($timeline_array); echo '
#DateIota'.$ci->lang->line('general_word_date').'IOTA Name Prefix Show QSOs
- + @@ -218,13 +222,14 @@ function write_waz_timeline($timeline_array, $custom_date_format, $bandselect, $ } function write_vucc_timeline($timeline_array, $custom_date_format, $bandselect, $modeselect, $award) { + $ci =& get_instance(); $i = count($timeline_array); echo '
#Date'.$ci->lang->line('general_word_date').' CQ Zone Show QSOs
- - + + From 90f64e6d7a96839cae92d89bf355f352becf36b7 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 27 Apr 2023 09:26:43 +0200 Subject: [PATCH 6/7] Add DXCC entities details to activators details SQL --- application/models/Logbook_model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 56f739b4..9c441ee6 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -443,6 +443,7 @@ class Logbook_model extends CI_Model { $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); + $this->db->join('dxcc_entities', 'dxcc_entities.adif = '.$this->config->item('table_name').'.COL_DXCC', 'left outer'); $this->db->where('COL_CALL', $call); if ($band != 'All') { if ($band == 'SAT') { @@ -460,6 +461,7 @@ class Logbook_model extends CI_Model { } $this->db->where_in('station_profile.station_id', $logbooks_locations_array); + $this->db->order_by('COL_TIME_ON', 'DESC'); return $this->db->get($this->config->item('table_name')); } From fc12664da858fc2a70c9444291c0488f30836e31 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 27 Apr 2023 09:47:09 +0200 Subject: [PATCH 7/7] Add deleted DXCC badge to linked station profiles --- application/models/Logbooks_model.php | 4 ++-- application/views/logbooks/edit.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/models/Logbooks_model.php b/application/models/Logbooks_model.php index 8cacc5a8..7096ce58 100644 --- a/application/models/Logbooks_model.php +++ b/application/models/Logbooks_model.php @@ -262,9 +262,9 @@ class Logbooks_model extends CI_Model { array_push($relationships_array, $row->station_location_id); } - $this->db->select('station_profile.*, dxcc_entities.name as station_country'); + $this->db->select('station_profile.*, dxcc_entities.name as station_country, dxcc_entities.end as end'); $this->db->where_in('station_id', $relationships_array); - $this->db->join('dxcc_entities','station_profile.station_dxcc = dxcc_entities.adif','left'); + $this->db->join('dxcc_entities','station_profile.station_dxcc = dxcc_entities.adif','left outer'); $query = $this->db->get('station_profile'); return $query; diff --git a/application/views/logbooks/edit.php b/application/views/logbooks/edit.php index 1380b800..1df99f4f 100644 --- a/application/views/logbooks/edit.php +++ b/application/views/logbooks/edit.php @@ -129,7 +129,7 @@ foreach ($station_locations_linked->result() as $row) { ?> - +
#DateGridsquare'.$ci->lang->line('general_word_date').''.$ci->lang->line('gen_hamradio_gridsquare').' Show QSOs
station_profile_name;?> (Callsign: station_callsign;?> DXCC: station_country;?>)station_profile_name;?> (Callsign: station_callsign;?> DXCC: station_country; if ($row->end != NULL) { echo ' '.$this->lang->line('gen_hamradio_deleted_dxcc').''; } ?>)