From 8565f86cd25100fb6461d5100b1b2e31e9b297f0 Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Tue, 28 Oct 2025 08:13:24 +0100 Subject: [PATCH] [Location list] A very early draft --- application/controllers/Stationsetup.php | 9 +++++++ application/models/Stationsetup_model.php | 9 +++++++ .../views/stationsetup/locationlist.php | 27 +++++++++++++++++++ .../views/stationsetup/stationsetup.php | 4 ++- 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 application/views/stationsetup/locationlist.php diff --git a/application/controllers/Stationsetup.php b/application/controllers/Stationsetup.php index aa0e7f418..8325bb9b1 100644 --- a/application/controllers/Stationsetup.php +++ b/application/controllers/Stationsetup.php @@ -519,4 +519,13 @@ class Stationsetup extends CI_Controller { $this->user_options_model->set_option('ExportMapOptions', 'qsocount', array($slug => xss_clean($this->input->post('qsocount')))); $this->user_options_model->set_option('ExportMapOptions', 'band', array($slug => xss_clean($this->input->post('band')))); } + + public function list_locations() { + $this->load->model('stationsetup_model'); + $data['locations'] = $this->stationsetup_model->list_all_locations()->result(); + $data['page_title'] = __("Station location list"); + $this->load->view('interface_assets/header'); + $this->load->view('stationsetup/locationlist', $data); + $this->load->view('interface_assets/footer'); + } } diff --git a/application/models/Stationsetup_model.php b/application/models/Stationsetup_model.php index 744890576..d1fc113c0 100644 --- a/application/models/Stationsetup_model.php +++ b/application/models/Stationsetup_model.php @@ -232,6 +232,15 @@ class Stationsetup_model extends CI_Model { return $this->db->get(); } + + function list_all_locations() { + $sql = "select station_profile_name, station_gridsquare, station_city, station_iota, station_sota, station_callsign, station_power, station_dxcc, station_cnty, station_cq, station_itu, station_active, eqslqthnickname, state, county, station_sig, station_sig_info, qrzrealtime, station_wwff, station_pota, oqrs, oqrs_text, oqrs_email, webadifrealtime, clublogrealtime, clublogignore, hrdlogrealtime, creation_date, last_modified + from station_profile + where user_id = ?"; + + $query = $this->db->query($sql, array($this->session->userdata('user_id'))); + return $query; + } } ?> diff --git a/application/views/stationsetup/locationlist.php b/application/views/stationsetup/locationlist.php new file mode 100644 index 000000000..5639b759a --- /dev/null +++ b/application/views/stationsetup/locationlist.php @@ -0,0 +1,27 @@ +

+ + + + + + + + + + + + + + + + + + + +
+ +
No locations found.
+ diff --git a/application/views/stationsetup/stationsetup.php b/application/views/stationsetup/stationsetup.php index b8d1f4148..678cc1fed 100644 --- a/application/views/stationsetup/stationsetup.php +++ b/application/views/stationsetup/stationsetup.php @@ -101,7 +101,9 @@

-

+

+ +