diff --git a/application/controllers/Qsl.php b/application/controllers/Qsl.php index 4c8617e1d..e0b27404d 100644 --- a/application/controllers/Qsl.php +++ b/application/controllers/Qsl.php @@ -42,6 +42,7 @@ class Qsl extends CI_Controller { $footerData = []; $footerData['scripts'] = [ + 'assets/js/bootstrap-multiselect.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/bootstrap-multiselect.js")), 'assets/js/sections/qsl.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/qsl.js")), ]; diff --git a/application/models/Qsl_model.php b/application/models/Qsl_model.php index 974d54e99..6d8cc2b9e 100644 --- a/application/models/Qsl_model.php +++ b/application/models/Qsl_model.php @@ -188,39 +188,39 @@ class Qsl_model extends CI_Model { } $location_list = "'".implode("','",$logbooks_locations_array)."'"; - $table = $this->config->item('table_name'); $sql_parts = array(); - if ($confirmationtype == 'qsl' || $confirmationtype == 'All') { + if (in_array('qsl', $confirmationtype)) { $sql_parts[] = " - SELECT col_primary_key, col_call, col_time_on, col_mode, col_submode, col_band, col_sat_name, col_qslrdate AS rxdate, 'QSL Card' AS type, exists(select 1 from qsl_images where qsoid = $table.COL_PRIMARY_KEY) as qslcount + SELECT col_primary_key, col_call, col_time_on, col_mode, col_submode, col_band, col_sat_name, col_qslrdate AS rxdate, 'QSL Card' AS type, + EXISTS (SELECT 1 FROM qsl_images WHERE qsoid = $table.COL_PRIMARY_KEY) AS qslcount FROM $table WHERE station_id IN ($location_list) AND col_qslrdate IS NOT NULL AND col_qslrdate != '' AND col_qsl_rcvd = 'Y' "; } - if ($confirmationtype == 'lotw' || $confirmationtype == 'All') { + if (in_array('lotw', $confirmationtype)) { $sql_parts[] = " SELECT col_primary_key, col_call, col_time_on, col_mode, col_submode, col_band, col_sat_name, col_lotw_qslrdate AS rxdate, 'LoTW' AS type, 0 as qslcount FROM $table WHERE station_id IN ($location_list) AND col_lotw_qslrdate IS NOT NULL AND col_lotw_qslrdate != '' AND col_lotw_qsl_rcvd = 'Y' "; } - if ($confirmationtype == 'eqsl' || $confirmationtype == 'All') { + if (in_array('eqsl', $confirmationtype)) { $sql_parts[] = " SELECT col_primary_key, col_call, col_time_on, col_mode, col_submode, col_band, col_sat_name, col_eqsl_qslrdate AS rxdate, 'eQSL' AS type, 0 as qslcount FROM $table WHERE station_id IN ($location_list) AND col_eqsl_qslrdate IS NOT NULL AND col_eqsl_qslrdate != '' AND col_eqsl_qsl_rcvd = 'Y' "; } - if ($confirmationtype == 'qrz' || $confirmationtype == 'All') { + if (in_array('qrz', $confirmationtype)) { $sql_parts[] = " SELECT col_primary_key, col_call, col_time_on, col_mode, col_submode, col_band, col_sat_name, col_qrzcom_qso_download_date AS rxdate, 'QRZ.com' AS type, 0 as qslcount FROM $table WHERE station_id IN ($location_list) AND col_qrzcom_qso_download_date IS NOT NULL AND col_qrzcom_qso_download_date != '' AND col_qrzcom_qso_download_status = 'Y' "; } - if ($confirmationtype == 'clublog' || $confirmationtype == 'All') { + if (in_array('clublog', $confirmationtype)) { $sql_parts[] = " SELECT col_primary_key, col_call, col_time_on, col_mode, col_submode, col_band, col_sat_name, col_clublog_qso_download_date AS rxdate, 'Clublog' AS type, 0 as qslcount FROM $table diff --git a/application/views/qslcard/confirmations.php b/application/views/qslcard/confirmations.php index ef0246b11..1b2ed07fe 100644 --- a/application/views/qslcard/confirmations.php +++ b/application/views/qslcard/confirmations.php @@ -10,13 +10,12 @@