[SimpleFLE] Replaced hardcoded bands with bands from db

这个提交包含在:
Andreas 2023-10-26 19:59:02 +02:00
父节点 50551441a1
当前提交 587660383e
共有 3 个文件被更改,包括 23 次插入77 次删除

查看文件

@ -13,7 +13,7 @@ class SimpleFLE extends CI_Controller {
$this->load->model('bands');
$data['station_profile'] = $this->stations->all_of_user(); // Used in the view for station location select
$data['bands'] = $this->bands->get_all_bands_for_user(); // Fetching Bands for FLE
$data['bands'] = $this->bands->get_all_bands(); // Fetching Bands for FLE
$data['active_station_profile'] = $this->stations->find_active(); // Prepopulate active Station in Station Location Selector

查看文件

@ -49,6 +49,20 @@ class Bands extends CI_Model {
return $results;
}
function get_all_bands() {
$this->db->from('bands');
$result = $this->db->get()->result();
$results = array();
foreach($result as $band) {
$results['b'.strtoupper($band->band)] = array('cw' => $band->cw, 'ssb' => $band->ssb, 'digi' => $band->data);
}
return $results;
}
function get_user_bands_for_qso_entry($includeall = false) {
$this->db->from('bands');
$this->db->join('bandxuser', 'bandxuser.bandid = bands.id');

查看文件

@ -1,71 +1,3 @@
var Bands = {
b160M: {
cw: "1.825",
ssb: "1.890",
digi: "1.840",
},
b80M: {
cw: "3.532",
ssb: "3.770",
digi: "3.573",
},
b60M: {
cw: "5.353",
ssb: "5.450",
digi: "5.357",
},
b40M: {
cw: "7.032",
ssb: "7.100",
digi: "7.074",
},
b30M: {
cw: "10.110",
ssb: "10.120",
digi: "10.136",
},
b20M: {
cw: "14.032",
ssb: "14.200",
digi: "14.074",
},
b17M: {
cw: "18.070",
ssb: "18.120",
digi: "18.104",
},
b15M: {
cw: "21.032",
ssb: "21.200",
digi: "21.074",
},
b12M: {
cw: "24.895",
ssb: "24.910",
digi: "24.915",
},
b10M: {
cw: "20.032",
ssb: "28.200",
digi: "28.074",
},
b6M: {
cw: "50.090",
ssb: "50.350",
digi: "50.313",
},
b2M: {
cw: "144.090",
ssb: "144.250",
digi: "144.174",
},
b70CM: {
cw: "432.050",
ssb: "432.300",
digi: "432.065",
},
};
var $textarea = $("textarea");
var qsodate = "";
var qsotime = "";