From 2d729817878b7701dd82b2c6f197939fd5494e71 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sat, 20 Apr 2024 16:01:50 +0100 Subject: [PATCH] Added full Worked All Britain Award Support Added full Worked All Britain Award Support using the SIG system in Cloudlog #3079 --- application/controllers/Awards.php | 1108 +++++++++-------- .../language/bulgarian/awards_lang.php | 10 + .../chinese_simplified/awards_lang.php | 10 + application/language/czech/awards_lang.php | 9 + application/language/dutch/awards_lang.php | 10 + application/language/english/awards_lang.php | 10 + application/language/finnish/awards_lang.php | 10 + application/language/french/awards_lang.php | 10 + application/language/german/awards_lang.php | 10 + application/language/greek/awards_lang.php | 10 + application/language/italian/awards_lang.php | 10 + application/language/polish/awards_lang.php | 10 + application/language/russian/awards_lang.php | 10 + application/language/spanish/awards_lang.php | 10 + application/language/swedish/awards_lang.php | 10 + application/language/turkish/awards_lang.php | 10 + application/models/Logbook_model.php | 15 + .../models/Worked_all_britain_model.php | 55 + application/views/awards/wab/details.php | 3 + application/views/awards/wab/index.php | 91 +- application/views/interface_assets/footer.php | 177 ++- application/views/interface_assets/header.php | 2 + 22 files changed, 961 insertions(+), 639 deletions(-) create mode 100644 application/models/Worked_all_britain_model.php create mode 100644 application/views/awards/wab/details.php diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 930902c0..4a1b1491 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -1,4 +1,4 @@ -load->model('user_model'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } - $this->lang->load(array( - 'lotw', - 'eqsl' - )); - } + $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'); + } + $this->lang->load(array( + 'lotw', + 'eqsl' + )); + } - public function index() - { - // Render Page - $data['page_title'] = "Awards"; - $this->load->view('interface_assets/header', $data); - $this->load->view('awards/index'); - $this->load->view('interface_assets/footer'); - } + public function index() + { + // Render Page + $data['page_title'] = "Awards"; + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/index'); + $this->load->view('interface_assets/footer'); + } - public function dok () - { + public function dok() + { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + $CI = &get_instance(); + $CI->load->model('logbooks_model'); + $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); - $this->load->model('dok'); - $this->load->model('bands'); - $this->load->model('modes'); + $this->load->model('dok'); + $this->load->model('bands'); + $this->load->model('modes'); - if($this->input->method() === 'post') { - $postdata['doks'] = $this->security->xss_clean($this->input->post('doks')); - } else { - $postdata['doks'] = 'both'; - } + if ($this->input->method() === 'post') { + $postdata['doks'] = $this->security->xss_clean($this->input->post('doks')); + } else { + $postdata['doks'] = 'both'; + } - $data['worked_bands'] = $this->bands->get_worked_bands('dok'); - $data['modes'] = $this->modes->active(); + $data['worked_bands'] = $this->bands->get_worked_bands('dok'); + $data['modes'] = $this->modes->active(); - if ($this->input->post('band') != NULL) { - if ($this->input->post('band') == 'All') { - $bands = $data['worked_bands']; - } else { - $bands[] = $this->security->xss_clean($this->input->post('band')); - } - } else { - $bands = $data['worked_bands']; - } + if ($this->input->post('band') != NULL) { + if ($this->input->post('band') == 'All') { + $bands = $data['worked_bands']; + } else { + $bands[] = $this->security->xss_clean($this->input->post('band')); + } + } else { + $bands = $data['worked_bands']; + } - $data['bands'] = $bands; + $data['bands'] = $bands; - if($this->input->method() === 'post') { - $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl')); - $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw')); - $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl')); - $postdata['worked'] = $this->security->xss_clean($this->input->post('worked')); - $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed')); - $postdata['band'] = $this->security->xss_clean($this->input->post('band')); - $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); - } else { - $postdata['qsl'] = 1; - $postdata['lotw'] = 1; - $postdata['eqsl'] = 0; - $postdata['worked'] = 1; - $postdata['confirmed'] = 1; - $postdata['band'] = 'All'; - $postdata['mode'] = 'All'; - } + if ($this->input->method() === 'post') { + $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl')); + $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw')); + $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl')); + $postdata['worked'] = $this->security->xss_clean($this->input->post('worked')); + $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed')); + $postdata['band'] = $this->security->xss_clean($this->input->post('band')); + $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); + } else { + $postdata['qsl'] = 1; + $postdata['lotw'] = 1; + $postdata['eqsl'] = 0; + $postdata['worked'] = 1; + $postdata['confirmed'] = 1; + $postdata['band'] = 'All'; + $postdata['mode'] = 'All'; + } - if ($logbooks_locations_array) { - $location_list = "'".implode("','",$logbooks_locations_array)."'"; - $data['dok_array'] = $this->dok->get_dok_array($bands, $postdata, $location_list); - $data['dok_summary'] = $this->dok->get_dok_summary($bands, $postdata, $location_list); - } else { - $location_list = null; - $data['dok_array'] = null; - $data['dok_summary'] = null; - } + if ($logbooks_locations_array) { + $location_list = "'" . implode("','", $logbooks_locations_array) . "'"; + $data['dok_array'] = $this->dok->get_dok_array($bands, $postdata, $location_list); + $data['dok_summary'] = $this->dok->get_dok_summary($bands, $postdata, $location_list); + } else { + $location_list = null; + $data['dok_array'] = null; + $data['dok_summary'] = null; + } - // Render Page - $data['page_title'] = "Awards - DOK"; - $this->load->view('interface_assets/header', $data); - $this->load->view('awards/dok/index'); - $this->load->view('interface_assets/footer'); + // Render Page + $data['page_title'] = "Awards - DOK"; + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/dok/index'); + $this->load->view('interface_assets/footer'); + } - } - - public function dxcc () { - $this->load->model('dxcc'); + public function dxcc() + { + $this->load->model('dxcc'); $this->load->model('modes'); $this->load->model('bands'); @@ -108,18 +112,16 @@ class Awards extends CI_Controller { if ($this->input->post('band') != NULL) { // Band is not set when page first loads. if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands $bands = $data['worked_bands']; - } - else { + } else { $bands[] = $this->security->xss_clean($this->input->post('band')); } - } - else { + } else { $bands = $data['worked_bands']; } $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view - if($this->input->method() === 'post') { + if ($this->input->method() === 'post') { $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl')); $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw')); $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl')); @@ -136,8 +138,7 @@ class Awards extends CI_Controller { $postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica')); $postdata['band'] = $this->security->xss_clean($this->input->post('band')); $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); - } - else { // Setting default values at first load of page + } else { // Setting default values at first load of page $postdata['qsl'] = 1; $postdata['lotw'] = 1; $postdata['eqsl'] = 0; @@ -156,45 +157,44 @@ class Awards extends CI_Controller { $postdata['mode'] = 'All'; } - $dxcclist = $this->dxcc->fetchdxcc($postdata); + $dxcclist = $this->dxcc->fetchdxcc($postdata); $data['dxcc_array'] = $this->dxcc->get_dxcc_array($dxcclist, $bands, $postdata); $data['dxcc_summary'] = $this->dxcc->get_dxcc_summary($bands, $postdata); - // Render Page - $data['page_title'] = "Awards - DXCC"; - $this->load->view('interface_assets/header', $data); - $this->load->view('awards/dxcc/index'); - $this->load->view('interface_assets/footer'); - } + // Render Page + $data['page_title'] = "Awards - DXCC"; + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/dxcc/index'); + $this->load->view('interface_assets/footer'); + } - public function waja () { - $footerData = []; - $footerData['scripts'] = [ - 'assets/js/sections/wajamap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/wajamap.js")) - ]; + public function waja() + { + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/wajamap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/wajamap.js")) + ]; - $this->load->model('waja'); + $this->load->model('waja'); $this->load->model('modes'); $this->load->model('bands'); $data['worked_bands'] = $this->bands->get_worked_bands('waja'); $data['modes'] = $this->modes->active(); - if ($this->input->post('band') != NULL) { // Band is not set when page first loads. + if ($this->input->post('band') != NULL) { // Band is not set when page first loads. if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands $bands = $data['worked_bands']; - } - else { + } else { $bands[] = $this->security->xss_clean($this->input->post('band')); } - } - else { + } else { $bands = $data['worked_bands']; } $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view - if($this->input->method() === 'post') { + if ($this->input->method() === 'post') { $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl')); $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw')); $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl')); @@ -211,8 +211,7 @@ class Awards extends CI_Controller { $postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica')); $postdata['band'] = $this->security->xss_clean($this->input->post('band')); $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); - } - else { // Setting default values at first load of page + } else { // Setting default values at first load of page $postdata['qsl'] = 1; $postdata['lotw'] = 1; $postdata['eqsl'] = 0; @@ -234,14 +233,15 @@ class Awards extends CI_Controller { $data['waja_array'] = $this->waja->get_waja_array($bands, $postdata); $data['waja_summary'] = $this->waja->get_waja_summary($bands, $postdata); - // Render Page - $data['page_title'] = "Awards - WAJA"; - $this->load->view('interface_assets/header', $data); - $this->load->view('awards/waja/index'); - $this->load->view('interface_assets/footer', $footerData); - } + // Render Page + $data['page_title'] = "Awards - WAJA"; + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/waja/index'); + $this->load->view('interface_assets/footer', $footerData); + } - public function vucc() { + public function vucc() + { $this->load->model('vucc'); $this->load->model('bands'); $data['worked_bands'] = $this->bands->get_worked_bands('vucc'); @@ -255,7 +255,8 @@ class Awards extends CI_Controller { $this->load->view('interface_assets/footer'); } - public function vucc_band(){ + public function vucc_band() + { $this->load->model('vucc'); $band = str_replace('"', "", $this->security->xss_clean($this->input->get("Band"))); $type = str_replace('"', "", $this->security->xss_clean($this->input->get("Type"))); @@ -263,15 +264,16 @@ class Awards extends CI_Controller { $data['type'] = $type; // Render Page - $data['page_title'] = "VUCC - " .$band . " Band"; - $data['filter'] = "band ".$band; + $data['page_title'] = "VUCC - " . $band . " Band"; + $data['filter'] = "band " . $band; $data['band'] = $band; $this->load->view('interface_assets/header', $data); $this->load->view('awards/vucc/band'); $this->load->view('interface_assets/footer'); } - public function vucc_details_ajax(){ + public function vucc_details_ajax() + { $this->load->model('logbook_model'); $gridsquare = str_replace('"', "", $this->security->xss_clean($this->input->post("Gridsquare"))); @@ -280,130 +282,133 @@ class Awards extends CI_Controller { // Render Page $data['page_title'] = "Log View - VUCC"; - $data['filter'] = "vucc " . $gridsquare . " and band ".$band; + $data['filter'] = "vucc " . $gridsquare . " and band " . $band; $this->load->view('awards/details', $data); } - /* + /* * Used to fetch QSOs from the logbook in the awards */ - public function qso_details_ajax(){ - $this->load->model('logbook_model'); + public function qso_details_ajax() + { + $this->load->model('logbook_model'); - $searchphrase = str_replace('"', "", $this->security->xss_clean($this->input->post("Searchphrase"))); - $band = str_replace('"', "", $this->security->xss_clean($this->input->post("Band"))); - $mode = str_replace('"', "", $this->security->xss_clean($this->input->post("Mode"))); - $type = $this->security->xss_clean($this->input->post('Type')); - $qsl = $this->input->post('QSL') == null ? '' : $this->security->xss_clean($this->input->post('QSL')); - $searchmode = $this->input->post('searchmode') == null ? '' : $this->security->xss_clean($this->input->post('searchmode')); - $data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type, $qsl, $searchmode); + $searchphrase = str_replace('"', "", $this->security->xss_clean($this->input->post("Searchphrase"))); + $band = str_replace('"', "", $this->security->xss_clean($this->input->post("Band"))); + $mode = str_replace('"', "", $this->security->xss_clean($this->input->post("Mode"))); + $type = $this->security->xss_clean($this->input->post('Type')); + $qsl = $this->input->post('QSL') == null ? '' : $this->security->xss_clean($this->input->post('QSL')); + $searchmode = $this->input->post('searchmode') == null ? '' : $this->security->xss_clean($this->input->post('searchmode')); + $data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type, $qsl, $searchmode); - // This is done because we have two different ways to get dxcc info in Cloudlog. Once is using the name (in awards), and the other one is using the ADIF DXCC. - // We replace the values to make it look a bit nicer - if ($type == 'DXCC2') { - $type = 'DXCC'; - $dxccname = $this->logbook_model->get_entity($searchphrase); - $searchphrase = $dxccname['name']; - } + // This is done because we have two different ways to get dxcc info in Cloudlog. Once is using the name (in awards), and the other one is using the ADIF DXCC. + // We replace the values to make it look a bit nicer + if ($type == 'DXCC2') { + $type = 'DXCC'; + $dxccname = $this->logbook_model->get_entity($searchphrase); + $searchphrase = $dxccname['name']; + } - $qsltype = []; - if (strpos($qsl, "Q") !== false) { - $qsltype[] = "QSL"; - } - if (strpos($qsl, "L") !== false) { - $qsltype[] = "LoTW"; - } - if (strpos($qsl, "E") !== false) { - $qsltype[] = "eQSL"; - } + $qsltype = []; + if (strpos($qsl, "Q") !== false) { + $qsltype[] = "QSL"; + } + if (strpos($qsl, "L") !== false) { + $qsltype[] = "LoTW"; + } + if (strpos($qsl, "E") !== false) { + $qsltype[] = "eQSL"; + } - // Render Page - $data['page_title'] = "Log View - " . $type; - $data['filter'] = $type . " " . $searchphrase . " and band ".$band . " and mode ".$mode; - if (!empty($qsltype)) { - $data['filter'] .= " and ".implode('/', $qsltype); - } - $this->load->view('awards/details', $data); - } + // Render Page + $data['page_title'] = "Log View - " . $type; + $data['filter'] = $type . " " . $searchphrase . " and band " . $band . " and mode " . $mode; + if (!empty($qsltype)) { + $data['filter'] .= " and " . implode('/', $qsltype); + } + $this->load->view('awards/details', $data); + } - /* + /* Handles showing worked SOTAs Comment field - SOTA:# */ - public function sota() { + public function sota() + { - // Grab all worked sota stations - $this->load->model('sota'); - $data['sota_all'] = $this->sota->get_all(); + // Grab all worked sota stations + $this->load->model('sota'); + $data['sota_all'] = $this->sota->get_all(); - // Render page - $data['page_title'] = "Awards - SOTA"; - $this->load->view('interface_assets/header', $data); - $this->load->view('awards/sota/index'); - $this->load->view('interface_assets/footer'); - } + // Render page + $data['page_title'] = "Awards - SOTA"; + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/sota/index'); + $this->load->view('interface_assets/footer'); + } - /* + /* Handles showing worked WWFFs Comment field - WWFF:# */ - public function wwff() { + public function wwff() + { - // Grab all worked wwff stations - $this->load->model('wwff'); - $data['wwff_all'] = $this->wwff->get_all(); + // 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'); - } + // 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'); + } - /* + /* Handles showing worked POTAs Comment field - POTA:# */ - public function pota() { + public function pota() + { - // Grab all worked pota stations - $this->load->model('pota'); - $data['pota_all'] = $this->pota->get_all(); + // Grab all worked pota stations + $this->load->model('pota'); + $data['pota_all'] = $this->pota->get_all(); - // Render page - $data['page_title'] = "Awards - POTA"; - $this->load->view('interface_assets/header', $data); - $this->load->view('awards/pota/index'); - $this->load->view('interface_assets/footer'); - } + // Render page + $data['page_title'] = "Awards - POTA"; + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/pota/index'); + $this->load->view('interface_assets/footer'); + } - public function cq() { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + public function cq() + { + $CI = &get_instance(); + $CI->load->model('logbooks_model'); + $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); $this->load->model('cq'); - $this->load->model('modes'); + $this->load->model('modes'); $this->load->model('bands'); $data['worked_bands'] = $this->bands->get_worked_bands('cq'); - $data['modes'] = $this->modes->active(); // Used in the view for mode select + $data['modes'] = $this->modes->active(); // Used in the view for mode select if ($this->input->post('band') != NULL) { // Band is not set when page first loads. if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands $bands = $data['worked_bands']; - } - else { + } else { $bands[] = $this->input->post('band'); } - } - else { + } else { $bands = $data['worked_bands']; } $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view - if($this->input->method() === 'post') { + if ($this->input->method() === 'post') { $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl')); $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw')); $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl')); @@ -411,9 +416,8 @@ class Awards extends CI_Controller { $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed')); $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked')); $postdata['band'] = $this->security->xss_clean($this->input->post('band')); - $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); - } - else { // Setting default values at first load of page + $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); + } else { // Setting default values at first load of page $postdata['qsl'] = 1; $postdata['lotw'] = 1; $postdata['eqsl'] = 0; @@ -421,14 +425,14 @@ class Awards extends CI_Controller { $postdata['confirmed'] = 1; $postdata['notworked'] = 1; $postdata['band'] = 'All'; - $postdata['mode'] = 'All'; + $postdata['mode'] = 'All'; } if ($logbooks_locations_array) { - $location_list = "'".implode("','",$logbooks_locations_array)."'"; + $location_list = "'" . implode("','", $logbooks_locations_array) . "'"; $data['cq_array'] = $this->cq->get_cq_array($bands, $postdata, $location_list); $data['cq_summary'] = $this->cq->get_cq_summary($bands, $postdata, $location_list); - } else { + } else { $location_list = null; $data['cq_array'] = null; $data['cq_summary'] = null; @@ -436,39 +440,38 @@ class Awards extends CI_Controller { // Render page $data['page_title'] = "Awards - CQ Magazine WAZ"; - $this->load->view('interface_assets/header', $data); - $this->load->view('awards/cq/index'); - $this->load->view('interface_assets/footer'); - } + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/cq/index'); + $this->load->view('interface_assets/footer'); + } - public function was() { - $footerData = []; - $footerData['scripts'] = [ - 'assets/js/sections/wasmap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/wasmap.js")) - ]; + public function was() + { + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/wasmap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/wasmap.js")) + ]; $this->load->model('was'); - $this->load->model('modes'); + $this->load->model('modes'); $this->load->model('bands'); $data['worked_bands'] = $this->bands->get_worked_bands('was'); - $data['modes'] = $this->modes->active(); // Used in the view for mode select + $data['modes'] = $this->modes->active(); // Used in the view for mode select if ($this->input->post('band') != NULL) { // Band is not set when page first loads. if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands $bands = $data['worked_bands']; - } - else { + } else { $bands[] = $this->security->xss_clean($this->input->post('band')); } - } - else { + } else { $bands = $data['worked_bands']; } $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view - if($this->input->method() === 'post') { + if ($this->input->method() === 'post') { $postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl')); $postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw')); $postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl')); @@ -476,9 +479,8 @@ class Awards extends CI_Controller { $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed')); $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked')); $postdata['band'] = $this->security->xss_clean($this->input->post('band')); - $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); - } - else { // Setting default values at first load of page + $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); + } else { // Setting default values at first load of page $postdata['qsl'] = 1; $postdata['lotw'] = 1; $postdata['eqsl'] = 0; @@ -486,7 +488,7 @@ class Awards extends CI_Controller { $postdata['confirmed'] = 1; $postdata['notworked'] = 1; $postdata['band'] = 'All'; - $postdata['mode'] = 'All'; + $postdata['mode'] = 'All'; } $data['was_array'] = $this->was->get_was_array($bands, $postdata); @@ -498,17 +500,40 @@ class Awards extends CI_Controller { $this->load->view('awards/was/index'); $this->load->view('interface_assets/footer', $footerData); } - public function wab() { - // Render page - $data['page_title'] = "Awards - Worked All Britain"; - $this->load->view('interface_assets/header', $data); - $this->load->view('awards/wab/index'); - $this->load->view('interface_assets/footer'); - } + public function wab() + { + // get worked squares from Worked_all_britain_model + $this->load->model('worked_all_britain_model'); + $data['worked_squares'] = array_filter($this->worked_all_britain_model->get_worked_squares()); - public function iota () { + $data['confirmed_squares'] = array_filter($this->worked_all_britain_model->get_confirmed_squares()); + + // Render page + $data['page_title'] = "Awards - Worked All Britain"; + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/wab/index'); + $this->load->view('interface_assets/footer'); + } + + public function wab_details_ajax() + { + $this->load->model('logbook_model'); + + $wab = str_replace('"', "", $this->security->xss_clean($this->input->post("Wab"))); + + $data['results'] = $this->logbook_model->wab_qso_details($wab); + + // Render Page + $data['page_title'] = "Log View - WAB"; + $data['filter'] = "WAB " . $wab; + $this->load->view('awards/wab/details', $data); + } + + + public function iota() + { $this->load->model('iota'); - $this->load->model('modes'); + $this->load->model('modes'); $this->load->model('bands'); $data['worked_bands'] = $this->bands->get_worked_bands('iota'); // Used in the view for band select @@ -516,19 +541,17 @@ class Awards extends CI_Controller { if ($this->input->post('band') != NULL) { // Band is not set when page first loads. if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands $bands = $data['worked_bands']; - } - else { + } else { $bands[] = $this->security->xss_clean($this->input->post('band')); } - } - else { + } else { $bands = $data['worked_bands']; } $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view - $data['modes'] = $this->modes->active(); // Used in the view for mode select + $data['modes'] = $this->modes->active(); // Used in the view for mode select - if($this->input->method() === 'post') { + if ($this->input->method() === 'post') { $postdata['worked'] = $this->security->xss_clean($this->input->post('worked')); $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed')); $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked')); @@ -541,9 +564,8 @@ class Awards extends CI_Controller { $postdata['Oceania'] = $this->security->xss_clean($this->input->post('Oceania')); $postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica')); $postdata['band'] = $this->security->xss_clean($this->input->post('band')); - $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); - } - else { // Setting default values at first load of page + $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); + } else { // Setting default values at first load of page $postdata['worked'] = 1; $postdata['confirmed'] = 1; $postdata['notworked'] = 1; @@ -556,7 +578,7 @@ class Awards extends CI_Controller { $postdata['Oceania'] = 1; $postdata['Antarctica'] = 1; $postdata['band'] = 'All'; - $postdata['mode'] = 'All'; + $postdata['mode'] = 'All'; } $iotalist = $this->iota->fetchIota($postdata); @@ -570,7 +592,8 @@ class Awards extends CI_Controller { $this->load->view('interface_assets/footer'); } - public function counties() { + public function counties() + { $this->load->model('counties'); $data['counties_array'] = $this->counties->get_counties_array(); @@ -581,7 +604,8 @@ class Awards extends CI_Controller { $this->load->view('interface_assets/footer'); } - public function counties_details() { + public function counties_details() + { $this->load->model('counties'); $state = str_replace('"', "", $this->security->xss_clean($this->input->get("State"))); $type = str_replace('"', "", $this->security->xss_clean($this->input->get("Type"))); @@ -590,13 +614,14 @@ class Awards extends CI_Controller { // Render Page $data['page_title'] = "US Counties"; - $data['filter'] = $type . " counties in state ".$state; + $data['filter'] = $type . " counties in state " . $state; $this->load->view('interface_assets/header', $data); $this->load->view('awards/counties/details'); $this->load->view('interface_assets/footer'); } - public function counties_details_ajax(){ + public function counties_details_ajax() + { $this->load->model('logbook_model'); $state = str_replace('"', "", $this->security->xss_clean($this->input->post("State"))); @@ -609,297 +634,305 @@ class Awards extends CI_Controller { $this->load->view('awards/details', $data); } - public function gridmaster($dxcc) { - $dxcc = $this->security->xss_clean($dxcc); - $data['page_title'] = "Awards - ".strtoupper($dxcc)." Gridmaster"; + public function gridmaster($dxcc) + { + $dxcc = $this->security->xss_clean($dxcc); + $data['page_title'] = "Awards - " . strtoupper($dxcc) . " Gridmaster"; - $this->load->model('bands'); - $this->load->model('gridmap_model'); - $this->load->model('stations'); + $this->load->model('bands'); + $this->load->model('gridmap_model'); + $this->load->model('stations'); - $data['homegrid']= explode(',', $this->stations->find_gridsquare()); + $data['homegrid'] = explode(',', $this->stations->find_gridsquare()); - $data['modes'] = $this->gridmap_model->get_worked_modes(); - $data['bands']= $this->bands->get_worked_bands(); - $data['sats_available']= $this->bands->get_worked_sats(); + $data['modes'] = $this->gridmap_model->get_worked_modes(); + $data['bands'] = $this->bands->get_worked_bands(); + $data['sats_available'] = $this->bands->get_worked_sats(); - $data['layer']= $this->optionslib->get_option('option_map_tile_server'); + $data['layer'] = $this->optionslib->get_option('option_map_tile_server'); - $data['attribution']= $this->optionslib->get_option('option_map_tile_server_copyright'); + $data['attribution'] = $this->optionslib->get_option('option_map_tile_server_copyright'); - $data['gridsquares_gridsquares']= lang('gridsquares_gridsquares'); - $data['gridsquares_gridsquares_worked']= lang('gridsquares_gridsquares_worked'); - $data['gridsquares_gridsquares_lotw']= lang('gridsquares_gridsquares_lotw'); - $data['gridsquares_gridsquares_paper']= lang('gridsquares_gridsquares_paper'); + $data['gridsquares_gridsquares'] = lang('gridsquares_gridsquares'); + $data['gridsquares_gridsquares_worked'] = lang('gridsquares_gridsquares_worked'); + $data['gridsquares_gridsquares_lotw'] = lang('gridsquares_gridsquares_lotw'); + $data['gridsquares_gridsquares_paper'] = lang('gridsquares_gridsquares_paper'); - $indexData['dxcc'] = $dxcc; + $indexData['dxcc'] = $dxcc; - $footerData = []; - $footerData['scripts']= [ - 'assets/js/leaflet/geocoding.js', - 'assets/js/leaflet/L.MaidenheadColouredGridmasterMap.js', - 'assets/js/sections/gridmaster.js' - ]; + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/leaflet/geocoding.js', + 'assets/js/leaflet/L.MaidenheadColouredGridmasterMap.js', + 'assets/js/sections/gridmaster.js' + ]; - $this->load->view('interface_assets/header',$data); - $this->load->view('awards/gridmaster/index',$indexData); - $this->load->view('interface_assets/footer',$footerData); + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/gridmaster/index', $indexData); + $this->load->view('interface_assets/footer', $footerData); } - public function ffma() { - $data['page_title'] = "Awards - Fred Fish Memorial Award (FFMA)"; + public function ffma() + { + $data['page_title'] = "Awards - Fred Fish Memorial Award (FFMA)"; - $this->load->model('bands'); - $this->load->model('ffma_model'); - $this->load->model('stations'); + $this->load->model('bands'); + $this->load->model('ffma_model'); + $this->load->model('stations'); - $data['homegrid']= explode(',', $this->stations->find_gridsquare()); + $data['homegrid'] = explode(',', $this->stations->find_gridsquare()); - $data['layer']= $this->optionslib->get_option('option_map_tile_server'); + $data['layer'] = $this->optionslib->get_option('option_map_tile_server'); - $data['attribution']= $this->optionslib->get_option('option_map_tile_server_copyright'); + $data['attribution'] = $this->optionslib->get_option('option_map_tile_server_copyright'); - $data['gridsquares_gridsquares']= lang('gridsquares_gridsquares'); - $data['gridsquares_gridsquares_worked']= lang('gridsquares_gridsquares_worked'); - $data['gridsquares_gridsquares_lotw']= lang('gridsquares_gridsquares_lotw'); - $data['gridsquares_gridsquares_paper']= lang('gridsquares_gridsquares_paper'); - $data['grid_count'] = $this->ffma_model->get_grid_count(); - $data['grids'] = $this->ffma_model->get_grids(); + $data['gridsquares_gridsquares'] = lang('gridsquares_gridsquares'); + $data['gridsquares_gridsquares_worked'] = lang('gridsquares_gridsquares_worked'); + $data['gridsquares_gridsquares_lotw'] = lang('gridsquares_gridsquares_lotw'); + $data['gridsquares_gridsquares_paper'] = lang('gridsquares_gridsquares_paper'); + $data['grid_count'] = $this->ffma_model->get_grid_count(); + $data['grids'] = $this->ffma_model->get_grids(); - $footerData = []; - $footerData['scripts']= [ - 'assets/js/leaflet/geocoding.js', - 'assets/js/leaflet/L.MaidenheadColouredGridmasterMap.js', - 'assets/js/sections/ffma.js' - ]; + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/leaflet/geocoding.js', + 'assets/js/leaflet/L.MaidenheadColouredGridmasterMap.js', + 'assets/js/sections/ffma.js' + ]; - $this->load->view('interface_assets/header',$data); - $this->load->view('awards/ffma/index'); - $this->load->view('interface_assets/footer',$footerData); - } + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/ffma/index'); + $this->load->view('interface_assets/footer', $footerData); + } - public function getFfmaGridsjs() { - $this->load->model('ffma_model'); + public function getFfmaGridsjs() + { + $this->load->model('ffma_model'); - $array_grid_4char = array(); - $array_grid_4char_lotw = array(); - $array_grid_4char_paper = array(); + $array_grid_4char = array(); + $array_grid_4char_lotw = array(); + $array_grid_4char_paper = array(); - $grid_4char = ""; - $grid_4char_lotw = ""; + $grid_4char = ""; + $grid_4char_lotw = ""; - $query = $this->ffma_model->get_lotw(); - if ($query && $query->num_rows() > 0) { - foreach ($query->result() as $row) { - $grid_4char_lotw = strtoupper(substr($row->GRID_SQUARES,0,4)); - if(!in_array($grid_4char_lotw, $array_grid_4char_lotw)){ - array_push($array_grid_4char_lotw, $grid_4char_lotw); - } - } - } + $query = $this->ffma_model->get_lotw(); + if ($query && $query->num_rows() > 0) { + foreach ($query->result() as $row) { + $grid_4char_lotw = strtoupper(substr($row->GRID_SQUARES, 0, 4)); + if (!in_array($grid_4char_lotw, $array_grid_4char_lotw)) { + array_push($array_grid_4char_lotw, $grid_4char_lotw); + } + } + } - $query = $this->ffma_model->get_paper(); - if ($query && $query->num_rows() > 0) { - foreach ($query->result() as $row) { - $grid_4char_paper = strtoupper(substr($row->GRID_SQUARES,0,4)); - if(!in_array($grid_4char_paper, $array_grid_4char_paper)){ - array_push($array_grid_4char_paper, $grid_4char_paper); - } - } - } + $query = $this->ffma_model->get_paper(); + if ($query && $query->num_rows() > 0) { + foreach ($query->result() as $row) { + $grid_4char_paper = strtoupper(substr($row->GRID_SQUARES, 0, 4)); + if (!in_array($grid_4char_paper, $array_grid_4char_paper)) { + array_push($array_grid_4char_paper, $grid_4char_paper); + } + } + } - $query = $this->ffma_model->get_worked(); - if ($query && $query->num_rows() > 0) { - foreach ($query->result() as $row) { - $grid_four = strtoupper(substr($row->GRID_SQUARES,0,4)); - if(!in_array($grid_four, $array_grid_4char)){ - array_push($array_grid_4char, $grid_four); - } - } - } + $query = $this->ffma_model->get_worked(); + if ($query && $query->num_rows() > 0) { + foreach ($query->result() as $row) { + $grid_four = strtoupper(substr($row->GRID_SQUARES, 0, 4)); + if (!in_array($grid_four, $array_grid_4char)) { + array_push($array_grid_4char, $grid_four); + } + } + } - $vucc_grids = $this->ffma_model->get_vucc_lotw(); - foreach($vucc_grids as $key) { - $grid_four_lotw = strtoupper(substr($key,0,4)); - if(!in_array($grid_four_lotw, $array_grid_4char_lotw)){ - array_push($array_grid_4char_lotw, $grid_four_lotw); - } - } + $vucc_grids = $this->ffma_model->get_vucc_lotw(); + foreach ($vucc_grids as $key) { + $grid_four_lotw = strtoupper(substr($key, 0, 4)); + if (!in_array($grid_four_lotw, $array_grid_4char_lotw)) { + array_push($array_grid_4char_lotw, $grid_four_lotw); + } + } - $vucc_grids = $this->ffma_model->get_vucc_paper(); - foreach($vucc_grids as $key) { - $grid_four_paper = strtoupper(substr($key,0,4)); - if(!in_array($grid_four_paper, $array_grid_4char_paper)){ - array_push($array_grid_4char_paper, $grid_four_paper); - } - } + $vucc_grids = $this->ffma_model->get_vucc_paper(); + foreach ($vucc_grids as $key) { + $grid_four_paper = strtoupper(substr($key, 0, 4)); + if (!in_array($grid_four_paper, $array_grid_4char_paper)) { + array_push($array_grid_4char_paper, $grid_four_paper); + } + } - $vucc_grids = $this->ffma_model->get_vucc_worked(); - foreach($vucc_grids as $key) { - $grid_four = strtoupper(substr($key,0,4)); - if(!in_array($grid_four, $array_grid_4char)){ - array_push($array_grid_4char, $grid_four); - } - } + $vucc_grids = $this->ffma_model->get_vucc_worked(); + foreach ($vucc_grids as $key) { + $grid_four = strtoupper(substr($key, 0, 4)); + if (!in_array($grid_four, $array_grid_4char)) { + array_push($array_grid_4char, $grid_four); + } + } - $data['grid_4char_lotw'] = ($array_grid_4char_lotw); - $data['grid_4char_paper'] = ($array_grid_4char_paper); - $data['grid_4char'] = ($array_grid_4char); - $data['grid_count'] = $this->ffma_model->get_grid_count(); - $data['grids'] = $this->ffma_model->get_grids(); + $data['grid_4char_lotw'] = ($array_grid_4char_lotw); + $data['grid_4char_paper'] = ($array_grid_4char_paper); + $data['grid_4char'] = ($array_grid_4char); + $data['grid_count'] = $this->ffma_model->get_grid_count(); + $data['grids'] = $this->ffma_model->get_grids(); - header('Content-Type: application/json'); - echo json_encode($data); - } + header('Content-Type: application/json'); + echo json_encode($data); + } - public function getGridmasterGridsjs($dxcc) { - $this->load->model('gridmaster_model'); + public function getGridmasterGridsjs($dxcc) + { + $this->load->model('gridmaster_model'); - $dxcc = $this->security->xss_clean($dxcc); + $dxcc = $this->security->xss_clean($dxcc); - $array_grid_4char = array(); - $array_grid_4char_lotw = array(); - $array_grid_4char_paper = array(); + $array_grid_4char = array(); + $array_grid_4char_lotw = array(); + $array_grid_4char_paper = array(); - $grid_4char = ""; - $grid_4char_lotw = ""; + $grid_4char = ""; + $grid_4char_lotw = ""; - $query = $this->gridmaster_model->get_lotw($dxcc); - if ($query && $query->num_rows() > 0) { - foreach ($query->result() as $row) { - $grid_4char_lotw = strtoupper(substr($row->GRID_SQUARES,0,4)); - if(!in_array($grid_4char_lotw, $array_grid_4char_lotw)){ - array_push($array_grid_4char_lotw, $grid_4char_lotw); - } - } - } + $query = $this->gridmaster_model->get_lotw($dxcc); + if ($query && $query->num_rows() > 0) { + foreach ($query->result() as $row) { + $grid_4char_lotw = strtoupper(substr($row->GRID_SQUARES, 0, 4)); + if (!in_array($grid_4char_lotw, $array_grid_4char_lotw)) { + array_push($array_grid_4char_lotw, $grid_4char_lotw); + } + } + } - $query = $this->gridmaster_model->get_paper($dxcc); - if ($query && $query->num_rows() > 0) { - foreach ($query->result() as $row) { - $grid_4char_paper = strtoupper(substr($row->GRID_SQUARES,0,4)); - if(!in_array($grid_4char_paper, $array_grid_4char_paper)){ - array_push($array_grid_4char_paper, $grid_4char_paper); - } - } - } + $query = $this->gridmaster_model->get_paper($dxcc); + if ($query && $query->num_rows() > 0) { + foreach ($query->result() as $row) { + $grid_4char_paper = strtoupper(substr($row->GRID_SQUARES, 0, 4)); + if (!in_array($grid_4char_paper, $array_grid_4char_paper)) { + array_push($array_grid_4char_paper, $grid_4char_paper); + } + } + } - $query = $this->gridmaster_model->get_worked($dxcc); - if ($query && $query->num_rows() > 0) { - foreach ($query->result() as $row) { - $grid_four = strtoupper(substr($row->GRID_SQUARES,0,4)); - if(!in_array($grid_four, $array_grid_4char)){ - array_push($array_grid_4char, $grid_four); - } - } - } + $query = $this->gridmaster_model->get_worked($dxcc); + if ($query && $query->num_rows() > 0) { + foreach ($query->result() as $row) { + $grid_four = strtoupper(substr($row->GRID_SQUARES, 0, 4)); + if (!in_array($grid_four, $array_grid_4char)) { + array_push($array_grid_4char, $grid_four); + } + } + } - $vucc_grids = $this->gridmaster_model->get_vucc_lotw($dxcc); - foreach($vucc_grids as $key) { - $grid_four_lotw = strtoupper(substr($key,0,4)); - if(!in_array($grid_four_lotw, $array_grid_4char_lotw)){ - array_push($array_grid_4char_lotw, $grid_four_lotw); - } - } + $vucc_grids = $this->gridmaster_model->get_vucc_lotw($dxcc); + foreach ($vucc_grids as $key) { + $grid_four_lotw = strtoupper(substr($key, 0, 4)); + if (!in_array($grid_four_lotw, $array_grid_4char_lotw)) { + array_push($array_grid_4char_lotw, $grid_four_lotw); + } + } - $vucc_grids = $this->gridmaster_model->get_vucc_paper($dxcc); - foreach($vucc_grids as $key) { - $grid_four_paper = strtoupper(substr($key,0,4)); - if(!in_array($grid_four_paper, $array_grid_4char_paper)){ - array_push($array_grid_4char_paper, $grid_four_paper); - } - } + $vucc_grids = $this->gridmaster_model->get_vucc_paper($dxcc); + foreach ($vucc_grids as $key) { + $grid_four_paper = strtoupper(substr($key, 0, 4)); + if (!in_array($grid_four_paper, $array_grid_4char_paper)) { + array_push($array_grid_4char_paper, $grid_four_paper); + } + } - $vucc_grids = $this->gridmaster_model->get_vucc_worked($dxcc); - foreach($vucc_grids as $key) { - $grid_four = strtoupper(substr($key,0,4)); - if(!in_array($grid_four, $array_grid_4char)){ - array_push($array_grid_4char, $grid_four); - } - } + $vucc_grids = $this->gridmaster_model->get_vucc_worked($dxcc); + foreach ($vucc_grids as $key) { + $grid_four = strtoupper(substr($key, 0, 4)); + if (!in_array($grid_four, $array_grid_4char)) { + array_push($array_grid_4char, $grid_four); + } + } - $data['grid_4char_lotw'] = ($array_grid_4char_lotw); - $data['grid_4char_paper'] = ($array_grid_4char_paper); - $data['grid_4char'] = ($array_grid_4char); - $data['grid_count'] = $this->gridmaster_model->get_grid_count($dxcc); - $data['grids'] = $this->gridmaster_model->get_grids($dxcc); - $data['lat'] = $this->gridmaster_model->get_lat($dxcc); - $data['lon'] = $this->gridmaster_model->get_lon($dxcc); - $data['zoom'] = $this->gridmaster_model->get_zoom($dxcc); + $data['grid_4char_lotw'] = ($array_grid_4char_lotw); + $data['grid_4char_paper'] = ($array_grid_4char_paper); + $data['grid_4char'] = ($array_grid_4char); + $data['grid_count'] = $this->gridmaster_model->get_grid_count($dxcc); + $data['grids'] = $this->gridmaster_model->get_grids($dxcc); + $data['lat'] = $this->gridmaster_model->get_lat($dxcc); + $data['lon'] = $this->gridmaster_model->get_lon($dxcc); + $data['zoom'] = $this->gridmaster_model->get_zoom($dxcc); - header('Content-Type: application/json'); - echo json_encode($data); - } + header('Content-Type: application/json'); + echo json_encode($data); + } - /* + /* Handles showing worked Sigs Adif fields: my_sig */ - public function sig() { - // Grab all worked sig stations - $this->load->model('sig'); + public function sig() + { + // Grab all worked sig stations + $this->load->model('sig'); - $data['sig_types'] = $this->sig->get_all_sig_types(); + $data['sig_types'] = $this->sig->get_all_sig_types(); - // Render page - $data['page_title'] = "Awards - SIG"; - $this->load->view('interface_assets/header', $data); - $this->load->view('awards/sig/index'); - $this->load->view('interface_assets/footer'); - } + // Render page + $data['page_title'] = "Awards - SIG"; + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/sig/index'); + $this->load->view('interface_assets/footer'); + } - /* + /* Handles showing worked Sigs */ - public function sig_details() { + public function sig_details() + { - // Grab all worked sig stations - $this->load->model('sig'); - $type = str_replace('"', "", $this->security->xss_clean($this->input->get("type"))); - $data['sig_all'] = $this->sig->get_all($type); - $data['type'] = $type; + // Grab all worked sig stations + $this->load->model('sig'); + $type = str_replace('"', "", $this->security->xss_clean($this->input->get("type"))); + $data['sig_all'] = $this->sig->get_all($type); + $data['type'] = $type; - // Render page - $data['page_title'] = "Awards - SIG - " . $type; - $this->load->view('interface_assets/header', $data); - $this->load->view('awards/sig/qso_list'); - $this->load->view('interface_assets/footer'); - } + // Render page + $data['page_title'] = "Awards - SIG - " . $type; + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/sig/qso_list'); + $this->load->view('interface_assets/footer'); + } - /* + /* Handles exporting SIGS to ADIF */ - public function sigexportadif() { - // Set memory limit to unlimited to allow heavy usage - ini_set('memory_limit', '-1'); + public function sigexportadif() + { + // Set memory limit to unlimited to allow heavy usage + ini_set('memory_limit', '-1'); - $this->load->model('adif_data'); + $this->load->model('adif_data'); - $type = $this->security->xss_clean($this->uri->segment(3)); - $data['qsos'] = $this->adif_data->sig_all($type); + $type = $this->security->xss_clean($this->uri->segment(3)); + $data['qsos'] = $this->adif_data->sig_all($type); - $this->load->view('adif/data/exportall', $data); - } + $this->load->view('adif/data/exportall', $data); + } /* function was_map This displays the WAS map and requires the $band_type and $mode_type */ - public function was_map() { - $stateString = 'AK,AL,AR,AZ,CA,CO,CT,DE,FL,GA,HI,IA,ID,IL,IN,KS,KY,LA,MA,MD,ME,MI,MN,MO,MS,MT,NC,ND,NE,NH,NJ,NM,NV,NY,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VA,VT,WA,WI,WV,WY'; - $wasArray = explode(',', $stateString); + public function was_map() + { + $stateString = 'AK,AL,AR,AZ,CA,CO,CT,DE,FL,GA,HI,IA,ID,IL,IN,KS,KY,LA,MA,MD,ME,MI,MN,MO,MS,MT,NC,ND,NE,NH,NJ,NM,NV,NY,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VA,VT,WA,WI,WV,WY'; + $wasArray = explode(',', $stateString); $this->load->model('was'); - $bands[] = $this->security->xss_clean($this->input->post('band')); + $bands[] = $this->security->xss_clean($this->input->post('band')); - $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1; - $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1; - $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1; - $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1; - $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1; - $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1; + $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL : 1; + $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL : 1; + $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL : 1; + $postdata['worked'] = $this->input->post('worked') == 0 ? NULL : 1; + $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL : 1; + $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL : 1; $postdata['band'] = $this->security->xss_clean($this->input->post('band')); $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); @@ -907,14 +940,14 @@ class Awards extends CI_Controller { $states = array(); - foreach ($wasArray as $state) { // Generating array for use in the table + foreach ($wasArray as $state) { // Generating array for use in the table $states[$state] = '-'; // Inits each state's count } foreach ($was_array as $was => $value) { foreach ($value as $key) { - if($key != "") { + if ($key != "") { if (strpos($key, '>W<') !== false) { $states[$was] = 'W'; break; @@ -939,37 +972,38 @@ class Awards extends CI_Controller { function cq_map This displays the CQ Zone map and requires the $band_type and $mode_type */ - public function cq_map() { - $CI =& get_instance(); - $CI->load->model('logbooks_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + public function cq_map() + { + $CI = &get_instance(); + $CI->load->model('logbooks_model'); + $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); $this->load->model('cq'); $bands[] = $this->input->post('band'); - $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1; - $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1; - $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1; - $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1; - $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1; - $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1; + $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL : 1; + $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL : 1; + $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL : 1; + $postdata['worked'] = $this->input->post('worked') == 0 ? NULL : 1; + $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL : 1; + $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL : 1; $postdata['band'] = $this->security->xss_clean($this->input->post('band')); - $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); + $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); if ($logbooks_locations_array) { - $location_list = "'".implode("','",$logbooks_locations_array)."'"; + $location_list = "'" . implode("','", $logbooks_locations_array) . "'"; $cq_array = $this->cq->get_cq_array($bands, $postdata, $location_list); - } else { + } else { $location_list = null; $cq_array = null; } - $zones = array(); + $zones = array(); foreach ($cq_array as $cq => $value) { foreach ($value as $key) { - if($key != "") { + if ($key != "") { if (strpos($key, '>W<') !== false) { $zones[] = 'W'; break; @@ -990,40 +1024,41 @@ class Awards extends CI_Controller { echo json_encode($zones); } - /* + /* function waja_map */ - public function waja_map() { - $prefectureString = '01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47'; - $wajaArray = explode(',', $prefectureString); + public function waja_map() + { + $prefectureString = '01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47'; + $wajaArray = explode(',', $prefectureString); $this->load->model('waja'); $this->load->model('bands'); $bands[] = $this->security->xss_clean($this->input->post('band')); - $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1; - $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1; - $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1; - $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1; - $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1; - $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1; + $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL : 1; + $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL : 1; + $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL : 1; + $postdata['worked'] = $this->input->post('worked') == 0 ? NULL : 1; + $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL : 1; + $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL : 1; $postdata['band'] = $this->security->xss_clean($this->input->post('band')); $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); - $waja_array = $this->waja->get_waja_array($bands, $postdata); + $waja_array = $this->waja->get_waja_array($bands, $postdata); - $prefectures = array(); + $prefectures = array(); - foreach ($wajaArray as $state) { // Generating array for use in the table + foreach ($wajaArray as $state) { // Generating array for use in the table $prefectures[$state] = '-'; // Inits each state's count } foreach ($waja_array as $waja => $value) { foreach ($value as $key) { - if($key != "") { + if ($key != "") { if (strpos($key, '>W<') !== false) { $prefectures[$waja] = 'W'; break; @@ -1048,28 +1083,29 @@ class Awards extends CI_Controller { function dxcc_map This displays the DXCC map */ - public function dxcc_map() { + public function dxcc_map() + { $this->load->model('dxcc'); $this->load->model('bands'); $bands[] = $this->security->xss_clean($this->input->post('band')); - $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1; - $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1; - $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1; - $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1; - $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1; - $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1; + $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL : 1; + $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL : 1; + $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL : 1; + $postdata['worked'] = $this->input->post('worked') == 0 ? NULL : 1; + $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL : 1; + $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL : 1; $postdata['band'] = $this->security->xss_clean($this->input->post('band')); $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')); - $postdata['includedeleted'] = $this->input->post('includedeleted') == 0 ? NULL: 1; - $postdata['Africa'] = $this->input->post('Africa') == 0 ? NULL: 1; - $postdata['Asia'] = $this->input->post('Asia') == 0 ? NULL: 1; - $postdata['Europe'] = $this->input->post('Europe') == 0 ? NULL: 1; - $postdata['NorthAmerica'] = $this->input->post('NorthAmerica') == 0 ? NULL: 1; - $postdata['SouthAmerica'] = $this->input->post('SouthAmerica') == 0 ? NULL: 1; - $postdata['Oceania'] = $this->input->post('Oceania') == 0 ? NULL: 1; - $postdata['Antarctica'] = $this->input->post('Antarctica') == 0 ? NULL: 1; + $postdata['includedeleted'] = $this->input->post('includedeleted') == 0 ? NULL : 1; + $postdata['Africa'] = $this->input->post('Africa') == 0 ? NULL : 1; + $postdata['Asia'] = $this->input->post('Asia') == 0 ? NULL : 1; + $postdata['Europe'] = $this->input->post('Europe') == 0 ? NULL : 1; + $postdata['NorthAmerica'] = $this->input->post('NorthAmerica') == 0 ? NULL : 1; + $postdata['SouthAmerica'] = $this->input->post('SouthAmerica') == 0 ? NULL : 1; + $postdata['Oceania'] = $this->input->post('Oceania') == 0 ? NULL : 1; + $postdata['Antarctica'] = $this->input->post('Antarctica') == 0 ? NULL : 1; $dxcclist = $this->dxcc->fetchdxcc($postdata); @@ -1081,7 +1117,7 @@ class Awards extends CI_Controller { $newdxcc[$i]['adif'] = $dxcc->adif; $newdxcc[$i]['prefix'] = $dxcc->prefix; $newdxcc[$i]['name'] = ucwords(strtolower($dxcc->name), "- (/"); - if ($dxcc->Enddate!=null) { + if ($dxcc->Enddate != null) { $newdxcc[$i]['name'] .= ' (deleted)'; } $newdxcc[$i]['lat'] = $dxcc->lat; @@ -1097,27 +1133,28 @@ class Awards extends CI_Controller { function iota This displays the IOTA map */ - public function iota_map() { + public function iota_map() + { $this->load->model('iota'); $this->load->model('bands'); $bands[] = $this->security->xss_clean($this->input->post('band')); - $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1; - $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1; - $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1; - $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1; - $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1; + $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL : 1; + $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL : 1; + $postdata['worked'] = $this->input->post('worked') == 0 ? NULL : 1; + $postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL : 1; + $postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL : 1; $postdata['band'] = $this->input->post('band'); - $postdata['mode'] = $this->input->post('mode'); - $postdata['includedeleted'] = $this->input->post('includedeleted') == 0 ? NULL: 1; - $postdata['Africa'] = $this->input->post('Africa') == 0 ? NULL: 1; - $postdata['Asia'] = $this->input->post('Asia') == 0 ? NULL: 1; - $postdata['Europe'] = $this->input->post('Europe') == 0 ? NULL: 1; - $postdata['NorthAmerica'] = $this->input->post('NorthAmerica') == 0 ? NULL: 1; - $postdata['SouthAmerica'] = $this->input->post('SouthAmerica') == 0 ? NULL: 1; - $postdata['Oceania'] = $this->input->post('Oceania') == 0 ? NULL: 1; - $postdata['Antarctica'] = $this->input->post('Antarctica') == 0 ? NULL: 1; + $postdata['mode'] = $this->input->post('mode'); + $postdata['includedeleted'] = $this->input->post('includedeleted') == 0 ? NULL : 1; + $postdata['Africa'] = $this->input->post('Africa') == 0 ? NULL : 1; + $postdata['Asia'] = $this->input->post('Asia') == 0 ? NULL : 1; + $postdata['Europe'] = $this->input->post('Europe') == 0 ? NULL : 1; + $postdata['NorthAmerica'] = $this->input->post('NorthAmerica') == 0 ? NULL : 1; + $postdata['SouthAmerica'] = $this->input->post('SouthAmerica') == 0 ? NULL : 1; + $postdata['Oceania'] = $this->input->post('Oceania') == 0 ? NULL : 1; + $postdata['Antarctica'] = $this->input->post('Antarctica') == 0 ? NULL : 1; $iotalist = $this->iota->fetchIota($postdata); @@ -1143,9 +1180,10 @@ class Awards extends CI_Controller { echo json_encode($newiota); } - function returnStatus($string) { + function returnStatus($string) + { foreach ($string as $key) { - if($key != "") { + if ($key != "") { if (strpos($key, '>W<') !== false) { return 'W'; } diff --git a/application/language/bulgarian/awards_lang.php b/application/language/bulgarian/awards_lang.php index 8102d266..035cce79 100644 --- a/application/language/bulgarian/awards_lang.php +++ b/application/language/bulgarian/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; + +/* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/chinese_simplified/awards_lang.php b/application/language/chinese_simplified/awards_lang.php index 75f393d1..1e117ddf 100644 --- a/application/language/chinese_simplified/awards_lang.php +++ b/application/language/chinese_simplified/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - 通联全日本都道府县奖状 $lang['awards_waja_description_ln2'] = "WAJA,通联全日本都道府县奖状,鼓励许可的业余无线电操作者与所有日本都道府县的电台通联"; $lang['awards_waja_description_ln3'] = "也许可以通过展示出已经通联(或收听)过来自日本47个都道府县的电台发来的QSL卡片,并按照WAJA(HAJA)的顺序进行排列,都道府县的名称可以忽略"; $lang['awards_waja_description_ln4'] = "请访问 https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm 获得更多信息"; + +/* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/czech/awards_lang.php b/application/language/czech/awards_lang.php index 8102d266..fe7fe689 100644 --- a/application/language/czech/awards_lang.php +++ b/application/language/czech/awards_lang.php @@ -193,3 +193,12 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; +/* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/dutch/awards_lang.php b/application/language/dutch/awards_lang.php index 8102d266..502ff497 100644 --- a/application/language/dutch/awards_lang.php +++ b/application/language/dutch/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; + + /* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/english/awards_lang.php b/application/language/english/awards_lang.php index 8102d266..035cce79 100644 --- a/application/language/english/awards_lang.php +++ b/application/language/english/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; + +/* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/finnish/awards_lang.php b/application/language/finnish/awards_lang.php index 8102d266..e57fe358 100644 --- a/application/language/finnish/awards_lang.php +++ b/application/language/finnish/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; + + /* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/french/awards_lang.php b/application/language/french/awards_lang.php index 208a5272..9d659893 100644 --- a/application/language/french/awards_lang.php +++ b/application/language/french/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; + + /* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/german/awards_lang.php b/application/language/german/awards_lang.php index 54f1b3c9..f9e0ba14 100644 --- a/application/language/german/awards_lang.php +++ b/application/language/german/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; + + /* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/greek/awards_lang.php b/application/language/greek/awards_lang.php index 8102d266..035cce79 100644 --- a/application/language/greek/awards_lang.php +++ b/application/language/greek/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; + +/* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/italian/awards_lang.php b/application/language/italian/awards_lang.php index 8102d266..035cce79 100644 --- a/application/language/italian/awards_lang.php +++ b/application/language/italian/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; + +/* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/polish/awards_lang.php b/application/language/polish/awards_lang.php index 8102d266..502ff497 100644 --- a/application/language/polish/awards_lang.php +++ b/application/language/polish/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; + + /* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/russian/awards_lang.php b/application/language/russian/awards_lang.php index 88dc4f9b..f5c7d763 100644 --- a/application/language/russian/awards_lang.php +++ b/application/language/russian/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; + + /* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/spanish/awards_lang.php b/application/language/spanish/awards_lang.php index 3cff941b..249c970e 100644 --- a/application/language/spanish/awards_lang.php +++ b/application/language/spanish/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Diploma Worked All Japan prefectu $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures (Trabajadas todas las prefecturas de Japón) en la radioafición, fomenta que los operadores de radioafición licenciados trabajen todas las prefecturas de Japón."; $lang['awards_waja_description_ln3'] = "Puede ser otorgado por haber contactado (escuchado) y recibido una tarjeta QSL de una estación de radioaficionado localizada en cada una de las 47 prefecturas de Japón. La lista de tarjetas QSL debe ser ordenada por su número de referencia WAJA (HAJA), sin embargo los nombres de las prefecturas pueden ser omitidos."; $lang['awards_waja_description_ln4'] = "Para más información, por favor visite: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm (en inglés)."; + + /* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/swedish/awards_lang.php b/application/language/swedish/awards_lang.php index 8102d266..502ff497 100644 --- a/application/language/swedish/awards_lang.php +++ b/application/language/swedish/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; + + /* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/language/turkish/awards_lang.php b/application/language/turkish/awards_lang.php index 8102d266..502ff497 100644 --- a/application/language/turkish/awards_lang.php +++ b/application/language/turkish/awards_lang.php @@ -193,3 +193,13 @@ $lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Awar $lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan."; $lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted."; $lang['awards_waja_description_ln4'] = "For more information, please visit: https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm."; + + /* +___________________________________________________________________________________________ +WAB -- Use all 3 Lines of Text +___________________________________________________________________________________________ +*/ +$lang['awards_waja_description_ln1'] = "WAB - Worked All Britain Award"; +$lang['awards_wab_description_ln2'] = "The Amateur Radio Worked All Britain (WAB) Award is a prestigious recognition program within the amateur radio community that celebrates communication achievements across the United Kingdom. The WAB Award scheme encourages radio operators to establish contact with stations located in different regions of Britain, fostering camaraderie and promoting radio communication skills. To earn the WAB Award, participants must make successful radio contacts with stations located in specific WAB areas, which are defined by Ordnance Survey grid squares. These grid squares cover the entirety of Great Britain, including England, Scotland, Wales, and some offshore islands."; +$lang['awards_wab_description_ln3'] = "Participants in the WAB Award program exchange information such as their location, signal strength, and WAB square reference during radio contacts. Points are awarded based on the location of the contacted station, with different point values assigned to contacts made within different WAB areas. By accumulating points from successful contacts, radio operators can progress through various award levels, each representing a significant milestone in their amateur radio journey. The WAB Award not only recognizes the dedication and skill of radio operators but also promotes geographic diversity and encourages exploration of the rich tapestry of locations across Britain through the medium of amateur radio."; +$lang['awards_waja_description_ln4'] = "For more information, please visit: https://wab.intermip.net/default.php."; diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 02d8fbc2..40a81acf 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -4702,6 +4702,21 @@ class Logbook_model extends CI_Model return $this->db->get($this->config->item('table_name')); } + function wab_qso_details($wab) + { + $CI = &get_instance(); + $CI->load->model('logbooks_model'); + $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + + $this->db->join('station_profile', 'station_profile.station_id = ' . $this->config->item('table_name') . '.station_id'); + $this->db->join('lotw_users', 'lotw_users.callsign = ' . $this->config->item('table_name') . '.col_call', 'left outer'); + $this->db->where_in($this->config->item('table_name') . '.station_id', $logbooks_locations_array); + $this->db->where('COL_SIG', "WAB"); + $this->db->where('COL_SIG_INFO', $wab); + + return $this->db->get($this->config->item('table_name')); + } + public function check_qso_is_accessible($id) { // check if qso belongs to user diff --git a/application/models/Worked_all_britain_model.php b/application/models/Worked_all_britain_model.php new file mode 100644 index 00000000..6385d64e --- /dev/null +++ b/application/models/Worked_all_britain_model.php @@ -0,0 +1,55 @@ +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->select("COL_SIG_INFO"); + $this->db->where_in("station_id", $logbooks_locations_array); + $this->db->where("COL_SIG", 'WAB'); + + // return result as an array + $query = $this->db->get($this->config->item('table_name')); + $worked_squares[] = null; + // run through the query results + foreach ($query->result() as $row) { + $worked_squares[] = "Small Square ".$row->COL_SIG_INFO." Boundry Box"; + } + + // return the rows as an array + return $worked_squares; + } + + function get_confirmed_squares () { + $CI =& get_instance(); + $CI->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->select("COL_SIG_INFO"); + $this->db->where_in("station_id", $logbooks_locations_array); + $this->db->where("COL_SIG", 'WAB'); + + // check if col_qsl_rcvd or col_eqsl_qsl_rcvd or COL_LOTW_QSL_RCVD is 'Y' + $this->db->where("(col_qsl_rcvd='Y' or col_eqsl_qsl_rcvd='Y' or COL_LOTW_QSL_RCVD='Y')"); + + // return result as an array + $query = $this->db->get($this->config->item('table_name')); + $worked_squares[] = null; + // run through the query results + foreach ($query->result() as $row) { + $worked_squares[] = "Small Square ".$row->COL_SIG_INFO." Boundry Box"; + } + + // return the rows as an array + return $worked_squares; + } +} \ No newline at end of file diff --git a/application/views/awards/wab/details.php b/application/views/awards/wab/details.php new file mode 100644 index 00000000..f656d527 --- /dev/null +++ b/application/views/awards/wab/details.php @@ -0,0 +1,3 @@ +
+ +load->view('view_log/partial/log_ajax'); ?> \ No newline at end of file diff --git a/application/views/awards/wab/index.php b/application/views/awards/wab/index.php index b80d79cf..11d5ee97 100644 --- a/application/views/awards/wab/index.php +++ b/application/views/awards/wab/index.php @@ -1,98 +1,19 @@
- +
+

- - - - -
- -
\ No newline at end of file diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index f2a6296c..e5c29663 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -1583,6 +1583,145 @@ if ($this->session->userdata('user_id') != null) { +uri->segment(1) == "awards" && $this->uri->segment(2) == "wab") { ?> + + + uri->segment(1) == "gridsquares" && !empty($this->uri->segment(2))) { ?>