From 8606a73a884db505b3821597c0c4f8da060d2e67 Mon Sep 17 00:00:00 2001 From: DJ3CE Date: Fri, 22 Mar 2024 11:51:53 +0100 Subject: [PATCH 01/21] Fix missing columns in logsearch --- .../views/search/search_result_ajax.php | 253 +++++++----------- 1 file changed, 98 insertions(+), 155 deletions(-) diff --git a/application/views/search/search_result_ajax.php b/application/views/search/search_result_ajax.php index 16c94bfbc..7752e507c 100644 --- a/application/views/search/search_result_ajax.php +++ b/application/views/search/search_result_ajax.php @@ -1,3 +1,86 @@ +COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; + break; + case 'RSTS': + echo $row->COL_RST_SENT; if ($row->COL_STX) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_STX); echo '';} if ($row->COL_STX_STRING) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_STX_STRING . '';}; + break; + case 'RSTR': + echo $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_SRX); echo '';} if ($row->COL_SRX_STRING) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_SRX_STRING . '';}; + break; + case 'Country': + echo ucwords(strtolower(($row->COL_COUNTRY))); + break; + case 'IOTA': + echo ($row->COL_IOTA); + break; + case 'SOTA': + echo ($row->COL_SOTA_REF); + break; + case 'WWFF': + echo ($row->COL_WWFF_REF); + break; + case 'POTA': + echo ($row->COL_POTA_REF); + break; + case 'Grid': + echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; + break; + case 'Distance': + echo ($row->COL_DISTANCE ? $row->COL_DISTANCE . ' km' : ''); + break; + case 'Band': + if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; + break; + case 'State': + echo ($row->COL_STATE); + break; + case 'Operator': + echo ($row->COL_OPERATOR); + break; + case 'Frequency': + if($row->COL_SAT_NAME != null) { echo ''; if ($row->COL_FREQ != null) { echo ' '.$row->COL_SAT_NAME.''; } else { echo $row->COL_SAT_NAME; } echo ''; } else { if ($row->COL_FREQ != null) { echo ' '.$ci->frequency->hz_to_mhz($row->COL_FREQ).''; } else { echo strtolower($row->COL_BAND); } }; + break; + case 'State': + echo ($row->COL_STATE); + break; + case 'Operator': + echo ($row->COL_OPERATOR); + break; + case 'Location': + echo ($row->station_profile_name); + break; + case 'Name': + echo ($row->COL_NAME); + break; + default: + echo '(unknown col)'; + } +} +?>
@@ -10,84 +93,19 @@ '; - switch($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) { - case 'Mode': echo lang('gen_hamradio_mode'); break; - case 'RSTS': echo lang('gen_hamradio_rsts'); break; - case 'RSTR': echo lang('gen_hamradio_rstr'); break; - case 'Country': echo lang('general_word_country'); break; - case 'IOTA': echo lang('gen_hamradio_iota'); break; - case 'SOTA': echo lang('gen_hamradio_sota'); break; - case 'State': echo lang('gen_hamradio_state'); break; - case 'Grid': echo lang('gen_hamradio_gridsquare'); break; - case 'Distance': echo lang('gen_hamradio_distance'); break; - case 'Band': echo lang('gen_hamradio_band'); break; - case 'Frequency': echo lang('gen_hamradio_frequency'); break; - case 'Operator': echo lang('gen_hamradio_operator'); break; - } + echo_table_header_col($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')); echo ''; echo ''; echo ''; echo ''; echo ''; if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> @@ -131,91 +149,16 @@ session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) { - case 'Mode': echo ''; break; - case 'RSTR': echo ''; break; - case 'Country': echo ''; } else { if ($row->COL_FREQ != null) { echo ' '.$ci->frequency->hz_to_mhz($row->COL_FREQ).''; } else { echo strtolower($row->COL_BAND); } } echo ''; break; - } - echo ''; - switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) { - case 'Mode': echo ''; break; - case 'RSTR': echo ''; break; - case 'Country': echo ''; } else { if ($row->COL_FREQ != null) { echo ' '.$ci->frequency->hz_to_mhz($row->COL_FREQ).''; } else { echo strtolower($row->COL_BAND); } } echo ''; break; - } - echo ''; - - switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) { - case 'Mode': echo ''; break; - case 'RSTR': echo ''; break; - case 'Country': echo ''; } else { if ($row->COL_FREQ != null) { echo ' '.$ci->frequency->hz_to_mhz($row->COL_FREQ).''; } else { echo strtolower($row->COL_BAND); } } echo ''; break; - } - echo ''; - switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) { - case 'Mode': echo ''; break; - case 'RSTR': echo ''; break; - case 'Country': echo ''; } else { if ($row->COL_FREQ != null) { echo ' '.$ci->frequency->hz_to_mhz($row->COL_FREQ).''; } else { echo strtolower($row->COL_BAND); } } echo ''; break; - } - echo ''; - switch($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')) { - case 'Mode': echo ''; break; - case 'RSTR': echo ''; break; - case 'Country': echo ''; } else { if ($row->COL_FREQ != null) { echo ' '.$ci->frequency->hz_to_mhz($row->COL_FREQ).''; } else { echo strtolower($row->COL_BAND); } } echo ''; break; - } + echo ''; if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> From 8d9e0ba2ccf1df9aba14a37b0519e82dfb785166 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Fri, 22 Mar 2024 10:58:30 +0000 Subject: [PATCH 02/21] Fixes Menu Hiding --- assets/css/general.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/css/general.css b/assets/css/general.css index 0207fd68e..dd402453c 100644 --- a/assets/css/general.css +++ b/assets/css/general.css @@ -793,4 +793,7 @@ label { #upcoming_dxccs_component #not_worked_before { background-color: #ffdddd; width: 33%; -} \ No newline at end of file +} + +.table-responsive>table .dropdown{position:static;} +.table-responsive>table .dropdown>.dropdown-menu{left:auto !important;top:auto !important;} \ No newline at end of file From f527be0af00f1b2188f6175886cbb51ff52b6b27 Mon Sep 17 00:00:00 2001 From: DJ3CE Date: Sat, 23 Mar 2024 17:33:32 +0100 Subject: [PATCH 03/21] Prevent non-numeric entries in contesting-serial fields --- assets/js/sections/contesting.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/sections/contesting.js b/assets/js/sections/contesting.js index 1ce2b5eb1..399b41607 100644 --- a/assets/js/sections/contesting.js +++ b/assets/js/sections/contesting.js @@ -94,10 +94,10 @@ $(function () { }); }); -// We don't want spaces to be written in serial +// We don't want anything but numbers to be written in serial $(function () { - $('#exch_serial_r').on('keypress', function (e) { - if (e.which == 32) { + $('#exch_serial_r, #exch_serial_s').on('keypress', function (e) { + if (e.key.charCodeAt(0) < 48 || e.key.charCodeAt(0) > 57) { return false; } }); From fdd4a2df8c311eb72bff17ae0a762726673d2406 Mon Sep 17 00:00:00 2001 From: Patrick Burns Date: Tue, 26 Mar 2024 22:08:16 -0500 Subject: [PATCH 04/21] realized my old branch/PR was started off of main and not dev, got a new one up now --- application/controllers/Logbook.php | 2 + application/controllers/Sstv.php | 95 +++++++++++++ .../language/english/general_words_lang.php | 4 + .../migrations/175_add_sstv_images_table.php | 37 +++++ application/models/Sstv_model.php | 91 ++++++++++++ application/views/interface_assets/footer.php | 130 ++++++++++++++++++ application/views/sstv/sstvcarousel.php | 38 +++++ application/views/view_log/qso.php | 60 ++++++++ 8 files changed, 457 insertions(+) create mode 100644 application/controllers/Sstv.php create mode 100644 application/migrations/175_add_sstv_images_table.php create mode 100644 application/models/Sstv_model.php create mode 100644 application/views/sstv/sstvcarousel.php diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 054de873a..65fbe634a 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -618,7 +618,9 @@ function view($id) { } $this->load->model('Qsl_model'); + $this->load->model('Sstv_model'); $data['qslimages'] = $this->Qsl_model->getQslForQsoId($id); + $data['sstvimages'] = $this->Sstv_model->getSstvForQsoId($id); $data['primary_subdivision'] = $this->subdivisions->get_primary_subdivision_name($data['query']->result()[0]->COL_DXCC); $data['secondary_subdivision'] = $this->subdivisions->get_secondary_subdivision_name($data['query']->result()[0]->COL_DXCC); $data['max_upload'] = ini_get('upload_max_filesize'); diff --git a/application/controllers/Sstv.php b/application/controllers/Sstv.php new file mode 100644 index 000000000..c229a13a4 --- /dev/null +++ b/application/controllers/Sstv.php @@ -0,0 +1,95 @@ +lang->load('qslcard'); + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + } + + public function uploadSSTV() { + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + + if (!file_exists('./assets/sstvimages')) { + mkdir('./assets/sstvimages', 0755, true); + } + $qsoid = $this->input->post('qsoid'); + + $results = array(); + if (isset($_FILES['sstvimages']) && $_FILES['sstvimages']['error'][0] == 0) + { + for($i=0; $i $_FILES['sstvimages']['name'][$i], + 'type' => $_FILES['sstvimages']['type'][$i], + 'tmp_name' => $_FILES['sstvimages']['tmp_name'][$i], + 'error' => $_FILES['sstvimages']['error'][$i], + 'size' => $_FILES['sstvimages']['size'][$i] + ); + $result = $this->uploadSSTVImage($qsoid, $file); + array_push($results, $result); + } + } + + header("Content-type: application/json"); + echo json_encode($results); + } + + function uploadSSTVImage($qsoid, $file) { + $config['upload_path'] = './assets/sstvimages'; + $config['allowed_types'] = 'jpg|gif|png|jpeg|JPG|PNG|bmp'; + $array = explode(".", $file['name']); + $ext = end($array); + $config['file_name'] = $qsoid . '.sstv.' . '_' . time() . '.' . $ext; + + $this->load->library('upload', $config); + + $_FILES['sstvimage'] = $file; + if ( ! $this->upload->do_upload('sstvimage')) { + // Upload of SSTV image Failed + $error = array('error' => $this->upload->display_errors()); + + return $error; + } + else { + // Load database queries + $this->load->model('Sstv_model'); + + //Upload of SSTV image was successful + $data = $this->upload->data(); + + // Now we need to insert info into database about file + $filename = $data['file_name']; + $insertid = $this->Sstv_model->saveSstvImages($qsoid, $filename); + + $result['status'] = 'Success'; + $result['insertid'] = $insertid; + $result['filename'] = $filename; + return $result; + } + } + + + // Deletes SSTV Image + public function delete() { + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + + $id = $this->input->post('id'); + $this->load->model('Sstv_model'); + + $path = './assets/sstvimages/'; + $file = $this->Sstv_model->getSSTVFilename($id)->row(); + $filename = $file->filename; + unlink($path.$filename); + + $this->Sstv_model->deleteSstv($id); + } +} diff --git a/application/language/english/general_words_lang.php b/application/language/english/general_words_lang.php index d61b9f679..b2a019f82 100644 --- a/application/language/english/general_words_lang.php +++ b/application/language/english/general_words_lang.php @@ -74,6 +74,10 @@ $lang['general_word_qslcard'] = 'QSL Card'; $lang['general_word_qslcard_management'] = 'QSL Management'; $lang['general_word_qslcards'] = 'QSL Cards'; +$lang['general_word_sstv_management'] = 'SSTV Management'; +$lang['general_word_sstvimages'] = 'SSTV Images'; +$lang['general_sstv_upload'] = 'Uploaded SSTV images'; +$lang['general_sstv_upload_button'] = 'Upload SSTV image(s)'; $lang['general_word_qslcard_direct'] = 'Direct'; $lang['general_word_qslcard_bureau'] = 'Bureau'; $lang['general_word_qslcard_electronic'] = 'Electronic'; diff --git a/application/migrations/175_add_sstv_images_table.php b/application/migrations/175_add_sstv_images_table.php new file mode 100644 index 000000000..657b53e3b --- /dev/null +++ b/application/migrations/175_add_sstv_images_table.php @@ -0,0 +1,37 @@ +dbforge->add_field(array( + 'id' => array( + 'type' => 'INT', + 'constraint' => 5, + 'unsigned' => TRUE, + 'auto_increment' => TRUE + ), + 'qsoid' => array( + 'type' => 'VARCHAR', + 'constraint' => '250', + ), + 'filename' => array( + 'type' => 'VARCHAR', + 'constraint' => '250', + ), + 'modified' => array( + 'type' => 'timestamp', + 'null' => TRUE, + ), + )); + $this->dbforge->add_key('id', TRUE); + $this->dbforge->create_table('sstv_images'); + } + + public function down() + { + echo "not possible"; + } +} \ No newline at end of file diff --git a/application/models/Sstv_model.php b/application/models/Sstv_model.php new file mode 100644 index 000000000..9541c6d67 --- /dev/null +++ b/application/models/Sstv_model.php @@ -0,0 +1,91 @@ +security->xss_clean($qsoid); + + // be sure that QSO belongs to user + $CI = &get_instance(); + $CI->load->model('logbook_model'); + if (!$CI->logbook_model->check_qso_is_accessible($clean_id)) { + return; + } + + $data = array( + 'qsoid' => $clean_id, + 'filename' => $filename + ); + + $this->db->insert('sstv_images', $data); + + return $this->db->insert_id(); + } + + function getSSTVFilename($id) + { + // Clean ID + $clean_id = $this->security->xss_clean($id); + + // be sure that QSO belongs to user + $CI = &get_instance(); + $CI->load->model('logbook_model'); + $this->db->select('qsoid'); + $this->db->from('sstv_images'); + $this->db->where('id', $clean_id); + $qsoid = $this->db->get()->row()->qsoid; + if (!$CI->logbook_model->check_qso_is_accessible($qsoid)) { + return; + } + + $this->db->select('filename'); + $this->db->from('sstv_images'); + $this->db->where('id', $clean_id); + + return $this->db->get(); + } + + + function deleteSstv($id) + { + // Clean ID + $clean_id = $this->security->xss_clean($id); + + // be sure that QSO belongs to user + $CI = &get_instance(); + $CI->load->model('logbook_model'); + $this->db->select('qsoid'); + $this->db->from('sstv_images'); + $this->db->where('id', $clean_id); + $qsoid = $this->db->get()->row()->qsoid; + if (!$CI->logbook_model->check_qso_is_accessible($qsoid)) { + return; + } + + // Delete Mode + $this->db->delete('sstv_images', array('id' => $clean_id)); + } + + + function getSstvForQsoId($id) + { + // Clean ID + $clean_id = $this->security->xss_clean($id); + + // be sure that QSO belongs to user + $CI = &get_instance(); + $CI->load->model('logbook_model'); + if (!$CI->logbook_model->check_qso_is_accessible($clean_id)) { + return; + } + + $this->db->select('*'); + $this->db->from('sstv_images'); + $this->db->where('qsoid', $clean_id); + + return $this->db->get()->result(); + } + +} diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 002ac060b..daf67e70a 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -2535,6 +2535,67 @@ function deleteQsl(id) { }); } + + + + - -

From bb64d68be1f7e86aacadb10b66233d4f2ab27c2f Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Fri, 5 Apr 2024 22:12:00 +0100 Subject: [PATCH 21/21] 2.6.8 tag --- application/config/migration.php | 2 +- application/migrations/176_tag_2_6_8.php | 30 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 application/migrations/176_tag_2_6_8.php diff --git a/application/config/migration.php b/application/config/migration.php index 086fb9a7c..f176f248e 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ | */ -$config['migration_version'] = 175; +$config['migration_version'] = 176; /* |-------------------------------------------------------------------------- diff --git a/application/migrations/176_tag_2_6_8.php b/application/migrations/176_tag_2_6_8.php new file mode 100644 index 000000000..087509914 --- /dev/null +++ b/application/migrations/176_tag_2_6_8.php @@ -0,0 +1,30 @@ +db->where('option_name', 'version'); + $this->db->update('options', array('option_value' => '2.6.8')); + + // Trigger Version Info Dialog + $this->db->where('option_type', 'version_dialog'); + $this->db->where('option_name', 'confirmed'); + $this->db->update('user_options', array('option_value' => 'false')); + + } + + public function down() + { + $this->db->where('option_name', 'version'); + $this->db->update('options', array('option_value' => '2.6.7')); + } +} \ No newline at end of file
'; - switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) { - case 'Mode': echo lang('gen_hamradio_mode'); break; - case 'RSTS': echo lang('gen_hamradio_rsts'); break; - case 'RSTR': echo lang('gen_hamradio_rstr'); break; - case 'Country': echo lang('general_word_country'); break; - case 'IOTA': echo lang('gen_hamradio_iota'); break; - case 'State': echo lang('gen_hamradio_state'); break; - case 'SOTA': echo lang('gen_hamradio_sota'); break; - case 'Grid': echo lang('gen_hamradio_gridsquare'); break; - case 'Distance': echo lang('gen_hamradio_distance'); break; - case 'Band': echo lang('gen_hamradio_band'); break; - case 'Frequency': echo lang('gen_hamradio_frequency'); break; - case 'Operator': echo lang('gen_hamradio_operator'); break; - } + echo_table_header_col($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')); echo ''; - switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) { - case 'Mode': echo lang('gen_hamradio_mode'); break; - case 'RSTS': echo lang('gen_hamradio_rsts'); break; - case 'RSTR': echo lang('gen_hamradio_rstr'); break; - case 'Country': echo lang('general_word_country'); break; - case 'IOTA': echo lang('gen_hamradio_iota'); break; - case 'SOTA': echo lang('gen_hamradio_sota'); break; - case 'State': echo lang('gen_hamradio_state'); break; - case 'Grid': echo lang('gen_hamradio_gridsquare'); break; - case 'Distance': echo lang('gen_hamradio_distance'); break; - case 'Band': echo lang('gen_hamradio_band'); break; - case 'Frequency': echo lang('gen_hamradio_frequency'); break; - case 'Operator': echo lang('gen_hamradio_operator'); break; - } + echo_table_header_col($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')); echo ''; - switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) { - case 'Mode': echo lang('gen_hamradio_mode'); break; - case 'RSTS': echo lang('gen_hamradio_rsts'); break; - case 'RSTR': echo lang('gen_hamradio_rstr'); break; - case 'Country': echo lang('general_word_country'); break; - case 'IOTA': echo lang('gen_hamradio_iota'); break; - case 'SOTA': echo lang('gen_hamradio_sota'); break; - case 'State': echo lang('gen_hamradio_state'); break; - case 'Grid': echo lang('gen_hamradio_gridsquare'); break; - case 'Distance': echo lang('gen_hamradio_distance'); break; - case 'Band': echo lang('gen_hamradio_band'); break; - case 'Frequency': echo lang('gen_hamradio_frequency'); break; - case 'Operator': echo lang('gen_hamradio_operator'); break; - } + echo_table_header_col($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')); echo ''; - switch($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')) { - case 'Mode': echo lang('gen_hamradio_mode'); break; - case 'RSTS': echo lang('gen_hamradio_rsts'); break; - case 'RSTR': echo lang('gen_hamradio_rstr'); break; - case 'Country': echo lang('general_word_country'); break; - case 'IOTA': echo lang('gen_hamradio_iota'); break; - case 'SOTA': echo lang('gen_hamradio_sota'); break; - case 'State': echo lang('gen_hamradio_state'); break; - case 'Grid': echo lang('gen_hamradio_gridsquare'); break; - case 'Distance': echo lang('gen_hamradio_distance'); break; - case 'Band': echo lang('gen_hamradio_band'); break; - case 'Frequency': echo lang('gen_hamradio_frequency'); break; - case 'Operator': echo lang('gen_hamradio_operator'); break; - } + echo_table_header_col($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')); echo ' '; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_STX); echo '';} if ($row->COL_STX_STRING) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_STX_STRING . '';} echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_SRX); echo '';} if ($row->COL_SRX_STRING) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_SRX_STRING . '';} echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'WWFF': echo '' . ($row->COL_WWFF_REF); break; - case 'POTA': echo '' . ($row->COL_POTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Distance':echo '' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . ' km' : ''); break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - case 'Operator': echo '' . ($row->COL_OPERATOR); break; - case 'Frequency': echo ''; if($row->COL_SAT_NAME != null) { echo ''; if ($row->COL_FREQ != null) { echo ' '.$row->COL_SAT_NAME.''; } else { echo $row->COL_SAT_NAME; } echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_STX); echo '';} if ($row->COL_STX_STRING) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_STX_STRING . '';} echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_SRX); echo '';} if ($row->COL_SRX_STRING) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_SRX_STRING . '';} echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'WWFF': echo '' . ($row->COL_WWFF_REF); break; - case 'POTA': echo '' . ($row->COL_POTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Distance':echo '' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . ' km' : ''); break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - case 'Operator': echo '' . ($row->COL_OPERATOR); break; - case 'Frequency': echo ''; if($row->COL_SAT_NAME != null) { echo ''; if ($row->COL_FREQ != null) { echo ' '.$row->COL_SAT_NAME.''; } else { echo $row->COL_SAT_NAME; } echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_STX); echo '';} if ($row->COL_STX_STRING) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_STX_STRING . '';} echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_SRX); echo '';} if ($row->COL_SRX_STRING) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_SRX_STRING . '';} echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'WWFF': echo '' . ($row->COL_WWFF_REF); break; - case 'POTA': echo '' . ($row->COL_POTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Distance':echo '' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . ' km' : ''); break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - case 'Operator': echo '' . ($row->COL_OPERATOR); break; - case 'Frequency': echo ''; if($row->COL_SAT_NAME != null) { echo ''; if ($row->COL_FREQ != null) { echo ' '.$row->COL_SAT_NAME.''; } else { echo $row->COL_SAT_NAME; } echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_STX); echo '';} if ($row->COL_STX_STRING) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_STX_STRING . '';} echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_SRX); echo '';} if ($row->COL_SRX_STRING) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_SRX_STRING . '';} echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'WWFF': echo '' . ($row->COL_WWFF_REF); break; - case 'POTA': echo '' . ($row->COL_POTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Distance':echo '' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . ' km' : ''); break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - case 'Operator': echo '' . ($row->COL_OPERATOR); break; - case 'Frequency': echo ''; if($row->COL_SAT_NAME != null) { echo ''; if ($row->COL_FREQ != null) { echo ' '.$row->COL_SAT_NAME.''; } else { echo $row->COL_SAT_NAME; } echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; - case 'RSTS': echo '' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_STX); echo '';} if ($row->COL_STX_STRING) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_STX_STRING . '';} echo '' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_SRX); echo '';} if ($row->COL_SRX_STRING) { echo ' COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_SRX_STRING . '';} echo '' . ucwords(strtolower(($row->COL_COUNTRY)));; break; - case 'IOTA': echo '' . ($row->COL_IOTA); break; - case 'SOTA': echo '' . ($row->COL_SOTA_REF); break; - case 'WWFF': echo '' . ($row->COL_WWFF_REF); break; - case 'POTA': echo '' . ($row->COL_POTA_REF); break; - case 'Grid': echo ''; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; - case 'Distance':echo '' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . ' km' : ''); break; - case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; - case 'State': echo '' . ($row->COL_STATE); break; - case 'Operator': echo '' . ($row->COL_OPERATOR); break; - case 'Frequency': echo ''; if($row->COL_SAT_NAME != null) { echo ''; if ($row->COL_FREQ != null) { echo ' '.$row->COL_SAT_NAME.''; } else { echo $row->COL_SAT_NAME; } echo ''; + echo_table_col($row, $this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')); + echo ''; + echo_table_col($row, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')); + echo ''; + echo_table_col($row, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')); + echo ''; + echo_table_col($row, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')); + echo ''; + echo_table_col($row, $this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')); echo '