From a65b19f991aa2cf07e33cca556dd2dbfb9f72a3a Mon Sep 17 00:00:00 2001 From: Andreas Date: Fri, 18 Sep 2020 12:17:41 +0200 Subject: [PATCH 1/6] Fixed display QSO for WAS-details as well. Changed so that bootstrapdialog is included on every page. Will start implementation on bootstrapdialog on other awards. --- application/views/interface_assets/footer.php | 55 +++++++++++++++++-- application/views/interface_assets/header.php | 4 +- .../views/view_log/partial/log_ajax.php | 2 +- application/views/view_log/qso.php | 6 +- 4 files changed, 57 insertions(+), 10 deletions(-) diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index ea08bf9b..f33e36b4 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -1410,9 +1410,54 @@ $(document).ready(function(){ - uri->segment(2) == "was") { ?> - + + - + diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index 835bde1a..b022b20b 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -29,9 +29,7 @@ - uri->segment(2) == "was") { ?> - - + uri->segment(1) == "adif") { ?> diff --git a/application/views/view_log/partial/log_ajax.php b/application/views/view_log/partial/log_ajax.php index b1830c77..9208ff17 100644 --- a/application/views/view_log/partial/log_ajax.php +++ b/application/views/view_log/partial/log_ajax.php @@ -41,7 +41,7 @@ COL_TIME_ON); echo date('H:i', $timestamp); ?> - COL_CALL)); ?> + COL_CALL)); ?> COL_MODE; ?> COL_RST_SENT; ?> COL_STX) { ?>COL_STX;?>COL_STX_STRING) { ?>COL_STX_STRING;?> diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index f35d47b9..76271e35 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -249,7 +249,7 @@ config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?>
-

Edit QSO

+

Edit QSO

@@ -279,6 +279,10 @@ var lat = ; var long = ; var callsign = "COL_CALL; ?>"; + + + + Date: Sun, 20 Sep 2020 06:00:54 +0200 Subject: [PATCH 2/6] Added bootstrapdialog for DXCC award. --- application/controllers/Awards.php | 13 +++++++++ application/models/Dxcc.php | 4 +-- .../views/awards/dxcc/details_ajax.php | 3 ++ application/views/interface_assets/footer.php | 29 +++++++++++++++++++ 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 application/views/awards/dxcc/details_ajax.php diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 40a1c91a..0e58533c 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -153,6 +153,19 @@ class Awards extends CI_Controller { $this->load->view('interface_assets/footer'); } + public function dxcc_details_ajax(){ + $this->load->model('logbook_model'); + + $country = str_replace('"', "", $this->input->post("Country")); + $band = str_replace('"', "", $this->input->post("Band")); + $data['results'] = $this->logbook_model->dxcc_qso_details($country, $band); + + // Render Page + $data['page_title'] = "Log View - DXCC"; + $data['filter'] = "country ".$country. " and ".$band; + $this->load->view('awards/dxcc/details_ajax', $data); + } + public function vucc() { $this->load->model('vucc'); $data['worked_bands'] = $this->vucc->get_worked_bands(); diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index d186b5ae..217b578d 100644 --- a/application/models/Dxcc.php +++ b/application/models/Dxcc.php @@ -191,7 +191,7 @@ class DXCC extends CI_Model { if ($postdata['worked'] != NULL) { $workedDXCC = $this->getDxccBandWorked($station_id, $band, $postdata); foreach ($workedDXCC as $wdxcc) { - $dxccMatrix[$wdxcc->dxcc][$band] = '
name).'"&Band="'. $band . '"\'>W
';; + $dxccMatrix[$wdxcc->dxcc][$band] = '
name).'","'. $band . '")\'>W
'; } } @@ -199,7 +199,7 @@ class DXCC extends CI_Model { if ($postdata['confirmed'] != NULL) { $confirmedDXCC = $this->getDxccBandConfirmed($station_id, $band, $postdata); foreach ($confirmedDXCC as $cdxcc) { - $dxccMatrix[$cdxcc->dxcc][$band] = '
name).'"&Band="'. $band . '"\'>C
';; + $dxccMatrix[$cdxcc->dxcc][$band] = '
name).'","'. $band . '")\'>C
'; } } } diff --git a/application/views/awards/dxcc/details_ajax.php b/application/views/awards/dxcc/details_ajax.php new file mode 100644 index 00000000..2e33a16d --- /dev/null +++ b/application/views/awards/dxcc/details_ajax.php @@ -0,0 +1,3 @@ +

