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 @@ +
Reference | +Date/Time | +Callsign | +Band | +RST Sent | +RST 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; ?> | +