From 328f572596c9630ea6ecb01940b2dafb0176d94e Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 1 Nov 2012 16:39:00 +0000 Subject: [PATCH] Basic tracking for wacral members WACRAL:# and awards/wacral for acceessing information for awards --- application/controllers/awards.php | 17 +++++++++ application/models/wacral.php | 23 ++++++++++++ application/views/awards/wacral/index.php | 45 +++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 application/models/wacral.php create mode 100644 application/views/awards/wacral/index.php diff --git a/application/controllers/awards.php b/application/controllers/awards.php index 265cd9bb..f6ed0830 100644 --- a/application/controllers/awards.php +++ b/application/controllers/awards.php @@ -47,4 +47,21 @@ class Awards extends CI_Controller { $this->load->view('layout/footer'); } + /* + Handles showing worked WACRAL members (wacral.org) + Comment field - WACRAL:# + */ + public function wacral() { + + // Grab all worked wacral members + $this->load->model('wacral'); + $data['wacral_all'] = $this->wacral->get_all(); + + // Render page + $data['page_title'] = "Awards - WACRAL Members"; + $this->load->view('layout/header', $data); + $this->load->view('awards/wacral/index'); + $this->load->view('layout/footer'); + } + } \ No newline at end of file diff --git a/application/models/wacral.php b/application/models/wacral.php new file mode 100644 index 00000000..bbe5cf9e --- /dev/null +++ b/application/models/wacral.php @@ -0,0 +1,23 @@ +db->order_by("COL_COMMENT", "ASC"); + $this->db->like('COL_COMMENT', 'WACRAL:'); + + return $this->db->get($this->config->item('table_name')); + } +} + +?> \ No newline at end of file diff --git a/application/views/awards/wacral/index.php b/application/views/awards/wacral/index.php new file mode 100644 index 00000000..ccac2606 --- /dev/null +++ b/application/views/awards/wacral/index.php @@ -0,0 +1,45 @@ +
+

+ + num_rows() > 0) { ?> + + + + + + + + + + + + result() as $row) { + ?> + + + + + + + + + + + +
Membership #Date/TimeCallsignBandRST SentRST Recvd
+ COL_COMMENT); + foreach($pieces as $val) { + if (strpos($val,'WACRAL:') !== false) { + //echo $val; + echo $rest = substr($val,7); // returns "cde" + } + } + ?> + 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; ?>
+ + +

You have lot logged any WACRAL

+ +
\ No newline at end of file