mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Distances Worked] Added propagation filter
This commit is contained in:
@@ -74,12 +74,13 @@ class Distances extends CI_Controller {
|
||||
$distance = $this->security->xss_clean($this->input->post('distance'));
|
||||
$band = $this->security->xss_clean($this->input->post('band'));
|
||||
$sat = $this->security->xss_clean($this->input->post('sat'));
|
||||
$propagation = $this->security->xss_clean($this->input->post('propagation'));
|
||||
|
||||
$data['results'] = $this->distances_model->qso_details($distance, $band, $sat);
|
||||
$data['results'] = $this->distances_model->qso_details($distance, $band, $sat, $propagation);
|
||||
|
||||
// Render Page
|
||||
$data['page_title'] = "Log View - " . $distance;
|
||||
$data['filter'] = __("QSOs with") . " " . $distance . " " . __("and band"). " " . $band;
|
||||
$data['filter'] = __("QSOs with") . " " . $distance . " " . __("and band"). " " . $band. __("and propagation"). " " . $propagation;
|
||||
$this->load->view('awards/details', $data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,19 @@ class Distances_model extends CI_Model
|
||||
$this->db->where('satellite.orbit', $clean_postdata['orbit']);
|
||||
}
|
||||
|
||||
if ( $clean_postdata['propagation'] == 'NoSAT' ) { // All without SAT
|
||||
$this->db->where('col_prop_mode !=', 'SAT');
|
||||
} elseif ($clean_postdata['propagation'] == 'None') { // Empty Propmode
|
||||
$this->db->group_start();
|
||||
$this->db->where('trim(col_prop_mode)', '');
|
||||
$this->db->or_where('col_prop_mode is null');
|
||||
$this->db->group_end();
|
||||
} elseif ($clean_postdata['propagation'] == 'All') { // Dont care for propmode
|
||||
; // No Prop-Filter
|
||||
} else { // Propmode set, take care of it
|
||||
$this->db->where('col_prop_mode', $clean_postdata['propagation']);
|
||||
}
|
||||
|
||||
$this->db->where('station_id', $station_id);
|
||||
$queryresult = $this->db->get($this->config->item('table_name'));
|
||||
|
||||
@@ -231,7 +244,7 @@ class Distances_model extends CI_Model
|
||||
/*
|
||||
* Used to fetch QSOs from the logbook in the awards
|
||||
*/
|
||||
public function qso_details($distance, $band, $sat){
|
||||
public function qso_details($distance, $band, $sat, $propagation){
|
||||
$distarray = $this->getdistparams($distance);
|
||||
$this->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
@@ -256,6 +269,19 @@ class Distances_model extends CI_Model
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($propagation == 'NoSAT' ) { // All without SAT
|
||||
$this->db->where('col_prop_mode !=', 'SAT');
|
||||
} elseif ($propagation == 'None') { // Empty Propmode
|
||||
$this->db->group_start();
|
||||
$this->db->where('trim(col_prop_mode)', '');
|
||||
$this->db->or_where('col_prop_mode is null');
|
||||
$this->db->group_end();
|
||||
} elseif ($propagation == 'All') { // Dont care for propmode
|
||||
; // No Prop-Filter
|
||||
} else { // Propmode set, take care of it
|
||||
$this->db->where('col_prop_mode', $propagation);
|
||||
}
|
||||
$this->db->order_by("COL_TIME_ON", "desc");
|
||||
|
||||
return $this->db->get($this->config->item('table_name'));
|
||||
|
||||
@@ -50,6 +50,32 @@
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<label class="my-1 me-2" for="propmode"><?= __("Propagation"); ?></label>
|
||||
<div class="my-1 me-2">
|
||||
<select class="form-select w-auto" name="propmode" id="propmode">
|
||||
<option value="All"><?= __("All"); ?></option>
|
||||
<option value="NoSAT"><?= __("All but SAT"); ?></option>
|
||||
<option value="None"><?= __("None/Empty"); ?></option>
|
||||
<option value="AS"><?= _pgettext("Propagation Mode","Aircraft Scatter"); ?></option>
|
||||
<option value="AUR"><?= _pgettext("Propagation Mode","Aurora"); ?></option>
|
||||
<option value="AUE"><?= _pgettext("Propagation Mode","Aurora-E"); ?></option>
|
||||
<option value="BS"><?= _pgettext("Propagation Mode","Back scatter"); ?></option>
|
||||
<option value="ECH"><?= _pgettext("Propagation Mode","EchoLink"); ?></option>
|
||||
<option value="EME"><?= _pgettext("Propagation Mode","Earth-Moon-Earth"); ?></option>
|
||||
<option value="ES"><?= _pgettext("Propagation Mode","Sporadic E"); ?></option>
|
||||
<option value="FAI"><?= _pgettext("Propagation Mode","Field Aligned Irregularities"); ?></option>
|
||||
<option value="F2"><?= _pgettext("Propagation Mode","F2 Reflection"); ?></option>
|
||||
<option value="INTERNET"><?= _pgettext("Propagation Mode","Internet-assisted"); ?></option>
|
||||
<option value="ION"><?= _pgettext("Propagation Mode","Ionoscatter"); ?></option>
|
||||
<option value="IRL"><?= _pgettext("Propagation Mode","IRLP"); ?></option>
|
||||
<option value="MS"><?= _pgettext("Propagation Mode","Meteor scatter"); ?></option>
|
||||
<option value="RPT"><?= _pgettext("Propagation Mode","Terrestrial or atmospheric repeater or transponder"); ?></option>
|
||||
<option value="RS"><?= _pgettext("Propagation Mode","Rain scatter"); ?></option>
|
||||
<option value="SAT"><?= _pgettext("Propagation Mode","Satellite"); ?></option>
|
||||
<option value="TEP"><?= _pgettext("Propagation Mode","Trans-equatorial"); ?></option>
|
||||
<option value="TR"><?= _pgettext("Propagation Mode","Tropospheric ducting"); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<button id="plot" type="button" name="plot" class="btn btn-primary ld-ext-right ld-ext-right-plot" onclick="distPlot(this.form)"><?= __("Show")?><div class="ld ld-ring ld-spin"></div></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -26,7 +26,8 @@ function distPlot(form) {
|
||||
type: 'post',
|
||||
data: {'band': form.distplot_bands.value,
|
||||
'sat': form.distplot_sats.value,
|
||||
'orbit': form.orbits.value
|
||||
'orbit': form.orbits.value,
|
||||
'propagation': form.propmode.value
|
||||
},
|
||||
success: function(tmp) {
|
||||
if (tmp.ok == 'OK') {
|
||||
@@ -157,6 +158,7 @@ function getDistanceQsos(distance) {
|
||||
'band': $("#distplot_bands").val(),
|
||||
'sat' : $("#distplot_sats").val(),
|
||||
'orbit': $("#orbits").val(),
|
||||
'propagation': $("#propmode").val()
|
||||
},
|
||||
success: function (html) {
|
||||
BootstrapDialog.show({
|
||||
|
||||
Reference in New Issue
Block a user