Removed unused functions

This commit is contained in:
Andreas Kristiansen
2026-02-24 10:00:07 +01:00
parent e1f7f23a64
commit 10e66bbdad

View File

@@ -284,72 +284,4 @@ class CQ extends CI_Model{
return $query->result();
}
/*
* Function gets worked and confirmed summary on each band on the active stationprofile
* Now uses data from get_cq_array instead of separate queries - much more efficient!
*/
function get_cq_summary($bands, $postdata, $location_list) {
$result = $this->get_cq_array($bands, $postdata, $location_list);
if ($result && isset($result['summary'])) {
return $result['summary'];
}
// Fallback to empty structure if something went wrong
$cqSummary = [];
foreach ($bands as $band) {
$cqSummary['worked'][$band] = '-';
$cqSummary['confirmed'][$band] = '-';
}
$cqSummary['worked']['Total'] = '-';
$cqSummary['confirmed']['Total'] = '-';
return $cqSummary;
}
function getSummaryByBand($band, $postdata, $location_list, $bandslots) {
$bindings=[];
$sql = "SELECT count(distinct thcv.col_cqz) as count FROM " . $this->config->item('table_name') . " thcv";
$sql .= " where station_id in (" . $location_list . ') and col_cqz <= 40 and col_cqz > 0';
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode = ?";
$bindings[]=$band;
} else if ($band == 'All') {
$this->load->model('bands');
// $bandslots = $this->bands->get_worked_bands('cq');
$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 = ?";
$bindings[]=$band;
}
if ($postdata['mode'] != 'All') {
$sql .= " and (col_mode = ? or col_submode = ?)";
$bindings[]=$postdata['mode'];
$bindings[]=$postdata['mode'];
}
if ($postdata['datefrom'] != NULL) {
$sql .= " and col_time_on >= ?";
$bindings[]=$postdata['datefrom'] . ' 00:00:00';
}
if ($postdata['dateto'] != NULL) {
$sql .= " and col_time_on <= ?";
$bindings[]=$postdata['dateto'] . ' 23:59:59';
}
$query = $this->db->query($sql,$bindings);
return $query->result();
}
}