Filtering on

+ + load->view('view_log/partial/log_ajax') ?> diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index f33e36b4..fe8a90f0 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -1457,6 +1457,35 @@ $(document).ready(function(){ }); } + uri->segment(2) == "dxcc") { ?> + + function displayDxccContacts(country, band) { + var baseURL= ""; + $.ajax({ + url: baseURL + 'index.php/awards/dxcc_details_ajax', + type: 'post', + data: {'Country': country, + 'Band': band + }, + success: function(html) { + BootstrapDialog.show({ + title: 'QSO Data', + size: BootstrapDialog.SIZE_WIDE, + cssClass: 'qso-dxcc-dialog', + nl2br: false, + message: html, + buttons: [{ + label: 'Close', + action: function (dialogItself) { + dialogItself.close(); + } + }] + }); + } + }); + } + + uri->segment(2) == "was") { ?> function displayWasContacts(was, band) { var baseURL= ""; From f138d84dc14b0dbb9af4e18145f722c27b4cca52 Mon Sep 17 00:00:00 2001 From: Andreas Date: Sun, 20 Sep 2020 11:02:29 +0200 Subject: [PATCH 3/6] Added bootstrapdialog for CQ award. --- application/controllers/Awards.php | 13 ++++++++ application/models/Cq.php | 4 +-- application/views/awards/cq/details_ajax.php | 3 ++ application/views/awards/cq/index.php | 4 +-- application/views/interface_assets/footer.php | 33 ++++++++++++++++++- 5 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 application/views/awards/cq/details_ajax.php diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 0e58533c..473ac838 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -324,6 +324,19 @@ class Awards extends CI_Controller { $this->load->view('interface_assets/footer'); } + public function cq_details_ajax(){ + $this->load->model('logbook_model'); + + $cqzone = str_replace('"', "", $this->input->post("CQZone")); + $band = str_replace('"', "", $this->input->post("Band")); + $data['results'] = $this->logbook_model->cq_qso_details($cqzone, $band); + + // Render Page + $data['page_title'] = "Log View - DXCC"; + $data['filter'] = "CQZone ".$cqzone. " and ".$band;; + $this->load->view('awards/cq/details_ajax', $data); + } + public function was() { $this->load->model('was'); $data['worked_bands'] = $this->was->get_worked_bands(); diff --git a/application/models/Cq.php b/application/models/Cq.php index 1485d8cb..e62ee86f 100644 --- a/application/models/Cq.php +++ b/application/models/Cq.php @@ -97,14 +97,14 @@ class CQ extends CI_Model{ if ($postdata['worked'] != NULL) { $cqBand = $this->getCQWorked($station_id, $band, $postdata); foreach ($cqBand as $line) { - $bandCq[$line->col_cqz][$band] = ''; + $bandCq[$line->col_cqz][$band] = ''; $cqZ[$line->col_cqz]['count']++; } } if ($postdata['confirmed'] != NULL) { $cqBand = $this->getCQConfirmed($station_id, $band, $postdata); foreach ($cqBand as $line) { - $bandCq[$line->col_cqz][$band] = ''; + $bandCq[$line->col_cqz][$band] = ''; $cqZ[$line->col_cqz]['count']++; } } diff --git a/application/views/awards/cq/details_ajax.php b/application/views/awards/cq/details_ajax.php new file mode 100644 index 00000000..97a47ed4 --- /dev/null +++ b/application/views/awards/cq/details_ajax.php @@ -0,0 +1,3 @@ +

Filtering on

+ +load->view('view_log/partial/log_ajax') ?> diff --git a/application/views/awards/cq/index.php b/application/views/awards/cq/index.php index 65677eb7..55f287b2 100644 --- a/application/views/awards/cq/index.php +++ b/application/views/awards/cq/index.php @@ -11,12 +11,12 @@ Table
-
+

diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index fe8a90f0..e43ff990 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -1440,7 +1440,6 @@ $(document).ready(function(){ id: 'mapbox.streets' }).addTo(mymap); - var redIcon = L.icon({ iconUrl: icon_dot_url, iconSize: [18, 18], // size of the icon @@ -1486,6 +1485,37 @@ $(document).ready(function(){ } + + uri->segment(2) == "cq") { ?> + + function displayCqContacts(cqzone, band) { + var baseURL= ""; + $.ajax({ + url: baseURL + 'index.php/awards/cq_details_ajax', + type: 'post', + data: {'CQZone': cqzone, + 'Band': band + }, + success: function(html) { + BootstrapDialog.show({ + title: 'QSO Data', + size: BootstrapDialog.SIZE_WIDE, + cssClass: 'qso-cq-dialog', + nl2br: false, + message: html, + buttons: [{ + label: 'Close', + action: function (dialogItself) { + dialogItself.close(); + } + }] + }); + } + }); + } + + + uri->segment(2) == "was") { ?> function displayWasContacts(was, band) { var baseURL= ""; @@ -1513,6 +1543,7 @@ $(document).ready(function(){ }); } + function qsl_rcvd(id, method) { var baseURL= ""; $.ajax({ From c06baf39e32260b3b157d15e1e8e2d2319c4193e Mon Sep 17 00:00:00 2001 From: Andreas Date: Sun, 20 Sep 2020 11:09:22 +0200 Subject: [PATCH 4/6] Added bootstrapdialog for IOTA award. --- application/controllers/Awards.php | 13 ++++++++ application/models/Iota.php | 4 +-- .../views/awards/iota/details_ajax.php | 3 ++ application/views/interface_assets/footer.php | 30 +++++++++++++++++++ 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 application/views/awards/iota/details_ajax.php diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 473ac838..1bebcda1 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -481,4 +481,17 @@ class Awards extends CI_Controller { $this->load->view('awards/iota/details'); $this->load->view('interface_assets/footer'); } + + public function iota_details_ajax(){ + $this->load->model('logbook_model'); + + $iota = str_replace('"', "", $this->input->post("Iota")); + $band = str_replace('"', "", $this->input->post("Band")); + $data['results'] = $this->logbook_model->iota_qso_details($iota, $band); + + // Render Page + $data['page_title'] = "Log View - IOTA"; + $data['filter'] = "iota ".$iota. " and ".$band; + $this->load->view('awards/iota/details_ajax', $data); + } } diff --git a/application/models/Iota.php b/application/models/Iota.php index 06eab514..12c5d539 100644 --- a/application/models/Iota.php +++ b/application/models/Iota.php @@ -81,7 +81,7 @@ class IOTA extends CI_Model { if ($postdata['worked'] != NULL) { $workedIota = $this->getIotaBandWorked($station_id, $band, $postdata); foreach ($workedIota as $wiota) { - $iotaMatrix[$wiota->tag][$band] = '';; + $iotaMatrix[$wiota->tag][$band] = ''; } } @@ -89,7 +89,7 @@ class IOTA extends CI_Model { if ($postdata['confirmed'] != NULL) { $confirmedIota = $this->getIotaBandConfirmed($station_id, $band, $postdata); foreach ($confirmedIota as $ciota) { - $iotaMatrix[$ciota->tag][$band] = '';; + $iotaMatrix[$ciota->tag][$band] = ''; } } } diff --git a/application/views/awards/iota/details_ajax.php b/application/views/awards/iota/details_ajax.php new file mode 100644 index 00000000..bdd89954 --- /dev/null +++ b/application/views/awards/iota/details_ajax.php @@ -0,0 +1,3 @@ +

Filtering on

+ +load->view('view_log/partial/log_ajax') ?> \ No newline at end of file diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index e43ff990..11f9f08b 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -1486,6 +1486,36 @@ $(document).ready(function(){ + uri->segment(2) == "iota") { ?> + + function displayIotaContacts(iota, band) { + var baseURL= ""; + $.ajax({ + url: baseURL + 'index.php/awards/iota_details_ajax', + type: 'post', + data: {'Iota': iota, + 'Band': band + }, + success: function(html) { + BootstrapDialog.show({ + title: 'QSO Data', + size: BootstrapDialog.SIZE_WIDE, + cssClass: 'qso-iota-dialog', + nl2br: false, + message: html, + buttons: [{ + label: 'Close', + action: function (dialogItself) { + dialogItself.close(); + } + }] + }); + } + }); + } + + + uri->segment(2) == "cq") { ?> function displayCqContacts(cqzone, band) { From 7e7f5ce63eb750da173c4aa2950545611e67c86f Mon Sep 17 00:00:00 2001 From: Andreas Date: Sun, 20 Sep 2020 13:57:14 +0200 Subject: [PATCH 5/6] Added bootstrapdialog for DOK award. --- application/controllers/Awards.php | 35 +++++++++++++++++++ application/views/awards/dok/details_ajax.php | 3 ++ application/views/awards/dok/index.php | 2 +- application/views/interface_assets/footer.php | 31 ++++++++++++++++ 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 application/views/awards/dok/details_ajax.php diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 1bebcda1..c02bd243 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -74,6 +74,41 @@ class Awards extends CI_Controller { $this->load->view('awards/dok/details'); $this->load->view('interface_assets/footer'); } + + public function dok_details_ajax(){ + $a = $this->input->post(); + $q = ""; + foreach ($a as $key => $value) { + $q .= $key."=".$value.("(and)"); + } + $q = substr($q, 0, strlen($q)-13); + + $arguments["query"] = $q; + $arguments["fields"] = ''; + $arguments["format"] = "json"; + $arguments["limit"] = ''; + $arguments["order"] = ''; + + // print_r($arguments); + // return; + + // Load the API and Logbook models + $this->load->model('api_model'); + $this->load->model('logbook_model'); + + // Call the parser within the API model to build the query + $query = $this->api_model->select_parse($arguments); + + // Execute the query, and retrieve the results + $data = $this->logbook_model->api_search_query($query); + + // Render Page + $data['page_title'] = "Log View - DOK"; + $data['filter'] = str_replace("(and)", ", ", $q);//implode(", ", array_keys($a)); + //$this->load->view('interface_assets/header', $data); + $this->load->view('awards/dok/details_ajax', $data); + //$this->load->view('interface_assets/footer'); + } public function dxcc () { $this->load->model('dxcc'); diff --git a/application/views/awards/dok/details_ajax.php b/application/views/awards/dok/details_ajax.php new file mode 100644 index 00000000..bdd89954 --- /dev/null +++ b/application/views/awards/dok/details_ajax.php @@ -0,0 +1,3 @@ +

Filtering on

+ +load->view('view_log/partial/log_ajax') ?> \ No newline at end of file diff --git a/application/views/awards/dok/index.php b/application/views/awards/dok/index.php index a97bcfb6..e2ed2cf4 100644 --- a/application/views/awards/dok/index.php +++ b/application/views/awards/dok/index.php @@ -26,7 +26,7 @@ if ($count == 0){ print(" "); }else{ - printf("%d", str_replace("&", "%26", $dok), $band, $count); + printf("%d", str_replace("&", "%26", $dok), $band, $count); } } } diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 11f9f08b..40ae42cd 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -1486,6 +1486,37 @@ $(document).ready(function(){ + + uri->segment(2) == "dok") { ?> + + function displayDokContacts(dok, band) { + var baseURL= ""; + $.ajax({ + url: baseURL + 'index.php/awards/dok_details_ajax', + type: 'post', + data: {'Dok': dok, + 'Band': band + }, + success: function(html) { + BootstrapDialog.show({ + title: 'QSO Data', + size: BootstrapDialog.SIZE_WIDE, + cssClass: 'qso-dok-dialog', + nl2br: false, + message: html, + buttons: [{ + label: 'Close', + action: function (dialogItself) { + dialogItself.close(); + } + }] + }); + } + }); + } + + + uri->segment(2) == "iota") { ?> function displayIotaContacts(iota, band) { From 13cdb9fd06b86a4938f034f02b35c1d6f3835e45 Mon Sep 17 00:00:00 2001 From: Andreas Date: Sun, 20 Sep 2020 14:09:46 +0200 Subject: [PATCH 6/6] Added bootstrapdialog for VUCC award. --- application/controllers/Awards.php | 13 ++++++++ application/views/awards/vucc/band.php | 2 +- .../views/awards/vucc/details_ajax.php | 3 ++ application/views/interface_assets/footer.php | 30 +++++++++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 application/views/awards/vucc/details_ajax.php diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index c02bd243..2133a304 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -243,6 +243,19 @@ class Awards extends CI_Controller { $this->load->view('interface_assets/footer'); } + public function vucc_details_ajax(){ + $this->load->model('logbook_model'); + + $gridsquare = str_replace('"', "", $this->input->post("Gridsquare")); + $band = str_replace('"', "", $this->input->post("Band")); + $data['results'] = $this->logbook_model->vucc_qso_details($gridsquare, $band); + + // Render Page + $data['page_title'] = "Log View - VUCC"; + $data['filter'] = "vucc " . $gridsquare . " and band ".$band; + $this->load->view('awards/vucc/details_ajax', $data); + } + /* Handles Displaying of WAB Squares worked. Comment field - WAB:# diff --git a/application/views/awards/vucc/band.php b/application/views/awards/vucc/band.php index 4802da12..712d21b9 100644 --- a/application/views/awards/vucc/band.php +++ b/application/views/awards/vucc/band.php @@ -18,7 +18,7 @@ foreach ($vucc_array as $vucc => $value) { // Fills the table with the data echo ' '. $i++ .' - '. $vucc .' + '. $vucc .' '. $value['qsl'] . ' '. $value['lotw'] .' '; diff --git a/application/views/awards/vucc/details_ajax.php b/application/views/awards/vucc/details_ajax.php new file mode 100644 index 00000000..97a47ed4 --- /dev/null +++ b/application/views/awards/vucc/details_ajax.php @@ -0,0 +1,3 @@ +

Filtering on

+ +load->view('view_log/partial/log_ajax') ?> diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 40ae42cd..95fb1f64 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -1486,6 +1486,36 @@ $(document).ready(function(){ + uri->segment(2) == "vucc_band") { ?> + + function displayVuccContacts(gridsquare, band) { + var baseURL= ""; + $.ajax({ + url: baseURL + 'index.php/awards/vucc_details_ajax', + type: 'post', + data: {'Gridsquare': gridsquare, + 'Band': band + }, + success: function(html) { + BootstrapDialog.show({ + title: 'QSO Data', + size: BootstrapDialog.SIZE_WIDE, + cssClass: 'qso-vucc-dialog', + nl2br: false, + message: html, + buttons: [{ + label: 'Close', + action: function (dialogItself) { + dialogItself.close(); + } + }] + }); + } + }); + } + + + uri->segment(2) == "dok") { ?>