diff --git a/application/controllers/Logbookadvanced.php b/application/controllers/Logbookadvanced.php index 89a356453..20bb51841 100644 --- a/application/controllers/Logbookadvanced.php +++ b/application/controllers/Logbookadvanced.php @@ -201,6 +201,17 @@ class Logbookadvanced extends CI_Controller { $this->load->view('adif/data/exportall', $data); } + function export_to_adif_params() { + $this->load->model('logbookadvanced_model'); + + $postdata = $this->input->post(); + $postdata['user_id'] = (int)$this->session->userdata('user_id'); + $postdata['qsoresults'] = 'All'; + $data['qsos'] = $this->logbookadvanced_model->getSearchResult($postdata); + + $this->load->view('adif/data/exportall', $data); + } + function update_qsl() { $this->load->model('logbookadvanced_model'); @@ -306,7 +317,7 @@ class Logbookadvanced extends CI_Controller { 'ids' => xss_clean($this->input->post('ids')) ); - $result = $this->logbookadvanced_model->searchDb($searchCriteria); + $result = $this->logbookadvanced_model->getSearchResultArray($searchCriteria); $this->prepareMappedQSos($result); } @@ -347,7 +358,7 @@ class Logbookadvanced extends CI_Controller { 'qslimages' => xss_clean($this->input->post('qslimages')), ); - $result = $this->logbookadvanced_model->searchDb($searchCriteria); + $result = $this->logbookadvanced_model->getSearchResultArray($searchCriteria); $this->prepareMappedQSos($result); } diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php index 6d8205caa..33ef9b1ff 100644 --- a/application/models/Logbookadvanced_model.php +++ b/application/models/Logbookadvanced_model.php @@ -208,7 +208,11 @@ class Logbookadvanced_model extends CI_Model { $where = "AND $where"; } - $limit = $searchCriteria['qsoresults']; + $limit = ''; + + if ($searchCriteria['qsoresults'] != 'All') { + $limit = 'limit ' . $searchCriteria['qsoresults']; + } $where2 = ''; @@ -222,7 +226,7 @@ class Logbookadvanced_model extends CI_Model { } $sql = " - SELECT * + SELECT *, dxcc_entities.name AS station_country FROM " . $this->config->item('table_name') . " qsos INNER JOIN station_profile ON qsos.station_id=station_profile.station_id LEFT OUTER JOIN satellite ON qsos.COL_SAT_NAME = satellite.name @@ -237,12 +241,19 @@ class Logbookadvanced_model extends CI_Model { $where $where2 ORDER BY qsos.COL_TIME_ON desc, qsos.COL_PRIMARY_KEY desc - LIMIT $limit + $limit "; - $data = $this->db->query($sql, $binding); + return $this->db->query($sql, $binding); - $results = $data->result('array'); - return $results; + } + + public function getSearchResult($searchCriteria) { + return $this->searchDb($searchCriteria); + } + + public function getSearchResultArray($searchCriteria) { + $result = $this->searchDb($searchCriteria); + return $result->result('array'); } /* @@ -250,7 +261,7 @@ class Logbookadvanced_model extends CI_Model { * @return array */ public function searchQsos($searchCriteria) : array { - $results = $this->searchDb($searchCriteria); + $results = $this->getSearchResultArray($searchCriteria); $qsos = []; foreach ($results as $data) { diff --git a/application/views/activated_gridmap/index.php b/application/views/activated_gridmap/index.php index 1b9c28335..0c2da4145 100644 --- a/application/views/activated_gridmap/index.php +++ b/application/views/activated_gridmap/index.php @@ -1,4 +1,4 @@ -
| - - | - datetime->show ?? "true") == "true") { - echo '' . lang('general_word_datetime') . ' | '; - } ?> - de->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_de') . ' | '; - } ?> - dx->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_dx') . ' | '; - } ?> - mode->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_mode') . ' | '; - } ?> - rsts->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_rsts') . ' | '; - } ?> - rstr->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_rstr') . ' | '; - } ?> - band->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_band') . ' | '; - } ?> - myrefs->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_myrefs') . ' | '; - } ?> - refs->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_refs') . ' | '; - } ?> - name->show ?? "true") == "true") { - echo '' . lang('general_word_name') . ' | '; - } ?> - qslvia->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_qslvia') . ' | '; - } ?> - qsl->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_qsl') . ' | '; - } ?> - session->userdata('user_eqsl_name') != "" && ($options->eqsl->show ?? "true") == "true"){ - echo 'eQSL | '; - } ?> - session->userdata('user_lotw_name') != "" && ($options->lotw->show ?? "true") == "true"){ - echo 'LoTW | '; - } ?> - qslmsg->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_qslmsg') . ' | '; - } ?> - dxcc->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_dxcc') . ' | '; - } ?> - state->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_state') . ' | '; - } ?> - cqzone->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_cq_zone') . ' | '; - } ?> - ituzone->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_itu_zone') . ' | '; - } ?> - iota->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_iota') . ' | '; - } ?> - pota->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_pota') . ' | '; - } ?> - operator->show ?? "true") == "true") { - echo '' . lang('gen_hamradio_operator') . ' | '; - } ?> - comment->show ?? "true") == "true") { - echo '' . lang('general_word_comment') . ' | '; - } ?> -
|---|