basic setup to make units selectable in band table

This commit is contained in:
HB9HIL
2024-07-05 20:16:25 +02:00
parent 571c93d0b5
commit 44ee68c19f
3 changed files with 318 additions and 245 deletions

View File

@@ -20,6 +20,7 @@ class Band extends CI_Controller {
$this->load->model('bands'); $this->load->model('bands');
$data['bands'] = $this->bands->get_all_bands_for_user(); $data['bands'] = $this->bands->get_all_bands_for_user();
$data['units'] = $this->frequency->QRG_UNITS;
// Render Page // Render Page
$data['page_title'] = __("Bands"); $data['page_title'] = __("Bands");

View File

@@ -1,132 +1,188 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Frequency { class Frequency {
public $defaultFrequencies = array( public $QRG_UNITS = [
'160m'=>array( 'Hz',
'SSB'=>"1900000", 'kHz',
'DATA'=>"1838000", 'MHz',
'CW'=>"1830000", 'GHz'
'NOMINAL'=>"1.8"), ];
'80m'=>array(
'SSB'=>"3700000", public $defaultFrequencies = array(
'DATA'=>"3583000", '160m' => array(
"CW"=>"3550000", 'SSB' => "1900000",
"NOMINAL"=>"3.5"), 'DATA' => "1838000",
'60m'=>array( 'CW' => "1830000",
'SSB'=>"5330000", 'NOMINAL' => "1.8",
'DATA'=>"5330000", 'UNIT' => 'kHz'
"CW"=>"5260000", ),
"NOMINAL"=>"5"), '80m' => array(
'40m'=>array( 'SSB' => "3700000",
'SSB'=>"7100000", 'DATA' => "3583000",
'DATA'=>"7040000", "CW" => "3550000",
'CW'=>"7020000", "NOMINAL" => "3.5",
'NOMINAL'=>"7"), 'UNIT' => 'kHz'
'30m'=>array( ),
'SSB'=>"10120000", '60m' => array(
'DATA'=>"10145000", 'SSB' => "5330000",
'CW'=>"10120000", 'DATA' => "5330000",
'NOMINAL'=>"10"), "CW" => "5260000",
'20m'=>array( "NOMINAL" => "5",
'SSB'=>"14200000", 'UNIT' => 'kHz'
'DATA'=>"14080000", ),
'CW'=>"14020000", '40m' => array(
'NOMINAL'=>"14"), 'SSB' => "7100000",
'17m'=>array( 'DATA' => "7040000",
'SSB'=>"18130000", 'CW' => "7020000",
'DATA'=>"18105000", 'NOMINAL' => "7",
'CW'=>"18080000", 'UNIT' => 'kHz'
'NOMINAL'=>"18"), ),
'15m'=>array( '30m' => array(
'SSB'=>"21300000", 'SSB' => "10120000",
'DATA'=>"21080000", 'DATA' => "10145000",
'CW'=>"21020000", 'CW' => "10120000",
'NOMINAL'=>"21"), 'NOMINAL' => "10",
'12m'=>array( 'UNIT' => 'kHz'
'SSB'=>"24950000", ),
'DATA'=>"24925000", '20m' => array(
'CW'=>"24900000", 'SSB' => "14200000",
'NOMINAL'=>"24"), 'DATA' => "14080000",
'10m'=>array( 'CW' => "14020000",
'SSB'=>"28300000", 'NOMINAL' => "14",
'DATA'=>"28120000", 'UNIT' => 'kHz'
'CW'=>"28050000", ),
'NOMINAL'=>"28"), '17m' => array(
'6m'=>array( 'SSB' => "18130000",
'SSB'=>"50150000", 'DATA' => "18105000",
'DATA'=>"50230000", 'CW' => "18080000",
'CW'=>"50090000", 'NOMINAL' => "18",
'NOMINAL'=>"50"), 'UNIT' => 'kHz'
'4m'=>array( ),
'SSB'=>"70200000", '15m' => array(
'DATA'=>"70200000", 'SSB' => "21300000",
'CW'=>"70200000", 'DATA' => "21080000",
'NOMINAL'=>"70"), 'CW' => "21020000",
'2m'=>array( 'NOMINAL' => "21",
'SSB'=>"144300000", 'UNIT' => 'kHz'
'DATA'=>"144370000", ),
'CW'=>"144050000", '12m' => array(
'NOMINAL'=>"144"), 'SSB' => "24950000",
'1.25m'=>array( 'DATA' => "24925000",
'SSB'=>"222100000", 'CW' => "24900000",
'DATA'=>"222100000", 'NOMINAL' => "24",
'CW'=>"222100000", 'UNIT' => 'kHz'
'NOMINAL'=>"222"), ),
'70cm'=>array( '10m' => array(
'SSB'=>"432200000", 'SSB' => "28300000",
'DATA'=>"432088000", 'DATA' => "28120000",
'CW'=>"432050000", 'CW' => "28050000",
'NOMINAL'=>"433"), 'NOMINAL' => "28",
'33cm'=>array( 'UNIT' => 'kHz'
'SSB'=>"902100000", ),
'DATA'=>"902100000", '6m' => array(
'CW'=>"902100000", 'SSB' => "50150000",
'NOMINAL'=>"902"), 'DATA' => "50230000",
'23cm'=>array( 'CW' => "50090000",
'SSB'=>"1296000000", 'NOMINAL' => "50",
'DATA'=>"1296138000", 'UNIT' => 'MHz'
'CW'=>"129600000", ),
'NOMINAL'=>"1296"), '4m' => array(
'13cm'=>array( 'SSB' => "70200000",
'SSB'=>"2320800000", 'DATA' => "70200000",
'DATA'=>"2320800000", 'CW' => "70200000",
'CW'=>"2320800000", 'NOMINAL' => "70",
'NOMINAL'=>"2400"), 'UNIT' => 'MHz'
'9cm'=>array( ),
'SSB'=>"3410000000", '2m' => array(
'DATA'=>"3410000000", 'SSB' => "144300000",
'CW'=>"3400000000", 'DATA' => "144370000",
'NOMINAL'=>"3400"), 'CW' => "144050000",
'6cm'=>array( 'NOMINAL' => "144",
'SSB'=>"5670000000", 'UNIT' => 'MHz'
'DATA'=>"5670000000", ),
'CW'=>"5670000000", '1.25m' => array(
'NOMINAL'=>"5670"), 'SSB' => "222100000",
'3cm'=>array( 'DATA' => "222100000",
'SSB'=>"10225000000", 'CW' => "222100000",
'DATA'=>"10225000000", 'NOMINAL' => "222",
'CW'=>"10225000000", 'UNIT' => 'MHz'
'NOMINAL'=>"10225") ),
); '70cm' => array(
'SSB' => "432200000",
'DATA' => "432088000",
'CW' => "432050000",
'NOMINAL' => "433",
'UNIT' => 'MHz'
),
'33cm' => array(
'SSB' => "902100000",
'DATA' => "902100000",
'CW' => "902100000",
'NOMINAL' => "902",
'UNIT' => 'MHz'
),
'23cm' => array(
'SSB' => "1296000000",
'DATA' => "1296138000",
'CW' => "129600000",
'NOMINAL' => "1296",
'UNIT' => 'GHz'
),
'13cm' => array(
'SSB' => "2320800000",
'DATA' => "2320800000",
'CW' => "2320800000",
'NOMINAL' => "2400",
'UNIT' => 'GHz'
),
'9cm' => array(
'SSB' => "3410000000",
'DATA' => "3410000000",
'CW' => "3400000000",
'NOMINAL' => "3400",
'UNIT' => 'GHz'
),
'6cm' => array(
'SSB' => "5670000000",
'DATA' => "5670000000",
'CW' => "5670000000",
'NOMINAL' => "5670",
'UNIT' => 'GHz'
),
'3cm' => array(
'SSB' => "10225000000",
'DATA' => "10225000000",
'CW' => "10225000000",
'NOMINAL' => "10225",
'UNIT' => 'GHz'
),
'1.25cm' => array(
'SSB' => "24000000000",
'DATA' => "24000000000",
'CW' => "24000000000",
'NOMINAL' => "24000",
'UNIT' => 'GHz'
),
);
/* Class to convert band and mode into a frequency in a format based on the specifications of the database table */ /* Class to convert band and mode into a frequency in a format based on the specifications of the database table */
public function convert_band($band, $mode='SSB') { public function convert_band($band, $mode = 'SSB') {
// Converting LSB and USB to SSB // Converting LSB and USB to SSB
if($mode =='LSB' or $mode =='USB'){ if ($mode == 'LSB' or $mode == 'USB') {
$mode= "SSB"; $mode = "SSB";
} }
// Use 'DATA' for any of the data modes // Use 'DATA' for any of the data modes
if($mode !='CW' and $mode !='SSB'){ if ($mode != 'CW' and $mode != 'SSB') {
$mode= "DATA"; $mode = "DATA";
} }
return $this->getDefaultFrequency($band, $mode); return $this->getDefaultFrequency($band, $mode);
} }
function getDefaultFrequency($band, $mode) { function getDefaultFrequency($band, $mode) {
$CI =& get_instance(); $CI = &get_instance();
$db =& $CI->db; $db = &$CI->db;
$db->from('bands'); $db->from('bands');
$db->where('bands.band', $band); $db->where('bands.band', $band);
@@ -198,10 +254,18 @@ class Frequency {
return $Band; return $Band;
} }
// converts a frequency in Hz to MHz output // converts a frequency in Hz to MHz output
function hz_to_mhz($frequency) function hz_to_mhz($frequency) {
{ return number_format(($frequency / 1000 / 1000), 3) . " MHz";
return number_format (($frequency / 1000 / 1000), 3) . " MHz"; }
}
function get_qrg_unit($band) {
if (isset($this->defaultFrequencies[$band]['UNIT'])) {
$unit = $this->defaultFrequencies[$band]['UNIT'];
} else {
$unit = 'kHz'; // we use kHz as fallback unit
}
return $unit;
}
} }
/* End of file Frequency.php */ /* End of file Frequency.php */

View File

@@ -17,139 +17,147 @@ $wwff = 0;
?> ?>
<div class="container"> <div class="container">
<br> <br>
<?php if($this->session->flashdata('message')) { ?> <?php if($this->session->flashdata('message')) { ?>
<!-- Display Message --> <!-- Display Message -->
<div class="alert-message error"> <div class="alert-message error">
<p><?php echo $this->session->flashdata('message'); ?></p> <p><?php echo $this->session->flashdata('message'); ?></p>
</div> </div>
<?php } ?> <?php } ?>
<h2><?= __("Bands"); ?></h2> <h2><?= __("Bands"); ?></h2>
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<?= __("Bands"); ?> <?= __("Bands"); ?>
</div> </div>
<div class="card-body"> <div class="card-body">
<p class="card-text"> <p class="card-text">
<?= __("Using the band list you can control which bands are shown when creating a new QSO."); ?> <?= __("Using the band list you can control which bands are shown when creating a new QSO."); ?><br>
</p> <?= __("Active bands will be shown in the QSO 'Band' drop-down, while inactive bands will be hidden and cannot be selected."); ?>
<p class="card-text"> </p>
<?= __("Active bands will be shown in the QSO 'Band' drop-down, while inactive bands will be hidden and cannot be selected."); ?> <div class="table-responsive">
</p>
<div class="table-responsive">
<table style="width:100%" class="bandtable table table-sm table-striped"> <table style="width:100%" class="bandtable table table-sm table-striped">
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
<th><?= __("Band"); ?></th> <th><?= __("Band"); ?></th>
<th><?= __("CQ"); ?></th> <th><?= __("CQ"); ?></th>
<th><?= __("DOK"); ?></th> <th><?= __("DOK"); ?></th>
<th><?= __("DXCC"); ?></th> <th><?= __("DXCC"); ?></th>
<th><?= __("H26"); ?></th> <th><?= __("H26"); ?></th>
<th><?= __("IOTA"); ?></th> <th><?= __("IOTA"); ?></th>
<th><?= __("JCC"); ?></th> <th><?= __("JCC"); ?></th>
<th><?= __("POTA"); ?></th> <th><?= __("POTA"); ?></th>
<th><?= __("RAC"); ?></th> <th><?= __("RAC"); ?></th>
<th><?= __("Sig"); ?></th> <th><?= __("Sig"); ?></th>
<th><?= __("SOTA"); ?></th> <th><?= __("SOTA"); ?></th>
<th><?= __("USA County"); ?></th> <th><?= __("USA County"); ?></th>
<th><?= __("VUCC"); ?></th> <th><?= __("VUCC"); ?></th>
<th><?= __("WAJA"); ?></th> <th><?= __("WAJA"); ?></th>
<th><?= __("WAS"); ?></th> <th><?= __("WAS"); ?></th>
<th><?= __("WWFF"); ?></th> <th><?= __("WWFF"); ?></th>
<th><?= __("Bandgroup"); ?></th> <th><?= __("Bandgroup"); ?></th>
<th><?= __("SSB QRG"); ?></th> <th><?= __("SSB QRG"); ?></th>
<th><?= __("DATA QRG"); ?></th> <th><?= __("DATA QRG"); ?></th>
<th><?= __("CW QRG"); ?></th> <th><?= __("CW QRG"); ?></th>
<?php if($this->session->userdata('user_type') == '99') { ?> <th><?= __("QRG Unit"); ?></th>
<th></th> <?php if($this->session->userdata('user_type') == '99') { ?>
<th></th> <th></th>
<?php } ?> <th></th>
</tr> <?php } ?>
</thead> </tr>
<tbody> </thead>
<?php foreach ($bands as $band) { ?> <tbody>
<tr> <?php foreach ($bands as $band) { ?>
<td style="text-align: center; vertical-align: middle;" class='band_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->active == 1) {echo 'checked';}?>></td> <tr>
<td style="text-align: center; vertical-align: middle;" ><?php echo $band->band;?></td> <td style="text-align: center; vertical-align: middle;" class='band_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->active == 1) {echo 'checked';}?>></td>
<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;" ><?php echo $band->band;?></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='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='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='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='helvetia_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->helvetia == 1) {echo 'checked'; $helvetia++;}?>></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='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='helvetia_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->helvetia == 1) {echo 'checked'; $helvetia++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='jcc_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->jcc == 1) {echo 'checked'; $jcc++;}?>></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='jcc_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->jcc == 1) {echo 'checked'; $jcc++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='rac_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->rac == 1) {echo 'checked'; $rac++;}?>></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> <td style="text-align: center; vertical-align: middle;" class='rac_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->rac == 1) {echo 'checked'; $rac++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='sota_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->sota == 1) {echo 'checked'; $sota++;}?>></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>
<td style="text-align: center; vertical-align: middle;" class='uscounties_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->uscounties == 1) {echo 'checked'; $uscounties++;}?>></td> <td style="text-align: center; vertical-align: middle;" class='sota_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->sota == 1) {echo 'checked'; $sota++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='vucc_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->vucc == 1) {echo 'checked'; $vucc++;}?>></td> <td style="text-align: center; vertical-align: middle;" class='uscounties_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->uscounties == 1) {echo 'checked'; $uscounties++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='waja_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->waja == 1) {echo 'checked'; $waja++;}?>></td> <td style="text-align: center; vertical-align: middle;" class='vucc_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->vucc == 1) {echo 'checked'; $vucc++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='was_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->was == 1) {echo 'checked'; $was++;}?>></td> <td style="text-align: center; vertical-align: middle;" class='waja_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->waja == 1) {echo 'checked'; $waja++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='wwff_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->wwff == 1) {echo 'checked'; $wwff++;}?>></td> <td style="text-align: center; vertical-align: middle;" class='was_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->was == 1) {echo 'checked'; $was++;}?>></td>
<td style="text-align: center; vertical-align: middle;" ><?php echo $band->bandgroup;?></td> <td style="text-align: center; vertical-align: middle;" class='wwff_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->wwff == 1) {echo 'checked'; $wwff++;}?>></td>
<td style="text-align: center; vertical-align: middle;" ><?php echo $band->ssb;?></td> <td style="text-align: center; vertical-align: middle;" ><?php echo $band->bandgroup;?></td>
<td style="text-align: center; vertical-align: middle;" ><?php echo $band->data;?></td> <td style="text-align: center; vertical-align: middle;" ><?php echo $band->ssb;?></td>
<td style="text-align: center; vertical-align: middle;" ><?php echo $band->cw;?></td> <td style="text-align: center; vertical-align: middle;" ><?php echo $band->data;?></td>
<?php if($this->session->userdata('user_type') == '99') { ?> <td style="text-align: center; vertical-align: middle;" ><?php echo $band->cw;?></td>
<td style="text-align: center; vertical-align: middle;" > <td style="text-align: center; vertical-align: middle;" class='band_<?php echo $band->id ?>'>
<a href="javascript:editBandDialog('<?php echo $band->bandid ?>');" class="btn btn-outline-primary btn-sm" title="Edit"><i class="fas fa-edit"></i></a> <select class="form-select" name="unit_<?php echo $band->id; ?>">
</td> <?php foreach($units as $unit): ?>
<td style="text-align: center; vertical-align: middle;" > <option value="<?php echo $unit; ?>" <?php if ($this->frequency->get_qrg_unit($band->band) == $unit) { echo 'selected';} ?>><?php echo $unit; ?></option>
<a href="javascript:deleteBand('<?php echo $band->id . '\',\'' . $band->band ?>');" class="btn btn-danger btn-sm" title="Delete"><i class="fas fa-trash-alt"></i></a> <?php endforeach; ?>
</td> </select>
<?php } ?> </td>
</tr> <?php if($this->session->userdata('user_type') == '99') { ?>
<td style="text-align: center; vertical-align: middle;" >
<a href="javascript:editBandDialog('<?php echo $band->bandid ?>');" class="btn btn-outline-primary btn-sm" title="Edit"><i class="fas fa-edit"></i></a>
</td>
<td style="text-align: center; vertical-align: middle;" >
<a href="javascript:deleteBand('<?php echo $band->id . '\',\'' . $band->band ?>');" class="btn btn-danger btn-sm" title="Delete"><i class="fas fa-trash-alt"></i></a>
</td>
<?php } ?>
</tr>
<?php } ?>
</tbody>
<tfoot>
<th><?= __("All"); ?></th>
<th></th>
<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_helvetia"><input type="checkbox" <?php if ($helvetia > 0) echo 'checked';?>></th>
<th class="master_iota"><input type="checkbox" <?php if ($iota > 0) echo 'checked';?>></th>
<th class="master_jcc"><input type="checkbox" <?php if ($jcc > 0) echo 'checked';?>></th>
<th class="master_pota"><input type="checkbox" <?php if ($pota > 0) echo 'checked';?>></th>
<th class="master_rac"><input type="checkbox" <?php if ($rac > 0) echo 'checked';?>></th>
<th class="master_sig"><input type="checkbox" <?php if ($sig > 0) echo 'checked';?>></th>
<th class="master_sota"><input type="checkbox" <?php if ($sota > 0) echo 'checked';?>></th>
<th class="master_uscounties"><input type="checkbox" <?php if ($uscounties > 0) echo 'checked';?>></th>
<th class="master_vucc"><input type="checkbox" <?php if ($vucc > 0) echo 'checked';?>></th>
<th class="master_waja"><input type="checkbox" <?php if ($waja > 0) echo 'checked';?>></th>
<th class="master_was"><input type="checkbox" <?php if ($was > 0) echo 'checked';?>></th>
<th class="master_wwff"><input type="checkbox" <?php if ($wwff > 0) echo 'checked';?>></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<?php if($this->session->userdata('user_type') == '99') { ?>
<th></th>
<th></th>
<?php } ?>
</tfoot>
<table>
</div>
<br/>
<p>
<?php if($this->session->userdata('user_type') == '99') { ?>
<script>
var lang_options_bands_edit = '<?= __("Edit Band"); ?>';
var lang_options_bands_create = '<?= __("Create a band"); ?>';
var lang_admin_close = '<?= __("Close"); ?>';
var lang_options_bands_delete_warning = '<?= __("Warning! Are you sure you want to delete the following band: "); ?>';
var lang_options_bands_activateall_warning = '<?= __("Warning! Are you sure you want to activate all bands?"); ?>';
var lang_options_bands_deactivateall_warning = '<?= __("Warning! Are you sure you want to deactivate all bands?"); ?>';
</script>
<button onclick="createBandDialog();" class="btn btn-primary btn-sm"><i class="fas fa-plus"></i> <?= __("Create a band"); ?></button>
<button onclick="activateAllBands();" class="btn btn-primary btn-sm"><?= __("Activate All"); ?></button>
<button onclick="deactivateAllBands();" class="btn btn-primary btn-sm"><?= __("Deactivate All"); ?></button>
<?php } ?> <?php } ?>
</tbody> </p>
<tfoot> </div>
<th><?= __("All"); ?></th>
<th></th>
<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_helvetia"><input type="checkbox" <?php if ($helvetia > 0) echo 'checked';?>></th>
<th class="master_iota"><input type="checkbox" <?php if ($iota > 0) echo 'checked';?>></th>
<th class="master_jcc"><input type="checkbox" <?php if ($jcc > 0) echo 'checked';?>></th>
<th class="master_pota"><input type="checkbox" <?php if ($pota > 0) echo 'checked';?>></th>
<th class="master_rac"><input type="checkbox" <?php if ($rac > 0) echo 'checked';?>></th>
<th class="master_sig"><input type="checkbox" <?php if ($sig > 0) echo 'checked';?>></th>
<th class="master_sota"><input type="checkbox" <?php if ($sota > 0) echo 'checked';?>></th>
<th class="master_uscounties"><input type="checkbox" <?php if ($uscounties > 0) echo 'checked';?>></th>
<th class="master_vucc"><input type="checkbox" <?php if ($vucc > 0) echo 'checked';?>></th>
<th class="master_waja"><input type="checkbox" <?php if ($waja > 0) echo 'checked';?>></th>
<th class="master_was"><input type="checkbox" <?php if ($was > 0) echo 'checked';?>></th>
<th class="master_wwff"><input type="checkbox" <?php if ($wwff > 0) echo 'checked';?>></th>
<th></th>
<th></th>
<th></th>
<th></th>
<?php if($this->session->userdata('user_type') == '99') { ?>
<th></th>
<th></th>
<?php } ?>
</tfoot>
<table>
</div> </div>
<br/> </div>
<p>
<?php if($this->session->userdata('user_type') == '99') { ?>
<script>
var lang_options_bands_edit = '<?= __("Edit Band"); ?>';
var lang_options_bands_create = '<?= __("Create a band"); ?>';
var lang_admin_close = '<?= __("Close"); ?>';
var lang_options_bands_delete_warning = '<?= __("Warning! Are you sure you want to delete the following band: "); ?>';
var lang_options_bands_activateall_warning = '<?= __("Warning! Are you sure you want to activate all bands?"); ?>';
var lang_options_bands_deactivateall_warning = '<?= __("Warning! Are you sure you want to deactivate all bands?"); ?>';
</script>
<button onclick="createBandDialog();" class="btn btn-primary btn-sm"><i class="fas fa-plus"></i> <?= __("Create a band"); ?></button>
<button onclick="activateAllBands();" class="btn btn-primary btn-sm"><?= __("Activate All"); ?></button>
<button onclick="deactivateAllBands();" class="btn btn-primary btn-sm"><?= __("Deactivate All"); ?></button>
<?php } ?>
</p>
</div>
</div>