Merge branch 'dev' into callbook_state_data

This commit is contained in:
HB9HIL
2024-02-18 20:40:33 +01:00
committed by GitHub
71 changed files with 2452 additions and 1214 deletions

View File

@@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
*/
$config['migration_version'] = 180;
$config['migration_version'] = 182;
/*
|--------------------------------------------------------------------------

View File

@@ -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

View File

@@ -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'));

View File

@@ -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"))

View File

@@ -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')) {

View File

@@ -1295,7 +1295,7 @@ class Logbook extends CI_Controller {
case 'WWFF': $ret.= '<td>' . ($row->COL_WWFF_REF) . '</td>'; break;
case 'POTA': $ret.= '<td>' . ($row->COL_POTA_REF) . '</td>'; break;
case 'Grid': $ret.= '<td>' . $this->part_QrbCalcLink($row->COL_MY_GRIDSQUARE, $row->COL_VUCC_GRIDS, $row->COL_GRIDSQUARE) . '</td>'; break;
case 'Distance': $ret.= '<td>' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . '&nbsp;km' : '') . '</td>'; break;
case 'Distance': $ret.= '<td>' . (($row->COL_DISTANCE ?? '' != '') ? $row->COL_DISTANCE . '&nbsp;km' : '') . '</td>'; break;
case 'Band': $ret.= '<td>'; if($row->COL_SAT_NAME != null) { $ret.= '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'.$row->COL_SAT_NAME.'</a></td>'; } else { $ret.= strtolower($row->COL_BAND); } $ret.= '</td>'; break;
case 'Frequency': $ret.= '<td>'; if($row->COL_SAT_NAME != null) { $ret.= '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'.$row->COL_SAT_NAME.'</a></td>'; } else { if($row->COL_FREQ != null) { $ret.= $ci->frequency->hz_to_mhz($row->COL_FREQ); } else { $ret.= strtolower($row->COL_BAND); } } $ret.= '</td>'; break;
case 'State': $ret.= '<td>' . ($row->COL_STATE) . '</td>'; break;

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -64,6 +64,18 @@ $lang['awards_ffma_description_ln3'] = "该奖项将颁发给任何能够再次
$lang['awards_ffma_description_ln4'] = "如需了解更多信息,您可以访问此链接:<a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -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 <a href='https://cq-amateur-radio.com/cq_awards/cq_waz_awards/index_cq_waz_award.html' target='_blank'>CQ Magazine</a>.";
$lang['awards_cq_description_ln4'] = "Du findest alle Informationen und Regeln auf der Website des <a href='https://cq-amateur-radio.com/cq_awards/cq_waz_awards/index_cq_waz_award.html' target='_blank'>CQ Magazine</a>.";
/*
___________________________________________________________________________________________
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 <a
/*
___________________________________________________________________________________________
DXCC -- Verwenden Sie alle 4 Textzeilen
DXCC -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
$lang['awards_dxcc_description_ln1'] = "DXCC Diplom";
$lang['awards_dxcc_description_ln2'] = "DXCC steht für 'DX Century Club', eine Auszeichnung, die auf gearbeiteten Ländern basiert. Die DXCC-Liste basiert auf einem Artikel, der 1935 von Clinton B. DeSoto, W1CBD, mit dem Titel <a href='http://www.arrl.org/desoto' target='_blank'>'How to Count Countries Worked, A New DX Scoring System'</a> erstellt wurde.";
$lang['awards_dxcc_description_ln3'] = "Sie finden alle Informationen zum DXCC Diplom auf der <a href='https://www.arrl.org/dxcc-rules' target='_blank'>ARRL-Website</a>.";
$lang['awards_dxcc_description_ln4'] = "Wichtiger Hinweis: Im Laufe der Zeit haben sich die Kriterien für die DXCC-Liste geändert. Die Liste bleibt unverändert, bis eine Einheit die Kriterien nicht mehr erfüllt, woraufhin sie in die Gelöschte Liste verschoben wird. Sie finden gelöschte DXCC-Einheiten auch in den Listen in Wavelog. Beachten Sie, dass diese DXCC-Einheiten veraltet und nicht mehr gültig sind.";
$lang['awards_dxcc_description_ln3'] = "Du findest alle Informationen zum DXCC Diplom auf der <a href='https://www.arrl.org/dxcc-rules' target='_blank'>ARRL-Website</a>.";
$lang['awards_dxcc_description_ln4'] = "Wichtiger Hinweis: Im Laufe der Zeit haben sich die Kriterien für die DXCC-Liste geändert. Die Liste bleibt unverändert, bis eine Einheit die Kriterien nicht mehr erfüllt, woraufhin sie in die Gelöschte Liste verschoben wird. Du findest gelöschte DXCC-Einheiten auch in den Listen in Wavelog. Beachte, dass diese DXCC-Einheiten veraltet und nicht mehr gültig sind.";
/*
___________________________________________________________________________________________
FFMA -- Verwenden Sie alle 4 Textzeilen
FFMA -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
$lang['awards_ffma_description_ln1'] = "Fred Fish Memorial Award";
$lang['awards_ffma_description_ln2'] = "Der Fred Fish Memorial Award wurde zu Ehren von Fred Fish, W5FF (SK), geschaffen, dem ersten Funkamateur, der alle 488 Maidenhead-Planquadrate in den 48 zusammenhängenden Bundesstaaten der USA auf 6 Metern gearbeitet und bestätigt hat.";
$lang['awards_ffma_description_ln3'] = "Der Preis wird an jeden Funkamateur verliehen, der die Leistung von W5FF nachahmen kann.";
$lang['awards_ffma_description_ln4'] = "Für weitere Informationen können Sie diesen Link besuchen: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
$lang['awards_ffma_description_ln4'] = "Für weitere Informationen kannst du diesen Link besuchen: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
IOTA -- Verwenden Sie alle 4 Textzeilen
H26 -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
$lang['awards_helvetia_description_ln1'] = "HELVETIA 26 | SWITZERLAND AWARD";
$lang['awards_helvetia_description_ln2'] = "Die USKA (Union Schweizerischer Kurzwellen Amateure) stiftet zwei Auszeichnungen, den HELVETIA 26 (H26) Award und den SWITZERLAND Award, um Aktivitäten auf den Bändern zu fördern, indem sie Kontakte über möglichst viele Schweizer Kantone auf verschiedenen Bändern anregen.";
$lang['awards_helvetia_description_ln3'] = "Diese Auszeichnungen gibt es in zwei Versionen: eine für HF-Bänder und eine für VHF-Bänder (einschließlich SHF und UHF). Gültige Verbindungen für diese Auszeichnungen datieren bis zum 1. Januar 1980 zurück.";
$lang['awards_helvetia_description_ln4'] = "Für weitere Informationen besuche bitte diesen Link: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
$lang['awards_iota_description_ln1'] = "IOTA Diplome";
$lang['awards_iota_description_ln2'] = "IOTA ist ein aufregendes und innovatives Aktivitätsprogramm, das das Interesse von Tausenden von Funkamateuren weltweit geweckt hat. Es wurde 1964 gegründet und fördert Funkkontakte mit Stationen, die sich auf Inseln auf der ganzen Welt befinden, um die Erfahrung aller zu verbessern, die auf den Amateurfunkbändern aktiv sind. Um dies zu erreichen, nutzt es die weit verbreitete Mystik um Inseln.";
$lang['awards_iota_description_ln3'] = "Es wird von Islands On The Air (IOTA) Ltd (auch als IOTA Management bezeichnet) in Zusammenarbeit mit der Radio Society of Great Britain (RSGB) verwaltet. IOTA Management hat die Inseln der Welt in etwa 1200 'IOTA-Gruppen' unterteilt, von denen jede eine unterschiedliche Anzahl von 'counters' (z.dt. 'Zählern') hat, die qualifizierende Inseln sind. Diese Listen werden im IOTA-Verzeichnis und auf der IOTA-Website veröffentlicht. Das Ziel für den IOTA Island Chaser besteht darin, Funkkontakt mit mindestens einem Zähler in so vielen dieser Gruppen wie möglich aufzunehmen. Das Programm hat klare Regeln und fördert den freundlichen Wettbewerb unter den Verfolgern, indem es die Leistungen der Teilnehmer in einer Ehrenrolle und jährlichen Listen veröffentlicht und sie mit Zertifikaten und renommierten Diplomen auszeichnet.";
$lang['awards_iota_description_ln4'] = "Sie finden diese Informationen auch auf der <a href='https://www.iota-world.org/' target='_blank'>IOTA WORLD-Website</a>.";
$lang['awards_iota_description_ln4'] = "Du findest diese Informationen auch auf der <a href='https://www.iota-world.org/' target='_blank'>IOTA WORLD-Website</a>.";
/*
___________________________________________________________________________________________
POTA -- Verwenden Sie alle 4 Textzeilen
POTA -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
$lang['awards_pota_description_ln1'] = "POTA Diplome";
$lang['awards_pota_description_ln2'] = "Parks on the Air® (POTA) startete Anfang 2017, als das 'National Parks on the Air' - Special Event des ARRL endete. Eine Gruppe von Freiwilligen wollte den Spaß über das einjährige Ereignis hinaus fortsetzen, und so wurde POTA geboren.";
$lang['awards_pota_description_ln3'] = "POTA funktioniert ähnlich wie SOTA, mit Aktivatoren und Jägern. Für die Diplome gibt es verschiedene Kategorien, die auf der Anzahl der Parks, geografischen Gebieten und mehr basieren.";
$lang['awards_pota_description_ln4'] = "Für weitere Informationen zu den verfügbaren Diplome und Kategorien besuchen Sie bitte die <a href='https://parksontheair.com/pota-awards/' target='_blank'>Parks on the Air®-Website</a>.";
$lang['awards_pota_description_ln4'] = "Für weitere Informationen zu den verfügbaren Diplome und Kategorien besuche bitte die <a href='https://parksontheair.com/pota-awards/' target='_blank'>Parks on the Air®-Website</a>.";
/*
___________________________________________________________________________________________
SIG -- Verwenden Sie alle 4 Textzeilen
SIG -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
$lang['awards_sig_description_ln1'] = "SIG-Information";
$lang['awards_sig_description_ln2'] = "Die SIG- oder Signature-Kategorie ermöglicht die Verwendung beliebiger 'Diplom-Identifikationen' für Diplome, die nicht in Wavelog implementiert sind.";
$lang['awards_sig_description_ln3'] = "Der Grund dafür ist, dass das gängige ADIF-Format nur wenige dedizierte Felder für bestimmte Diplome bietet. SIG ermöglicht es dennoch, alle anderen Arten von Signaturmarkierungen zu verwenden und auszuwerten.";
$lang['awards_sig_description_ln4'] = "Im QSO-Verarbeitung finden Sie zwei Felder: 'SIG' enthält die tatsächliche Markierung, die auch in der Auswertung der Auszeichnung sichtbar ist, und 'SIG INFO', das eine Beschreibung der Signatur enthält. Beide Felder sind frei anpassbar.";
$lang['awards_sig_description_ln4'] = "Im QSO-Verarbeitung findest du zwei Felder: 'SIG' enthält die tatsächliche Markierung, die auch in der Auswertung der Auszeichnung sichtbar ist, und 'SIG INFO', das eine Beschreibung der Signatur enthält. Beide Felder sind frei anpassbar.";
/*
___________________________________________________________________________________________
SOTA -- Verwenden Sie alle 4 Textzeilen
SOTA -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
$lang['awards_sota_description_ln1'] = "SOTA Awards";
$lang['awards_sota_description_ln2'] = "SOTA (Summits On The Air) ist ein Auszeichnungsschema für Funkamateure, das den portablen Betrieb in bergigen Gebieten fördert.";
$lang['awards_sota_description_ln3'] = "Es ist in fast hundert Ländern weltweit voll verfügbar. Jedes Land hat seine eigene Vereinigung, die die anerkannten SOTA-Gipfel innerhalb dieser Vereinigung definiert. Jeder Gipfel verdient den Aktivierenden und Verfolgenden eine Punktzahl, die sich auf die Höhe des Gipfels bezieht. Zertifikate sind für verschiedene Punktzahlen erhältlich und führen zu den renommierten Trophäen 'Mountain Goat' und 'Shack Sloth'. Eine Ehrenrolle für Aktivierende und Verfolgende wird in der SOTA-Online-Datenbank geführt.";
$lang['awards_sota_description_ln4'] = "Für weitere Informationen besuchen Sie bitte: <a href='https://www.sota.org.uk/' target='_blank'>https://www.sota.org.uk/</a>.";
$lang['awards_sota_description_ln4'] = "Für weitere Informationen besuche bitte: <a href='https://www.sota.org.uk/' target='_blank'>https://www.sota.org.uk/</a>.";
/*
___________________________________________________________________________________________
US Counties -- Verwenden Sie alle 4 Textzeilen
US Counties -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
$lang['awards_counties_description_ln1'] = "US County Diplom";
$lang['awards_counties_description_ln2'] = "Das US Counties Diplom (USA-CA) der Vereinigten Staaten von Amerika, gesponsert von CQ Magazine, wird für bestätigte Funkkontakte mit einer festgelegten Anzahl von US-Counties unter Regeln und Bedingungen verliehen, die Sie <a href='https://cq-amateur-radio.com/cq_awards/cq_usa_ca_awards/cq_usa_ca_awards.html' target='_blank'>hier</a> finden können.";
$lang['awards_counties_description_ln2'] = "Das US Counties Diplom (USA-CA) der Vereinigten Staaten von Amerika, gesponsert von CQ Magazine, wird für bestätigte Funkkontakte mit einer festgelegten Anzahl von US-Counties unter Regeln und Bedingungen verliehen, die du <a href='https://cq-amateur-radio.com/cq_awards/cq_usa_ca_awards/cq_usa_ca_awards.html' target='_blank'>hier</a> findest.";
$lang['awards_counties_description_ln3'] = "USA-CA steht allen lizenzierten Funkamateuren weltweit zur Verfügung und wird an Einzelpersonen für alle gemachten County-Kontakte verliehen, unabhängig von den verwendeten Rufzeichen, Stationsorten oder Daten.";
$lang['awards_counties_description_ln4'] = "Spezielle USA-CA-Diplome stehen auch für SWLs auf der Grundlage des Gehörten zur Verfügung.";
/*
___________________________________________________________________________________________
US Gridmaster -- Verwenden Sie alle 4 Textzeilen
US Gridmaster -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
@@ -138,7 +150,7 @@ $lang['awards_us_gridmaster_description_ln4'] = "Diese Karte zeigt nur QSOs, die
/*
___________________________________________________________________________________________
JA Gridmaster -- Verwenden Sie alle 4 Textzeilen
JA Gridmaster -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
@@ -150,46 +162,46 @@ $lang['awards_ja_gridmaster_description_ln4'] = "";
/*
___________________________________________________________________________________________
VUCC -- Verwenden Sie alle 4 Textzeilen
VUCC -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
$lang['awards_vucc_description_ln1'] = "VUCC - VHF/UHF Century Club Award";
$lang['awards_vucc_description_ln2'] = "Der VHF/UHF Century Club Award wird für eine Mindestanzahl von gearbeiteten und bestätigten Gitterquadraten auf einem gewünschten Band verliehen.";
$lang['awards_vucc_description_ln3'] = "Offizielle Informationen und Regeln finden Sie in diesem Dokument: <a href='https://www.arrl.org/vucc' target='_blank'>Klick hier.</a>.";
$lang['awards_vucc_description_ln3'] = "Offizielle Informationen und Regeln findest du in diesem Dokument: <a href='https://www.arrl.org/vucc' target='_blank'>Klick hier.</a>.";
$lang['awards_vucc_description_ln4'] = "Nur VHF/UHF-Bänder sind relevant.";
/*
___________________________________________________________________________________________
WAS -- Verwenden Sie alle 4 Textzeilen
WAS -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
$lang['awards_was_description_ln1'] = "WAS Diplom";
$lang['awards_was_description_ln2'] = "Die beliebteste Auszeichnung des ARRL ist das Worked All States Diplom. Tausende von Diplomen wurden an Funkamateure auf der ganzen Welt verliehen. Im 101. Jahr des ARRL haben sie die Diplome und das Programm in der Hoffnung überarbeitet und verbessert, das Diplomprogramm zu optimieren und zu vereinfachen.";
$lang['awards_was_description_ln3'] = "Das WAS (Worked All States) Diplom steht allen Funkamateuren weltweit zur Verfügung, die den Nachweis mit schriftlicher Bestätigung von Kontakten mit jedem der 50 Bundesstaaten der Vereinigten Staaten von Amerika erbringen. Funkamateure in den USA und ihren angehängten Staaten müssen Mitglieder des ARRL sein, um sich für einen WAS bewerben zu können. Bewerber aus dem Ausland sind von dieser Anforderung befreit.";
$lang['awards_was_description_ln4'] = "Alle Informationen und Regeln für den ARRL WAS Award finden Sie <a href='https://www.arrl.org/was' target='_blank'>hier</a>.";
$lang['awards_was_description_ln4'] = "Alle Informationen und Regeln für den ARRL WAS Award findest du <a href='https://www.arrl.org/was' target='_blank'>hier</a>.";
/*
___________________________________________________________________________________________
WWFF -- Verwenden Sie alle 4 Textzeilen
WWFF -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
$lang['awards_wwff_description_ln1'] = "WWFF - World Wide Flora and Fauna Award";
$lang['awards_wwff_description_ln2'] = "WWFF, World Wide Flora and Fauna in Amateur Radio, ermutigt lizenzierte Funkamateure, ihre Funkstationen zu verlassen und in geschützten Flora- und Fauna-Gebieten (PFF) weltweit portabel zu funken.";
$lang['awards_wwff_description_ln3'] = "Bereits mehr als 26.000 geschützte Flora- und Fauna-Gebiete (PFF) weltweit sind in dem WWFF-Verzeichnis registriert. Jäger und Aktivatoren können bunte Diplome sowohl weltweit als auch national beantragen.";
$lang['awards_wwff_description_ln4'] = "Für weitere Informationen besuchen Sie bitte: <a href='https://wwff.co/awards/' target='_blank'>https://wwff.co/awards/</a>.";
$lang['awards_wwff_description_ln4'] = "Für weitere Informationen besuche bitte: <a href='https://wwff.co/awards/' target='_blank'>https://wwff.co/awards/</a>.";
/*
___________________________________________________________________________________________
WAJA -- Use all 4 Lines of Text
WAJA -- Verwende alle 4 Textzeilen
___________________________________________________________________________________________
*/
$lang['awards_waja_description_ln1'] = "WAJA - Worked All Japan prefectures Award";
$lang['awards_waja_description_ln2'] = "WAJA, Worked All Japan prefectures in Amateur Radio, encourages licensed ham radio operators to work all the prefectures in Japan.";
$lang['awards_waja_description_ln3'] = "May be claimed for having contacted (heard) and received a QSL card from an amateur station located in each of the 47 prefectures of Japan. A list of QSL cards should be arranged in order of WAJA (HAJA) reference number, however names of prefectures may be omitted.";
$lang['awards_waja_description_ln4'] = "For more information, please visit: <a href='https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm' target='_blank'>https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm</a>.";
$lang['awards_waja_description_ln2'] = "WAJA, 'Worked All Japan prefectures in Amateur Radio', ermutigt lizenzierte Amateurfunkbetreiber dazu, mit allen Präfekturen in Japan zu arbeiten.";
$lang['awards_waja_description_ln3'] = "Du kannst diesen Award beanspruchen, indem du (gehört hast) und eine QSL-Karte von einer Amateurstation in jedem der 47 Präfekturen Japans erhalten hast. Eine Liste der QSL-Karten sollte nach der WAJA (HAJA) Referenznummer geordnet sein, jedoch können die Namen der Präfekturen ausgelassen werden.";
$lang['awards_waja_description_ln4'] = "Für weitere Informationen besuche bitte: <a href='https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm' target='_blank'>https://www.jarl.org/English/4_Library/A-4-2_Awards/Award_Main.htm</a>.";

