h26 band settings

This commit is contained in:
HB9HIL
2024-02-17 00:01:42 +01:00
parent ffe381f429
commit 5ffae9229b
4 changed files with 8 additions and 1 deletions

View File

@@ -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'));

View File

@@ -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);");
}

View File

@@ -2,6 +2,7 @@
$cq = 0;
$dok = 0;
$dxcc = 0;
$h26 = 0;
$iota = 0;
$pota = 0;
$sig = 0;
@@ -45,6 +46,7 @@ $wwff = 0;
<th><?php echo lang('gen_hamradio_cq'); ?></th>
<th><?php echo lang('gen_hamradio_dok'); ?></th>
<th><?php echo lang('gen_hamradio_dxcc'); ?></th>
<th><?php echo lang('menu_h26'); ?></th>
<th><?php echo lang('gen_hamradio_iota'); ?></th>
<th><?php echo lang('gen_hamradio_pota'); ?></th>
<th><?php echo lang('gen_hamradio_sig'); ?></th>
@@ -72,6 +74,7 @@ $wwff = 0;
<td style="text-align: center; vertical-align: middle;" class='cq_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->cq == 1) {echo 'checked'; $cq++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='dok_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->dok == 1) {echo 'checked'; $dok++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='dxcc_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->dxcc == 1) {echo 'checked'; $dxcc++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='h26_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->h26 == 1) {echo 'checked'; $h26++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='iota_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->iota == 1) {echo 'checked'; $iota++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='pota_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->pota == 1) {echo 'checked'; $pota++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='sig_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->sig == 1) {echo 'checked'; $sig++;}?>></td>
@@ -103,6 +106,7 @@ $wwff = 0;
<th class="master_cq"><input type="checkbox" <?php if ($cq > 0) echo 'checked';?>></th>
<th class="master_dok"><input type="checkbox" <?php if ($dok > 0) echo 'checked';?>></th>
<th class="master_dxcc"><input type="checkbox" <?php if ($dxcc > 0) echo 'checked';?>></th>
<th class="master_h26"><input type="checkbox" <?php if ($h26 > 0) echo 'checked';?>></th>
<th class="master_iota"><input type="checkbox" <?php if ($iota > 0) echo 'checked';?>></th>
<th class="master_pota"><input type="checkbox" <?php if ($pota > 0) echo 'checked';?>></th>
<th class="master_sig"><input type="checkbox" <?php if ($sig > 0) echo 'checked';?>></th>

View File

@@ -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"),