mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Only bands with EME
This commit is contained in:
@@ -314,7 +314,7 @@ class Statistics extends CI_Controller {
|
||||
|
||||
$data['modes'] = $this->modes->active();
|
||||
|
||||
$data['worked_bands'] = $this->bands->get_worked_bands();
|
||||
$data['worked_bands'] = $this->bands->get_worked_bands_eme();
|
||||
|
||||
// Set Page Title
|
||||
$data['page_title'] = __("EME Initials");
|
||||
|
||||
@@ -391,6 +391,25 @@ class Bands extends CI_Model {
|
||||
|
||||
return $worked_slots;
|
||||
}
|
||||
|
||||
function get_worked_bands_eme() {
|
||||
if (!$this->logbooks_locations_array) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$location_list = "'".implode("','",$this->logbooks_locations_array)."'";
|
||||
|
||||
// get all worked slots from database
|
||||
$data = $this->db->query(
|
||||
"SELECT distinct LOWER(`COL_BAND`) as `COL_BAND` FROM `".$this->config->item('table_name')."` WHERE station_id in (" . $location_list . ") AND COL_PROP_MODE = 'EME'"
|
||||
);
|
||||
$worked_slots = array();
|
||||
foreach($data->result() as $row){
|
||||
array_push($worked_slots, $row->COL_BAND);
|
||||
}
|
||||
|
||||
return $worked_slots;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
<label class="col-md-1 control-label" for="band"><?= __("Band") ?></label>
|
||||
<div class="col-md-3">
|
||||
<select id="band" name="band" class="form-select">
|
||||
<option value="All" <?php if ($this->input->post('band') == "All" || $this->input->method() !== 'post') echo ' selected'; ?> ><?= __("All") ?></option>
|
||||
<?php foreach($worked_bands as $band) {
|
||||
echo '<option value="' . $band . '"';
|
||||
if ($this->input->post('band') == $band) echo ' selected';
|
||||
|
||||
Reference in New Issue
Block a user