prop mode

This commit is contained in:
HB9HIL
2024-05-05 23:10:02 +02:00
parent fad182e3f8
commit 4b1b5c4d62
8 changed files with 353 additions and 265 deletions

View File

@@ -54,6 +54,7 @@ class Activated_gridmap extends CI_Controller {
$qrz = $this->security->xss_clean($this->input->post('qrz'));
$sat = $this->security->xss_clean($this->input->post('sat'));
$orbit = $this->security->xss_clean($this->input->post('orbit'));
$propagation = $this->security->xss_clean($this->input->post('propagation'));
$this->load->model('activated_gridmap_model');
$array_grid_2char = array();
@@ -72,7 +73,7 @@ class Activated_gridmap extends CI_Controller {
$grid_4char_confirmed = "";
$grid_6char_confirmed = "";
$query = $this->activated_gridmap_model->get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit);
$query = $this->activated_gridmap_model->get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation);
if ($query && $query->num_rows() > 0) {
foreach ($query->result() as $row) {
@@ -102,7 +103,7 @@ class Activated_gridmap extends CI_Controller {
}
}
$query = $this->activated_gridmap_model->get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit);
$query = $this->activated_gridmap_model->get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation);
if ($query && $query->num_rows() > 0) {
foreach ($query->result() as $row) {
@@ -132,7 +133,7 @@ class Activated_gridmap extends CI_Controller {
}
}
}
$query_vucc = $this->activated_gridmap_model->get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit);
$query_vucc = $this->activated_gridmap_model->get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation);
if ($query_vucc && $query_vucc->num_rows() > 0) {
foreach ($query_vucc->result() as $row) {
@@ -157,7 +158,7 @@ class Activated_gridmap extends CI_Controller {
}
// // Confirmed Squares
$query_vucc = $this->activated_gridmap_model->get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit);
$query_vucc = $this->activated_gridmap_model->get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation);
if ($query_vucc && $query_vucc->num_rows() > 0) {
foreach ($query_vucc->result() as $row) {

View File

@@ -419,10 +419,11 @@ class Awards extends CI_Controller {
$mode = str_replace('"', "", $this->security->xss_clean($this->input->post("Mode")));
$sat = str_replace('"', "", $this->security->xss_clean($this->input->post("Sat")));
$orbit = str_replace('"', "", $this->security->xss_clean($this->input->post("Orbit")));
$propagation = str_replace('"', "", $this->security->xss_clean($this->input->post("Propagation")) ?? '');
$type = $this->security->xss_clean($this->input->post('Type'));
$qsl = $this->input->post('QSL') == null ? '' : $this->security->xss_clean($this->input->post('QSL'));
$searchmode = $this->input->post('searchmode') == null ? '' : $this->security->xss_clean($this->input->post('searchmode'));
$data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type, $qsl, $sat, $orbit, $searchmode);
$data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type, $qsl, $sat, $orbit, $searchmode, $propagation);
// This is done because we have two different ways to get dxcc info in Wavelog. Once is using the name (in awards), and the other one is using the ADIF DXCC.
// We replace the values to make it look a bit nicer
@@ -457,6 +458,9 @@ class Awards extends CI_Controller {
$data['filter'] .= " and orbit type ".$orbit;
}
}
if ($propagation != '' && $propagation != null) {
$data['filter'] .= " and propagation ".$propagation;
}
if ($mode != null && strtolower($mode) != 'all') {
$data['filter'] .= " and mode ".$mode;
}

View File

