Merge pull request #2777 from AndreasK79/cqz_itu_fixes

CQ and ITU zone fixes
This commit is contained in:
Andreas Kristiansen
2026-01-06 09:12:14 +01:00
committed by GitHub
4 changed files with 13 additions and 2 deletions

View File

@@ -1713,7 +1713,7 @@ class Logbook_model extends CI_Model {
'COL_COUNTRY' => $country,
'COL_CONT' => $this->input->post('continent'),
'COL_DXCC' => $dxcc,
'COL_CQZ' => $this->input->post('cqz'),
'COL_CQZ' => $this->input->post('cqz') != '' ? $this->input->post('cqz') : null,
'COL_ITUZ' => $this->input->post('ituz') != '' ? $this->input->post('ituz') : null,
'COL_SAT_NAME' => $this->input->post('sat_name'),
'COL_SAT_MODE' => $this->input->post('sat_mode'),

View File

@@ -897,6 +897,10 @@ class Logbookadvanced_model extends CI_Model {
$updatedData['COL_ITUZ'] = $callbook['ituz'];
$updated = true;
}
if (!empty($callbook['cqz']) && empty($qso['COL_CQZ'])) {
$updatedData['COL_CQZ'] = $callbook['cqz'];
$updated = true;
}
if (empty($qso['COL_CONT'])) {
$updatedData['COL_CONT'] = $this->logbook_model->getContinent($callbook['dxcc']);
$updated = true;
@@ -1328,6 +1332,10 @@ class Logbookadvanced_model extends CI_Model {
$skipqrzupdate = true;
} else {
if ($value == "null") {
$value = null;
}
$sql = "UPDATE ".$this->config->item('table_name')." JOIN station_profile ON ".$this->config->item('table_name').".station_id = station_profile.station_id SET " . $this->config->item('table_name').".".$column . " = ? WHERE " . $this->config->item('table_name').".col_primary_key in ? and station_profile.user_id = ?";
$query = $this->db->query($sql, array($value, json_decode($ids, true), $this->session->userdata('user_id')));

View File

@@ -62,6 +62,7 @@
<!-- CQ Zone -->
<select style="display:none" class="form-select form-select-sm w-auto" id="editCqz" name="cqz" required>
<option value="null">-</option>
<?php
for ($i = 1; $i <= 40; $i++) {
echo '<option value="' . $i . '">' . $i . '</option>';
@@ -71,6 +72,7 @@
<!-- ITU Zone -->
<select style="display:none" class="form-select form-select-sm w-auto" id="editItuz" name="ituz" required>
<option value="null">-</option>
<?php
for ($i = 1; $i <= 90; $i++) {
echo '<option value="' . $i . '">' . $i . '</option>';

View File

@@ -307,7 +307,8 @@
<div class="mb-3 col-sm-6">
<label for="cqz"><?= __("CQ Zone"); ?></label>
<select class="form-select" id="cqz_edit" name="cqz" required>
<?php for ($i = 1; $i <= 40; $i++) { ?>
<option value=''></option>
<?php for ($i = 1; $i <= 40; $i++) { ?>
<option value="<?= $i; ?>" <?php if ($qso->COL_CQZ == $i) echo "selected=\"selected\""; ?>><?= $i; ?></option>
<?php } ?>
</select>