mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge branch 'dev' into dxcc_award_optimized
This commit is contained in:
@@ -668,37 +668,43 @@ class Awards extends CI_Controller {
|
||||
|
||||
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
|
||||
|
||||
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['band'] = $this->security->xss_clean($this->input->post('band'));
|
||||
if($this->input->method() === 'post') {
|
||||
$postdata['qsl'] = ($this->input->post('qsl',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['lotw'] = ($this->input->post('lotw',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['eqsl'] = ($this->input->post('eqsl',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['qrz'] = ($this->input->post('qrz',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['clublog'] = ($this->input->post('clublog',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['worked'] = ($this->input->post('worked',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['confirmed'] = ($this->input->post('confirmed',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['notworked'] = ($this->input->post('notworked',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
|
||||
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
|
||||
$postdata['datefrom'] = $this->security->xss_clean($this->input->post('dateFrom'));
|
||||
$postdata['dateto'] = $this->security->xss_clean($this->input->post('dateTo'));
|
||||
}
|
||||
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['band'] = 'All';
|
||||
}
|
||||
else { // Setting default values at first load of page
|
||||
$postdata['qsl'] = 1;
|
||||
$postdata['lotw'] = 1;
|
||||
$postdata['eqsl'] = NULL;
|
||||
$postdata['qrz'] = NULL;
|
||||
$postdata['clublog'] = NULL;
|
||||
$postdata['worked'] = 1;
|
||||
$postdata['confirmed'] = 1;
|
||||
$postdata['notworked'] = 1;
|
||||
$postdata['band'] = 'All';
|
||||
$postdata['mode'] = 'All';
|
||||
$postdata['datefrom'] = null;
|
||||
$postdata['dateto'] = null;
|
||||
}
|
||||
}
|
||||
|
||||
$data['posted_band'] = $postdata['band'];
|
||||
|
||||
if ($logbooks_locations_array) {
|
||||
$location_list = "'".implode("','",$logbooks_locations_array)."'";
|
||||
$data['cq_array'] = $this->cq->get_cq_array($bands, $postdata, $location_list);
|
||||
$data['cq_summary'] = $this->cq->get_cq_summary($bands, $postdata, $location_list);
|
||||
$cq_result = $this->cq->get_cq_array($bands, $postdata, $location_list);
|
||||
// Extract bands data and summary from the result
|
||||
$data['cq_array'] = ($cq_result && isset($cq_result['bands'])) ? $cq_result['bands'] : null;
|
||||
$data['cq_summary'] = ($cq_result && isset($cq_result['summary'])) ? $cq_result['summary'] : null;
|
||||
} else {
|
||||
$location_list = null;
|
||||
$data['cq_array'] = null;
|
||||
@@ -1602,8 +1608,16 @@ class Awards extends CI_Controller {
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
$this->load->model('cq');
|
||||
$this->load->model('bands');
|
||||
|
||||
$bands[] = $this->input->post('band');
|
||||
$data['worked_bands'] = $this->bands->get_worked_bands('cq');
|
||||
|
||||
if ($this->input->post('band') == 'All') {
|
||||
$bands = $data['worked_bands'];
|
||||
}
|
||||
else {
|
||||
$bands[] = $this->input->post('band');
|
||||
}
|
||||
|
||||
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
|
||||
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
|
||||
@@ -1615,36 +1629,15 @@ class Awards extends CI_Controller {
|
||||
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
|
||||
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
|
||||
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
|
||||
$postdata['datefrom'] = $this->security->xss_clean($this->input->post('datefrom'));
|
||||
$postdata['dateto'] = $this->security->xss_clean($this->input->post('dateto'));
|
||||
$postdata['datefrom'] = $this->security->xss_clean($this->input->post('dateFrom'));
|
||||
$postdata['dateto'] = $this->security->xss_clean($this->input->post('dateTo'));
|
||||
|
||||
if ($logbooks_locations_array) {
|
||||
$location_list = "'".implode("','",$logbooks_locations_array)."'";
|
||||
$cq_array = $this->cq->get_cq_array($bands, $postdata, $location_list, $this->user_map_color_qso, $this->user_map_color_qsoconfirm);
|
||||
$zones = $this->cq->get_cq_array($bands, $postdata, $location_list, true);
|
||||
} else {
|
||||
$location_list = null;
|
||||
$cq_array = null;
|
||||
}
|
||||
|
||||
$zones = array();
|
||||
|
||||
foreach ($cq_array as $cq => $value) {
|
||||
foreach ($value as $key) {
|
||||
if($key != "") {
|
||||
if (strpos($key, '>W<') !== false) {
|
||||
$zones[] = 'W';
|
||||
break;
|
||||
}
|
||||
if (strpos($key, '>C<') !== false) {
|
||||
$zones[] = 'C';
|
||||
break;
|
||||
}
|
||||
if (strpos($key, '-') !== false) {
|
||||
$zones[] = '-';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$zones = array();
|
||||
}
|
||||
|
||||
header('Content-Type: application/json');
|
||||
@@ -1987,9 +1980,9 @@ class Awards extends CI_Controller {
|
||||
$this->load->model('itu');
|
||||
$this->load->model('modes');
|
||||
$this->load->model('bands');
|
||||
$data['user_map_custom'] = $this->optionslib->get_map_custom();
|
||||
|
||||
$data['worked_bands'] = $this->bands->get_worked_bands('cq');
|
||||
$data['user_map_custom'] = $this->optionslib->get_map_custom();
|
||||
$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.
|
||||
@@ -2006,35 +1999,43 @@ class Awards extends CI_Controller {
|
||||
|
||||
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
|
||||
|
||||
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['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
|
||||
$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['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['clublog'] = 0;
|
||||
$postdata['worked'] = 1;
|
||||
$postdata['confirmed'] = 1;
|
||||
$postdata['notworked'] = 1;
|
||||
$postdata['band'] = 'All';
|
||||
if($this->input->method() === 'post') {
|
||||
$postdata['qsl'] = ($this->input->post('qsl',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['lotw'] = ($this->input->post('lotw',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['eqsl'] = ($this->input->post('eqsl',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['qrz'] = ($this->input->post('qrz',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['clublog'] = ($this->input->post('clublog',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['worked'] = ($this->input->post('worked',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['confirmed'] = ($this->input->post('confirmed',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['notworked'] = ($this->input->post('notworked',true) ?? 0) == 0 ? NULL: 1;
|
||||
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
|
||||
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
|
||||
$postdata['datefrom'] = $this->security->xss_clean($this->input->post('dateFrom'));
|
||||
$postdata['dateto'] = $this->security->xss_clean($this->input->post('dateTo'));
|
||||
}
|
||||
else { // Setting default values at first load of page
|
||||
$postdata['qsl'] = 1;
|
||||
$postdata['lotw'] = 1;
|
||||
$postdata['eqsl'] = NULL;
|
||||
$postdata['qrz'] = NULL;
|
||||
$postdata['clublog'] = NULL;
|
||||
$postdata['worked'] = 1;
|
||||
$postdata['confirmed'] = 1;
|
||||
$postdata['notworked'] = 1;
|
||||
$postdata['band'] = 'All';
|
||||
$postdata['mode'] = 'All';
|
||||
}
|
||||
$postdata['datefrom'] = null;
|
||||
$postdata['dateto'] = null;
|
||||
}
|
||||
|
||||
$data['posted_band'] = $postdata['band'];
|
||||
|
||||
if ($logbooks_locations_array) {
|
||||
$location_list = "'".implode("','",$logbooks_locations_array)."'";
|
||||
$data['itu_array'] = $this->itu->get_itu_array($bands, $postdata, $location_list);
|
||||
$data['itu_summary'] = $this->itu->get_itu_summary($bands, $postdata, $location_list);
|
||||
$itu_result = $this->itu->get_itu_array($bands, $postdata, $location_list);
|
||||
// Extract bands data and summary from the result
|
||||
$data['itu_array'] = ($itu_result && isset($itu_result['bands'])) ? $itu_result['bands'] : null;
|
||||
$data['itu_summary'] = ($itu_result && isset($itu_result['summary'])) ? $itu_result['summary'] : null;
|
||||
} else {
|
||||
$location_list = null;
|
||||
$data['itu_array'] = null;
|
||||
@@ -2057,8 +2058,16 @@ class Awards extends CI_Controller {
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
$this->load->model('itu');
|
||||
$this->load->model('bands');
|
||||
|
||||
$bands[] = $this->input->post('band');
|
||||
$data['worked_bands'] = $this->bands->get_worked_bands('cq');
|
||||
|
||||
if ($this->input->post('band') == 'All') {
|
||||
$bands = $data['worked_bands'];
|
||||
}
|
||||
else {
|
||||
$bands[] = $this->input->post('band');
|
||||
}
|
||||
|
||||
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
|
||||
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
|
||||
@@ -2070,34 +2079,15 @@ class Awards extends CI_Controller {
|
||||
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
|
||||
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
|
||||
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
|
||||
$postdata['datefrom'] = $this->security->xss_clean($this->input->post('dateFrom'));
|
||||
$postdata['dateto'] = $this->security->xss_clean($this->input->post('dateTo'));
|
||||
|
||||
if ($logbooks_locations_array) {
|
||||
$location_list = "'".implode("','",$logbooks_locations_array)."'";
|
||||
$itu_array = $this->itu->get_itu_array($bands, $postdata, $location_list);
|
||||
$zones = $this->itu->get_itu_array($bands, $postdata, $location_list, true);
|
||||
} else {
|
||||
$location_list = null;
|
||||
$itu_array = null;
|
||||
}
|
||||
|
||||
$zones = array();
|
||||
|
||||
foreach ($itu_array as $itu => $value) {
|
||||
foreach ($value as $key) {
|
||||
if($key != "") {
|
||||
if (strpos($key, '>W<') !== false) {
|
||||
$zones[] = 'W';
|
||||
break;
|
||||
}
|
||||
if (strpos($key, '>C<') !== false) {
|
||||
$zones[] = 'C';
|
||||
break;
|
||||
}
|
||||
if (strpos($key, '-') !== false) {
|
||||
$zones[] = '-';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$zones = array();
|
||||
}
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
@@ -8,7 +8,7 @@ class Club extends CI_Controller
|
||||
* 3 - Member
|
||||
*
|
||||
* These permission levels are independent of the codeigniter permission levels and managed in the club_permissions table!
|
||||
* https://github.com/wavelog/wavelog/wiki/Clubstations
|
||||
* https://docs.wavelog.org/admin-guide/administration/clubstations/
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -80,7 +80,7 @@ class Distances extends CI_Controller {
|
||||
|
||||
// Render Page
|
||||
$data['page_title'] = "Log View - " . $distance;
|
||||
$data['filter'] = __("QSOs with") . " " . $distance . " " . __("and band"). " " . $band. __("and propagation"). " " . $propagation;
|
||||
$data['filter'] = __("QSOs with") . " " . $distance . " " . __("and band"). " " . $band. " " . __("and propagation"). " " . $propagation;
|
||||
$this->load->view('awards/details', $data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -441,7 +441,7 @@ class Lotw extends CI_Controller {
|
||||
unlink($file);
|
||||
// OpenSSL error:11800071:PKCS12 routines::mac verify failure is most likely an (unknown) password set on the exported certificate
|
||||
if (str_contains($openssl_error_pkcs12_read, 'mac verify failure')) {
|
||||
$this->session->set_flashdata('warning', sprintf(__("The certificate found in file %s contains a password and cannot be processed. %sPlease make sure you export the LoTW certificate from tqsl application without password!%s For further information please visit the %sLoTW FAQ page%s in the Wavelog Wiki."), basename($file), '<b>', '</b>', '<a target="_blank" href="https://github.com/wavelog/wavelog/wiki/Logbook-of-The-World-(LoTW)">', '</a>'));
|
||||
$this->session->set_flashdata('warning', sprintf(__("The certificate found in file %s contains a password and cannot be processed. %sPlease make sure you export the LoTW certificate from tqsl application without password!%s For further information please visit the %sLoTW FAQ page%s in the Wavelog Wiki."), basename($file), '<b>', '</b>', '<a target="_blank" href="https://docs.wavelog.org/user-guide/qsl/lotw/">', '</a>'));
|
||||
} else {
|
||||
$this->session->set_flashdata('warning', sprintf(__("Generic error extracting the certificate from file %s. If the filename contains 'key-only' this is typically a certificate request which has not been processed by LoTW yet."), basename($file)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user