mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Advanced Logbook] Added qrz.com status
This commit is contained in:
@@ -526,6 +526,7 @@ class Logbookadvanced extends CI_Controller {
|
||||
$json_string['sig']['show'] = $this->input->post('sig');
|
||||
$json_string['wwff']['show'] = $this->input->post('wwff');
|
||||
$json_string['continent']['show'] = $this->input->post('continent');
|
||||
$json_string['qrz']['show'] = $this->input->post('qrz');
|
||||
|
||||
$obj['column_settings']= json_encode($json_string);
|
||||
|
||||
|
||||
@@ -51,7 +51,8 @@
|
||||
\"dok\":{\"show\":\"true\"},
|
||||
\"wwff\":{\"show\":\"true\"},
|
||||
\"sig\":{\"show\":\"true\"},
|
||||
\"continent\":{\"show\":\"true\"}
|
||||
\"continent\":{\"show\":\"true\",
|
||||
\"qrz\":{\"show\":\"true\",}
|
||||
}";
|
||||
}
|
||||
$current_opts = json_decode($options);
|
||||
@@ -108,6 +109,10 @@
|
||||
echo "\nvar o_template = { continent: {show: 'true'}};";
|
||||
echo "\nuser_options={...user_options, ...o_template};";
|
||||
}
|
||||
if (!isset($current_opts->qrz)) {
|
||||
echo "\nvar o_template = { qrz: {show: 'true'}};";
|
||||
echo "\nuser_options={...user_options, ...o_template};";
|
||||
}
|
||||
|
||||
|
||||
foreach ($mapoptions as $mo) {
|
||||
@@ -602,6 +607,9 @@ $options = json_decode($options);
|
||||
} ?>
|
||||
<?php if ($this->session->userdata('user_lotw_name') != "" && ($options->lotw->show ?? "true") == "true") {
|
||||
echo '<th class="lotwconfirmation">LoTW</th>';
|
||||
} ?>
|
||||
<?php if (($options->qrz->show ?? "true") == "true") {
|
||||
echo '<th class="qrz">' . __("QRZ") . '</th>';
|
||||
} ?>
|
||||
<?php if (($options->qslmsg->show ?? "true") == "true") {
|
||||
echo '<th>' . __("QSL Msg") . '</th>';
|
||||
|
||||
@@ -142,6 +142,10 @@
|
||||
<td><?= __("Continent"); ?></td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="continent" type="checkbox" <?php if (($options->continent->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= __("QRZ"); ?></td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="qrz" type="checkbox" <?php if (($options->qrz->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -73,6 +73,9 @@ function updateRow(qso) {
|
||||
if ($(".lotwconfirmation")[0] && user_options.lotw.show == "true"){
|
||||
cells.eq(c++).html(qso.lotw);
|
||||
}
|
||||
if (user_options.qrz.show == "true"){
|
||||
cells.eq(c++).html(qso.qrz);
|
||||
}
|
||||
if (user_options.qslmsg.show == "true"){
|
||||
cells.eq(c++).text(qso.qslMessage);
|
||||
}
|
||||
@@ -221,6 +224,9 @@ function loadQSOTable(rows) {
|
||||
if ($(".lotwconfirmation")[0] && user_options.lotw.show == "true"){
|
||||
data.push(qso.lotw);
|
||||
}
|
||||
if (user_options.qrz.show == "true"){
|
||||
data.push(qso.qrz);
|
||||
}
|
||||
if (user_options.qslmsg.show == "true"){
|
||||
data.push(qso.qslMessage);
|
||||
}
|
||||
@@ -1137,6 +1143,7 @@ function saveOptions() {
|
||||
wwff: $('input[name="wwff"]').is(':checked') ? true : false,
|
||||
sig: $('input[name="sig"]').is(':checked') ? true : false,
|
||||
continent: $('input[name="continent"]').is(':checked') ? true : false,
|
||||
qrz: $('input[name="qrz"]').is(':checked') ? true : false,
|
||||
gridsquare_layer: $('input[name="gridsquareoverlay"]').is(':checked') ? true : false,
|
||||
path_lines: $('input[name="pathlines"]').is(':checked') ? true : false,
|
||||
cqzone_layer: $('input[name="cqzones"]').is(':checked') ? true : false,
|
||||
|
||||
@@ -64,6 +64,7 @@ class QSO
|
||||
private string $lotw;
|
||||
private string $eqsl;
|
||||
private string $clublog;
|
||||
private string $qrz;
|
||||
/** Lotw callsign info **/
|
||||
private string $callsign;
|
||||
private string $lastupload;
|
||||
@@ -200,6 +201,7 @@ class QSO
|
||||
$this->lotw = $this->getLotwString($data, $custom_date_format);
|
||||
$this->eqsl = $this->getEqslString($data, $custom_date_format);
|
||||
$this->clublog = $this->getClublogString($data, $custom_date_format);
|
||||
$this->qrz = $this->getQrzString($data, $custom_date_format);
|
||||
|
||||
$this->cqzone = ($data['COL_CQZ'] === null) ? '' : $this->geCqLink($data['COL_CQZ']);
|
||||
$this->ituzone = $data['COL_ITUZ'] ?? '';
|
||||
@@ -451,6 +453,45 @@ class QSO
|
||||
return $clublogstring;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
function getQrzString($data, $custom_date_format): string {
|
||||
$CI =& get_instance();
|
||||
|
||||
$qrzstring = '<span ';
|
||||
|
||||
if ($data['COL_QRZCOM_QSO_UPLOAD_STATUS'] == "Y") {
|
||||
$qrzstring .= "title=\"".__("Sent");
|
||||
|
||||
if ($data['COL_QRZCOM_QSO_UPLOAD_DATE'] != null) {
|
||||
$timestamp = strtotime($data['COL_QRZCOM_QSO_UPLOAD_DATE']);
|
||||
$qrzstring .= " ".($timestamp!=''?date($custom_date_format, $timestamp):'');
|
||||
}
|
||||
|
||||
$qrzstring .= "\" data-bs-toggle=\"tooltip\"";
|
||||
}
|
||||
|
||||
$qrzstring .= ' class="qrz-' . (($data['COL_QRZCOM_QSO_UPLOAD_STATUS'] =='Y') ? 'green':'red') . '">▲</span><span ';
|
||||
|
||||
if ($data['COL_QRZCOM_QSO_DOWNLOAD_STATUS'] == "Y") {
|
||||
$qrzstring .= "title=\"".__("Received");
|
||||
|
||||
if ($data['COL_QRZCOM_QSO_DOWNLOAD_DATE'] != null) {
|
||||
$timestamp = strtotime($data['COL_QRZCOM_QSO_DOWNLOAD_DATE']);
|
||||
$qrzstring .= " ".($timestamp!=''?date($custom_date_format, $timestamp):'');
|
||||
}
|
||||
$qrzstring .= "\" data-bs-toggle=\"tooltip\"";
|
||||
}
|
||||
|
||||
$qrzstring .= ' class="qrz-' . (($data['COL_QRZCOM_QSO_DOWNLOAD_STATUS']=='Y') ? 'green':'red') . '">▼</span>';
|
||||
|
||||
$qrzstring .= '</span>';
|
||||
|
||||
return $qrzstring;
|
||||
}
|
||||
|
||||
|
||||
function getEqslString($data, $custom_date_format): string
|
||||
{
|
||||
$CI =& get_instance();
|
||||
@@ -819,6 +860,14 @@ class QSO
|
||||
return $this->clublog;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getqrz(): string
|
||||
{
|
||||
return $this->qrz;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@@ -882,6 +931,7 @@ class QSO
|
||||
'lotw' => $this->getlotw(),
|
||||
'eqsl' => $this->geteqsl(),
|
||||
'clublog' => $this->getclublog(),
|
||||
'qrz' => $this->getqrz(),
|
||||
'qslMessage' => $this->getQSLMsg(),
|
||||
'name' => $this->getName(),
|
||||
'dxcc' => $this->getDXCC(),
|
||||
|
||||
Reference in New Issue
Block a user