Added overlap-checking to PHP and REST-Return

This commit is contained in:
int2001
2025-07-09 10:17:45 +00:00
parent a1d1d4c1a5
commit 2ec1eccc35
3 changed files with 24 additions and 3 deletions

View File

@@ -207,8 +207,13 @@ class Band extends CI_Controller {
$frequencyto = $this->security->xss_clean($this->input->post('frequencyto', true));
$mode = $this->security->xss_clean($this->input->post('mode', true));
$this->bands->saveBandEdge($id, $frequencyfrom, $frequencyto, $mode);
echo json_encode(array('message' => 'OK'));
$overlap=$this->bands->check4overlapEdges($id, $frequencyfrom, $frequencyto, $mode);
if (!($overlap)) {
$this->bands->saveBandEdge($id, $frequencyfrom, $frequencyto, $mode);
echo json_encode(array('message' => 'OK'));
} else {
echo json_encode(array('message' => 'Overlapping'));
}
return;
}
}