@@ -54,6 +54,7 @@ class Gridmap extends CI_Controller {
$qrz = $this->security->xss_clean($this->input->post('qrz'));
$sat = $this->security->xss_clean($this->input->post('sat'));
$orbit = $this->security->xss_clean($this->input->post('orbit'));
$propagation = $this->security->xss_clean($this->input->post('propagation'));
$this->load->model('gridmap_model');
$array_grid_2char = array();
@@ -72,7 +73,7 @@ class Gridmap extends CI_Controller {
$grid_4char_confirmed = "";
$grid_6char_confirmed = "";
$query = $this->gridmap_model->get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit);
$query = $this->gridmap_model->get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation);
if ($query && $query->num_rows() > 0) {
foreach ($query->result() as $row) {
@@ -99,7 +100,7 @@ class Gridmap extends CI_Controller {
}
}
$query = $this->gridmap_model->get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit);
$query = $this->gridmap_model->get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation);
if ($query && $query->num_rows() > 0) {
foreach ($query->result() as $row) {
@@ -126,7 +127,7 @@ class Gridmap extends CI_Controller {
}
}
}
$query_vucc = $this->gridmap_model->get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit);
$query_vucc = $this->gridmap_model->get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation);
if ($query_vucc && $query_vucc->num_rows() > 0) {
foreach ($query_vucc->result() as $row) {
@@ -151,7 +152,7 @@ class Gridmap extends CI_Controller {
}
// // Confirmed Squares
$query_vucc = $this->gridmap_model->get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit);
$query_vucc = $this->gridmap_model->get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation);
if ($query_vucc && $query_vucc->num_rows() > 0) {
foreach ($query_vucc->result() as $row) {

View File

@@ -2,10 +2,10 @@
class Activated_gridmap_model extends CI_Model {
function get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit) {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
function get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation) {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
return null;
@@ -20,20 +20,24 @@ class Activated_gridmap_model extends CI_Model {
. 'AND station_profile.station_id in ('.$location_list.')';
if ($band != 'All') {
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $band . "'";
}
}
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode ='" . $propagation . "'";
$sql .= " and col_band ='" . $band . "'";
}
} else {
if ($propagation != '') {
$sql .= " and col_prop_mode ='" . $propagation . "'";
}
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
$sql .= $this->addOrbitToQuery($orbit);
@@ -41,10 +45,10 @@ class Activated_gridmap_model extends CI_Model {
return $this->db->query($sql);
}
function get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit) {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
function get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation) {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
return null;
@@ -59,30 +63,34 @@ class Activated_gridmap_model extends CI_Model {
. 'AND station_profile.station_id in ('.$location_list.')';
if ($band != 'All') {
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $band . "'";
}
}
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode ='" . $propagation . "'";
$sql .= " and col_band ='" . $band . "'";
}
} else {
if ($propagation != '') {
$sql .= " and col_prop_mode ='" . $propagation . "'";
}
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
$sql .= $this->addOrbitToQuery($orbit);
return $this->db->query($sql);
}
function get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit) {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
function get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation) {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
return null;
@@ -97,20 +105,24 @@ class Activated_gridmap_model extends CI_Model {
.$location_list.') AND COL_VUCC_GRIDS != ""';
if ($band != 'All') {
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $band . "'";
}
}
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode ='" . $propagation . "'";
$sql .= " and col_band ='" . $band . "'";
}
} else {
if ($propagation != '') {
$sql .= " and col_prop_mode ='" . $propagation . "'";
}
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
$sql .= $this->addOrbitToQuery($orbit);
@@ -118,10 +130,10 @@ class Activated_gridmap_model extends CI_Model {
return $this->db->query($sql);
}
function get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit) {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
function get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation) {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
return null;
@@ -136,20 +148,24 @@ class Activated_gridmap_model extends CI_Model {
.$location_list.') AND COL_VUCC_GRIDS != ""';
if ($band != 'All') {
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $band . "'";
}
}
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode ='" . $propagation . "'";
$sql .= " and col_band ='" . $band . "'";
}
} else {
if ($propagation != '') {
$sql .= " and col_prop_mode ='" . $propagation . "'";
}
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
$sql .= $this->addOrbitToQuery($orbit);
@@ -197,9 +213,9 @@ class Activated_gridmap_model extends CI_Model {
* Get's the worked modes from the log
*/
function get_worked_modes() {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
return null;

View File

@@ -2,11 +2,11 @@
class Gridmap_model extends CI_Model {
function get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $logbooks_locations_array = NULL) {
function get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation, $logbooks_locations_array = NULL) {
if ($logbooks_locations_array == NULL) {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
}
if (!$logbooks_locations_array) {
@@ -22,20 +22,24 @@ class Gridmap_model extends CI_Model {
.$location_list.') AND COL_GRIDSQUARE != ""';
if ($band != 'All') {
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $band . "'";
}
}
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode ='" . $propagation . "'";
$sql .= " and col_band ='" . $band . "'";
}
} else {
if ($propagation != '') {
$sql .= " and col_prop_mode ='" . $propagation . "'";
}
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
$sql .= $this->addOrbitToQuery($orbit);
@@ -44,11 +48,11 @@ class Gridmap_model extends CI_Model {
return $this->db->query($sql);
}
function get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $logbooks_locations_array = NULL) {
function get_band($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation, $logbooks_locations_array = NULL) {
if ($logbooks_locations_array == NULL) {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
}
if (!$logbooks_locations_array) {
@@ -64,31 +68,35 @@ class Gridmap_model extends CI_Model {
.$location_list.') AND COL_GRIDSQUARE != ""';
if ($band != 'All') {
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $band . "'";
}
}
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode ='" . $propagation . "'";
$sql .= " and col_band ='" . $band . "'";
}
} else {
if ($propagation != '') {
$sql .= " and col_prop_mode ='" . $propagation . "'";
}
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
$sql .= $this->addOrbitToQuery($orbit);
return $this->db->query($sql);
}
function get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $logbooks_locations_array = NULL) {
function get_band_worked_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation, $logbooks_locations_array = NULL) {
if ($logbooks_locations_array == NULL) {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
}
if (!$logbooks_locations_array) {
@@ -104,31 +112,35 @@ class Gridmap_model extends CI_Model {
.$location_list.') AND COL_VUCC_GRIDS != ""';
if ($band != 'All') {
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $band . "'";
}
}
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode ='" . $propagation . "'";
$sql .= " and col_band ='" . $band . "'";
}
} else {
if ($propagation != '') {
$sql .= " and col_prop_mode ='" . $propagation . "'";
}
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
$sql .= $this->addOrbitToQuery($orbit);
return $this->db->query($sql);
}
function get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $logbooks_locations_array = NULL) {
function get_band_confirmed_vucc_squares($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $orbit, $propagation, $logbooks_locations_array = NULL) {
if ($logbooks_locations_array == NULL) {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
}
if (!$logbooks_locations_array) {
@@ -145,20 +157,24 @@ class Gridmap_model extends CI_Model {
.$location_list.') AND COL_VUCC_GRIDS != ""';
if ($band != 'All') {
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode !='SAT'";
$sql .= " and col_band ='" . $band . "'";
}
}
if ($band == 'SAT') {
$sql .= " and col_prop_mode ='" . $band . "'";
if ($sat != 'All') {
$sql .= " and col_sat_name ='" . $sat . "'";
}
} else {
$sql .= " and col_prop_mode ='" . $propagation . "'";
$sql .= " and col_band ='" . $band . "'";
}
} else {
if ($propagation != '') {
$sql .= " and col_prop_mode ='" . $propagation . "'";
}
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
if ($mode != 'All') {
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
}
$sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $qrz);
@@ -211,9 +227,9 @@ class Gridmap_model extends CI_Model {
* Get's the worked modes from the log
*/
function get_worked_modes() {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
return null;

View File

@@ -389,7 +389,7 @@ class Logbook_model extends CI_Model {
/*
* Used to fetch QSOs from the logbook in the awards
*/
public function qso_details($searchphrase, $band, $mode, $type, $qsl, $sat = null, $orbit = null, $searchmode = null){
public function qso_details($searchphrase, $band, $mode, $type, $qsl, $sat = null, $orbit = null, $searchmode = null, $propagation = null){
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
@@ -446,6 +446,9 @@ class Logbook_model extends CI_Model {
$this->db->where("satellite.orbit = '$orbit'");
}
}
if ($propagation != '' && $propagation != null) {
$this->db->where("COL_PROP_MODE = '$propagation'");
}
}
break;
case 'CQZone':

View File

@@ -1,135 +1,178 @@
<div class="container">
<br>
<br>
<h2><?php echo $page_title; ?></h2>
<h2><?php echo $page_title; ?></h2>
<?php if ($visitor == false) { ?>
<form class="d-flex align-items-center">
<label class="my-1 me-2" for="band"><?php echo lang('gridsquares_band'); ?></label>
<select class="form-select my-1 me-sm-2 w-auto" id="band">
<option value="All"><?php echo lang('general_word_all')?></option>
<?php foreach($bands as $band) {
echo '<option value="'.$band.'"';
if ($user_default_band == $band) {
echo ' selected="selected"';
}
echo '>'.$band.'</option>'."\n";
} ?>
</select>
<?php if (count($sats_available) != 0) { ?>
<label class="my-1 me-2" id="satslabel" for="distplot_sats" <?php if ($user_default_band != "SAT") { ?>style="display: none;"<?php } ?>><?php echo lang('gridsquares_sat'); ?></label>
<select class="form-select my-1 me-sm-2 w-auto" id="sats" <?php if ($user_default_band != "SAT") { ?>style="display: none;"<?php } ?>>
<option value="All"><?php echo lang('general_word_all')?></option>
<?php foreach($sats_available as $sat) {
echo '<option value="' . $sat . '"' . '>' . $sat . '</option>'."\n";
} ?>
</select>
<?php } else { ?>
<input id="sats" type="hidden" value="All"></input>
<?php } ?>
<label class="my-1 me-2" id="orbitslabel" for="orbits" <?php if ($user_default_band != "SAT") { ?>style="display: none;"<?php } ?>><?php echo lang('gridsquares_orbit'); ?></label>
<select class="form-select my-1 me-sm-2 w-auto" id="orbits" <?php if ($user_default_band != "SAT") { ?>style="display: none;"<?php } ?>>
<option value="All"><?php echo lang('general_word_all')?></option>
<?php
foreach($orbits as $orbit){
echo '<option value="' . $orbit . '">' . strtoupper($orbit) . '</option>'."\n";
}
?>
</select>
<label class="my-1 me-2" for="mode"><?php echo lang('gridsquares_mode'); ?></label>
<select class="form-select my-1 me-sm-2 w-auto" id="mode">
<option value="All"><?php echo lang('general_word_all')?></option>
<?php
foreach($modes as $mode){
if ($mode->submode ?? '' == '') {
echo '<option value="' . $mode . '">' . strtoupper($mode) . '</option>'."\n";
}
}
?>
</select>
<label class="my-1 me-2"><?php echo lang('gridsquares_confirmation'); ?></label>
<div>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="qsl" id="qsl"';
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'Q') !== false) {
echo ' checked' ;
}
echo '>'; ?>
<label class="form-check-label" for="qsl">QSL</label>
</div>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="lotw" id="lotw"';
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'L') !== false) {
echo ' checked' ;
}
echo '>'; ?>
<label class="form-check-label" for="lotw">LoTW</label>
</div>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="eqsl" id="eqsl"';
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'E') !== false) {
echo ' checked' ;
}
echo '>'; ?>
<label class="form-check-label" for="eqsl">eQSL</label>
</div>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="qrz" id="qrz"';
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'Z') !== false) {
echo ' checked' ;
}
echo '>'; ?>
<label class="form-check-label" for="qrz">QRZ.com</label>
</div>
<?php if ($visitor == false) { ?>
<form class="form">
<div class="row mb-3">
<label class="col-md-1" for="band"><?php echo lang('gridsquares_band'); ?></label>
<div class="col-sm-2">
<select class="form-select form-select-sm" id="band">
<option value="All"><?php echo lang('general_word_all') ?></option>
<?php foreach ($bands as $band) {
echo '<option value="' . $band . '"';
if ($user_default_band == $band) {
echo ' selected="selected"';
}
echo '>' . $band . '</option>' . "\n";
} ?>
</select>
</div>
<button id="plot" type="button" name="plot" class="btn btn-primary me-1 ld-ext-right ld-ext-right-plot" onclick="gridPlot(this.form,<?php echo $visitor == true ? "true" : "false"; ?>)"><?php echo lang('gridsquares_button_plot'); ?><div class="ld ld-ring ld-spin"></div></button>
<button id="clear" type="button" name="clear" class="btn btn-primary me-1 ld-ext-right ld-ext-right-clear" onclick="clearMarkers()"><?php echo lang('gridsquares_button_clear_markers'); ?><div class="ld ld-ring ld-spin"></div></button>
</form>
<?php } ?>
<?php if (count($sats_available) != 0) { ?>
<label class="col-md-1" id="satslabel" for="distplot_sats" <?php if ($user_default_band != "SAT") { ?>style="display: none;" <?php } ?>><?php echo lang('gridsquares_sat'); ?></label>
<div class="col-sm-2" id="sats" <?php if ($user_default_band != "SAT") { ?>style="display: none;" <?php } ?>>
<select class="form-select form-select-sm">
<option value="All"><?php echo lang('general_word_all') ?></option>
<?php foreach ($sats_available as $sat) {
echo '<option value="' . $sat . '"' . '>' . $sat . '</option>' . "\n";
} ?>
</select>
</div>
<?php } else { ?>
<input id="sats" type="hidden" value="All"></input>
<?php } ?>
<?php if($this->session->flashdata('message')) { ?>
<!-- Display Message -->
<div class="alert-message error">
<p><?php echo $this->session->flashdata('message'); ?></p>
</div>
<?php } ?>
<label class="col-md-1" for="propagation">Propagation</label>
<div class="col-sm-2">
<select class="form-select form-select-sm" id="propagation">
<option value=""><?php echo lang('general_word_all'); ?></option>
<option value="AS">Aircraft Scatter</option>
<option value="AUR">Aurora</option>
<option value="AUE">Aurora-E</option>
<option value="BS">Back scatter</option>
<option value="ECH">EchoLink</option>
<option value="EME">Earth-Moon-Earth</option>
<option value="ES">Sporadic E</option>
<option value="FAI">Field Aligned Irregularities</option>
<option value="F2">F2 Reflection</option>
<option value="INTERNET">Internet-assisted</option>
<option value="ION">Ionoscatter</option>
<option value="IRL">IRLP</option>
<option value="MS">Meteor scatter</option>
<option value="RPT">Terrestrial or atmospheric repeater or transponder</option>
<option value="RS">Rain scatter</option>
<option value="SAT">Satellite</option>
<option value="TEP">Trans-equatorial</option>
<option value="TR">Tropospheric ducting</option>
</select>
</div>
</div>
<div class="row mb-3">
<label class="col-md-1" for="mode"><?php echo lang('gridsquares_mode'); ?></label>
<div class="col-sm-2">
<select class="form-select form-select-sm" id="mode">
<option value="All"><?php echo lang('general_word_all') ?></option>
<?php
foreach ($modes as $mode) {
if ($mode->submode ?? '' == '') {
echo '<option value="' . $mode . '">' . strtoupper($mode) . '</option>' . "\n";
}
}
?>
</select>
</div>
<label class="col-md-1" id="orbitslabel" for="orbits" <?php if ($user_default_band != "SAT") { ?>style="display: none;" <?php } ?>><?php echo lang('gridsquares_orbit'); ?></label>
<div class="col-sm-2">
<select class="form-select form-select-sm" id="orbits" <?php if ($user_default_band != "SAT") { ?>style="display: none;" <?php } ?>>
<option value="All"><?php echo lang('general_word_all') ?></option>
<?php
foreach ($orbits as $orbit) {
echo '<option value="' . $orbit . '">' . strtoupper($orbit) . '</option>' . "\n";
}
?>
</select>
</div>
</div>
<div class="row mb-3">
<label class="col-md-2"><?php echo lang('gridsquares_confirmation'); ?></label>
<div class="col-sm-8">
<div>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="qsl" id="qsl"';
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'Q') !== false) {
echo ' checked';
}
echo '>'; ?>
<label class="form-check-label" for="qsl">QSL</label>
</div>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="lotw" id="lotw"';
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'L') !== false) {
echo ' checked';
}
echo '>'; ?>
<label class="form-check-label" for="lotw">LoTW</label>
</div>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="eqsl" id="eqsl"';
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'E') !== false) {
echo ' checked';
}
echo '>'; ?>
<label class="form-check-label" for="eqsl">eQSL</label>
</div>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="qrz" id="qrz"';
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'Z') !== false) {
echo ' checked';
}
echo '>'; ?>
<label class="form-check-label" for="qrz">QRZ.com</label>
</div>
</div>
</div>
</div>
<button id="plot" type="button" name="plot" class="btn btn-primary me-1 mb-3 ld-ext-right ld-ext-right-plot" onclick="gridPlot(this.form,<?php echo $visitor == true ? "true" : "false"; ?>)"><?php echo lang('gridsquares_button_plot'); ?><div class="ld ld-ring ld-spin"></div></button>
<button id="clear" type="button" name="clear" class="btn btn-primary me-1 mb-3 ld-ext-right ld-ext-right-clear" onclick="clearMarkers()"><?php echo lang('gridsquares_button_clear_markers'); ?><div class="ld ld-ring ld-spin"></div></button>
</form>
<?php } ?>
<?php if ($this->session->flashdata('message')) { ?>
<!-- Display Message -->
<div class="alert-message error">
<p><?php echo $this->session->flashdata('message'); ?></p>
</div>
<?php } ?>
</div>
<div id="gridmapcontainer">
<div id="gridsquare_map" class="map-leaflet" style="width: 100%; height: 800px"></div>
<div id="gridsquare_map" class="map-leaflet" style="width: 100%; height: 800px"></div>
</div>
<div class="coordinates d-flex">
<div class="cohidden"><?php echo lang('gen_hamradio_latitude')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="latDeg"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_longitude')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="lngDeg"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_gridsquare')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="locator"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_distance')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="distance"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_bearing')?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="bearing"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_latitude') ?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="latDeg"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_longitude') ?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="lngDeg"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_gridsquare') ?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="locator"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_distance') ?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="distance"></div>
<div class="cohidden"><?php echo lang('gen_hamradio_bearing') ?>:&nbsp;</div>
<div class="cohidden col-auto text-success fw-bold" id="bearing"></div>
</div>
<script>
var gridsquaremap = true;
var type = "worked";
<?php if ($visitor == true) { ?>
var visitor = true;
<?php } else { ?>
var visitor = false;
<?php } ?>
<?php
echo "var jslayer = \"" . $layer ."\";\n";
var gridsquaremap = true;
var type = "worked";
<?php if ($visitor == true) { ?>
var visitor = true;
<?php } else { ?>
var visitor = false;
<?php } ?>
<?php
echo "var jslayer = \"" . $layer . "\";\n";
echo "var jsattribution ='" . $attribution . "';";
if ($visitor == false) {
echo "var homegrid = \"" . strtoupper($homegrid[0]) . "\";\n";
echo "var homegrid = \"" . strtoupper($homegrid[0]) . "\";\n";
}
echo "var gridsquares_gridsquares = \"" . $gridsquares_gridsquares . "\";\n";
echo "var gridsquares_gridsquares_confirmed = \"" . $gridsquares_gridsquares_confirmed . "\";\n";
echo "var gridsquares_gridsquares_not_confirmed = \"" . $gridsquares_gridsquares_not_confirmed . "\";\n";
echo "var gridsquares_gridsquares_total_worked = \"" . $gridsquares_gridsquares_total_worked . "\";\n";
?>
</script>
?>
</script>

View File

@@ -9,11 +9,13 @@ $('#band').change(function(){
$("#orbits").hide();
$("#satslabel").hide();
$("#orbitslabel").hide();
$('#propagation').val('').prop('disabled', false);
} else {
$("#sats").show();
$("#orbits").show();
$("#orbitslabel").show();
$("#satslabel").show();
$('#propagation').val('SAT').prop('disabled', true);
}
});
@@ -62,6 +64,7 @@ function gridPlot(form, visitor=true) {
qrz: $("#qrz").is(":checked"),
sat: $("#sats").val(),
orbit: $("#orbits").val(),
propagation: $('#propagation').val()
},
success: function (data) {
$('.cohidden').show();
@@ -142,6 +145,7 @@ function spawnGridsquareModal(loc_4char) {
'Mode': $("#mode").val(),
'Sat': $("#sats").val(),
'Orbit': $("#orbits").val(),
'Propagation': $('#propagation').val(),
'Type': 'VUCC'
})
if (type == 'activated') {