diff --git a/application/config/migration.php b/application/config/migration.php index cba5ee184..1d9283c0a 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 180; +$config['migration_version'] = 182; /* |-------------------------------------------------------------------------- diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 904a9e671..1b033cab8 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -581,12 +581,20 @@ class Awards extends CI_Controller { $this->load->view('interface_assets/footer', $footerData); } - public function iota () { - $this->load->model('iota'); + public function helvetia() { + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/helvetiamap_geojson.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/helvetiamap_geojson.js")), + 'assets/js/sections/helvetiamap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/helvetiamap.js")), + 'assets/js/leaflet/L.Maidenhead.js', + ]; + + $this->load->model('helvetia_model'); $this->load->model('modes'); $this->load->model('bands'); - $data['worked_bands'] = $this->bands->get_worked_bands('iota'); // Used in the view for band select + $data['worked_bands'] = $this->bands->get_worked_bands('helvetia'); + $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 @@ -601,48 +609,99 @@ class Awards extends CI_Controller { } $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 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['qrz'] = $this->security->xss_clean($this->input->post('qrz')); $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')); - $postdata['includedeleted'] = $this->security->xss_clean($this->input->post('includedeleted')); - $postdata['Africa'] = $this->security->xss_clean($this->input->post('Africa')); - $postdata['Asia'] = $this->security->xss_clean($this->input->post('Asia')); - $postdata['Europe'] = $this->security->xss_clean($this->input->post('Europe')); - $postdata['NorthAmerica'] = $this->security->xss_clean($this->input->post('NorthAmerica')); - $postdata['SouthAmerica'] = $this->security->xss_clean($this->input->post('SouthAmerica')); - $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['qsl'] = 1; + $postdata['lotw'] = 1; + $postdata['eqsl'] = 0; + $postdata['qrz'] = 0; $postdata['worked'] = 1; $postdata['confirmed'] = 1; $postdata['notworked'] = 1; - $postdata['includedeleted'] = 0; - $postdata['Africa'] = 1; - $postdata['Asia'] = 1; - $postdata['Europe'] = 1; - $postdata['NorthAmerica'] = 1; - $postdata['SouthAmerica'] = 1; - $postdata['Oceania'] = 1; - $postdata['Antarctica'] = 1; $postdata['band'] = 'All'; $postdata['mode'] = 'All'; } - $iotalist = $this->iota->fetchIota($postdata); - $data['iota_array'] = $this->iota->get_iota_array($iotalist, $bands, $postdata); - $data['iota_summary'] = $this->iota->get_iota_summary($bands, $postdata); + $data['helvetia_array'] = $this->helvetia_model->get_helvetia_array($bands, $postdata); + $data['helvetia_summary'] = $this->helvetia_model->get_helvetia_summary($bands, $postdata); // Render Page - $data['page_title'] = "Awards - IOTA (Islands On The Air)"; + $data['page_title'] = "Awards - H26"; $this->load->view('interface_assets/header', $data); - $this->load->view('awards/iota/index'); - $this->load->view('interface_assets/footer'); + $this->load->view('awards/helvetia/index'); + $this->load->view('interface_assets/footer', $footerData); + } + + public function iota () { + $this->load->model('iota'); + $this->load->model('modes'); + $this->load->model('bands'); + + $data['worked_bands'] = $this->bands->get_worked_bands('iota'); // Used in the view for band 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 { + $bands[] = $this->security->xss_clean($this->input->post('band')); + } + } 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 + + if($this->input->method() === 'post') { + $postdata['worked'] = $this->security->xss_clean($this->input->post('worked')) ?? NULL; + $postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed')) ?? NULL; + $postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked')) ?? NULL; + $postdata['includedeleted'] = $this->security->xss_clean($this->input->post('includedeleted')) ?? NULL; + $postdata['Africa'] = $this->security->xss_clean($this->input->post('Africa')) ?? NULL; + $postdata['Asia'] = $this->security->xss_clean($this->input->post('Asia')) ?? NULL; + $postdata['Europe'] = $this->security->xss_clean($this->input->post('Europe')) ?? NULL; + $postdata['NorthAmerica'] = $this->security->xss_clean($this->input->post('NorthAmerica')) ?? NULL; + $postdata['SouthAmerica'] = $this->security->xss_clean($this->input->post('SouthAmerica')) ?? NULL; + $postdata['Oceania'] = $this->security->xss_clean($this->input->post('Oceania')) ?? NULL; + $postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica')) ?? NULL; + $postdata['band'] = $this->security->xss_clean($this->input->post('band')) ?? NULL; + $postdata['mode'] = $this->security->xss_clean($this->input->post('mode')) ?? NULL; + } else { // Setting default values at first load of page + $postdata['worked'] = 1; + $postdata['confirmed'] = 1; + $postdata['notworked'] = 1; + $postdata['includedeleted'] = 0; + $postdata['Africa'] = 1; + $postdata['Asia'] = 1; + $postdata['Europe'] = 1; + $postdata['NorthAmerica'] = 1; + $postdata['SouthAmerica'] = 1; + $postdata['Oceania'] = 1; + $postdata['Antarctica'] = 1; + $postdata['band'] = 'All'; + $postdata['mode'] = 'All'; + } + + $iotalist = $this->iota->fetchIota($postdata); + $data['iota_array'] = $this->iota->get_iota_array($iotalist, $bands, $postdata); + $data['iota_summary'] = $this->iota->get_iota_summary($bands, $postdata); + + // Render Page + $data['page_title'] = "Awards - IOTA (Islands On The Air)"; + $this->load->view('interface_assets/header', $data); + $this->load->view('awards/iota/index'); + $this->load->view('interface_assets/footer'); } public function counties() { @@ -1066,6 +1125,61 @@ class Awards extends CI_Controller { echo json_encode($states); } + /* + function H26_map + + This displays the H26 map and requires the $band_type and $mode_type + */ + public function helvetia_map() { + $stateString = 'AG,AI,AR,BE,BL,BS,FR,GE,GL,GR,JU,LU,NE,NW,OW,SG,SH,SO,SZ,TG,TI,UR,VD,VS,ZG,ZH'; + $helvetiaArray = explode(',', $stateString); + + $this->load->model('helvetia_model'); + + $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['qrz'] = $this->input->post('qrz') == 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')); + + $helvetia_array = $this->helvetia_model->get_helvetia_array($bands, $postdata); + + $states = array(); + + foreach ($helvetiaArray as $state) { // Generating array for use in the table + $states[$state] = '-'; // Inits each state's count + } + + + foreach ($helvetia_array as $was => $value) { + foreach ($value as $key) { + if($key != "") { + if (strpos($key, '>W<') !== false) { + $states[$was] = 'W'; + break; + } + if (strpos($key, '>C<') !== false) { + $states[$was] = 'C'; + break; + } + if (strpos($key, '-') !== false) { + $states[$was] = '-'; + break; + } + } + } + } + + header('Content-Type: application/json'); + echo json_encode($states); + } + /* function cq_map This displays the CQ Zone map and requires the $band_type and $mode_type diff --git a/application/controllers/Band.php b/application/controllers/Band.php index 16b5fa7d9..d56e7a05d 100644 --- a/application/controllers/Band.php +++ b/application/controllers/Band.php @@ -122,6 +122,7 @@ class Band extends CI_Controller { $band['cq'] = $this->security->xss_clean($this->input->post('cq')); $band['dok'] = $this->security->xss_clean($this->input->post('dok')); $band['dxcc'] = $this->security->xss_clean($this->input->post('dxcc')); + $band['helvetia'] = $this->security->xss_clean($this->input->post('helvetia')); $band['iota'] = $this->security->xss_clean($this->input->post('iota')); $band['sig'] = $this->security->xss_clean($this->input->post('sig')); $band['sota'] = $this->security->xss_clean($this->input->post('sota')); diff --git a/application/controllers/Contestcalendar.php b/application/controllers/Contestcalendar.php index 197b5d062..e61a67f45 100644 --- a/application/controllers/Contestcalendar.php +++ b/application/controllers/Contestcalendar.php @@ -8,8 +8,13 @@ class Contestcalendar extends CI_Controller { $data['page_title'] = "Contest Calendar"; - $url = 'https://www.contestcalendar.com/calendar.rss'; - $data['rss'] = simplexml_load_file($url, null, LIBXML_NOCDATA); + $this->load->driver('cache', array('adapter' => 'file', 'backup' => 'file')); + $rssUrl = 'https://www.contestcalendar.com/calendar.rss'; + if (!$rssRawData = $this->cache->get('RssRawContestCal')) { + $rssRawData = file_get_contents($rssUrl, true); + $this->cache->save('RssRawContestCal', $rssRawData, (60*60*12)); + } + $data['rss'] = simplexml_load_string($rssRawData, null, LIBXML_NOCDATA); $footerData['scripts'] = [ 'assets/js/sections/dxcalendar.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/dxcalendar.js")) diff --git a/application/controllers/Dxcalendar.php b/application/controllers/Dxcalendar.php index a188ee6a7..36890882d 100644 --- a/application/controllers/Dxcalendar.php +++ b/application/controllers/Dxcalendar.php @@ -9,8 +9,13 @@ class Dxcalendar extends CI_Controller { $data['page_title'] = "DX Calendar"; - $url = 'http://www.ng3k.com/adxo.xml'; - $rssdata = simplexml_load_file($url, null, LIBXML_NOCDATA); + $this->load->driver('cache', array('adapter' => 'file', 'backup' => 'file')); + $rssUrl = 'http://www.ng3k.com/adxo.xml'; + if (!$rssRawData = $this->cache->get('RssRawDxCal')) { + $rssRawData = file_get_contents($rssUrl, true); + $this->cache->save('RssRawDxCal', $rssRawData, (60*60*12)); + } + $rssdata = simplexml_load_string($rssRawData, null, LIBXML_NOCDATA); // Get Date format if($this->session->userdata('user_date_format')) { diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 38c210ff6..7b82ca5fb 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -1295,7 +1295,7 @@ class Logbook extends CI_Controller { case 'WWFF': $ret.= '' . ($row->COL_WWFF_REF) . ''; break; case 'POTA': $ret.= '' . ($row->COL_POTA_REF) . ''; break; case 'Grid': $ret.= '' . $this->part_QrbCalcLink($row->COL_MY_GRIDSQUARE, $row->COL_VUCC_GRIDS, $row->COL_GRIDSQUARE) . ''; break; - case 'Distance': $ret.= '' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . ' km' : '') . ''; break; + case 'Distance': $ret.= '' . (($row->COL_DISTANCE ?? '' != '') ? $row->COL_DISTANCE . ' km' : '') . ''; break; case 'Band': $ret.= ''; if($row->COL_SAT_NAME != null) { $ret.= ''.$row->COL_SAT_NAME.''; } else { $ret.= strtolower($row->COL_BAND); } $ret.= ''; break; case 'Frequency': $ret.= ''; if($row->COL_SAT_NAME != null) { $ret.= ''.$row->COL_SAT_NAME.''; } else { if($row->COL_FREQ != null) { $ret.= $ci->frequency->hz_to_mhz($row->COL_FREQ); } else { $ret.= strtolower($row->COL_BAND); } } $ret.= ''; break; case 'State': $ret.= '' . ($row->COL_STATE) . ''; break; diff --git a/application/controllers/Logbookadvanced.php b/application/controllers/Logbookadvanced.php index 5be9b787f..41fc9590f 100644 --- a/application/controllers/Logbookadvanced.php +++ b/application/controllers/Logbookadvanced.php @@ -87,6 +87,8 @@ class Logbookadvanced extends CI_Controller { 'assets/js/moment.min.js', 'assets/js/datetime-moment.js', 'assets/js/sections/logbookadvanced.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/logbookadvanced.js")), + 'assets/js/sections/logbookadvanced_edit.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/logbookadvanced_edit.js")), + 'assets/js/sections/logbookadvanced_map.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/logbookadvanced_map.js")), 'assets/js/sections/cqmap_geojson.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/cqmap_geojson.js")), 'assets/js/sections/itumap_geojson.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/itumap_geojson.js")), 'assets/js/leaflet/L.Terminator.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/leaflet/L.Terminator.js")), @@ -495,4 +497,34 @@ class Logbookadvanced extends CI_Controller { $this->user_options_model->set_option('LogbookAdvancedMap', 'ituzones_layer', array('boolean' => xss_clean($this->input->post('ituzone_layer')))); $this->user_options_model->set_option('LogbookAdvancedMap', 'nightshadow_layer', array('boolean' => xss_clean($this->input->post('nightshadow_layer')))); } + + public function editDialog() { + $this->load->view('logbookadvanced/edit'); + } + + public function saveBatchEditQsos() { + $ids = xss_clean($this->input->post('ids')); + $column = xss_clean($this->input->post('column')); + $value = xss_clean($this->input->post('value')); + + $this->load->model('logbookadvanced_model'); + $this->logbookadvanced_model->saveEditedQsos($ids, $column, $value); + + $data = $this->logbookadvanced_model->getQsosForAdif($ids, $this->session->userdata('user_id')); + + $results = $data->result('array'); + + $qsos = []; + foreach ($results as $data) { + $qsos[] = new QSO($data); + } + + $q = []; + foreach ($qsos as $qso) { + $q[] = $qso->toArray(); + } + + header("Content-Type: application/json"); + print json_encode($q); + } } diff --git a/application/controllers/Sattimers.php b/application/controllers/Sattimers.php index bdcfdcfd7..66332e392 100644 --- a/application/controllers/Sattimers.php +++ b/application/controllers/Sattimers.php @@ -9,41 +9,50 @@ class Sattimers extends CI_Controller { if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } } - public function index() { - $this->load->model('stations'); - $footerData = []; - $footerData['scripts'] = [ - 'assets/js/sections/sattimers.js?' - ]; - $url = 'https://www.df2et.de/tevel/api2.php?grid='.strtoupper($this->stations->find_gridsquare()); - $json = file_get_contents($url); - $data['activations'] = json_decode($json, true)['data']; - $data['gridsquare'] = strtoupper($this->stations->find_gridsquare()); + public function index() { + $this->load->model('stations'); + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/sattimers.js?' + ]; - $data['page_title'] = "Satellite Timers"; + $url = 'https://www.df2et.de/tevel/api2.php?grid='.strtoupper($this->stations->find_gridsquare()); - $CI =& get_instance(); - if($CI->session->userdata('user_date_format')) { - $data['custom_date_format'] = $CI->session->userdata('user_date_format'); - } else { - $data['custom_date_format'] = $CI->config->item('qso_date_format'); - } + $this->load->driver('cache', array('adapter' => 'file', 'backup' => 'file')); + if (!$RawData = $this->cache->get('SatTimers'.strtoupper($this->stations->find_gridsquare()))) { + $RawData = file_get_contents($url, true); + $this->cache->save('SatTimers'.strtoupper($this->stations->find_gridsquare()), $RawData, (60*1)); + } - switch ($data['custom_date_format']) { - case "d/m/y": $data['custom_date_format'] = 'DD/MM/YY'; break; - case "d/m/Y": $data['custom_date_format'] = 'DD/MM/YYYY'; break; - case "m/d/y": $data['custom_date_format'] = 'MM/DD/YY'; break; - case "m/d/Y": $data['custom_date_format'] = 'MM/DD/YYYY'; break; - case "d.m.Y": $data['custom_date_format'] = 'DD.MM.YYYY'; break; - case "y/m/d": $data['custom_date_format'] = 'YY/MM/DD'; break; - case "Y-m-d": $data['custom_date_format'] = 'YYYY-MM-DD'; break; - case "M d, Y": $data['custom_date_format'] = 'MMM DD, YYYY'; break; - case "M d, y": $data['custom_date_format'] = 'MMM DD, YY'; break; - default: $data['custom_date_format'] = 'DD/MM/YYYY'; - } + $json = $RawData; - $this->load->view('interface_assets/header', $data); - $this->load->view('/sattimers/index', $data); - $this->load->view('interface_assets/footer', $footerData); - } + $data['activations'] = json_decode($json, true)['data']; + $data['gridsquare'] = strtoupper($this->stations->find_gridsquare()); + + $data['page_title'] = "Satellite Timers"; + + $CI =& get_instance(); + if($CI->session->userdata('user_date_format')) { + $data['custom_date_format'] = $CI->session->userdata('user_date_format'); + } else { + $data['custom_date_format'] = $CI->config->item('qso_date_format'); + } + + switch ($data['custom_date_format']) { + case "d/m/y": $data['custom_date_format'] = 'DD/MM/YY'; break; + case "d/m/Y": $data['custom_date_format'] = 'DD/MM/YYYY'; break; + case "m/d/y": $data['custom_date_format'] = 'MM/DD/YY'; break; + case "m/d/Y": $data['custom_date_format'] = 'MM/DD/YYYY'; break; + case "d.m.Y": $data['custom_date_format'] = 'DD.MM.YYYY'; break; + case "y/m/d": $data['custom_date_format'] = 'YY/MM/DD'; break; + case "Y-m-d": $data['custom_date_format'] = 'YYYY-MM-DD'; break; + case "M d, Y": $data['custom_date_format'] = 'MMM DD, YYYY'; break; + case "M d, y": $data['custom_date_format'] = 'MMM DD, YY'; break; + default: $data['custom_date_format'] = 'DD/MM/YYYY'; + } + + $this->load->view('interface_assets/header', $data); + $this->load->view('/sattimers/index', $data); + $this->load->view('interface_assets/footer', $footerData); + } } diff --git a/application/language/bulgarian/awards_lang.php b/application/language/bulgarian/awards_lang.php index 08355a024..b0e961908 100644 --- a/application/language/bulgarian/awards_lang.php +++ b/application/language/bulgarian/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "The award will be given to any amateur w $lang['awards_ffma_description_ln4'] = "For more information, you can visit this link: https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/bulgarian/menu_lang.php b/application/language/bulgarian/menu_lang.php index dc4755bf0..024cc5ea3 100644 --- a/application/language/bulgarian/menu_lang.php +++ b/application/language/bulgarian/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/chinese_simplified/awards_lang.php b/application/language/chinese_simplified/awards_lang.php index 2097c1d2f..b6b46fcc8 100644 --- a/application/language/chinese_simplified/awards_lang.php +++ b/application/language/chinese_simplified/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "该奖项将颁发给任何能够再次 $lang['awards_ffma_description_ln4'] = "如需了解更多信息,您可以访问此链接:https://www.arrl.org/ffma"; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/chinese_simplified/menu_lang.php b/application/language/chinese_simplified/menu_lang.php index 548fb1a46..d84912b1b 100644 --- a/application/language/chinese_simplified/menu_lang.php +++ b/application/language/chinese_simplified/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/czech/awards_lang.php b/application/language/czech/awards_lang.php index 08355a024..b0e961908 100644 --- a/application/language/czech/awards_lang.php +++ b/application/language/czech/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "The award will be given to any amateur w $lang['awards_ffma_description_ln4'] = "For more information, you can visit this link: https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/czech/menu_lang.php b/application/language/czech/menu_lang.php index 04069a5c4..587d5ba2b 100644 --- a/application/language/czech/menu_lang.php +++ b/application/language/czech/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/dutch/awards_lang.php b/application/language/dutch/awards_lang.php index 08355a024..b0e961908 100644 --- a/application/language/dutch/awards_lang.php +++ b/application/language/dutch/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "The award will be given to any amateur w $lang['awards_ffma_description_ln4'] = "For more information, you can visit this link: https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/dutch/menu_lang.php b/application/language/dutch/menu_lang.php index 6f875bd91..62718d3e5 100644 --- a/application/language/dutch/menu_lang.php +++ b/application/language/dutch/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/english/awards_lang.php b/application/language/english/awards_lang.php index 08355a024..b0e961908 100644 --- a/application/language/english/awards_lang.php +++ b/application/language/english/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "The award will be given to any amateur w $lang['awards_ffma_description_ln4'] = "For more information, you can visit this link: https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/english/menu_lang.php b/application/language/english/menu_lang.php index 426be0b02..ae7fbabdb 100644 --- a/application/language/english/menu_lang.php +++ b/application/language/english/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/finnish/awards_lang.php b/application/language/finnish/awards_lang.php index 08355a024..b0e961908 100644 --- a/application/language/finnish/awards_lang.php +++ b/application/language/finnish/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "The award will be given to any amateur w $lang['awards_ffma_description_ln4'] = "For more information, you can visit this link: https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/finnish/menu_lang.php b/application/language/finnish/menu_lang.php index 4b7513cd3..6b6e3cc41 100644 --- a/application/language/finnish/menu_lang.php +++ b/application/language/finnish/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/french/awards_lang.php b/application/language/french/awards_lang.php index 764b82408..2cc16b38f 100644 --- a/application/language/french/awards_lang.php +++ b/application/language/french/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "The award will be given to any amateur w $lang['awards_ffma_description_ln4'] = "For more information, you can visit this link: https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/french/menu_lang.php b/application/language/french/menu_lang.php index 426be0b02..ae7fbabdb 100644 --- a/application/language/french/menu_lang.php +++ b/application/language/french/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/german/awards_lang.php b/application/language/german/awards_lang.php index a6d340702..61269a00d 100644 --- a/application/language/german/awards_lang.php +++ b/application/language/german/awards_lang.php @@ -18,19 +18,19 @@ $lang['awards_cq_page_title'] = "Diplome - CQ Magazin WAZ"; /* ___________________________________________________________________________________________ -CQ -- Verwenden Sie alle 4 Textzeilen +CQ -- Verwende alle 4 Textzeilen ___________________________________________________________________________________________ */ $lang['awards_cq_description_ln1'] = "CQ Magazine WAZ Diplom"; $lang['awards_cq_description_ln2'] = "Das CQ Magazine befindet sich in den USA und ist eines der beliebtesten Amateurfunkmagazine der Welt. Das Magazin erschien erstmals im Januar 1945 und konzentriert sich auf Diplome und die praktischen Aspekte des Amateurfunks."; $lang['awards_cq_description_ln3'] = "Der WAZ Award steht für 'Worked All Zones' und erfordert Kontakte zu allen 40 CQ-Zonen sowie die entsprechende QSL Bestätigung."; -$lang['awards_cq_description_ln4'] = "Sie finden alle Informationen und Regeln auf der Website des CQ Magazine."; +$lang['awards_cq_description_ln4'] = "Du findest alle Informationen und Regeln auf der Website des CQ Magazine."; /* ___________________________________________________________________________________________ -DOK -- Verwenden Sie alle 4 Textzeilen +DOK -- Verwende alle 4 Textzeilen ___________________________________________________________________________________________ */ @@ -42,91 +42,103 @@ $lang['awards_dok_description_ln4'] = "Diese Informationen findest du auf der https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/greek/menu_lang.php b/application/language/greek/menu_lang.php index 426be0b02..ae7fbabdb 100644 --- a/application/language/greek/menu_lang.php +++ b/application/language/greek/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/italian/awards_lang.php b/application/language/italian/awards_lang.php index 08355a024..b0e961908 100644 --- a/application/language/italian/awards_lang.php +++ b/application/language/italian/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "The award will be given to any amateur w $lang['awards_ffma_description_ln4'] = "For more information, you can visit this link: https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/italian/menu_lang.php b/application/language/italian/menu_lang.php index 426be0b02..ae7fbabdb 100644 --- a/application/language/italian/menu_lang.php +++ b/application/language/italian/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/polish/awards_lang.php b/application/language/polish/awards_lang.php index 08355a024..b0e961908 100644 --- a/application/language/polish/awards_lang.php +++ b/application/language/polish/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "The award will be given to any amateur w $lang['awards_ffma_description_ln4'] = "For more information, you can visit this link: https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/polish/menu_lang.php b/application/language/polish/menu_lang.php index 426be0b02..ae7fbabdb 100644 --- a/application/language/polish/menu_lang.php +++ b/application/language/polish/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/russian/awards_lang.php b/application/language/russian/awards_lang.php index b62c49486..50c602bbe 100644 --- a/application/language/russian/awards_lang.php +++ b/application/language/russian/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "The award will be given to any amateur w $lang['awards_ffma_description_ln4'] = "For more information, you can visit this link: https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/russian/menu_lang.php b/application/language/russian/menu_lang.php index e1e9ef73e..d0be1dfd8 100644 --- a/application/language/russian/menu_lang.php +++ b/application/language/russian/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/spanish/awards_lang.php b/application/language/spanish/awards_lang.php index 08355a024..b0e961908 100644 --- a/application/language/spanish/awards_lang.php +++ b/application/language/spanish/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "The award will be given to any amateur w $lang['awards_ffma_description_ln4'] = "For more information, you can visit this link: https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/spanish/menu_lang.php b/application/language/spanish/menu_lang.php index 93d1654c7..bbb9fe8b6 100644 --- a/application/language/spanish/menu_lang.php +++ b/application/language/spanish/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/swedish/awards_lang.php b/application/language/swedish/awards_lang.php index 08355a024..b0e961908 100644 --- a/application/language/swedish/awards_lang.php +++ b/application/language/swedish/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "The award will be given to any amateur w $lang['awards_ffma_description_ln4'] = "For more information, you can visit this link: https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/swedish/menu_lang.php b/application/language/swedish/menu_lang.php index fe867ae23..b6253125d 100644 --- a/application/language/swedish/menu_lang.php +++ b/application/language/swedish/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/language/turkish/awards_lang.php b/application/language/turkish/awards_lang.php index 08355a024..b0e961908 100644 --- a/application/language/turkish/awards_lang.php +++ b/application/language/turkish/awards_lang.php @@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "The award will be given to any amateur w $lang['awards_ffma_description_ln4'] = "For more information, you can visit this link: https://www.arrl.org/ffma."; +/* +___________________________________________________________________________________________ +H26 -- Use all 4 Lines of Text +___________________________________________________________________________________________ +*/ + +$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD"; +$lang['awards_helvetia_description_ln2'] = "The USKA (Union of Swiss Shortwave Amateurs) sponsors two awards, the HELVETIA 26 (H26) Award and the SWITZERLAND Award, aimed at promoting activities on the bands by encouraging contacts across as many Swiss cantons as possible on multiple bands."; +$lang['awards_helvetia_description_ln3'] = "These awards come in two versions: one for HF bands and the other for VHF (including SHF and UHF) bands. Valid connections for these awards date back to January 1, 1980"; +$lang['awards_helvetia_description_ln4'] = "For more information, you can visit this link: https://www.uska.ch/contest/uska-diplome/."; + + /* ___________________________________________________________________________________________ IOTA -- Use all 4 Lines of Text diff --git a/application/language/turkish/menu_lang.php b/application/language/turkish/menu_lang.php index 426be0b02..ae7fbabdb 100644 --- a/application/language/turkish/menu_lang.php +++ b/application/language/turkish/menu_lang.php @@ -38,6 +38,7 @@ $lang['menu_cq'] = 'CQ'; $lang['menu_dok'] = 'DOK'; $lang['menu_dxcc'] = 'DXCC'; $lang['menu_ffma'] = 'Fred Fish Memorial Award'; +$lang['menu_helvetia'] = "H26"; $lang['menu_gridmaster'] = "Gridmaster"; $lang['menu_dl_gridmaster'] = 'DL Gridmaster'; $lang['menu_lx_gridmaster'] = 'LX Gridmaster'; diff --git a/application/libraries/Genfunctions.php b/application/libraries/Genfunctions.php new file mode 100644 index 000000000..30d2a6964 --- /dev/null +++ b/application/libraries/Genfunctions.php @@ -0,0 +1,69 @@ + 0) { + $sql .= implode(' or ', $qsl); + } else { + $sql .= '1=0'; + } + $sql .= ')'; + } else { + $sql.=' and 1=0'; + } + return $sql; + } + + function addBandToQuery($band) { + $sql = ''; + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + } else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + return $sql; + } + + function gen_qsl_from_postdata($postdata) { + $qsl=''; + if ($postdata['confirmed'] != NULL) { + if ($postdata['qsl'] != NULL ) { + $qsl .= "Q"; + } + if ($postdata['lotw'] != NULL ) { + $qsl .= "L"; + } + if ($postdata['eqsl'] != NULL ) { + $qsl .= "E"; + } + if ($postdata['qrz'] != NULL ) { + $qsl .= "Z"; + } + } + return $qsl; + } + +} diff --git a/application/migrations/181_add_helvetia_bandxuser.php b/application/migrations/181_add_helvetia_bandxuser.php new file mode 100644 index 000000000..573088f5d --- /dev/null +++ b/application/migrations/181_add_helvetia_bandxuser.php @@ -0,0 +1,23 @@ +db->field_exists('helvetia', 'bandxuser')) { + $this->dbforge->add_column('bandxuser', $fields); + } + } + + public function down() + { + if ($this->db->field_exists('helvetia', 'bandxuser')) { + $this->dbforge->drop_column('bandxuser', 'helvetia'); + } + } +} diff --git a/application/migrations/182_main_recreate_iota_idx.php b/application/migrations/182_main_recreate_iota_idx.php new file mode 100644 index 000000000..7e783db2f --- /dev/null +++ b/application/migrations/182_main_recreate_iota_idx.php @@ -0,0 +1,31 @@ +add_ix('HRD_IDX_COL_IOTA','`station_id`,`COL_IOTA`'); + } + + + public function down(){ + $this->rm_ix('HRD_IDX_COL_IOTA'); + } + + private function add_ix($index,$cols) { + $ix_exist = $this->db->query("SHOW INDEX FROM ".$this->config->item('table_name')." WHERE Key_name = '".$index."'")->num_rows(); + if ($ix_exist == 0) { + $sql = "ALTER TABLE ".$this->config->item('table_name')." ADD INDEX `".$index."` (".$cols.");"; + $this->db->query($sql); + } + } + + private function rm_ix($index) { + $ix_exist = $this->db->query("SHOW INDEX FROM ".$this->config->item('table_name')." WHERE Key_name = '".$index."'")->num_rows(); + if ($ix_exist >= 1) { + $sql = "ALTER TABLE ".$this->config->item('table_name')." DROP INDEX `".$index."`;"; + $this->db->query($sql); + } + } +} diff --git a/application/models/Bands.php b/application/models/Bands.php index f371d4007..2a8df6cc5 100644 --- a/application/models/Bands.php +++ b/application/models/Bands.php @@ -260,6 +260,7 @@ class Bands extends CI_Model { 'cq' => $band['cq'] == "true" ? '1' : '0', 'dok' => $band['dok'] == "true" ? '1' : '0', 'dxcc' => $band['dxcc'] == "true" ? '1' : '0', + 'helvetia' => $band['helvetia'] == "true" ? '1' : '0', 'iota' => $band['iota'] == "true" ? '1' : '0', 'pota' => $band['pota'] == "true" ? '1' : '0', 'sig' => $band['sig'] == "true" ? '1' : '0', @@ -307,8 +308,8 @@ class Bands extends CI_Model { $this->db->insert('bands', $data); } - $this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, iota, pota, sig, sota, uscounties, was, wwff, vucc) - select bands.id, " . $this->session->userdata('user_id') . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands where band ='".$data['band']."' and not exists (select 1 from bandxuser where userid = " . $this->session->userdata('user_id') . " and bandid = bands.id);"); + $this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, helvetia, iota, pota, sig, sota, uscounties, was, wwff, vucc, waja) + select bands.id, " . $this->session->userdata('user_id') . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands where band ='".$data['band']."' and not exists (select 1 from bandxuser where userid = " . $this->session->userdata('user_id') . " and bandid = bands.id);"); } function getband($id) { diff --git a/application/models/Cq.php b/application/models/Cq.php index 2583fd5a5..3dafbfd38 100644 --- a/application/models/Cq.php +++ b/application/models/Cq.php @@ -2,6 +2,10 @@ class CQ extends CI_Model{ + function __construct() { + $this->load->library('Genfunctions'); + } + function get_cq_array($bands, $postdata, $location_list) { $cqZ = array(); // Used for keeping track of which states that are not worked @@ -9,22 +13,8 @@ class CQ extends CI_Model{ $cqZ[$i]['count'] = 0; // Inits each cq zone's count } - $qsl = ""; - if ($postdata['confirmed'] != NULL) { - if ($postdata['qsl'] != NULL ) { - $qsl .= "Q"; - } - if ($postdata['lotw'] != NULL ) { - $qsl .= "L"; - } - if ($postdata['eqsl'] != NULL ) { - $qsl .= "E"; - } - if ($postdata['qrz'] != NULL ) { - $qsl .= "Z"; - } - } - + $qsl = $this->genfunctions->gen_qsl_from_postdata($postdata); + foreach ($bands as $band) { for ($i = 1; $i <= 40; $i++) { $bandCq[$i][$band] = '-'; // Sets all to dash to indicate no result @@ -89,7 +79,7 @@ class CQ extends CI_Model{ $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); $sql .= " and not exists (select 1 from " . $this->config->item('table_name') . " where station_id in (" . $location_list . @@ -99,9 +89,9 @@ class CQ extends CI_Model{ $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $sql .= ")"; @@ -122,56 +112,15 @@ class CQ extends CI_Model{ $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $query = $this->db->query($sql); return $query->result(); } - function addQslToQuery($postdata) { - $sql = ''; - $qsl = array(); - if ($postdata['qrz'] != NULL || $postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) { - $sql .= ' and ('; - if ($postdata['qsl'] != NULL) { - array_push($qsl, "col_qsl_rcvd = 'Y'"); - } - if ($postdata['lotw'] != NULL) { - array_push($qsl, "col_lotw_qsl_rcvd = 'Y'"); - } - if ($postdata['eqsl'] != NULL) { - array_push($qsl, "col_eqsl_qsl_rcvd = 'Y'"); - } - if ($postdata['qrz'] != NULL) { - array_push($qsl, "COL_QRZCOM_QSO_DOWNLOAD_STATUS = 'Y'"); - } - if (count($qsl) > 0) { - $sql .= implode(' or ', $qsl); - } else { - $sql .= '1=0'; - } - $sql .= ')'; - } else { - $sql.=' and 1=0'; - } - return $sql; - } - - function addBandToQuery($band) { - $sql = ''; - if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } - return $sql; - } /* * Function gets worked and confirmed summary on each band on the active stationprofile @@ -248,7 +197,7 @@ class CQ extends CI_Model{ $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $query = $this->db->query($sql); diff --git a/application/models/Dok.php b/application/models/Dok.php index f2ed33264..c17c2e76b 100644 --- a/application/models/Dok.php +++ b/application/models/Dok.php @@ -2,6 +2,10 @@ class DOK extends CI_Model { + function __construct() { + $this->load->library('Genfunctions'); + } + function get_dok_array($bands, $postdata, $location_list) { $doks = array(); @@ -13,21 +17,7 @@ class DOK extends CI_Model { $doks[$dok->COL_DARC_DOK]['count'] = 0; } - $qsl = ""; - if ($postdata['confirmed'] != NULL) { - if ($postdata['qsl'] != NULL ) { - $qsl .= "Q"; - } - if ($postdata['lotw'] != NULL ) { - $qsl .= "L"; - } - if ($postdata['eqsl'] != NULL ) { - $qsl .= "E"; - } - if ($postdata['qrz'] != NULL ) { - $qsl .= "Z"; - } - } + $qsl = $this->genfunctions->gen_qsl_from_postdata($postdata); foreach ($bands as $band) { foreach ($list as $dok) { @@ -98,13 +88,13 @@ class DOK extends CI_Model { $sql .= " AND (COL_MODE = '" . $postdata['mode'] . "' OR COL_SUBMODE = '" . $postdata['mode'] . "')"; } $sql .= $this->addDokTypeToQuery($postdata['doks']); - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); $sql .= " AND NOT EXISTS (SELECT 1 from " . $this->config->item('table_name') . " WHERE station_id in (" . $location_list . ") AND COL_DARC_DOK = thcv.COL_DARC_DOK AND COL_DARC_DOK <> '' AND COL_DARC_DOK <> 'NM' "; $sql .= $this->addDokTypeToQuery($postdata['doks']); - $sql .= $this->addBandToQuery($band); - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addBandToQuery($band); + $sql .= $this->genfunctions->addQslToQuery($postdata); $sql .= ")"; $query = $this->db->query($sql); @@ -119,52 +109,12 @@ class DOK extends CI_Model { $sql .= " AND (COL_MODE = '" . $postdata['mode'] . "' or COL_SUBMODE = '" . $postdata['mode'] . "')"; } $sql .= $this->addDokTypeToQuery($postdata['doks']); - $sql .= $this->addBandToQuery($band); - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addBandToQuery($band); + $sql .= $this->genfunctions->addQslToQuery($postdata); $query = $this->db->query($sql); return $query->result(); } - function addQslToQuery($postdata) { - $sql = ''; - $qsl = array(); - if ($postdata['qrz'] != NULL || $postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) { - $sql .= ' and ('; - if ($postdata['qsl'] != NULL) { - array_push($qsl, "col_qsl_rcvd = 'Y'"); - } - if ($postdata['lotw'] != NULL) { - array_push($qsl, "col_lotw_qsl_rcvd = 'Y'"); - } - if ($postdata['eqsl'] != NULL) { - array_push($qsl, "col_eqsl_qsl_rcvd = 'Y'"); - } - if ($postdata['qrz'] != NULL) { - array_push($qsl, "COL_QRZCOM_QSO_DOWNLOAD_STATUS = 'Y'"); - } - if (count($qsl) > 0) { - $sql .= implode(' or ', $qsl); - } else { - $sql .= '1=0'; - } - $sql .= ')'; - } else { - $sql.=' and 1=0'; - } - return $sql; - } - function addBandToQuery($band) { - $sql = ''; - if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " AND COL_PROP_MODE ='" . $band . "'"; - } else { - $sql .= " AND COL_PROP_MODE !='SAT'"; - $sql .= " AND col_BAND ='" . $band . "'"; - } - } - return $sql; - } function addDokTypeToQuery($doks) { $sql = ''; @@ -236,7 +186,7 @@ class DOK extends CI_Model { } else if ($postdata['doks'] == 'sdok') { $sql .= " AND COL_DARC_DOK NOT REGEXP '^[A-Z][0-9]{2}$'"; } - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $query = $this->db->query($sql); return $query->result(); } diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index ada40f4df..025d15ff9 100644 --- a/application/models/Dxcc.php +++ b/application/models/Dxcc.php @@ -2,6 +2,10 @@ class DXCC extends CI_Model { + function __construct() { + $this->load->library('Genfunctions'); + } + /** * Function: mostactive * Information: Returns the most active band @@ -70,21 +74,7 @@ class DXCC extends CI_Model { $location_list = "'".implode("','",$logbooks_locations_array)."'"; - $qsl = ""; - if ($postdata['confirmed'] != NULL) { - if ($postdata['qsl'] != NULL ) { - $qsl .= "Q"; - } - if ($postdata['lotw'] != NULL ) { - $qsl .= "L"; - } - if ($postdata['eqsl'] != NULL ) { - $qsl .= "E"; - } - if ($postdata['qrz'] != NULL ) { - $qsl .= "Z"; - } - } + $qsl = $this->genfunctions->gen_qsl_from_postdata($postdata); foreach ($bands as $band) { // Looping through bands and entities to generate the array needed for display foreach ($dxccArray as $dxcc) { @@ -146,13 +136,13 @@ class DXCC extends CI_Model { where station_id in (" . $location_list . ") and col_dxcc > 0"; - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $sql .= " group by col_dxcc ) x on dxcc_entities.adif = x.col_dxcc"; @@ -174,7 +164,7 @@ class DXCC extends CI_Model { select col_dxcc from ".$this->config->item('table_name')." thcv where station_id in (" . $location_list . ") and col_dxcc > 0"; - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } @@ -188,19 +178,6 @@ class DXCC extends CI_Model { return $query->result(); } - function addBandToQuery($band) { - $sql = ''; - if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } - return $sql; - } - function fetchDxcc($postdata) { $CI =& get_instance(); $CI->load->model('logbooks_model'); @@ -255,20 +232,20 @@ class DXCC extends CI_Model { from ".$this->config->item('table_name')." thcv where station_id in (" . $location_list . ") and col_dxcc > 0"; - $sql .= $this->addBandToQuery($postdata['band']); + $sql .= $this->genfunctions->addBandToQuery($postdata['band']); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } $sql .= " and not exists (select 1 from ".$this->config->item('table_name')." where station_id in (". $location_list .") and col_dxcc = thcv.col_dxcc and col_dxcc > 0"; - $sql .= $this->addBandToQuery($postdata['band']); + $sql .= $this->genfunctions->addBandToQuery($postdata['band']); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $sql .= ')'; $sql .= " group by col_dxcc ) ll on dxcc_entities.adif = ll.col_dxcc @@ -291,13 +268,13 @@ class DXCC extends CI_Model { where station_id in (". $location_list . ") and col_dxcc > 0"; - $sql .= $this->addBandToQuery($postdata['band']); + $sql .= $this->genfunctions->addBandToQuery($postdata['band']); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $sql .= " group by col_dxcc ) ll on dxcc_entities.adif = ll.col_dxcc @@ -314,37 +291,6 @@ class DXCC extends CI_Model { return $query->result(); } - // Made function instead of repeating this several times - function addQslToQuery($postdata) { - $sql = ''; - $qsl = array(); - if ($postdata['qrz'] != NULL || $postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) { - $sql .= ' and ('; - if ($postdata['qsl'] != NULL) { - array_push($qsl, "col_qsl_rcvd = 'Y'"); - } - if ($postdata['lotw'] != NULL) { - array_push($qsl, "col_lotw_qsl_rcvd = 'Y'"); - } - if ($postdata['eqsl'] != NULL) { - array_push($qsl, "col_eqsl_qsl_rcvd = 'Y'"); - } - if ($postdata['qrz'] != NULL) { - array_push($qsl, "COL_QRZCOM_QSO_DOWNLOAD_STATUS = 'Y'"); - } - if (count($qsl) > 0) { - $sql .= implode(' or ', $qsl); - } else { - $sql .= '1=0'; - } - $sql .= ')'; - } else { - $sql.=' and 1=0'; - } - return $sql; - } - - // Made function instead of repeating this several times function addContinentsToQuery($postdata) { $sql = ''; @@ -471,7 +417,7 @@ class DXCC extends CI_Model { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); if ($postdata['includedeleted'] == NULL) { diff --git a/application/models/Dxcluster_model.php b/application/models/Dxcluster_model.php index e9f379db9..45070489c 100644 --- a/application/models/Dxcluster_model.php +++ b/application/models/Dxcluster_model.php @@ -22,14 +22,18 @@ class Dxcluster_model extends CI_Model { $CI->load->model('logbook_model'); $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); - // CURL Functions - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $dxcache_url); - curl_setopt($ch, CURLOPT_USERAGENT, 'Wavelog '.$this->optionslib->get_option('version').' DXLookup'); - curl_setopt($ch, CURLOPT_HEADER, false); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - $jsonraw = curl_exec($ch); - curl_close($ch); + $this->load->driver('cache', array('adapter' => 'file', 'backup' => 'file')); + if (!$jsonraw = $this->cache->get('dxcache'.$band)) { + // CURL Functions + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $dxcache_url); + curl_setopt($ch, CURLOPT_USERAGENT, 'Wavelog '.$this->optionslib->get_option('version').' DXLookup'); + curl_setopt($ch, CURLOPT_HEADER, false); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $jsonraw = curl_exec($ch); + curl_close($ch); + $this->cache->save('dxcache'.$band, $jsonraw, 59); // Cache DXClusterCache Instancewide for 59seconds + } $json = json_decode($jsonraw); $date = date('Ymd', time()); diff --git a/application/models/Helvetia_model.php b/application/models/Helvetia_model.php new file mode 100644 index 000000000..eccc0a85e --- /dev/null +++ b/application/models/Helvetia_model.php @@ -0,0 +1,252 @@ +load->library('Genfunctions'); + } + + public $stateString = 'AG,AI,AR,BE,BL,BS,FR,GE,GL,GR,JU,LU,NE,NW,OW,SG,SH,SO,SZ,TG,TI,UR,VD,VS,ZG,ZH'; + + function get_helvetia_array($bands, $postdata) { + $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; + } + + $location_list = "'".implode("','",$logbooks_locations_array)."'"; + + $stateArray = explode(',', $this->stateString); + + $states = array(); // Used for keeping thelvetiak of which states that are not worked + + $qsl = $this->genfunctions->gen_qsl_from_postdata($postdata); + + foreach ($stateArray as $state) { // Generating array for use in the table + $states[$state]['count'] = 0; // Inits each state's count + } + + + foreach ($bands as $band) { + foreach ($stateArray as $state) { // Generating array for use in the table + $bandhelvetia[$state][$band] = '-'; // Sets all to dash to indicate no result + } + + if ($postdata['worked'] != NULL) { + $helvetiaBand = $this->gethelvetiaWorked($location_list, $band, $postdata); + foreach ($helvetiaBand as $line) { + $bandhelvetia[$line->col_state][$band] = '
col_state . '","' . $band . '","'. $postdata['mode'] . '","helvetia", "")\'>W
'; + $states[$line->col_state]['count']++; + } + } + if ($postdata['confirmed'] != NULL) { + $helvetiaBand = $this->gethelvetiaConfirmed($location_list, $band, $postdata); + foreach ($helvetiaBand as $line) { + $bandhelvetia[$line->col_state][$band] = '
col_state . '","' . $band . '","'. $postdata['mode'] . '","helvetia", "'.$qsl.'")\'>C
'; + $states[$line->col_state]['count']++; + } + } + } + + // We want to remove the worked states in the list, since we do not want to display them + if ($postdata['worked'] == NULL) { + $helvetiaBand = $this->gethelvetiaWorked($location_list, $postdata['band'], $postdata); + foreach ($helvetiaBand as $line) { + unset($bandhelvetia[$line->col_state]); + } + } + + // We want to remove the confirmed states in the list, since we do not want to display them + if ($postdata['confirmed'] == NULL) { + $helvetiaBand = $this->gethelvetiaConfirmed($location_list, $postdata['band'], $postdata); + foreach ($helvetiaBand as $line) { + unset($bandhelvetia[$line->col_state]); + } + } + + if ($postdata['notworked'] == NULL) { + foreach ($stateArray as $state) { + if ($states[$state]['count'] == 0) { + unset($bandhelvetia[$state]); + }; + } + } + + if (isset($bandhelvetia)) { + return $bandhelvetia; + } + else { + return 0; + } + } + + /* + * Function gets worked and confirmed summary on each band on the active stationprofile + */ + function get_helvetia_summary($bands, $postdata) + { + $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; + } + + $location_list = "'".implode("','",$logbooks_locations_array)."'"; + + foreach ($bands as $band) { + $worked = $this->getSummaryByBand($band, $postdata, $location_list); + $confirmed = $this->getSummaryByBandConfirmed($band, $postdata, $location_list); + $helvetiaSummary['worked'][$band] = $worked[0]->count; + $helvetiaSummary['confirmed'][$band] = $confirmed[0]->count; + } + + $workedTotal = $this->getSummaryByBand($postdata['band'], $postdata, $location_list); + $confirmedTotal = $this->getSummaryByBandConfirmed($postdata['band'], $postdata, $location_list); + + $helvetiaSummary['worked']['Total'] = $workedTotal[0]->count; + $helvetiaSummary['confirmed']['Total'] = $confirmedTotal[0]->count; + + return $helvetiaSummary; + } + + function getSummaryByBand($band, $postdata, $location_list) + { + $sql = "SELECT count(distinct thcv.col_state) as count FROM " . $this->config->item('table_name') . " thcv"; + + $sql .= " where station_id in (" . $location_list . ")"; + + if ($band == 'SAT') { + $sql .= " and thcv.col_prop_mode ='" . $band . "'"; + } else if ($band == 'All') { + $this->load->model('bands'); + + $bandslots = $this->bands->get_worked_bands('helvetia'); + + $bandslots_list = "'".implode("','",$bandslots)."'"; + + $sql .= " and thcv.col_band in (" . $bandslots_list . ")" . + " and thcv.col_prop_mode !='SAT'"; + } else { + $sql .= " and thcv.col_prop_mode !='SAT'"; + $sql .= " and thcv.col_band ='" . $band . "'"; + } + + if ($postdata['mode'] != 'All') { + $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; + } + + $sql .= $this->addStateToQuery(); + + $query = $this->db->query($sql); + + return $query->result(); + } + + function getSummaryByBandConfirmed($band, $postdata, $location_list) + { + $sql = "SELECT count(distinct thcv.col_state) as count FROM " . $this->config->item('table_name') . " thcv"; + + $sql .= " where station_id in (" . $location_list . ")"; + + if ($band == 'SAT') { + $sql .= " and thcv.col_prop_mode ='" . $band . "'"; + } else if ($band == 'All') { + $this->load->model('bands'); + + $bandslots = $this->bands->get_worked_bands('helvetia'); + + $bandslots_list = "'".implode("','",$bandslots)."'"; + + $sql .= " and thcv.col_band in (" . $bandslots_list . ")" . + " and thcv.col_prop_mode !='SAT'"; + } else { + $sql .= " and thcv.col_prop_mode !='SAT'"; + $sql .= " and thcv.col_band ='" . $band . "'"; + } + + if ($postdata['mode'] != 'All') { + $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; + } + + $sql .= $this->genfunctions->addQslToQuery($postdata); + + $sql .= $this->addStateToQuery(); + + $query = $this->db->query($sql); + + return $query->result(); + } + + /* + * Function returns all worked, but not confirmed states + * $postdata contains data from the form, in this case Lotw or QSL are used + */ + function gethelvetiaWorked($location_list, $band, $postdata) { + $sql = "SELECT distinct col_state FROM " . $this->config->item('table_name') . " thcv + where station_id in (" . $location_list . ")"; + + if ($postdata['mode'] != 'All') { + $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; + } + + $sql .= $this->addStateToQuery(); + + $sql .= $this->genfunctions->addBandToQuery($band); + + $sql .= " and not exists (select 1 from ". $this->config->item('table_name') . + " where station_id in (". $location_list . ")" . + " and col_state = thcv.col_state"; + + if ($postdata['mode'] != 'All') { + $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; + } + + $sql .= $this->genfunctions->addBandToQuery($band); + + $sql .= $this->genfunctions->addQslToQuery($postdata); + + $sql .= $this->addStateToQuery(); + + $sql .= ")"; + + $query = $this->db->query($sql); + + return $query->result(); + } + + /* + * Function returns all confirmed states on given band and on LoTW or QSL + * $postdata contains data from the form, in this case Lotw or QSL are used + */ + function gethelvetiaConfirmed($location_list, $band, $postdata) { + $sql = "SELECT distinct col_state FROM " . $this->config->item('table_name') . " thcv + where station_id in (" . $location_list . ")"; + + if ($postdata['mode'] != 'All') { + $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; + } + + $sql .= $this->addStateToQuery(); + + $sql .= $this->genfunctions->addBandToQuery($band); + + $sql .= $this->genfunctions->addQslToQuery($postdata); + + $query = $this->db->query($sql); + + return $query->result(); + } + + function addStateToQuery() { + $sql = ''; + $sql .= " and COL_DXCC = 287"; + $sql .= " and COL_STATE in ('AG','AI','AR','BE','BL','BS','FR','GE','GL','GR','JU','LU','NE','NW','OW','SG','SH','SO','SZ','TG','TI','UR','VD','VS','ZG','ZH')"; + return $sql; + } +} +?> diff --git a/application/models/Iota.php b/application/models/Iota.php index a543c6503..6b1b7893a 100644 --- a/application/models/Iota.php +++ b/application/models/Iota.php @@ -1,8 +1,11 @@ load->library('Genfunctions'); + } - function get_iota_array($iotaArray, $bands, $postdata) { + function get_iota_array($iotaArray, $bands, $postdata) { $CI =& get_instance(); $CI->load->model('logbooks_model'); $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); @@ -78,7 +81,7 @@ class IOTA extends CI_Model { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); if ($postdata['includedeleted'] == NULL) { $sql .= " and coalesce(iota.status, '') <> 'D'"; @@ -101,7 +104,7 @@ class IOTA extends CI_Model { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); if ($postdata['includedeleted'] == NULL) { $sql .= " and coalesce(iota.status, '') <> 'D'"; @@ -170,11 +173,11 @@ class IOTA extends CI_Model { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addBandToQuery($postdata['band']); + $sql .= $this->genfunctions->addBandToQuery($postdata['band']); $sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y'))"; - $sql .= $this->addBandToQuery($postdata['band']); + $sql .= $this->genfunctions->addBandToQuery($postdata['band']); if ($postdata['includedeleted'] == NULL) { $sql .= " and coalesce(iota.status, '') <> 'D'"; @@ -208,7 +211,7 @@ class IOTA extends CI_Model { $sql .= $this->addContinentsToQuery($postdata); - $sql .= $this->addBandToQuery($postdata['band']); + $sql .= $this->genfunctions->addBandToQuery($postdata['band']); $query = $this->db->query($sql); @@ -357,17 +360,5 @@ class IOTA extends CI_Model { return $query->result(); } - function addBandToQuery($band) { - $sql = ''; - if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } - return $sql; - } } ?> diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index ea5df6549..9e5a6158f 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -380,6 +380,10 @@ class Logbook_model extends CI_Model { $this->db->where('COL_STATE', $searchphrase); $this->db->where_in('COL_DXCC', ['1']); break; + case 'helvetia': + $this->db->where('COL_STATE', $searchphrase); + $this->db->where_in('COL_DXCC', ['287']); + break; case 'SOTA': $this->db->where('COL_SOTA_REF', $searchphrase); break; diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php index e35cb5626..4eb9c1a57 100644 --- a/application/models/Logbookadvanced_model.php +++ b/application/models/Logbookadvanced_model.php @@ -466,4 +466,23 @@ class Logbookadvanced_model extends CI_Model { return $this->db->get()->result(); } + + function saveEditedQsos($ids, $column, $value) { + switch($column) { + case "cqz": $column = 'COL_CQZ'; break; + case "dxcc": $column = 'COL_DXCC'; break; + case "iota": $column = 'COL_IOTA'; break; + case "was": $column = 'COL_STATE'; break; + case "propagation": $column = 'COL_PROP_MODE'; break; + default: return; + } + + $this->db->trans_start(); + $sql = "UPDATE ".$this->config->item('table_name')." JOIN station_profile ON ".$this->config->item('table_name').".station_id = station_profile.station_id SET " . $column . " = ? WHERE " . $this->config->item('table_name').".col_primary_key in ? and station_profile.user_id = ?"; + + $query = $this->db->query($sql, array($value, json_decode($ids, true), $this->session->userdata('user_id'))); + $this->db->trans_complete(); + + return array('message' => 'OK'); + } } diff --git a/application/models/Rac.php b/application/models/Rac.php index f171a2b41..f662e451f 100644 --- a/application/models/Rac.php +++ b/application/models/Rac.php @@ -2,6 +2,10 @@ class rac extends CI_Model { + function __construct() { + $this->load->library('Genfunctions'); + } + public $stateString = 'AB,BC,MB,NB,NL,NT,NS,NU,ON,PE,QC,SK,YT'; function get_rac_array($bands, $postdata) { @@ -19,21 +23,7 @@ class rac extends CI_Model { $states = array(); // Used for keeping track of which states that are not worked - $qsl = ""; - if ($postdata['confirmed'] != NULL) { - if ($postdata['qsl'] != NULL ) { - $qsl .= "Q"; - } - if ($postdata['lotw'] != NULL ) { - $qsl .= "L"; - } - if ($postdata['eqsl'] != NULL ) { - $qsl .= "E"; - } - if ($postdata['qrz'] != NULL ) { - $qsl .= "Z"; - } - } + $qsl = $this->genfunctions->gen_qsl_from_postdata($postdata); foreach ($stateArray as $state) { // Generating array for use in the table $states[$state]['count'] = 0; // Inits each state's count @@ -183,7 +173,7 @@ class rac extends CI_Model { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $sql .= $this->addStateToQuery(); @@ -206,7 +196,7 @@ class rac extends CI_Model { $sql .= $this->addStateToQuery(); - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); $sql .= " and not exists (select 1 from ". $this->config->item('table_name') . " where station_id in (". $location_list . ")" . @@ -216,9 +206,9 @@ class rac extends CI_Model { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $sql .= $this->addStateToQuery(); @@ -243,68 +233,15 @@ class rac extends CI_Model { $sql .= $this->addStateToQuery(); - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $query = $this->db->query($sql); return $query->result(); } - function addQslToQuery($postdata) { - $sql = ''; - $qsl = array(); - if ($postdata['qrz'] != NULL || $postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) { - $sql .= ' and ('; - if ($postdata['qsl'] != NULL) { - array_push($qsl, "col_qsl_rcvd = 'Y'"); - } - if ($postdata['lotw'] != NULL) { - array_push($qsl, "col_lotw_qsl_rcvd = 'Y'"); - } - if ($postdata['eqsl'] != NULL) { - array_push($qsl, "col_eqsl_qsl_rcvd = 'Y'"); - } - if ($postdata['qrz'] != NULL) { - array_push($qsl, "COL_QRZCOM_QSO_DOWNLOAD_STATUS = 'Y'"); - } - if (count($qsl) > 0) { - $sql .= implode(' or ', $qsl); - } else { - $sql .= '1=0'; - } - $sql .= ')'; - } else { - $sql.=' and 1=0'; - } - return $sql; - } - - - - function addBandToQuery($band) { - $sql = ''; - if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } else { - $this->load->model('bands'); - - $bandslots = $this->bands->get_worked_bands('rac'); - - $bandslots_list = "'".implode("','",$bandslots)."'"; - - $sql .= " and col_band in (" . $bandslots_list . ")" . - " and col_prop_mode !='SAT'"; - } - return $sql; - } - function addStateToQuery() { $sql = ''; $sql .= " and COL_DXCC = 1"; diff --git a/application/models/User_model.php b/application/models/User_model.php index b26681cba..c9116b5d0 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -200,7 +200,7 @@ class User_Model extends CI_Model { // Add user and insert bandsettings for user $this->db->insert($this->config->item('auth_table'), $data); $insert_id = $this->db->insert_id(); - $this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, iota, pota, sig, sota, uscounties, was, wwff, vucc, waja, rac) select bands.id, " . $insert_id . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands;"); + $this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, helvetia, iota, pota, sig, sota, uscounties, was, wwff, vucc, waja, rac) select bands.id, " . $insert_id . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands;"); $this->db->query("insert into paper_types (user_id,paper_name,metric,width,orientation,height) SELECT ".$insert_id.", paper_name, metric, width, orientation,height FROM paper_types where user_id = -1;"); return OK; } else { diff --git a/application/models/Waja.php b/application/models/Waja.php index 6e4f9dc7f..8fb9b1d90 100644 --- a/application/models/Waja.php +++ b/application/models/Waja.php @@ -2,6 +2,10 @@ class WAJA extends CI_Model { + function __construct() { + $this->load->library('Genfunctions'); + } + public $jaPrefectures = array( '01' => 'Hokkaido', '02' => 'Aomori', @@ -67,27 +71,12 @@ class WAJA extends CI_Model { $wajaArray = explode(',', $this->prefectureString); $prefectures = array(); // Used for keeping track of which states that are not worked - - $qsl = ""; - if ($postdata['confirmed'] != NULL) { - if ($postdata['qsl'] != NULL ) { - $qsl .= "Q"; - } - if ($postdata['lotw'] != NULL ) { - $qsl .= "L"; - } - if ($postdata['eqsl'] != NULL ) { - $qsl .= "E"; - } - if ($postdata['qrz'] != NULL ) { - $qsl .= "Z"; - } - } - - foreach ($wajaArray as $state) { // Generating array for use in the table + foreach ($wajaArray as $state) { // Generating array for use in the table $prefectures[$state]['count'] = 0; // Inits each state's count } + $qsl = $this->genfunctions->gen_qsl_from_postdata($postdata); + foreach ($bands as $band) { foreach ($wajaArray as $state) { // Generating array for use in the table @@ -151,13 +140,13 @@ class WAJA extends CI_Model { where station_id in (" . $location_list . ") and col_dxcc > 0"; - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $sql .= " group by col_dxcc ) x on dxcc_entities.adif = x.col_dxcc"; @@ -180,7 +169,7 @@ class WAJA extends CI_Model { where station_id in (" . $location_list . ") and col_dxcc > 0"; - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); if ($postdata['mode'] != 'All') { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; @@ -200,19 +189,6 @@ class WAJA extends CI_Model { return $query->result(); } - function addBandToQuery($band) { - $sql = ''; - if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } - return $sql; - } - /* * Function returns all worked, but not confirmed states * $postdata contains data from the form, in this case Lotw or QSL are used @@ -227,7 +203,7 @@ class WAJA extends CI_Model { $sql .= $this->addStateToQuery(); - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); $sql .= " and not exists (select 1 from ". $this->config->item('table_name') . " where station_id in (". $location_list . ")" . @@ -237,9 +213,9 @@ class WAJA extends CI_Model { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $sql .= $this->addStateToQuery(); @@ -264,45 +240,16 @@ class WAJA extends CI_Model { $sql .= $this->addStateToQuery(); - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $query = $this->db->query($sql); return $query->result(); } - function addQslToQuery($postdata) { - $sql = ''; - $qsl = array(); - if ($postdata['qrz'] != NULL || $postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) { - $sql .= ' and ('; - if ($postdata['qsl'] != NULL) { - array_push($qsl, "col_qsl_rcvd = 'Y'"); - } - if ($postdata['lotw'] != NULL) { - array_push($qsl, "col_lotw_qsl_rcvd = 'Y'"); - } - if ($postdata['eqsl'] != NULL) { - array_push($qsl, "col_eqsl_qsl_rcvd = 'Y'"); - } - if ($postdata['qrz'] != NULL) { - array_push($qsl, "COL_QRZCOM_QSO_DOWNLOAD_STATUS = 'Y'"); - } - if (count($qsl) > 0) { - $sql .= implode(' or ', $qsl); - } else { - $sql .= '1=0'; - } - $sql .= ')'; - } else { - $sql.=' and 1=0'; - } - return $sql; - } - - + /* * Function gets worked and confirmed summary on each band on the active stationprofile */ @@ -393,7 +340,7 @@ class WAJA extends CI_Model { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $sql .= $this->addStateToQuery(); diff --git a/application/models/Was.php b/application/models/Was.php index 80be059f3..720897212 100644 --- a/application/models/Was.php +++ b/application/models/Was.php @@ -1,6 +1,9 @@ load->library('Genfunctions'); + } public $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'; @@ -18,22 +21,8 @@ class was extends CI_Model { $states = array(); // Used for keeping track of which states that are not worked - $qsl = ""; - if ($postdata['confirmed'] != NULL) { - if ($postdata['qsl'] != NULL ) { - $qsl .= "Q"; - } - if ($postdata['lotw'] != NULL ) { - $qsl .= "L"; - } - if ($postdata['eqsl'] != NULL ) { - $qsl .= "E"; - } - if ($postdata['qrz'] != NULL ) { - $qsl .= "Z"; - } - } - + $qsl = $this->genfunctions->gen_qsl_from_postdata($postdata); + foreach ($stateArray as $state) { // Generating array for use in the table $states[$state]['count'] = 0; // Inits each state's count } @@ -182,7 +171,7 @@ class was extends CI_Model { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $sql .= $this->addStateToQuery(); @@ -205,7 +194,7 @@ class was extends CI_Model { $sql .= $this->addStateToQuery(); - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); $sql .= " and not exists (select 1 from ". $this->config->item('table_name') . " where station_id in (". $location_list . ")" . @@ -215,9 +204,9 @@ class was extends CI_Model { $sql .= " and (col_mode = '" . $postdata['mode'] . "' or col_submode = '" . $postdata['mode'] . "')"; } - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $sql .= $this->addStateToQuery(); @@ -242,67 +231,15 @@ class was extends CI_Model { $sql .= $this->addStateToQuery(); - $sql .= $this->addBandToQuery($band); + $sql .= $this->genfunctions->addBandToQuery($band); - $sql .= $this->addQslToQuery($postdata); + $sql .= $this->genfunctions->addQslToQuery($postdata); $query = $this->db->query($sql); return $query->result(); } - function addQslToQuery($postdata) { - $sql = ''; - $qsl = array(); - if ($postdata['qrz'] != NULL || $postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) { - $sql .= ' and ('; - if ($postdata['qsl'] != NULL) { - array_push($qsl, "col_qsl_rcvd = 'Y'"); - } - if ($postdata['lotw'] != NULL) { - array_push($qsl, "col_lotw_qsl_rcvd = 'Y'"); - } - if ($postdata['eqsl'] != NULL) { - array_push($qsl, "col_eqsl_qsl_rcvd = 'Y'"); - } - if ($postdata['qrz'] != NULL) { - array_push($qsl, "COL_QRZCOM_QSO_DOWNLOAD_STATUS = 'Y'"); - } - if (count($qsl) > 0) { - $sql .= implode(' or ', $qsl); - } else { - $sql .= '1=0'; - } - $sql .= ')'; - } else { - $sql.=' and 1=0'; - } - return $sql; - } - - - function addBandToQuery($band) { - $sql = ''; - if ($band != 'All') { - if ($band == 'SAT') { - $sql .= " and col_prop_mode ='" . $band . "'"; - } else { - $sql .= " and col_prop_mode !='SAT'"; - $sql .= " and col_band ='" . $band . "'"; - } - } else { - $this->load->model('bands'); - - $bandslots = $this->bands->get_worked_bands('was'); - - $bandslots_list = "'".implode("','",$bandslots)."'"; - - $sql .= " and col_band in (" . $bandslots_list . ")" . - " and col_prop_mode !='SAT'"; - } - return $sql; - } - function addStateToQuery() { $sql = ''; $sql .= " and COL_DXCC in ('291', '6', '110')"; diff --git a/application/views/awards/helvetia/index.php b/application/views/awards/helvetia/index.php new file mode 100644 index 000000000..b5d1a09db --- /dev/null +++ b/application/views/awards/helvetia/index.php @@ -0,0 +1,245 @@ + + + + +
+ +
+
+ +

+ +
+ +
+
+ +
+
Worked / Confirmed
+
+
+ input->post('worked') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> > + +
+
+ input->post('confirmed') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> > + +
+
+ input->post('notworked') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> > + +
+
+
+ +
+
QSL Type
+
+
+ input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> > + +
+
+ input->post('lotw') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> > + +
+
+ input->post('eqsl')) echo ' checked="checked"'; ?> > + +
+
+ input->post('qrz')) echo ' checked="checked"'; ?> > + +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ + + + +
+
+ +
+
+ + +
+ +
+
+
+ +
+ +
+ +
+ + + + + + # + Canton'; + foreach($bands as $band) { + echo '' . $band . ''; + } + echo ' + + '; + + foreach ($helvetia_array as $helvetia => $value) { // Fills the table with the data + echo ' + ' . $i++ . ' + '. $helvetia .''; + foreach ($value as $key) { + echo '' . $key . ''; + } + echo ''; + } + echo ' + +

Summary

+ + + + '; + + foreach($bands as $band) { + echo ''; + } + echo ' + + + + '; + + foreach ($helvetia_summary['worked'] as $helvetia) { // Fills the table with the data + echo ''; + } + + echo ' + '; + foreach ($helvetia_summary['confirmed'] as $helvetia) { // Fills the table with the data + echo ''; + } + + echo ' +
' . $band . 'Total
Total worked' . $helvetia . '
Total confirmed' . $helvetia . '
+
'; + } + else { + echo ''; + } + ?> +
+
+ diff --git a/application/views/bands/index.php b/application/views/bands/index.php index 829912567..a0c4f04ef 100644 --- a/application/views/bands/index.php +++ b/application/views/bands/index.php @@ -2,6 +2,7 @@ $cq = 0; $dok = 0; $dxcc = 0; +$helvetia = 0; $iota = 0; $pota = 0; $sig = 0; @@ -45,6 +46,7 @@ $wwff = 0; + @@ -72,6 +74,7 @@ $wwff = 0; cq == 1) {echo 'checked'; $cq++;}?>> dok == 1) {echo 'checked'; $dok++;}?>> dxcc == 1) {echo 'checked'; $dxcc++;}?>> + helvetia == 1) {echo 'checked'; $helvetia++;}?>> iota == 1) {echo 'checked'; $iota++;}?>> pota == 1) {echo 'checked'; $pota++;}?>> sig == 1) {echo 'checked'; $sig++;}?>> @@ -103,6 +106,7 @@ $wwff = 0; 0) echo 'checked';?>> 0) echo 'checked';?>> 0) echo 'checked';?>> + 0) echo 'checked';?>> 0) echo 'checked';?>> 0) echo 'checked';?>> 0) echo 'checked';?>> diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 89d71d9d4..d5d5b601a 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -48,7 +48,7 @@ - + - + + +uri->segment(2) == "helvetia") { ?> + + uri->segment(2) == "vucc_band") { ?> - +