View File

@@ -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';

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -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: <a href='https://www.arrl.org/ffma' target='_blank'>https://www.arrl.org/ffma</a>.";
/*
___________________________________________________________________________________________
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: <a href='https://www.uska.ch/contest/uska-diplome/' target='_blank'>https://www.uska.ch/contest/uska-diplome/</a>.";
/*
___________________________________________________________________________________________
IOTA -- Use all 4 Lines of Text

View File

@@ -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';

View File

@@ -0,0 +1,69 @@
<?php defined('BASEPATH') or exit('No direct script access allowed');
/***
* Libary for common functions, used at many places
*/
class Genfunctions
{
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 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;
}
}

View File

@@ -0,0 +1,23 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Migration_add_helvetia_bandxuser extends CI_Migration
{
public function up()
{
$fields = array(
'helvetia TINYINT NOT NULL DEFAULT 1',
);
if (!$this->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');
}
}
}

View File

@@ -0,0 +1,31 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Migration_main_recreate_iota_idx extends CI_Migration {
public function up() {
$this->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);
}
}
}

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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();
}

View File

@@ -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) {

View File

@@ -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());

View File

@@ -0,0 +1,252 @@
<?php
class helvetia_model extends CI_Model {
function __construct() {
$this->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] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","'. $postdata['mode'] . '","helvetia", "")\'>W</a></div>';
$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] = '<div class="bg-success awardsBgSuccess"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","'. $postdata['mode'] . '","helvetia", "'.$qsl.'")\'>C</a></div>';
$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;
}
}
?>

View File

@@ -1,8 +1,11 @@
<?php
class IOTA extends CI_Model {
function __construct() {
$this->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;
}
}
?>

View File

@@ -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;

View File

@@ -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');
}
}

View File

@@ -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";

View File

