From c61bddc67d93437d1cb5a8572cd38e0ef22a77d5 Mon Sep 17 00:00:00 2001 From: phl0 Date: Sat, 10 Sep 2022 15:04:05 +0200 Subject: [PATCH] Add WWFF Award infos --- application/controllers/Awards.php | 17 +++++++ application/models/Wwff.php | 22 ++++++++++ application/views/awards/wwff/index.php | 44 +++++++++++++++++++ application/views/interface_assets/header.php | 2 + 4 files changed, 85 insertions(+) create mode 100644 application/models/Wwff.php create mode 100644 application/views/awards/wwff/index.php diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index e5c2fd38..16cc5b96 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -240,6 +240,23 @@ class Awards extends CI_Controller { $this->load->view('interface_assets/footer'); } + /* + Handles showing worked WWFFs + Comment field - WWFF:# + */ + public function wwff() { + + // Grab all worked wwff stations + $this->load->model('wwff'); + $data['wwff_all'] = $this->wwff->get_all(); + + // Render page + $data['page_title'] = "Awards - WWFF"; + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/wwff/index'); + $this->load->view('interface_assets/footer'); + } + public function cq() { $CI =& get_instance(); $CI->load->model('logbooks_model'); diff --git a/application/models/Wwff.php b/application/models/Wwff.php new file mode 100644 index 00000000..f34bfaba --- /dev/null +++ b/application/models/Wwff.php @@ -0,0 +1,22 @@ +load->model('logbooks_model'); + $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + if (!$logbooks_locations_array) { + return null; + } + + $this->db->where_in("station_id", $logbooks_locations_array); + $this->db->order_by("COL_WWFF_REF", "ASC"); + $this->db->where('COL_WWFF_REF !=', ''); + + return $this->db->get($this->config->item('table_name')); + } +} + +?> diff --git a/application/views/awards/wwff/index.php b/application/views/awards/wwff/index.php new file mode 100644 index 00000000..df98c4e3 --- /dev/null +++ b/application/views/awards/wwff/index.php @@ -0,0 +1,44 @@ +
+ +

+ + + + + + + + + + + + + + + num_rows() > 0) { + foreach ($wwff_all->result() as $row) { + ?> + + + + + + + + + + + +
ReferenceDate/TimeCallsignBandRST SentRST Received
+ COL_WWFF_REF; ?> + COL_TIME_ON); echo date('d/m/y', $timestamp); ?> - COL_TIME_ON); echo date('H:i', $timestamp); ?>COL_CALL; ?>COL_BAND; ?>COL_RST_SENT; ?>COL_RST_RCVD; ?>
+ ×Nothing found!
'; + }?> + diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index c50df122..8a441efc 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -126,6 +126,8 @@ VUCC WAS + + WWFF