diff --git a/application/controllers/Logbookadvanced.php b/application/controllers/Logbookadvanced.php index eb93e9f64..88d938508 100644 --- a/application/controllers/Logbookadvanced.php +++ b/application/controllers/Logbookadvanced.php @@ -133,6 +133,8 @@ class Logbookadvanced extends CI_Controller { 'lotwReceived' => xss_clean($this->input->post('lotwReceived')), 'eqslSent' => xss_clean($this->input->post('eqslSent')), 'eqslReceived' => xss_clean($this->input->post('eqslReceived')), + 'clublogSent' => xss_clean($this->input->post('clublogSent')), + 'clublogReceived' => xss_clean($this->input->post('clublogReceived')), 'qslvia' => xss_clean($this->input->post('qslvia')), 'sota' => xss_clean($this->input->post('sota')), 'pota' => xss_clean($this->input->post('pota')), @@ -300,6 +302,8 @@ class Logbookadvanced extends CI_Controller { 'lotwReceived' => '', 'eqslSent' => '', 'eqslReceived' => '', + 'clublogSent' => '', + 'clublogReceived' => '', 'qslvia' => '', 'sota' => '', 'pota' => '', @@ -342,6 +346,8 @@ class Logbookadvanced extends CI_Controller { 'lotwReceived' => xss_clean($this->input->post('lotwReceived')), 'eqslSent' => xss_clean($this->input->post('eqslSent')), 'eqslReceived' => xss_clean($this->input->post('eqslReceived')), + 'clublogSent' => xss_clean($this->input->post('clublogSent')), + 'clublogReceived' => xss_clean($this->input->post('clublogReceived')), 'qslvia' => xss_clean($this->input->post('qslvia')), 'sota' => xss_clean($this->input->post('sota')), 'pota' => xss_clean($this->input->post('pota')), @@ -491,6 +497,7 @@ class Logbookadvanced extends CI_Controller { $json_string['qsl']['show'] = $this->input->post('qsl'); $json_string['lotw']['show'] = $this->input->post('lotw'); $json_string['eqsl']['show'] = $this->input->post('eqsl'); + $json_string['clublog']['show'] = $this->input->post('clublog'); $json_string['qslmsg']['show'] = $this->input->post('qslmsg'); $json_string['dxcc']['show'] = $this->input->post('dxcc'); $json_string['state']['show'] = $this->input->post('state'); diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php index 43623d788..4fb5b70a2 100644 --- a/application/models/Logbookadvanced_model.php +++ b/application/models/Logbookadvanced_model.php @@ -120,6 +120,24 @@ class Logbookadvanced_model extends CI_Model { $binding[] = $searchCriteria['lotwReceived']; } + if ($searchCriteria['clublogSent'] !== '') { + $condition = "COL_CLUBLOG_QSO_UPLOAD_STATUS = ?"; + if ($searchCriteria['clublogSent'] == 'N') { + $condition = '('.$condition; + $condition .= " OR COL_CLUBLOG_QSL_UPLOAD_STATUS IS NULL OR COL_CLUBLOG_QSO_UPLOAD_STATUS = '')"; + } + $conditions[] = $condition; + $binding[] = $searchCriteria['clublogSent']; + } + if ($searchCriteria['clublogReceived'] !== '') { + $condition = "COL_CLUBLOG_QSO_DOWNLOAD_STATUS = ?"; + if ($searchCriteria['clublogReceived'] == 'N') { + $condition = '('.$condition; + $condition .= " OR COL_CLUBLOG_QSO_DOWNLOAD_STATUS IS NULL OR COL_CLUBLOG_QSO_DOWNLOAD_STATUS = '')"; + } + $conditions[] = $condition; + $binding[] = $searchCriteria['clublogReceived']; + } if ($searchCriteria['eqslSent'] !== '') { $condition = "COL_EQSL_QSL_SENT = ?"; if ($searchCriteria['eqslSent'] == 'N') { diff --git a/application/views/logbookadvanced/index.php b/application/views/logbookadvanced/index.php index a7ca2e709..3272fa01e 100644 --- a/application/views/logbookadvanced/index.php +++ b/application/views/logbookadvanced/index.php @@ -27,6 +27,7 @@ \"qsl\":{\"show\":\"true\"}, \"lotw\":{\"show\":\"true\"}, \"eqsl\":{\"show\":\"true\"}, + \"clublog\":{\"show\":\"true\"}, \"qslmsg\":{\"show\":\"true\"}, \"dxcc\":{\"show\":\"true\"}, \"state\":{\"show\":\"true\"}, @@ -86,6 +87,10 @@ if (!isset($current_opts->wwff)) { echo "\nvar o_template = { wwff: {show: 'true'}};"; echo "\nuser_options={...user_options, ...o_template};"; + } + if (!isset($current_opts->clublog)) { + echo "\nvar o_template = { clublog: {show: 'true'}};"; + echo "\nuser_options={...user_options, ...o_template};"; } if (!isset($current_opts->sig)) { echo "\nvar o_template = { sig: {show: 'true'}};"; @@ -345,6 +350,28 @@ $options = json_decode($options); +
+ + +
+
+ + +
eqsl->show ?? "true") == "true") { echo 'checked'; } ?>>
+ + +
clublog->show ?? "true") == "true") { echo 'checked'; } ?>>
+
qslmsg->show ?? "true") == "true") { echo 'checked'; } ?>>
diff --git a/assets/js/sections/logbookadvanced.js b/assets/js/sections/logbookadvanced.js index 425ba56d0..6ec47d571 100644 --- a/assets/js/sections/logbookadvanced.js +++ b/assets/js/sections/logbookadvanced.js @@ -61,6 +61,9 @@ function updateRow(qso) { if (user_options.qsl.show == "true"){ cells.eq(c++).html(qso.qsl); } + if (user_options.clublog.show == "true"){ + cells.eq(c++).html(qso.clublog); + } if ($(".eqslconfirmation")[0] && user_options.eqsl.show == "true"){ cells.eq(c++).html(qso.eqsl); } @@ -184,6 +187,9 @@ function loadQSOTable(rows) { if (user_options.qslvia.show == "true"){ data.push(qso.qslVia); } + if (user_options.clublog.show == "true"){ + data.push(qso.clublog); + } if (user_options.qsl.show == "true"){ data.push(qso.qsl); } @@ -352,6 +358,8 @@ $(document).ready(function () { ituzone: this.ituzone.value, lotwSent: this.lotwSent.value, lotwReceived: this.lotwReceived.value, + clublogSent: this.clublogSent.value, + clublogReceived: this.clublogReceived.value, eqslSent: this.eqslSent.value, eqslReceived: this.eqslReceived.value, qslvia: $('[name="qslvia"]').val(), @@ -1019,6 +1027,7 @@ function saveOptions() { name: $('input[name="name"]').is(':checked') ? true : false, qslvia: $('input[name="qslvia"]').is(':checked') ? true : false, qsl: $('input[name="qsl"]').is(':checked') ? true : false, + clublog: $('input[name="clublog"]').is(':checked') ? true : false, lotw: $('input[name="lotw"]').is(':checked') ? true : false, eqsl: $('input[name="eqsl"]').is(':checked') ? true : false, qslmsg: $('input[name="qslmsg"]').is(':checked') ? true : false, diff --git a/src/QSLManager/QSO.php b/src/QSLManager/QSO.php index fa1fe76ab..ea18da2ec 100644 --- a/src/QSLManager/QSO.php +++ b/src/QSLManager/QSO.php @@ -62,6 +62,7 @@ class QSO private string $qsl; private string $lotw; private string $eqsl; + private string $clublog; /** Lotw callsign info **/ private string $callsign; private string $lastupload; @@ -196,6 +197,7 @@ class QSO $this->qsl = $this->getQslString($data, $custom_date_format); $this->lotw = $this->getLotwString($data, $custom_date_format); $this->eqsl = $this->getEqslString($data, $custom_date_format); + $this->clublog = $this->getClublogString($data, $custom_date_format); $this->cqzone = ($data['COL_CQZ'] === null) ? '' : $this->geCqLink($data['COL_CQZ']); $this->ituzone = $data['COL_ITUZ'] ?? ''; @@ -392,6 +394,41 @@ class QSO /** * @return string */ + function getClublogString($data, $custom_date_format): string { + $CI =& get_instance(); + + $clublogstring = ''; + + $clublogstring .= ''; + + return $clublogstring; + } + function getEqslString($data, $custom_date_format): string { $CI =& get_instance(); @@ -752,6 +789,14 @@ class QSO return $this->lotw; } + /** + * @return string + */ + public function getclublog(): string + { + return $this->clublog; + } + /** * @return string */ @@ -814,6 +859,7 @@ class QSO 'qsl' => $this->getqsl(), 'lotw' => $this->getlotw(), 'eqsl' => $this->geteqsl(), + 'clublog' => $this->getclublog(), 'qslMessage' => $this->getQSLMsg(), 'name' => $this->getName(), 'dxcc' => $this->getDXCC(),