diff --git a/application/controllers/Band.php b/application/controllers/Band.php index 16b5fa7d9..2c56080b4 100644 --- a/application/controllers/Band.php +++ b/application/controllers/Band.php @@ -122,6 +122,7 @@ class Band extends CI_Controller { $band['cq'] = $this->security->xss_clean($this->input->post('cq')); $band['dok'] = $this->security->xss_clean($this->input->post('dok')); $band['dxcc'] = $this->security->xss_clean($this->input->post('dxcc')); + $band['h26'] = $this->security->xss_clean($this->input->post('h26')); $band['iota'] = $this->security->xss_clean($this->input->post('iota')); $band['sig'] = $this->security->xss_clean($this->input->post('sig')); $band['sota'] = $this->security->xss_clean($this->input->post('sota')); diff --git a/application/models/Bands.php b/application/models/Bands.php index f371d4007..7fc915630 100644 --- a/application/models/Bands.php +++ b/application/models/Bands.php @@ -260,6 +260,7 @@ class Bands extends CI_Model { 'cq' => $band['cq'] == "true" ? '1' : '0', 'dok' => $band['dok'] == "true" ? '1' : '0', 'dxcc' => $band['dxcc'] == "true" ? '1' : '0', + 'h26' => $band['h26'] == "true" ? '1' : '0', 'iota' => $band['iota'] == "true" ? '1' : '0', 'pota' => $band['pota'] == "true" ? '1' : '0', 'sig' => $band['sig'] == "true" ? '1' : '0', @@ -307,7 +308,7 @@ class Bands extends CI_Model { $this->db->insert('bands', $data); } - $this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, iota, pota, sig, sota, uscounties, was, wwff, vucc) + $this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, h26, iota, pota, sig, sota, uscounties, was, wwff, vucc) select bands.id, " . $this->session->userdata('user_id') . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands where band ='".$data['band']."' and not exists (select 1 from bandxuser where userid = " . $this->session->userdata('user_id') . " and bandid = bands.id);"); } diff --git a/application/views/bands/index.php b/application/views/bands/index.php index 829912567..4c85d3e9d 100644 --- a/application/views/bands/index.php +++ b/application/views/bands/index.php @@ -2,6 +2,7 @@ $cq = 0; $dok = 0; $dxcc = 0; +$h26 = 0; $iota = 0; $pota = 0; $sig = 0; @@ -45,6 +46,7 @@ $wwff = 0; + @@ -72,6 +74,7 @@ $wwff = 0; cq == 1) {echo 'checked'; $cq++;}?>> dok == 1) {echo 'checked'; $dok++;}?>> dxcc == 1) {echo 'checked'; $dxcc++;}?>> + h26 == 1) {echo 'checked'; $h26++;}?>> iota == 1) {echo 'checked'; $iota++;}?>> pota == 1) {echo 'checked'; $pota++;}?>> sig == 1) {echo 'checked'; $sig++;}?>> @@ -103,6 +106,7 @@ $wwff = 0; 0) echo 'checked';?>> 0) echo 'checked';?>> 0) echo 'checked';?>> + 0) echo 'checked';?>> 0) echo 'checked';?>> 0) echo 'checked';?>> 0) echo 'checked';?>> diff --git a/assets/js/sections/bands.js b/assets/js/sections/bands.js index d775549be..6c1b92485 100644 --- a/assets/js/sections/bands.js +++ b/assets/js/sections/bands.js @@ -213,6 +213,7 @@ function saveBand(id) { 'cq': $(".cq_"+id+" input[type='checkbox']").is(":checked"), 'dok': $(".dok_"+id+" input[type='checkbox']").is(":checked"), 'dxcc': $(".dxcc_"+id+" input[type='checkbox']").is(":checked"), + 'h26': $(".h26_"+id+" input[type='checkbox']").is(":checked"), 'iota': $(".iota_"+id+" input[type='checkbox']").is(":checked"), 'pota': $(".pota_"+id+" input[type='checkbox']").is(":checked"), 'sig': $(".sig_"+id+" input[type='checkbox']").is(":checked"),