Show info about source callbook

This commit is contained in:
phl0
2025-12-28 22:49:45 +01:00
parent 6d772373ad
commit 1f9604e3c3
7 changed files with 26 additions and 7 deletions

View File

@@ -222,6 +222,7 @@ class Logbook extends CI_Controller {
$return['latlng'] = $this->qralatlng($return['callsign_qra']);
$return['bearing'] = $this->bearing($return['callsign_qra'], $measurement_base, $station_id);
}
$return['callbook_source'] = $callbook['source'];
echo json_encode($return, JSON_PRETTY_PRINT);

View File

@@ -125,8 +125,9 @@ class Hamqth {
$data['us_county'] = '';
}
} finally {
return $data;
}
} finally {
$data['source'] = 'HamQTH';
return $data;
}
}
}

View File

@@ -186,7 +186,7 @@ class Qrz {
$data['cqzone'] = '';
}
} finally {
$data['source'] = 'QRZ';
return $data;
}
}

View File

@@ -144,7 +144,7 @@ class Qrzcq {
}
} finally {
$data['source'] = 'QRZCQ';
return $data;
}
}

View File

@@ -115,6 +115,7 @@ class Qrzru {
$data['cqz'] = '';
}
} finally {
$data['source'] = 'QRZ.ru';
return $data;
}
}

View File

@@ -61,6 +61,11 @@
</td>
</tr>
<tr>
<td style="padding: 0 0.3em 0 0;" align="left"><?= __("Source callbook"); ?></td>
<td style="padding: 0.3em 0 0.3em 0.5em;" align="left"><?= $callsign['source']; ?>
</td>
</tr>
<tr>
<td style="padding: 0 0.3em 0 0;" align="left"><?= __("LoTW User"); ?></td>
<td style="padding: 0.3em 0 0.3em 0.5em;" align="left">

View File

@@ -1692,6 +1692,11 @@ $("#callsign").on("focusout", function () {
}
profileInfo += '</p>';
}
// Email information
if (result.callsign_email) {
profileInfo += '<p class="mb-1" style="font-size: 0.875rem;"><i class="fas fa-envelope me-1"></i><a href="mailto:'+result.callsign_email+'">' + result.callsign_email + '</a></p>';
}
// Born (with age calculation)
if (result.profile_born) {
let currentYear = new Date().getFullYear();
@@ -1756,7 +1761,7 @@ $("#callsign").on("focusout", function () {
}
// QSL information
let qslInfo = '<i class="fas fa-envelope me-1"></i>' + lang_qso_profile_qsl + ': ';
let qslInfo = '<i class="fas fa-address-card me-1"></i>' + lang_qso_profile_qsl + ': ';
let qslMethodsIcons = [];
// Build QSL methods icons list
@@ -1783,7 +1788,13 @@ $("#callsign").on("focusout", function () {
qslInfo += qslMethodsIcons.join(', ');
}
profileInfo += '<p class="mb-0" style="font-size: 0.875rem;">' + qslInfo + '</p>'; $('#callsign-image-info').html(profileInfo);
profileInfo += '<p class="mb-0" style="font-size: 0.875rem;">' + qslInfo + '</p>';
// Email information
if (result.callbook_source) {
profileInfo += '<p class="mb-1" style="font-size: 0.875rem;"><i class="fas fa-address-book me-1"></i>'+result.callbook_source+'</p>';
}
$('#callsign-image-info').html(profileInfo);
// Show the panel first so we can measure it
$('#callsign-image').attr('style', 'display: true;');