From fa3d024720c7bfc83e99e8a61d8203c4b422fd4e Mon Sep 17 00:00:00 2001 From: HB9HIL <80885850+HB9HIL@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:27:28 +0200 Subject: [PATCH] Add new Filter --- application/controllers/Logbookadvanced.php | 6 ++++-- application/language/bulgarian/filter_lang.php | 3 ++- .../language/chinese_simplified/filter_lang.php | 3 ++- application/language/czech/filter_lang.php | 3 ++- application/language/dutch/filter_lang.php | 3 ++- application/language/english/filter_lang.php | 3 ++- application/language/finnish/filter_lang.php | 3 ++- application/language/french/filter_lang.php | 3 ++- application/language/german/filter_lang.php | 3 ++- application/language/greek/filter_lang.php | 3 ++- application/language/italian/filter_lang.php | 3 ++- application/language/polish/filter_lang.php | 3 ++- application/language/russian/filter_lang.php | 3 ++- application/language/spanish/filter_lang.php | 3 ++- application/language/swedish/filter_lang.php | 3 ++- application/language/turkish/filter_lang.php | 3 ++- application/models/Logbookadvanced_model.php | 15 ++++++++------- application/views/logbookadvanced/index.php | 14 ++++++++++++-- 18 files changed, 54 insertions(+), 26 deletions(-) diff --git a/application/controllers/Logbookadvanced.php b/application/controllers/Logbookadvanced.php index 888a0a52f..dacd91758 100644 --- a/application/controllers/Logbookadvanced.php +++ b/application/controllers/Logbookadvanced.php @@ -105,7 +105,8 @@ class Logbookadvanced extends CI_Controller { 'band' => xss_clean($this->input->post('band')), 'qslSent' => xss_clean($this->input->post('qslSent')), 'qslReceived' => xss_clean($this->input->post('qslReceived')), - 'qslMethod' => xss_clean($this->input->post('qslMethod')), + 'qslSentMethod' => xss_clean($this->input->post('qslSentMethod')), + 'qslReceivedMethod' => xss_clean($this->input->post('qslReceivedMethod')), 'iota' => xss_clean($this->input->post('iota')), 'dxcc' => xss_clean($this->input->post('dxcc')), 'propmode' => xss_clean($this->input->post('propmode')), @@ -292,7 +293,8 @@ class Logbookadvanced extends CI_Controller { 'band' => xss_clean($this->input->post('band')), 'qslSent' => xss_clean($this->input->post('qslSent')), 'qslReceived' => xss_clean($this->input->post('qslReceived')), - 'qslMethod' => xss_clean($this->input->post('qslMethod')), + 'qslSentMethod' => xss_clean($this->input->post('qslSentMethod')), + 'qslReceivedMethod' => xss_clean($this->input->post('qslReceivedMethod')), 'iota' => xss_clean($this->input->post('iota')), 'dxcc' => xss_clean($this->input->post('dxcc')), 'propmode' => xss_clean($this->input->post('propmode')), diff --git a/application/language/bulgarian/filter_lang.php b/application/language/bulgarian/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/bulgarian/filter_lang.php +++ b/application/language/bulgarian/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/chinese_simplified/filter_lang.php b/application/language/chinese_simplified/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/chinese_simplified/filter_lang.php +++ b/application/language/chinese_simplified/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/czech/filter_lang.php b/application/language/czech/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/czech/filter_lang.php +++ b/application/language/czech/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/dutch/filter_lang.php b/application/language/dutch/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/dutch/filter_lang.php +++ b/application/language/dutch/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/english/filter_lang.php b/application/language/english/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/english/filter_lang.php +++ b/application/language/english/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/finnish/filter_lang.php b/application/language/finnish/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/finnish/filter_lang.php +++ b/application/language/finnish/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/french/filter_lang.php b/application/language/french/filter_lang.php index 6024ae202..6421792c2 100644 --- a/application/language/french/filter_lang.php +++ b/application/language/french/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/german/filter_lang.php b/application/language/german/filter_lang.php index c95f0adc0..37470ed9b 100644 --- a/application/language/german/filter_lang.php +++ b/application/language/german/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL gesendet'; $lang['filter_qsl_recv'] = 'QSL erhalten'; -$lang['filter_qsl_method'] = 'QSL Methode'; +$lang['filter_qsl_sent_method'] = 'QSL-Sende Methode'; +$lang['filter_qsl_recv_method'] = 'QSL-Empfangs Methode'; $lang['filter_lotw_sent'] = 'LoTW gesendet'; $lang['filter_lotw_recv'] = 'LoTW erhalten'; $lang['filter_eqsl_sent'] = 'eQSL gesendet'; diff --git a/application/language/greek/filter_lang.php b/application/language/greek/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/greek/filter_lang.php +++ b/application/language/greek/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/italian/filter_lang.php b/application/language/italian/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/italian/filter_lang.php +++ b/application/language/italian/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/polish/filter_lang.php b/application/language/polish/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/polish/filter_lang.php +++ b/application/language/polish/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/russian/filter_lang.php b/application/language/russian/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/russian/filter_lang.php +++ b/application/language/russian/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/spanish/filter_lang.php b/application/language/spanish/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/spanish/filter_lang.php +++ b/application/language/spanish/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/swedish/filter_lang.php b/application/language/swedish/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/swedish/filter_lang.php +++ b/application/language/swedish/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/language/turkish/filter_lang.php b/application/language/turkish/filter_lang.php index 793893c74..869278f79 100644 --- a/application/language/turkish/filter_lang.php +++ b/application/language/turkish/filter_lang.php @@ -46,7 +46,8 @@ ________________________________________________________________________________ $lang['filter_qsl_sent'] = 'QSL sent'; $lang['filter_qsl_recv'] = 'QSL received'; -$lang['filter_qsl_method'] = 'QSL Method'; +$lang['filter_qsl_sent_method'] = 'QSL Sending Method'; +$lang['filter_qsl_recv_method'] = 'QSL Receiving Method'; $lang['filter_lotw_sent'] = 'LoTW sent'; $lang['filter_lotw_recv'] = 'LoTW received'; $lang['filter_eqsl_sent'] = 'eQSL sent'; diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php index b1a7bc923..1b892e77b 100644 --- a/application/models/Logbookadvanced_model.php +++ b/application/models/Logbookadvanced_model.php @@ -62,14 +62,15 @@ class Logbookadvanced_model extends CI_Model { $conditions[] = $condition; $binding[] = $searchCriteria['qslReceived']; } - if ($searchCriteria['qslMethod'] !== '') { - $condition = "COL_QSL_RCVD = ?"; - if ($searchCriteria['qslMethod'] == 'N') { - $condition = '('.$condition; - $condition .= " OR COL_QSL_RCVD IS NULL OR COL_QSL_RCVD = '')"; - } + if ($searchCriteria['qslSentMethod'] !== '') { + $condition = "COL_QSL_SENT_VIA = ?"; $conditions[] = $condition; - $binding[] = $searchCriteria['qslReceived']; + $binding[] = $searchCriteria['qslSentMethod']; + } + if ($searchCriteria['qslReceivedMethod'] !== '') { + $condition = "COL_QSL_RECV_VIA = ?"; + $conditions[] = $condition; + $binding[] = $searchCriteria['qslReceivedMethod']; } if ($searchCriteria['lotwSent'] !== '') { $condition = "COL_LOTW_QSL_SENT = ?"; diff --git a/application/views/logbookadvanced/index.php b/application/views/logbookadvanced/index.php index 6843a8c27..8b68b98ee 100644 --- a/application/views/logbookadvanced/index.php +++ b/application/views/logbookadvanced/index.php @@ -235,8 +235,18 @@ $options = json_decode($options);