@@ -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 {

View File

@@ -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();

View File

@@ -1,6 +1,9 @@
<?php
class was extends CI_Model {
function __construct() {
$this->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')";

View File

@@ -0,0 +1,245 @@
<script>
var tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"
</script>
<style>
#helvetiamap {
height: calc(100vh - 500px) !important;
max-height: 900px !important;
}
/*Legend specific*/
.legend {
padding: 6px 8px;
font: 14px Arial, Helvetica, sans-serif;
background: white;
background: rgba(255, 255, 255, 0.8);
line-height: 24px;
color: #555;
}
.legend h4 {
text-align: center;
font-size: 16px;
margin: 2px 12px 8px;
color: #555;
}
.legend span {
position: relative;
bottom: 3px;
color: #555;
}
.legend i {
width: 18px;
height: 18px;
float: left;
margin: 0 8px 0 0;
opacity: 0.7;
color: #555;
}
.info {
padding: 6px 8px;
font: 14px/16px Arial, Helvetica, sans-serif;
background: white;
background: rgba(255,255,255,0.8);
box-shadow: 0 0 15px rgba(0,0,0,0.2);
border-radius: 5px;
color: #555;
}
.info h4 {
margin: 0 0 5px;
color: #555;
}
</style>
<div class="container">
<!-- Award Info Box -->
<br>
<div id="awardInfoButton">
<script>
var lang_awards_info_button = "<?php echo lang('awards_info_button'); ?>";
var lang_award_info_ln1 = "<?php echo lang('awards_helvetia_description_ln1'); ?>";
var lang_award_info_ln2 = "<?php echo lang('awards_helvetia_description_ln2'); ?>";
var lang_award_info_ln3 = "<?php echo lang('awards_helvetia_description_ln3'); ?>";
var lang_award_info_ln4 = "<?php echo lang('awards_helvetia_description_ln4'); ?>";
</script>
<h2><?php echo $page_title; ?></h2>
<button type="button" class="btn btn-sm btn-primary me-1" id="displayAwardInfo"><?php echo lang('awards_info_button'); ?></button>
</div>
<!-- End of Award Info Box -->
<form class="form" action="<?php echo site_url('awards/helvetia'); ?>" method="post" enctype="multipart/form-data">
<fieldset>
<div class="mb-3 row">
<div class="col-md-2" for="checkboxes">Worked / Confirmed</div>
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="worked" id="worked" value="1" <?php if ($this->input->post('worked') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
<label class="form-check-label" for="worked">Show worked</label>
</div>
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="confirmed" id="confirmed" value="1" <?php if ($this->input->post('confirmed') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
<label class="form-check-label" for="confirmed">Show confirmed</label>
</div>
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="notworked" id="notworked" value="1" <?php if ($this->input->post('notworked') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
<label class="form-check-label" for="notworked">Show not worked</label>
</div>
</div>
</div>
<div class="mb-3 row">
<div class="col-md-2">QSL Type</div>
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
<label class="form-check-label" for="qsl">QSL</label>
</div>
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="lotw" value="1" id="lotw" <?php if ($this->input->post('lotw') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
<label class="form-check-label" for="lotw">LoTW</label>
</div>
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="eqsl" value="1" id="eqsl" <?php if ($this->input->post('eqsl')) echo ' checked="checked"'; ?> >
<label class="form-check-label" for="eqsl">eQSL</label>
</div>
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="qrz" value="1" id="qrz" <?php if ($this->input->post('qrz')) echo ' checked="checked"'; ?> >
<label class="form-check-label" for="qrz">QRZ.com</label>
</div>
</div>
</div>
<div class="mb-3 row">
<label class="col-md-2 control-label" for="band">Band</label>
<div class="col-md-2">
<select id="band2" name="band" class="form-select form-select-sm">
<option value="All" <?php if ($this->input->post('band') == "All" || $this->input->method() !== 'post') echo ' selected'; ?> >Every band</option>
<?php foreach($worked_bands as $band) {
echo '<option value="' . $band . '"';
if ($this->input->post('band') == $band) echo ' selected';
echo '>' . $band . '</option>'."\n";
} ?>
</select>
</div>
</div>
<div class="mb-3 row">
<label class="col-md-2 control-label" for="mode">Mode</label>
<div class="col-md-2">
<select id="mode" name="mode" class="form-select form-select-sm">
<option value="All" <?php if ($this->input->post('mode') == "All" || $this->input->method() !== 'mode') echo ' selected'; ?>>All</option>
<?php
foreach($modes->result() as $mode){
if ($mode->submode == null) {
echo '<option value="' . $mode->mode . '"';
if ($this->input->post('mode') == $mode->mode) echo ' selected';
echo '>'. $mode->mode . '</option>'."\n";
} else {
echo '<option value="' . $mode->submode . '"';
if ($this->input->post('mode') == $mode->submode) echo ' selected';
echo '>' . $mode->submode . '</option>'."\n";
}
}
?>
</select>
</div>
</div>
<div class="mb-3 row">
<label class="col-md-2 control-label" for="button1id"></label>
<div class="col-md-10">
<button id="button2id" type="reset" name="button2id" class="btn btn-sm btn-warning">Reset</button>
<button id="button1id" type="submit" name="button1id" class="btn btn-sm btn-primary">Show</button>
<?php if ($helvetia_array) {
?><button type="button" onclick="load_helvetia_map();" class="btn btn-info btn-sm"><i class="fas fa-globe-americas"></i> Show helvetia Map</button>
<?php }?>
</div>
</div>
</fieldset>
</form>
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="table-tab" data-bs-toggle="tab" href="#table" role="tab" aria-controls="table" aria-selected="true">Table</a>
</li>
<li class="nav-item">
<a class="nav-link" id="map-tab" onclick="load_helvetia_map();" data-bs-toggle="tab" href="#helvetiamaptab" role="tab" aria-controls="home" aria-selected="false">Map</a>
</li>
</ul>
<br />
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade" id="helvetiamaptab" role="tabpanel" aria-labelledby="home-tab">
<br />
<div id="helvetiamap" class="map-leaflet" ></div>
</div>
<div class="tab-pane fade show active" id="table" role="tabpanel" aria-labelledby="table-tab">
<?php
if ($helvetia_array) {
$i = 1;
echo '
<table style="width:100%" class="table table-sm tablehelvetia table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr>
<td>#</td>
<td>Canton</td>';
foreach($bands as $band) {
echo '<td>' . $band . '</td>';
}
echo '</tr>
</thead>
<tbody>';
foreach ($helvetia_array as $helvetia => $value) { // Fills the table with the data
echo '<tr>
<td>' . $i++ . '</td>
<td>'. $helvetia .'</td>';
foreach ($value as $key) {
echo '<td style="text-align: center">' . $key . '</td>';
}
echo '</tr>';
}
echo '</table>
<h2>Summary</h2>
<table class="table tablesummary table-sm table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr><td></td>';
foreach($bands as $band) {
echo '<td>' . $band . '</td>';
}
echo '<td>Total</td></tr>
</thead>
<tbody>
<tr><td>Total worked</td>';
foreach ($helvetia_summary['worked'] as $helvetia) { // Fills the table with the data
echo '<td style="text-align: center">' . $helvetia . '</td>';
}
echo '</tr><tr>
<td>Total confirmed</td>';
foreach ($helvetia_summary['confirmed'] as $helvetia) { // Fills the table with the data
echo '<td style="text-align: center">' . $helvetia . '</td>';
}
echo '</tr>
</table>
</div>';
}
else {
echo '<div class="alert alert-danger" role="alert">Nothing found!</div>';
}
?>
</div>
</div>
</div>

View File

@@ -2,6 +2,7 @@
$cq = 0;
$dok = 0;
$dxcc = 0;
$helvetia = 0;
$iota = 0;
$pota = 0;
$sig = 0;
@@ -45,6 +46,7 @@ $wwff = 0;
<th><?php echo lang('gen_hamradio_cq'); ?></th>
<th><?php echo lang('gen_hamradio_dok'); ?></th>
<th><?php echo lang('gen_hamradio_dxcc'); ?></th>
<th><?php echo lang('menu_helvetia'); ?></th>
<th><?php echo lang('gen_hamradio_iota'); ?></th>
<th><?php echo lang('gen_hamradio_pota'); ?></th>
<th><?php echo lang('gen_hamradio_sig'); ?></th>
@@ -72,6 +74,7 @@ $wwff = 0;
<td style="text-align: center; vertical-align: middle;" class='cq_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->cq == 1) {echo 'checked'; $cq++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='dok_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->dok == 1) {echo 'checked'; $dok++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='dxcc_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->dxcc == 1) {echo 'checked'; $dxcc++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='helvetia_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->helvetia == 1) {echo 'checked'; $helvetia++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='iota_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->iota == 1) {echo 'checked'; $iota++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='pota_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->pota == 1) {echo 'checked'; $pota++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='sig_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->sig == 1) {echo 'checked'; $sig++;}?>></td>
@@ -103,6 +106,7 @@ $wwff = 0;
<th class="master_cq"><input type="checkbox" <?php if ($cq > 0) echo 'checked';?>></th>
<th class="master_dok"><input type="checkbox" <?php if ($dok > 0) echo 'checked';?>></th>
<th class="master_dxcc"><input type="checkbox" <?php if ($dxcc > 0) echo 'checked';?>></th>
<th class="master_helvetia"><input type="checkbox" <?php if ($helvetia > 0) echo 'checked';?>></th>
<th class="master_iota"><input type="checkbox" <?php if ($iota > 0) echo 'checked';?>></th>
<th class="master_pota"><input type="checkbox" <?php if ($pota > 0) echo 'checked';?>></th>
<th class="master_sig"><input type="checkbox" <?php if ($sig > 0) echo 'checked';?>></th>

View File

@@ -48,7 +48,7 @@
<script type="text/javascript" src="<?php echo base_url() ;?>assets/js/sections/eqslcharcounter.js"></script>
<script type="text/javascript" src="<?php echo base_url() ;?>assets/js/sections/version_dialog.js"></script>
<script src="https://unpkg.com/htmx.org@1.6.1"></script>
<script src="<?php echo base_url(); ?>assets/js/htmx.min.js"></script>
<script>
// Reinitialize tooltips after new content has been loaded
@@ -1930,7 +1930,50 @@ $(document).ready(function(){
$(".buttons-csv").css("color", "white");
}
</script>
<?php } ?>
<?php } ?>
<?php if ($this->uri->segment(2) == "helvetia") { ?>
<script>
$('.tablehelvetia').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
'csv'
]
});
$('.tablesummary').DataTable({
info: false,
searching: false,
ordering: false,
"paging": false,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
"language": {
url: getDataTablesLanguageUrl(),
},
buttons: [
'csv'
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
</script>
<?php } ?>
<?php if ($this->uri->segment(2) == "vucc_band") { ?>
<script>

View File

@@ -143,6 +143,8 @@
<div class="dropdown-divider"></div>
<li><a class="dropdown-item" href="<?php echo site_url('awards/ffma'); ?>"><i class="fas fa-trophy"></i> <?php echo lang('menu_ffma'); ?></a></li>
<div class="dropdown-divider"></div>
<li><a class="dropdown-item" href="<?php echo site_url('awards/helvetia'); ?>"><i class="fas fa-trophy"></i> H26</a></li>
<div class="dropdown-divider"></div>
<li><a class="dropdown-item" href="<?php echo site_url('awards/iota'); ?>"><i class="fas fa-trophy"></i> <?php echo lang('menu_iota'); ?></a></li>
<div class="dropdown-divider"></div>
<li><a class="dropdown-item dropdown-toggle" data-bs-toggle="dropdown" href="#"><i class="fas fa-trophy"></i> <?php echo lang('menu_gridmaster'); ?></a>

View File

@@ -0,0 +1,86 @@
<form method="post" class="d-flex align-items-center">
<select id="editColumn" name="type" class="form-select w-auto me-2">
<option value="cqz">CQ Zone</option>
<option value="dxcc">DXCC</option>
<option value="iota">IOTA</option>
<option value="was">US State</option>
<option value="propagation">Propagation</option>
</select>
<div>&nbsp;</div>
<input style="display:none" class="form-control input-group-sm w-auto" id="quicklookuptext" type="text" name="searchfield" placeholder="" aria-label="Search">
<!-- CQ Zone -->
<select class="form-select w-auto" id="editCqz" name="cqz" required>
<?php
for ($i = 1; $i <= 40; $i++) {
echo '<option value="' . $i . '">' . $i . '</option>';
}
?>
</select>
<select style="display:none" class="form-select w-auto" id="editDxcc" name="dxcc" required>
</select>
<select style="display:none" class="form-select w-auto" id="editPropagation" name="propagation" required>
</select>
<select style="display:none" class="form-select w-auto" id="editState" name="was">
<option value="AL">Alabama (AL)</option>
<option value="AK">Alaska (AK)</option>
<option value="AZ">Arizona (AZ)</option>
<option value="AR">Arkansas (AR)</option>
<option value="CA">California (CA)</option>
<option value="CO">Colorado (CO)</option>
<option value="CT">Connecticut (CT)</option>
<option value="DE">Delaware (DE)</option>
<option value="DC">District Of Columbia (DC)</option>
<option value="FL">Florida (FL)</option>
<option value="GA">Georgia (GA)</option>
<option value="HI">Hawaii (HI)</option>
<option value="ID">Idaho (ID)</option>
<option value="IL">Illinois (IL)</option>
<option value="IN">Indiana (IN)</option>
<option value="IA">Iowa (IA)</option>
<option value="KS">Kansas (KS)</option>
<option value="KY">Kentucky (KY)</option>
<option value="LA">Louisiana (LA)</option>
<option value="ME">Maine (ME)</option>
<option value="MD">Maryland (MD)</option>
<option value="MA">Massachusetts (MA)</option>
<option value="MI">Michigan (MI)</option>
<option value="MN">Minnesota (MN)</option>
<option value="MS">Mississippi (MS)</option>
<option value="MO">Missouri (MO)</option>
<option value="MT">Montana (MT)</option>
<option value="NE">Nebraska (NE)</option>
<option value="NV">Nevada (NV)</option>
<option value="NH">New Hampshire (NH)</option>
<option value="NJ">New Jersey (NJ)</option>
<option value="NM">New Mexico (NM)</option>
<option value="NY">New York (NY)</option>
<option value="NC">North Carolina (NC)</option>
<option value="ND">North Dakota (ND)</option>
<option value="OH">Ohio (OH)</option>
<option value="OK">Oklahoma (OK)</option>
<option value="OR">Oregon (OR)</option>
<option value="PA">Pennsylvania (PA)</option>
<option value="RI">Rhode Island (RI)</option>
<option value="SC">South Carolina (SC)</option>
<option value="SD">South Dakota (SD)</option>
<option value="TN">Tennessee (TN)</option>
<option value="TX">Texas (TX)</option>
<option value="UT">Utah (UT)</option>
<option value="VT">Vermont (VT)</option>
<option value="VA">Virginia (VA)</option>
<option value="WA">Washington (WA)</option>
<option value="WV">West Virginia (WV)</option>
<option value="WI">Wisconsin (WI)</option>
<option value="WY">Wyoming (WY)</option>
</select>
<select style="display:none" class="form-select w-auto" id="editIota" name="iota_ref">
</select>
</form>

View File

@@ -417,6 +417,7 @@ $options = json_decode($options);
</select>
<button type="submit" class="btn btn-sm btn-primary me-1 ld-ext-right" id="searchButton"><?php echo lang('filter_search'); ?><div class="ld ld-ring ld-spin"></div></button>
<button type="button" class="btn btn-sm btn-primary me-1 ld-ext-right" id="dupeButton"><?php echo lang('filter_dupes'); ?><div class="ld ld-ring ld-spin"></div></button>
<button type="button" class="btn btn-sm btn-primary me-1 ld-ext-right" id="editButton">Edit<div class="ld ld-ring ld-spin"></div></button>
<button type="button" class="btn btn-sm btn-primary me-1 ld-ext-right" id="mapButton" onclick="mapQsos(this.form);"><?php echo lang('filter_map'); ?><div class="ld ld-ring ld-spin"></div></button>
<button type="options" class="btn btn-sm btn-primary me-1" id="optionButton"><?php echo lang('filter_options'); ?></button>
<button type="reset" class="btn btn-sm btn-danger me-1" id="resetButton"><?php echo lang('filter_reset'); ?></button>

View File

@@ -8,7 +8,7 @@
<script type="text/javascript" src="<?php echo base_url() ;?>assets/js/darkmodehelpers.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrapdialog/js/bootstrap-dialog.min.js"></script>
<script type="text/javascript" src="<?php echo base_url() ;?>assets/js/easyprint.js"></script>
<script src="https://unpkg.com/htmx.org@1.6.1"></script>
<script src="<?php echo base_url(); ?>assets/js/htmx.min.js"></script>
<script type="text/javascript">
/*

1
assets/js/htmx.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -25,6 +25,10 @@
user-select: none;
-webkit-user-drag: none;
}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
image-rendering: -webkit-optimize-contrast;
@@ -41,7 +45,10 @@
}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg,
.leaflet-container .leaflet-overlay-pane svg {
max-width: none !important;
max-height: none !important;
}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
@@ -49,8 +56,15 @@
.leaflet-container .leaflet-tile {
max-width: none !important;
max-height: none !important;
width: auto;
padding: 0;
}
.leaflet-container img.leaflet-tile {
/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
mix-blend-mode: plus-lighter;
}
.leaflet-container.leaflet-touch-zoom {
-ms-touch-action: pan-x pan-y;
touch-action: pan-x pan-y;
@@ -162,9 +176,6 @@
/* zoom and fade animations */
.leaflet-fade-anim .leaflet-tile {
will-change: opacity;
}
.leaflet-fade-anim .leaflet-popup {
opacity: 0;
-webkit-transition: opacity 0.2s linear;
@@ -179,9 +190,10 @@
-ms-transform-origin: 0 0;
transform-origin: 0 0;
}
.leaflet-zoom-anim .leaflet-zoom-animated {
svg.leaflet-zoom-animated {
will-change: transform;
}
}
.leaflet-zoom-anim .leaflet-zoom-animated {
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
@@ -237,7 +249,8 @@
.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive {
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
@@ -246,14 +259,11 @@
.leaflet-container {
background: #ddd;
outline: 0;
outline-offset: 1px;
}
.leaflet-container a {
color: #0078A8;
}
.leaflet-container a.leaflet-active {
outline: 2px solid orange;
}
.leaflet-zoom-box {
border: 2px dotted #38f;
background: rgba(255,255,255,0.5);
@@ -262,7 +272,10 @@
/* general typography */
.leaflet-container {
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
font-size: 12px;
font-size: 0.75rem;
line-height: 1.5;
}
@@ -272,8 +285,7 @@
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
border-radius: 4px;
}
.leaflet-bar a,
.leaflet-bar a:hover {
.leaflet-bar a {
background-color: #fff;
border-bottom: 1px solid #ccc;
width: 26px;
@@ -290,7 +302,8 @@
background-repeat: no-repeat;
display: block;
}
.leaflet-bar a:hover {
.leaflet-bar a:hover,
.leaflet-bar a:focus {
background-color: #f4f4f4;
}
.leaflet-bar a:first-child {
@@ -380,6 +393,8 @@
}
.leaflet-control-layers label {
display: block;
font-size: 13px;
font-size: 1.08333em;
}
.leaflet-control-layers-separator {
height: 0;
@@ -388,7 +403,7 @@
}
/* Default icon URLs */
.leaflet-default-icon-path {
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
background-image: url(images/marker-icon.png);
}
@@ -397,23 +412,27 @@
.leaflet-container .leaflet-control-attribution {
background: #fff;
background: rgba(255, 255, 255, 0.7);
background: rgba(255, 255, 255, 0.8);
margin: 0;
}
.leaflet-control-attribution,
.leaflet-control-scale-line {
padding: 0 5px;
color: #333;
line-height: 1.4;
}
.leaflet-control-attribution a {
text-decoration: none;
}
.leaflet-control-attribution a:hover {
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
text-decoration: underline;
}
.leaflet-container .leaflet-control-attribution,
.leaflet-container .leaflet-control-scale {
font-size: 11px;
.leaflet-attribution-flag {
display: inline !important;
vertical-align: baseline !important;
width: 1em;
height: 0.6669em;
}
.leaflet-left .leaflet-control-scale {
margin-left: 5px;
@@ -426,14 +445,11 @@
border-top: none;
line-height: 1.1;
padding: 2px 5px 1px;
font-size: 11px;
white-space: nowrap;
overflow: hidden;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: #fff;
background: rgba(255, 255, 255, 0.5);
background: rgba(255, 255, 255, 0.8);
text-shadow: 1px 1px #fff;
}
.leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777;
@@ -469,17 +485,22 @@
border-radius: 12px;
}
.leaflet-popup-content {
margin: 13px 19px;
line-height: 1.4;
margin: 13px 24px 13px 20px;
line-height: 1.3;
font-size: 13px;
font-size: 1.08333em;
min-height: 1px;
}
.leaflet-popup-content p {
margin: 18px 0;
margin: 17px 0;
margin: 1.3em 0;
}
.leaflet-popup-tip-container {
width: 40px;
height: 20px;
position: absolute;
left: 50%;
margin-top: -1px;
margin-left: -20px;
overflow: hidden;
pointer-events: none;
@@ -490,6 +511,7 @@
padding: 1px;
margin: -10px auto 0;
pointer-events: auto;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
@@ -506,28 +528,25 @@
position: absolute;
top: 0;
right: 0;
padding: 4px 4px 0 0;
border: none;
text-align: center;
width: 18px;
height: 14px;
font: 16px/14px Tahoma, Verdana, sans-serif;
color: #c3c3c3;
width: 24px;
height: 24px;
font: 16px/24px Tahoma, Verdana, sans-serif;
color: #757575;
text-decoration: none;
font-weight: bold;
background: transparent;
}
.leaflet-container a.leaflet-popup-close-button:hover {
color: #999;
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
color: #585858;
}
.leaflet-popup-scrolled {
overflow: auto;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
}
.leaflet-oldie .leaflet-popup-content-wrapper {
zoom: 1;
-ms-zoom: 1;
}
.leaflet-oldie .leaflet-popup-tip {
width: 24px;
@@ -536,9 +555,6 @@
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
}
.leaflet-oldie .leaflet-popup-tip-container {
margin-top: -1px;
}
.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
@@ -573,7 +589,7 @@
pointer-events: none;
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.leaflet-tooltip.leaflet-clickable {
.leaflet-tooltip.leaflet-interactive {
cursor: pointer;
pointer-events: auto;
}
@@ -633,3 +649,13 @@
margin-left: -12px;
border-right-color: #fff;
}
/* Printing */
@media print {
/* Prevent printers from removing background-images of controls. */
.leaflet-control {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -213,6 +213,7 @@ function saveBand(id) {
'cq': $(".cq_"+id+" input[type='checkbox']").is(":checked"),
'dok': $(".dok_"+id+" input[type='checkbox']").is(":checked"),
'dxcc': $(".dxcc_"+id+" input[type='checkbox']").is(":checked"),
'helvetia': $(".helvetia_"+id+" input[type='checkbox']").is(":checked"),
'iota': $(".iota_"+id+" input[type='checkbox']").is(":checked"),
'pota': $(".pota_"+id+" input[type='checkbox']").is(":checked"),
'sig': $(".sig_"+id+" input[type='checkbox']").is(":checked"),

View File

@@ -0,0 +1,202 @@
var osmUrl = tileUrl;
var province;
var geojson;
var map;
var info;
var clickmarkers = [];
const states = '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';
var statearray = states.split(",");
function load_helvetia_map() {
$('.nav-tabs a[href="#helvetiamaptab"]').tab('show');
$.ajax({
url: base_url + 'index.php/awards/helvetia_map',
type: 'post',
data: {
band: $('#band2').val(),
mode: $('#mode').val(),
worked: +$('#worked').prop('checked'),
confirmed: +$('#confirmed').prop('checked'),
notworked: +$('#notworked').prop('checked'),
qsl: +$('#qsl').prop('checked'),
eqsl: +$('#eqsl').prop('checked'),
lotw: +$('#lotw').prop('checked'),
qrz: +$('#qrz').prop('checked'),
},
success: function(data) {
province = data;
load_helvetia_map2(data);
},
error: function() {
},
});
}
function load_helvetia_map2(data) {
// If map is already initialized
var container = L.DomUtil.get('helvetiamap');
if(container != null){
container._leaflet_id = null;
container.remove();
$("#helvetiamaptab").append('<div id="helvetiamap"></div>');
}
map = new L.Map('helvetiamap', {
fullscreenControl: true,
fullscreenControlOptions: {
position: 'topleft'
},
});
L.tileLayer(
osmUrl,
{
attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
maxZoom: 18
}
).addTo(map);
var notworked = mapcoordinates.features.length;
var confirmed = 0;
var workednotconfirmed = 0;
for(var k in data) {
var mapColor = 'red';
if (data[k] == 'C') {
mapColor = 'green';
confirmed++;
notworked--;
}
if (data[k] == 'W') {
mapColor = 'orange';
workednotconfirmed++;
notworked--;
}
}
/*Legend specific*/
var legend = L.control({ position: "topright" });
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += "<h4>" + lang_general_word_colors + "</h4>";
div.innerHTML += "<i style='background: green'></i><span>" + lang_general_word_confirmed + " (" + confirmed + ")</span><br>";
div.innerHTML += "<i style='background: orange'></i><span>" + lang_general_word_worked_not_confirmed + " (" + workednotconfirmed + ")</span><br>";
div.innerHTML += "<i style='background: red'></i><span>" + lang_general_word_not_worked + " (" + notworked + ")</span><br>";
return div;
};
legend.addTo(map);
info = L.control();
info.onAdd = function (map) {
this._div = L.DomUtil.create('div', 'info'); // create a div with a class "info"
this.update();
return this._div;
};
// method that we will use to update the control based on feature properties passed
info.update = function (props) {
this._div.innerHTML = '<h4>Kanton</h4>' + (props ? '<b>' + props.kan_code + ' - ' + props.kan_name + '</b><br />' : 'Hover over a kanton');
};
info.addTo(map);
geojson = L.geoJSON (mapcoordinates, {
style: style,
onEachFeature: onEachFeature,
}).addTo(map);
map.setView([46.8, 8.4], 8);
//addMarkers();
map.on('zoomed', function() {
clearMarkers();
addMarkers();
});
var layerControl = new L.Control.Layers(null, { 'Gridsquares': maidenhead = L.maidenhead() }).addTo(map);
maidenhead.addTo(map);
}
function createMarker(i) {
var title = '<span class="grid-text" style="cursor: default"><font style="color: \'white\'; font-size: 1em; font-weight: 900;">' + (i.properties.kan_code) + '</font></span>';
var myIcon = L.divIcon({className: 'my-div-icon', html: title});
var marker = L.marker(
[i.properties.geo_point_2d.lat, i.properties.geo_point_2d.lon], {
icon: myIcon,
title: i.properties.kan_code,
zIndex: 1000,
}
).addTo(map).on('click', onClick2);
clickmarkers.push(marker);
}
function getColor(d) {
return province[d] == 'C' ? 'green' :
province[d] == 'W' ? 'orange' :
'red';
}
function highlightFeature(e) {
var layer = e.target;
layer.setStyle({
weight: 3,
color: 'white',
dashArray: '',
fillOpacity: 0.8
});
layer.bringToFront();
info.update(layer.feature.properties);
}
function onEachFeature(feature, layer) {
layer.on({
mouseover: highlightFeature,
mouseout: resetHighlight,
click: onClick
});
createMarker(feature);
}
function zoomToFeature(e) {
map.fitBounds(e.target.getBounds());
}
function resetHighlight(e) {
geojson.resetStyle(e.target);
info.update();
}
function style(feature) {
return {
fillColor: getColor(feature.properties.kan_code),
weight: 1,
opacity: 1,
color: 'white',
// dashArray: '3',
fillOpacity: 0.6
};
}
function onClick(e) {
var marker = e.target;
displayContactsOnMap($("#helvetiamap"),marker.feature.properties.kan_code[0], $('#band2').val(), $('#mode').val(), 'helvetia');
}
function onClick2(e) {
var marker = e.target;
displayContactsOnMap($("#helvetiamap"), marker.options.title[0], $('#band2').val(), $('#mode').val(), 'helvetia');
}

File diff suppressed because one or more lines are too long

View File

@@ -1,27 +1,6 @@
var callBookProcessingDialog = null;
var inCallbookProcessing = false;
var inCallbookItemProcessing = false;
var clicklines = [];
var map;
var maidenhead;
var geojson;
var itugeojson;
var zonemarkers = [];
var ituzonemarkers = [];
var nightlayer;
var defaultlinecolor = 'blue';
if (isDarkModeTheme()) {
defaultlinecolor = 'red';
}
var iconsList = { 'qso': { 'color': defaultlinecolor, 'icon': 'fas fa-dot-circle', 'iconSize': [5, 5] }, 'qsoconfirm': { 'color': defaultlinecolor, 'icon': 'fas fa-dot-circle', 'iconSize': [5, 5] } };
var stationIcon = L.divIcon({ className: 'cspot_station', iconSize: [5, 5], iconAnchor: [5, 5]});
var qsoIcon = L.divIcon({ className: 'cspot_qso', iconSize: [5, 5], iconAnchor: [5, 5] }); //default (fas fa-dot-circle red)
var qsoconfirmIcon = L.divIcon({ className: 'cspot_qsoconfirm', iconSize: [5, 5], iconAnchor: [5, 5] });
var redIconImg = L.icon({ iconUrl: icon_dot_url, iconSize: [5, 5] }); // old //
$('#band').change(function () {
var band = $("#band option:selected").text();
@@ -52,7 +31,7 @@ function updateRow(qso) {
cells.eq(c++).text(qso.de);
}
if (user_options.dx.show == "true"){
cells.eq(c++).html('<span class="qso_call"><a id="edit_qso" href="javascript:displayQso('+qso.qsoID+')"><span id="dx">'+qso.dx+'</span></a><span class="qso_icons">' + (qso.callsign == '' ? '' : ' <a href="https://lotw.arrl.org/lotwuser/act?act='+qso.callsign+'" target="_blank"><small id="lotw_info" class="badge bg-success'+qso.lotw_hint+'" data-bs-toggle="tooltip" title="LoTW User. Last upload was ' + qso.lastupload + '">L</small></a>') + ' <a target="_blank" href="https://www.qrz.com/db/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/qrz.png" alt="Lookup ' + qso.dx + ' on QRZ.com"></a> <a target="_blank" href="https://www.hamqth.com/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/hamqth.png" alt="Lookup ' + qso.dx + ' on HamQTH"></a> <a target="_blank" href="https://www.hamqth.com/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/hamqth.png" alt="Lookup ' + qso.dx + ' on HamQTH"></a> <a target="_blank" href="https://clublog.org/logsearch.php?log='+qso.dx+'&call='+qso.de+'"><img width="16" height="16" src="'+base_url+'images/icons/clublog.png" alt="Clublog Log Search"></a></span></span>');
cells.eq(c++).html('<span class="qso_call"><a id="edit_qso" href="javascript:displayQso('+qso.qsoID+')"><span id="dx">'+qso.dx+'</span></a><span class="qso_icons">' + (qso.callsign == '' ? '' : ' <a href="https://lotw.arrl.org/lotwuser/act?act='+qso.callsign+'" target="_blank"><small id="lotw_info" class="badge bg-success'+qso.lotw_hint+'" data-bs-toggle="tooltip" title="LoTW User. Last upload was ' + qso.lastupload + '">L</small></a>') + ' <a target="_blank" href="https://www.qrz.com/db/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/qrz.png" alt="Lookup ' + qso.dx + ' on QRZ.com"></a> <a target="_blank" href="https://www.hamqth.com/'+qso.dx+'"><img width="16" height="16" src="'+base_url+ 'images/icons/hamqth.png" alt="Lookup ' + qso.dx + ' on HamQTH"></a> <a target="_blank" href="https://clublog.org/logsearch.php?log='+qso.dx+'&call='+qso.de+'"><img width="16" height="16" src="'+base_url+'images/icons/clublog.png" alt="Clublog Log Search"></a></span></span>');
}
if (user_options.mode.show == "true"){
cells.eq(c++).text(qso.mode);
@@ -542,6 +521,10 @@ $(document).ready(function () {
dupeSearch();
});
$('#editButton').click(function (event) {
editQsos();
});
$('#optionButton').click(function (event) {
$('#optionButton').prop("disabled", true);
$.ajax({
@@ -852,615 +835,46 @@ function printlabel() {
});
}
function mapQsos(form) {
$('#mapButton').prop("disabled", true).addClass("running");
var id_list=[];
var elements = $('#qsoList tbody input:checked');
var nElements = elements.length;
elements.each(function() {
let id = $(this).first().closest('tr').data('qsoID')
id_list.push(id);
unselectQsoID(id);
});
$("#qsoList").attr("Hidden", true);
$("#qsoList_wrapper").attr("Hidden", true);
$("#qsoList_info").attr("Hidden", true);
amap = $('#advancedmap').val();
if (amap == undefined) {
$(".qso_manager").append('<div id="advancedmap" class="map-leaflet"></div>');
}
if (id_list.length > 0) {
$.ajax({
url: base_url + 'index.php/logbookadvanced/mapSelectedQsos',
type: 'post',
data: {
ids: id_list,
de: form.de.value
},
success: function(data) {
loadMapOptions(data);
},
error: function() {
$('#mapButton').prop("disabled", false).removeClass("running");
},
});
} else {
$.ajax({
url: base_url + 'index.php/logbookadvanced/mapQsos',
type: 'post',
data: {
dateFrom: form.dateFrom.value,
dateTo: form.dateTo.value,
de: form.de.value,
dx: form.dx.value,
mode: form.mode.value,
band: form.band.value,
qslSent: form.qslSent.value,
qslReceived: form.qslReceived.value,
qslSentMethod: this.qslSentMethod.value,
qslReceivedMethod: this.qslReceivedMethod.value,
iota: form.iota.value,
dxcc: form.dxcc.value,
propmode: form.selectPropagation.value,
gridsquare: form.gridsquare.value,
state: form.state.value,
qsoresults: form.qsoResults.value,
sats: form.sats.value,
cqzone: form.cqzone.value,
lotwSent: form.lotwSent.value,
lotwReceived: form.lotwReceived.value,
eqslSent: form.eqslSent.value,
eqslReceived: form.eqslReceived.value,
qslvia: $('[name="qslviainput"]').val(),
sota: form.sota.value,
pota: form.pota.value,
operator: form.operator.value,
wwff: form.wwff.value,
qslimages: form.qslimages.value,
},
success: function(data) {
loadMapOptions(data);
},
error: function() {
$('#mapButton').prop("disabled", false).removeClass("running");
},
});
}
};
function loadMapOptions(data) {
function saveOptions() {
$('#saveButton').prop("disabled", true);
$('#closeButton').prop("disabled", true);
$.ajax({
url: base_url + 'index.php/user_options/get_map_custom',
type: 'GET',
dataType: 'json',
error: function () {
},
success: function (json_mapinfo) {
if (typeof json_mapinfo.qso !== "undefined") {
iconsList = json_mapinfo;
}
loadMap(data, iconsList)
}
});
}
function loadMap(data, iconsList) {
$('#mapButton').prop("disabled", false).removeClass("running");
var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
// If map is already initialized
var container = L.DomUtil.get('advancedmap');
var bounds = L.latLngBounds()
if(container != null){
container._leaflet_id = null;
container.remove();
$(".coordinates").remove();
$(".qso_manager").append('<div id="advancedmap" class="map-leaflet"></div>');
$(".qso_manager").append('<div class="coordinates d-flex">' +
'<div class="cohidden">' + lang_gen_hamradio_latitude + '&nbsp;</div>' +
'<div class="cohidden col-auto text-success fw-bold" id="latDeg"></div>' +
'<div class="cohidden">' + lang_gen_hamradio_longitude + '&nbsp;</div>' +
'<div class="cohidden col-auto text-success fw-bold" id="lngDeg"></div>' +
'<div class="cohidden">' + lang_gen_hamradio_gridsquare + '&nbsp;</div>' +
'<div class="cohidden col-auto text-success fw-bold" id="locator"></div>' +
'<div class="cohidden">' + lang_gen_hamradio_distance + '&nbsp;</div>' +
'<div class="cohidden col-auto text-success fw-bold" id="distance"></div>' +
'<div class="cohidden">' + lang_gen_hamradio_bearing + '&nbsp;</div>' +
'<div class="cohidden col-auto text-success fw-bold" id="bearing"></div>' +
'</div>');
$('.cohidden').show();
}
map = new L.Map('advancedmap', {
fullscreenControl: true,
fullscreenControlOptions: {
position: 'topleft'
url: base_url + 'index.php/logbookadvanced/setUserOptions',
type: 'post',
data: {
datetime: $('input[name="datetime"]').is(':checked') ? true : false,
de: $('input[name="de"]').is(':checked') ? true : false,
dx: $('input[name="dx"]').is(':checked') ? true : false,
mode: $('input[name="mode"]').is(':checked') ? true : false,
rsts: $('input[name="rsts"]').is(':checked') ? true : false,
rstr: $('input[name="rstr"]').is(':checked') ? true : false,
band: $('input[name="band"]').is(':checked') ? true : false,
myrefs: $('input[name="myrefs"]').is(':checked') ? true : false,
refs: $('input[name="refs"]').is(':checked') ? true : false,
name: $('input[name="name"]').is(':checked') ? true : false,
qslvia: $('input[name="qslvia"]').is(':checked') ? true : false,
qsl: $('input[name="qsl"]').is(':checked') ? true : false,
lotw: $('input[name="lotw"]').is(':checked') ? true : false,
eqsl: $('input[name="eqsl"]').is(':checked') ? true : false,
qslmsg: $('input[name="qslmsg"]').is(':checked') ? true : false,
dxcc: $('input[name="dxcc"]').is(':checked') ? true : false,
state: $('input[name="state"]').is(':checked') ? true : false,
cqzone: $('input[name="cqzone"]').is(':checked') ? true : false,
iota: $('input[name="iota"]').is(':checked') ? true : false,
pota: $('input[name="pota"]').is(':checked') ? true : false,
operator: $('input[name="operator"]').is(':checked') ? true : false,
gridsquare_layer: $('input[name="gridsquareoverlay"]').is(':checked') ? true : false,
path_lines: $('input[name="pathlines"]').is(':checked') ? true : false,
cqzone_layer: $('input[name="cqzones"]').is(':checked') ? true : false,
ituzone_layer: $('input[name="ituzones"]').is(':checked') ? true : false,
nightshadow_layer: $('input[name="nightshadow"]').is(':checked') ? true : false,
},
success: function(data) {
$('#saveButton').prop("disabled", false);
$('#closeButton').prop("disabled", false);
},
error: function() {
$('#saveButton').prop("disabled", false);
},
});
var osm = L.tileLayer(
osmUrl,
{
attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
maxZoom: 18,
zoom: 3,
minZoom: 2,
}
).addTo(map);
map.setView([30, 0], 1.5);
var redIcon = L.icon({
iconUrl: icon_dot_url,
iconSize: [10, 10], // size of the icon
});
var counter = 0;
clicklines = [];
$.each(data, function(k, v) {
counter++;
// Need to fix so that marker is placed at same place as end of line, but this only needs to be done when longitude is < -170
if (this.latlng2[1] < -170) {
this.latlng2[1] = parseFloat(this.latlng2[1])+360;
}
if (this.latlng1[1] < -170) {
this.latlng1[1] = parseFloat(this.latlng1[1])+360;
}
var popupmessage = createContentMessage(this);
var popupmessage2 = createContentMessageDx(this);
var marker = L.marker([this.latlng1[0], this.latlng1[1]], {icon: stationIcon}, {closeOnClick: false, autoClose: false}).addTo(map).bindPopup(popupmessage);
marker.on('mouseover',function(ev) {
ev.target.openPopup();
});
let lat_lng = [this.latlng1[0], this.latlng1[1]];
bounds.extend(lat_lng);
if (this.confirmed && iconsList.qsoconfirm.icon !== "0") {
var marker2 = L.marker([this.latlng2[0], this.latlng2[1]], {icon: qsoconfirmIcon},{closeOnClick: false, autoClose: false}).addTo(map).bindPopup(popupmessage2);
linecolor = iconsList.qsoconfirm.color;
} else {
var marker2 = L.marker([this.latlng2[0], this.latlng2[1]], {icon: qsoIcon},{closeOnClick: false, autoClose: false}).addTo(map).bindPopup(popupmessage2);
linecolor = iconsList.qso.color;
}
marker2.on('mouseover',function(ev) {
ev.target.openPopup();
});
lat_lng = [this.latlng2[0], this.latlng2[1]];
bounds.extend(lat_lng);
const multiplelines = [];
multiplelines.push(
new L.LatLng(this.latlng1[0], this.latlng1[1]),
new L.LatLng(this.latlng2[0], this.latlng2[1])
)
const geodesic = L.geodesic(multiplelines, {
weight: 1,
opacity: 1,
color: linecolor,
wrap: false,
steps: 100
}).addTo(map);
clicklines.push(geodesic);
});
/*Legend specific*/
var legend = L.control({ position: "topright" });
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += '<div>' + counter + " QSOs plotted</div>";
div.innerHTML += '<input type="checkbox" onclick="toggleFunction(this.checked)" ' + (typeof path_lines !== 'undefined' && path_lines ? 'checked' : '') + ' style="outline: none;"><span> Path lines</span><br>';
div.innerHTML += '<input type="checkbox" onclick="toggleGridsquares(this.checked)" ' + (typeof gridsquare_layer !== 'undefined' && gridsquare_layer ? 'checked' : '') + ' style="outline: none;"><span> Gridsquares</span><br>';
div.innerHTML += '<input type="checkbox" onclick="toggleCqZones(this.checked)" ' + (typeof cqzones_layer !== 'undefined' && cqzones_layer ? 'checked' : '') + ' style="outline: none;"><span> CQ Zones</span><br>';
div.innerHTML += '<input type="checkbox" onclick="toggleItuZones(this.checked)" ' + (typeof ituzones_layer !== 'undefined' && ituzones_layer ? 'checked' : '') + ' style="outline: none;"><span> ITU Zones</span><br>';
div.innerHTML += '<input type="checkbox" onclick="toggleNightShadow(this.checked)" ' + (typeof nightshadow_layer !== 'undefined' && nightshadow_layer ? 'checked' : '') + ' style="outline: none;"><span> Night shadow</span>';
return div;
};
legend.addTo(map);
maidenhead = L.maidenheadqrb().addTo(map);
nightlayer = L.terminator().addTo(map);
map.fitBounds(bounds);
$.each(iconsList, function (icon, data) {
$('#advancedmap' + ' .cspot_' + icon).addClass(data.icon).css("color", data.color);
});
var printer = L.easyPrint({
tileLayer: osm,
sizeModes: ['Current', 'A4Landscape', 'A4Portrait'],
filename: 'Wavelog',
exportOnly: true,
hideControlContainer: true
}).addTo(map);
map.on('mousemove', onMapMove);
if (typeof gridsquare_layer !== 'undefined') {
toggleGridsquares(gridsquare_layer);
} else {
toggleGridsquares(false);
}
if (typeof path_lines !== 'undefined') {
toggleFunction(path_lines);
} else {
toggleFunction(false);
}
if (typeof cqzones_layer !== 'undefined') {
toggleCqZones(cqzones_layer);
} else {
toggleCqZones(false);
}
if (typeof ituzones_layer !== 'undefined') {
toggleItuZones(ituzones_layer);
} else {
toggleItuZones(false);
}
if (typeof nightshadow_layer !== 'undefined') {
toggleNightShadow(nightshadow_layer);
} else {
toggleNightShadow(false);
}
}
function createContentMessage(qso) {
var table = '<table><tbody>' +
'<tr>' +
'<td>' +
'Station callsign: ' + qso.mycallsign +
"</td></tr>" +
'<tr>' +
'<td>' +
'Gridsquare: ' + qso.mygridsquare +
"</td></tr>";
return (table += "</tbody></table>");
}
function createContentMessageDx(qso) {
var table = '<table><tbody>' +
'<tr>' +
'<td>Callsign</td>' +
'<td>' + qso.callsign + '</td>' +
'</tr>' +
'<tr>' +
'<td>Date/time</td>' +
'<td>' + qso.datetime + '</td>' +
'</tr>' +
'<tr>';
if (qso.satname != "") {
table += '<td>Band</td>' +
'<td>' + qso.satname + '</td>' +
'</tr>' +
'<tr>';
} else {
table += '<td>Band</td>' +
'<td>' + qso.band + '</td>' +
'</tr>' +
'<tr>';
}
table += '<td>Mode</td>' +
'<td>' + qso.mode + '</td>' +
'</tr>' +
'<tr>';
if (qso.gridsquare != undefined) {
table += '<td>Gridsquare</td>' +
'<td>' + qso.gridsquare + '</td>' +
'</tr>';
}
if (qso.distance != undefined) {
table += '<td>Distance</td>' +
'<td>' + qso.distance + '</td>' +
'</tr>';
}
if (qso.bearing != undefined) {
table += '<td>Bearing</td>' +
'<td>' + qso.bearing + '</td>' +
'</tr>';
}
return (table += '</tbody></table>');
}
function saveOptions() {
$('#saveButton').prop("disabled", true);
$('#closeButton').prop("disabled", true);
$.ajax({
url: base_url + 'index.php/logbookadvanced/setUserOptions',
type: 'post',
data: {
datetime: $('input[name="datetime"]').is(':checked') ? true : false,
de: $('input[name="de"]').is(':checked') ? true : false,
dx: $('input[name="dx"]').is(':checked') ? true : false,
mode: $('input[name="mode"]').is(':checked') ? true : false,
rsts: $('input[name="rsts"]').is(':checked') ? true : false,
rstr: $('input[name="rstr"]').is(':checked') ? true : false,
band: $('input[name="band"]').is(':checked') ? true : false,
myrefs: $('input[name="myrefs"]').is(':checked') ? true : false,
refs: $('input[name="refs"]').is(':checked') ? true : false,
name: $('input[name="name"]').is(':checked') ? true : false,
qslvia: $('input[name="qslvia"]').is(':checked') ? true : false,
qsl: $('input[name="qsl"]').is(':checked') ? true : false,
lotw: $('input[name="lotw"]').is(':checked') ? true : false,
eqsl: $('input[name="eqsl"]').is(':checked') ? true : false,
qslmsg: $('input[name="qslmsg"]').is(':checked') ? true : false,
dxcc: $('input[name="dxcc"]').is(':checked') ? true : false,
state: $('input[name="state"]').is(':checked') ? true : false,
cqzone: $('input[name="cqzone"]').is(':checked') ? true : false,
iota: $('input[name="iota"]').is(':checked') ? true : false,
pota: $('input[name="pota"]').is(':checked') ? true : false,
operator: $('input[name="operator"]').is(':checked') ? true : false,
gridsquare_layer: $('input[name="gridsquareoverlay"]').is(':checked') ? true : false,
path_lines: $('input[name="pathlines"]').is(':checked') ? true : false,
cqzone_layer: $('input[name="cqzones"]').is(':checked') ? true : false,
ituzone_layer: $('input[name="ituzones"]').is(':checked') ? true : false,
nightshadow_layer: $('input[name="nightshadow"]').is(':checked') ? true : false,
},
success: function(data) {
$('#saveButton').prop("disabled", false);
$('#closeButton').prop("disabled", false);
},
error: function() {
$('#saveButton').prop("disabled", false);
},
});
}
function toggleFunction(bool) {
if(bool) {
addLines();
} else {
clearLines();
}
};
function toggleGridsquares(bool) {
if(!bool) {
map.removeLayer(maidenhead);
} else {
maidenhead.addTo(map);
}
};
const cqzonenames = [
[ "75", "-140" ],
[ "70", "-82.5" ],
[ "45", "-125" ],
[ "45", "-100" ],
[ "45", "-65" ],
[ "25.5", "-115" ],
[ "14.5", "-90" ],
[ "22", "-60" ],
[ "11.5", "-70" ],
[ "-5", "-100" ],
[ "-9", "-45" ],
[ "-45", "-106" ],
[ "-45", "-55" ],
[ "52", "-14" ],
[ "46", "11" ],
[ "60", "35" ],
[ "55", "65" ],
[ "70", "90" ],
[ "70", "150" ],
[ "42", "29" ],
[ "28", "53" ],
[ "6", "75" ],
[ "44", "93" ],
[ "33", "110" ],
[ "38", "134" ],
[ "16", "100" ],
[ "15", "140" ],
[ "0", "125" ],
[ "-25", "115" ],
[ "-25", "145" ],
[ "15", "-165" ],
[ "-25", "-165" ],
[ "32", "-26" ],
[ "25", "25.5" ],
[ "15", "-6" ],
[ "-5", "-6" ],
[ "6", "51" ],
[ "-45", "8" ],
[ "-25", "55"],
[ "78", "-10"],
];
const ituzonenames = [
["60","-160"],
["55","-125"],
["55","-100"],
["55","-78"],
["73","-40"],
["40","-119"],
["40","-100"],
["40","-80"],
["55","-60"],
["20","-102"],
["21","-75"],
["-3","-72"],
["-5","-45"],
["-30","-65"],
["-25","-45"],
["-50","-65"],
["61","-26"],
["70","10"],
["70","40"],
["70","62.5"],
["70","82.5"],
["70","100"],
["70","122.5"],
["70","142.5"],
["70","162.5"],
["70","180"],
["52","2"],
["45","18"],
["53","36"],
["53","62.5"],
["53","82.5"],
["53","100"],
["53","122.5"],
["53","142"],
["55","160"],
["35","-25"],
["35","0"],
["27.5","22.5"],
["27","42"],
["32","56"],
["10","75"],
["39","82.5"],
["33","100"],
["33","118"],
["33","140"],
["15","-10"],
["12.5","22"],
["5","40"],
["15","100"],
["10","120"],
["-4","150"],
["-7","17"],
["-12.5","45"],
["-2","115"],
["-20","140"],
["-20","170"],
["-30","24"],
["-25","120"],
["-40","140"],
["-40","170"],
["15","-170"],
["-15","-170"],
["-15","-135"],
["10","140"],
["10","162"],
["-23","-11"],
["-70","10"],
["-47.5","60"],
["-70","70"],
["-70","130"],
["-70","-170"],
["-70","-110"],
["-70","-050"],
["-82.5","0"],
["82.5","0"],
["40","-150"],
["15","-135"],
["-15","-95"],
["-40","-160"],
["-40","-125"],
["-40","-90"],
["50","-30"],
["25","-47.5"],
["-45","-40"],
["-45","10"],
["-25","70"],
["-25","95"],
["-50","95"],
["-54","140"],
["39","165"]
];
function toggleCqZones(bool) {
if(!bool) {
zonemarkers.forEach(function (item) {
map.removeLayer(item);
});
if (geojson != undefined) {
map.removeLayer(geojson);
}
} else {
geojson = L.geoJson(zonestuff, {style: style}).addTo(map);
for (var i = 0; i < cqzonenames.length; i++) {
var title = '<span class="grid-text" style="cursor: default"><font style="color: \'white\'; font-size: 1.5em; font-weight: 900;">' + (Number(i)+Number(1)) + '</font></span>';
var myIcon = L.divIcon({className: 'my-div-icon', html: title});
var marker = L.marker(
[cqzonenames[i][0], cqzonenames[i][1]], {
icon: myIcon,
title: (Number(i)+Number(1)),
zIndex: 1000,
}
).addTo(map);
zonemarkers.push(marker);
}
}
}
function toggleItuZones(bool) {
if(!bool) {
ituzonemarkers.forEach(function (item) {
map.removeLayer(item);
});
if (itugeojson != undefined) {
map.removeLayer(itugeojson);
}
} else {
itugeojson = L.geoJson(ituzonestuff, {style: style}).addTo(map);
for (var i = 0; i < ituzonenames.length; i++) {
var title = '<span class="grid-text" style="cursor: default"><font style="color: \'white\'; font-size: 1.5em; font-weight: 900;">' + (Number(i)+Number(1)) + '</font></span>';
var myIcon = L.divIcon({className: 'my-div-icon', html: title});
var marker = L.marker(
[ituzonenames[i][0], ituzonenames[i][1]], {
icon: myIcon,
title: (Number(i)+Number(1)),
zIndex: 1000,
}
).addTo(map);
ituzonemarkers.push(marker);
}
}
}
function toggleNightShadow(bool) {
if(!bool) {
map.removeLayer(nightlayer);
} else {
nightlayer.addTo(map);
}
}
function style(feature) {
var bordercolor = "black";
if (isDarkModeTheme()) {
bordercolor = "white";
}
return {
fillColor: "white",
fillOpacity: 0,
opacity: 0.65,
color: bordercolor,
weight: 1,
};
}
function clearLines() {
clicklines.forEach(function (item) {
map.removeLayer(item);
});
}
function addLines() {
clicklines.forEach(function (item) {
map.addLayer(item);
});
}

View File

@@ -0,0 +1,147 @@
function editQsos() {
var elements = $('#qsoList tbody input:checked');
var nElements = elements.length;
if (nElements == 0) {
return;
}
var id_list=[];
elements.each(function() {
let id = $(this).first().closest('tr').data('qsoID')
id_list.push(id);
});
$('#editButton').prop("disabled", true);
$.ajax({
url: base_url + 'index.php/logbookadvanced/editDialog',
type: 'post',
success: function (html) {
BootstrapDialog.show({
title: 'Batch edit for QSOs',
size: BootstrapDialog.SIZE_NORMAL,
cssClass: 'options',
nl2br: false,
message: html,
onshown: function(dialog) {
$('#editDxcc').html($('#dxcc').html());
$('#editDxcc option[value=""]').remove();
$('#editIota').html($('#iota').html());
$('#editPropagation').html($('#selectPropagation').html());
$('#editPropagation option[value=""]').remove();
var option = $('<option>');
option.val('').text('-');
$('#editPropagation').prepend(option);
$('#editPropagation').val('').trigger('chosen:updated');
$('#editColumn').change(function(){
var type = $('#editColumn').val();
changeEditType(type);
});
},
buttons: [{
label: 'Save',
cssClass: 'btn-primary btn-sm',
id: 'saveButton',
action: function (dialogItself) {
saveBatchEditQsos(id_list);
$('#editButton').prop("disabled", false);
$('#closeButton').prop("disabled", true);
dialogItself.close();
}
},
{
label: lang_admin_close,
cssClass: 'btn-sm',
id: 'closeButton',
action: function (dialogItself) {
$('#editButton').prop("disabled", false);
dialogItself.close();
}
}],
onhide: function(dialogRef){
$('#editButton').prop("disabled", false);
},
});
}
});
}
function saveBatchEditQsos(id_list) {
var column = $("#editColumn").val();
var value;
if (column == 'cqz') {
value = $("#editCqz").val();
}
if (column == 'dxcc') {
value = $("#editDxcc").val();
}
if (column == 'iota') {
value = $("#editIota").val();
}
if (column == 'was') {
value = $("#editState").val();
}
if (column == 'propagation') {
value = $("#editPropagation").val();
}
$.ajax({
url: base_url + 'index.php/logbookadvanced/saveBatchEditQsos',
type: 'post',
data: {
ids: JSON.stringify(id_list, null, 2),
column: column,
value: value
},
success: function (data) {
if (data != []) {
$.each(data, function(k, v) {
updateRow(this);
unselectQsoID(this.qsoID);
});
}
}
});
}
function changeEditType(type) {
if (type == "dxcc") {
$('#editCqz').hide();
$('#editIota').hide();
$('#editDxcc').show();
$('#editState').hide();
$('#editPropagation').hide();
} else if (type == "iota") {
$('#editCqz').hide();
$('#editIota').show();
$('#editDxcc').hide();
$('#editState').hide();
$('#editPropagation').hide();
} else if (type == "vucc" || type == "sota" || type == "wwff") {
$('#editCqz').hide();
$('#editIota').hide();
$('#editDxcc').hide();
$('#editState').hide();
$('#editPropagation').hide();
} else if (type == "cqz") {
$('#editCqz').show();
$('#editIota').hide();
$('#editDxcc').hide();
$('#editState').hide();
$('#editPropagation').hide();
} else if (type == "was") {
$('#editCqz').hide();
$('#editIota').hide();
$('#editDxcc').hide();
$('#editState').show();
$('#editPropagation').hide();
} else if (type == "propagation") {
$('#editCqz').hide();
$('#editIota').hide();
$('#editDxcc').hide();
$('#editState').hide();
$('#editPropagation').show();
}
}

View File

@@ -0,0 +1,590 @@
var clicklines = [];
var map;
var maidenhead;
var geojson;
var itugeojson;
var zonemarkers = [];
var ituzonemarkers = [];
var nightlayer;
var defaultlinecolor = 'blue';
if (isDarkModeTheme()) {
defaultlinecolor = 'red';
}
var iconsList = { 'qso': { 'color': defaultlinecolor, 'icon': 'fas fa-dot-circle', 'iconSize': [5, 5] }, 'qsoconfirm': { 'color': defaultlinecolor, 'icon': 'fas fa-dot-circle', 'iconSize': [5, 5] } };
var stationIcon = L.divIcon({ className: 'cspot_station', iconSize: [5, 5], iconAnchor: [5, 5]});
var qsoIcon = L.divIcon({ className: 'cspot_qso', iconSize: [5, 5], iconAnchor: [5, 5] }); //default (fas fa-dot-circle red)
var qsoconfirmIcon = L.divIcon({ className: 'cspot_qsoconfirm', iconSize: [5, 5], iconAnchor: [5, 5] });
var redIconImg = L.icon({ iconUrl: icon_dot_url, iconSize: [5, 5] }); // old //
function toggleCqZones(bool) {
if(!bool) {
zonemarkers.forEach(function (item) {
map.removeLayer(item);
});
if (geojson != undefined) {
map.removeLayer(geojson);
}
} else {
geojson = L.geoJson(zonestuff, {style: style}).addTo(map);
for (var i = 0; i < cqzonenames.length; i++) {
var title = '<span class="grid-text" style="cursor: default"><font style="color: \'white\'; font-size: 1.5em; font-weight: 900;">' + (Number(i)+Number(1)) + '</font></span>';
var myIcon = L.divIcon({className: 'my-div-icon', html: title});
var marker = L.marker(
[cqzonenames[i][0], cqzonenames[i][1]], {
icon: myIcon,
title: (Number(i)+Number(1)),
zIndex: 1000,
}
).addTo(map);
zonemarkers.push(marker);
}
}
}
function toggleItuZones(bool) {
if(!bool) {
ituzonemarkers.forEach(function (item) {
map.removeLayer(item);
});
if (itugeojson != undefined) {
map.removeLayer(itugeojson);
}
} else {
itugeojson = L.geoJson(ituzonestuff, {style: style}).addTo(map);
for (var i = 0; i < ituzonenames.length; i++) {
var title = '<span class="grid-text" style="cursor: default"><font style="color: \'white\'; font-size: 1.5em; font-weight: 900;">' + (Number(i)+Number(1)) + '</font></span>';
var myIcon = L.divIcon({className: 'my-div-icon', html: title});
var marker = L.marker(
[ituzonenames[i][0], ituzonenames[i][1]], {
icon: myIcon,
title: (Number(i)+Number(1)),
zIndex: 1000,
}
).addTo(map);
ituzonemarkers.push(marker);
}
}
}
function toggleNightShadow(bool) {
if(!bool) {
map.removeLayer(nightlayer);
} else {
nightlayer.addTo(map);
}
}
function style(feature) {
var bordercolor = "black";
if (isDarkModeTheme()) {
bordercolor = "white";
}
return {
fillColor: "white",
fillOpacity: 0,
opacity: 0.65,
color: bordercolor,
weight: 1,
};
}
function clearLines() {
clicklines.forEach(function (item) {
map.removeLayer(item);
});
}
function addLines() {
clicklines.forEach(function (item) {
map.addLayer(item);
});
}
function toggleFunction(bool) {
if(bool) {
addLines();
} else {
clearLines();
}
};
function toggleGridsquares(bool) {
if(!bool) {
map.removeLayer(maidenhead);
} else {
maidenhead.addTo(map);
}
};
const cqzonenames = [
[ "75", "-140" ],
[ "70", "-82.5" ],
[ "45", "-125" ],
[ "45", "-100" ],
[ "45", "-65" ],
[ "25.5", "-115" ],
[ "14.5", "-90" ],
[ "22", "-60" ],
[ "11.5", "-70" ],
[ "-5", "-100" ],
[ "-9", "-45" ],
[ "-45", "-106" ],
[ "-45", "-55" ],
[ "52", "-14" ],
[ "46", "11" ],
[ "60", "35" ],
[ "55", "65" ],
[ "70", "90" ],
[ "70", "150" ],
[ "42", "29" ],
[ "28", "53" ],
[ "6", "75" ],
[ "44", "93" ],
[ "33", "110" ],
[ "38", "134" ],
[ "16", "100" ],
[ "15", "140" ],
[ "0", "125" ],
[ "-25", "115" ],
[ "-25", "145" ],
[ "15", "-165" ],
[ "-25", "-165" ],
[ "32", "-26" ],
[ "25", "25.5" ],
[ "15", "-6" ],
[ "-5", "-6" ],
[ "6", "51" ],
[ "-45", "8" ],
[ "-25", "55"],
[ "78", "-10"],
];
const ituzonenames = [
["60","-160"],
["55","-125"],
["55","-100"],
["55","-78"],
["73","-40"],
["40","-119"],
["40","-100"],
["40","-80"],
["55","-60"],
["20","-102"],
["21","-75"],
["-3","-72"],
["-5","-45"],
["-30","-65"],
["-25","-45"],
["-50","-65"],
["61","-26"],
["70","10"],
["70","40"],
["70","62.5"],
["70","82.5"],
["70","100"],
["70","122.5"],
["70","142.5"],
["70","162.5"],
["70","180"],
["52","2"],
["45","18"],
["53","36"],
["53","62.5"],
["53","82.5"],
["53","100"],
["53","122.5"],
["53","142"],
["55","160"],
["35","-25"],
["35","0"],
["27.5","22.5"],
["27","42"],
["32","56"],
["10","75"],
["39","82.5"],
["33","100"],
["33","118"],
["33","140"],
["15","-10"],
["12.5","22"],
["5","40"],
["15","100"],
["10","120"],
["-4","150"],
["-7","17"],
["-12.5","45"],
["-2","115"],
["-20","140"],
["-20","170"],
["-30","24"],
["-25","120"],
["-40","140"],
["-40","170"],
["15","-170"],
["-15","-170"],
["-15","-135"],
["10","140"],
["10","162"],
["-23","-11"],
["-70","10"],
["-47.5","60"],
["-70","70"],
["-70","130"],
["-70","-170"],
["-70","-110"],
["-70","-050"],
["-82.5","0"],
["82.5","0"],
["40","-150"],
["15","-135"],
["-15","-95"],
["-40","-160"],
["-40","-125"],
["-40","-90"],
["50","-30"],
["25","-47.5"],
["-45","-40"],
["-45","10"],
["-25","70"],
["-25","95"],
["-50","95"],
["-54","140"],
["39","165"]
];
function loadMap(data, iconsList) {
$('#mapButton').prop("disabled", false).removeClass("running");
var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
// If map is already initialized
var container = L.DomUtil.get('advancedmap');
var bounds = L.latLngBounds()
if(container != null){
container._leaflet_id = null;
container.remove();
$(".coordinates").remove();
$(".qso_manager").append('<div id="advancedmap" class="map-leaflet"></div>');
$(".qso_manager").append('<div class="coordinates d-flex">' +
'<div class="cohidden">' + lang_gen_hamradio_latitude + '&nbsp;</div>' +
'<div class="cohidden col-auto text-success fw-bold" id="latDeg"></div>' +
'<div class="cohidden">' + lang_gen_hamradio_longitude + '&nbsp;</div>' +
'<div class="cohidden col-auto text-success fw-bold" id="lngDeg"></div>' +
'<div class="cohidden">' + lang_gen_hamradio_gridsquare + '&nbsp;</div>' +
'<div class="cohidden col-auto text-success fw-bold" id="locator"></div>' +
'<div class="cohidden">' + lang_gen_hamradio_distance + '&nbsp;</div>' +
'<div class="cohidden col-auto text-success fw-bold" id="distance"></div>' +
'<div class="cohidden">' + lang_gen_hamradio_bearing + '&nbsp;</div>' +
'<div class="cohidden col-auto text-success fw-bold" id="bearing"></div>' +
'</div>');
$('.cohidden').show();
}
map = new L.Map('advancedmap', {
fullscreenControl: true,
fullscreenControlOptions: {
position: 'topleft'
},
});
var osm = L.tileLayer(
osmUrl,
{
attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
maxZoom: 18,
zoom: 3,
minZoom: 2,
}
).addTo(map);
map.setView([30, 0], 1.5);
var redIcon = L.icon({
iconUrl: icon_dot_url,
iconSize: [10, 10], // size of the icon
});
var counter = 0;
clicklines = [];
$.each(data, function(k, v) {
counter++;
// Need to fix so that marker is placed at same place as end of line, but this only needs to be done when longitude is < -170
if (this.latlng2[1] < -170) {
this.latlng2[1] = parseFloat(this.latlng2[1])+360;
}
if (this.latlng1[1] < -170) {
this.latlng1[1] = parseFloat(this.latlng1[1])+360;
}
var popupmessage = createContentMessage(this);
var popupmessage2 = createContentMessageDx(this);
var marker = L.marker([this.latlng1[0], this.latlng1[1]], {icon: stationIcon}, {closeOnClick: false, autoClose: false}).addTo(map).bindPopup(popupmessage);
marker.on('mouseover',function(ev) {
ev.target.openPopup();
});
let lat_lng = [this.latlng1[0], this.latlng1[1]];
bounds.extend(lat_lng);
if (this.confirmed && iconsList.qsoconfirm.icon !== "0") {
var marker2 = L.marker([this.latlng2[0], this.latlng2[1]], {icon: qsoconfirmIcon},{closeOnClick: false, autoClose: false}).addTo(map).bindPopup(popupmessage2);
linecolor = iconsList.qsoconfirm.color;
} else {
var marker2 = L.marker([this.latlng2[0], this.latlng2[1]], {icon: qsoIcon},{closeOnClick: false, autoClose: false}).addTo(map).bindPopup(popupmessage2);
linecolor = iconsList.qso.color;
}
marker2.on('mouseover',function(ev) {
ev.target.openPopup();
});
lat_lng = [this.latlng2[0], this.latlng2[1]];
bounds.extend(lat_lng);
const multiplelines = [];
multiplelines.push(
new L.LatLng(this.latlng1[0], this.latlng1[1]),
new L.LatLng(this.latlng2[0], this.latlng2[1])
)
const geodesic = L.geodesic(multiplelines, {
weight: 1,
opacity: 1,
color: linecolor,
wrap: false,
steps: 100
}).addTo(map);
clicklines.push(geodesic);
});
/*Legend specific*/
var legend = L.control({ position: "topright" });
legend.onAdd = function(map) {
var div = L.DomUtil.create("div", "legend");
div.innerHTML += '<div>' + counter + " QSOs plotted</div>";
div.innerHTML += '<input type="checkbox" onclick="toggleFunction(this.checked)" ' + (typeof path_lines !== 'undefined' && path_lines ? 'checked' : '') + ' style="outline: none;"><span> Path lines</span><br>';
div.innerHTML += '<input type="checkbox" onclick="toggleGridsquares(this.checked)" ' + (typeof gridsquare_layer !== 'undefined' && gridsquare_layer ? 'checked' : '') + ' style="outline: none;"><span> Gridsquares</span><br>';
div.innerHTML += '<input type="checkbox" onclick="toggleCqZones(this.checked)" ' + (typeof cqzones_layer !== 'undefined' && cqzones_layer ? 'checked' : '') + ' style="outline: none;"><span> CQ Zones</span><br>';
div.innerHTML += '<input type="checkbox" onclick="toggleItuZones(this.checked)" ' + (typeof ituzones_layer !== 'undefined' && ituzones_layer ? 'checked' : '') + ' style="outline: none;"><span> ITU Zones</span><br>';
div.innerHTML += '<input type="checkbox" onclick="toggleNightShadow(this.checked)" ' + (typeof nightshadow_layer !== 'undefined' && nightshadow_layer ? 'checked' : '') + ' style="outline: none;"><span> Night shadow</span>';
return div;
};
legend.addTo(map);
maidenhead = L.maidenheadqrb().addTo(map);
nightlayer = L.terminator().addTo(map);
map.fitBounds(bounds);
$.each(iconsList, function (icon, data) {
$('#advancedmap' + ' .cspot_' + icon).addClass(data.icon).css("color", data.color);
});
var printer = L.easyPrint({
tileLayer: osm,
sizeModes: ['Current', 'A4Landscape', 'A4Portrait'],
filename: 'Wavelog',
exportOnly: true,
hideControlContainer: true
}).addTo(map);
map.on('mousemove', onMapMove);
if (typeof gridsquare_layer !== 'undefined') {
toggleGridsquares(gridsquare_layer);
} else {
toggleGridsquares(false);
}
if (typeof path_lines !== 'undefined') {
toggleFunction(path_lines);
} else {
toggleFunction(false);
}
if (typeof cqzones_layer !== 'undefined') {
toggleCqZones(cqzones_layer);
} else {
toggleCqZones(false);
}
if (typeof ituzones_layer !== 'undefined') {
toggleItuZones(ituzones_layer);
} else {
toggleItuZones(false);
}
if (typeof nightshadow_layer !== 'undefined') {
toggleNightShadow(nightshadow_layer);
} else {
toggleNightShadow(false);
}
}
function createContentMessage(qso) {
var table = '<table><tbody>' +
'<tr>' +
'<td>' +
'Station callsign: ' + qso.mycallsign +
"</td></tr>" +
'<tr>' +
'<td>' +
'Gridsquare: ' + qso.mygridsquare +
"</td></tr>";
return (table += "</tbody></table>");
}
function createContentMessageDx(qso) {
var table = '<table><tbody>' +
'<tr>' +
'<td>Callsign</td>' +
'<td>' + qso.callsign + '</td>' +
'</tr>' +
'<tr>' +
'<td>Date/time</td>' +
'<td>' + qso.datetime + '</td>' +
'</tr>' +
'<tr>';
if (qso.satname != "") {
table += '<td>Band</td>' +
'<td>' + qso.satname + '</td>' +
'</tr>' +
'<tr>';
} else {
table += '<td>Band</td>' +
'<td>' + qso.band + '</td>' +
'</tr>' +
'<tr>';
}
table += '<td>Mode</td>' +
'<td>' + qso.mode + '</td>' +
'</tr>' +
'<tr>';
if (qso.gridsquare != undefined) {
table += '<td>Gridsquare</td>' +
'<td>' + qso.gridsquare + '</td>' +
'</tr>';
}
if (qso.distance != undefined) {
table += '<td>Distance</td>' +
'<td>' + qso.distance + '</td>' +
'</tr>';
}
if (qso.bearing != undefined) {
table += '<td>Bearing</td>' +
'<td>' + qso.bearing + '</td>' +
'</tr>';
}
return (table += '</tbody></table>');
}
function loadMapOptions(data) {
$.ajax({
url: base_url + 'index.php/user_options/get_map_custom',
type: 'GET',
dataType: 'json',
error: function () {
},
success: function (json_mapinfo) {
if (typeof json_mapinfo.qso !== "undefined") {
iconsList = json_mapinfo;
}
loadMap(data, iconsList)
}
});
}
function mapQsos(form) {
$('#mapButton').prop("disabled", true).addClass("running");
var id_list=[];
var elements = $('#qsoList tbody input:checked');
var nElements = elements.length;
elements.each(function() {
let id = $(this).first().closest('tr').data('qsoID')
id_list.push(id);
unselectQsoID(id);
});
$("#qsoList").attr("Hidden", true);
$("#qsoList_wrapper").attr("Hidden", true);
$("#qsoList_info").attr("Hidden", true);
amap = $('#advancedmap').val();
if (amap == undefined) {
$(".qso_manager").append('<div id="advancedmap" class="map-leaflet"></div>');
}
if (id_list.length > 0) {
$.ajax({
url: base_url + 'index.php/logbookadvanced/mapSelectedQsos',
type: 'post',
data: {
ids: id_list,
de: form.de.value
},
success: function(data) {
loadMapOptions(data);
},
error: function() {
$('#mapButton').prop("disabled", false).removeClass("running");
},
});
} else {
$.ajax({
url: base_url + 'index.php/logbookadvanced/mapQsos',
type: 'post',
data: {
dateFrom: form.dateFrom.value,
dateTo: form.dateTo.value,
de: form.de.value,
dx: form.dx.value,
mode: form.mode.value,
band: form.band.value,
qslSent: form.qslSent.value,
qslReceived: form.qslReceived.value,
qslSentMethod: this.qslSentMethod.value,
qslReceivedMethod: this.qslReceivedMethod.value,
iota: form.iota.value,
dxcc: form.dxcc.value,
propmode: form.selectPropagation.value,
gridsquare: form.gridsquare.value,
state: form.state.value,
qsoresults: form.qsoResults.value,
sats: form.sats.value,
cqzone: form.cqzone.value,
lotwSent: form.lotwSent.value,
lotwReceived: form.lotwReceived.value,
eqslSent: form.eqslSent.value,
eqslReceived: form.eqslReceived.value,
qslvia: $('[name="qslviainput"]').val(),
sota: form.sota.value,
pota: form.pota.value,
operator: form.operator.value,
wwff: form.wwff.value,
qslimages: form.qslimages.value,
},
success: function(data) {
loadMapOptions(data);
},
error: function() {
$('#mapButton').prop("disabled", false).removeClass("running");
},
});
}
};

View File

@@ -49,6 +49,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @author EllisLab Dev Team
* @link
*/
#[AllowDynamicProperties] // DJ7NT added for PHP 8.2 compat
class CI_Driver_Library {
/**