Cloudlog/application/views/view_log/qso.php

708 wiersze
38 KiB
PHP
Czysty Zwykły widok Historia

<?php if ($query->num_rows() > 0) { foreach ($query->result() as $row) { ?>
2020-10-28 22:20:03 +00:00
<div class="container-fluid">
<ul style="margin-bottom: 10px;" class="nav nav-tabs" id="myTab" role="tablist">
2020-10-28 22:20:03 +00:00
<li class="nav-item">
2023-11-14 12:35:53 +00:00
<a class="nav-link active" id="table-tab" data-bs-toggle="tab" href="#qsodetails" role="tab" aria-controls="table" aria-selected="true"><?php echo lang('qso_details'); ?></a>
2020-10-28 22:20:03 +00:00
</li>
<li class="nav-item">
2023-11-14 12:35:53 +00:00
<a id="station-tab" class="nav-link" data-bs-toggle="tab" href="#stationdetails" role="tab" aria-controls="table" aria-selected="true"><?php echo lang('cloudlog_station_profile'); ?></a>
</li>
2020-10-28 22:20:03 +00:00
<?php
if ($row->COL_NOTES != null) {?>
<li class="nav-item">
2023-11-14 12:35:53 +00:00
<a id="notes-tab" class="nav-link" data-bs-toggle="tab" href="#notesdetails" role="tab" aria-controls="table" aria-selected="true"><?php echo "Notes"; ?></a>
</li>
<?php }?>
<?php
2020-10-28 22:20:03 +00:00
if (($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) {
echo '<li ';
if (count($qslimages) == 0) {
echo 'hidden ';
2020-10-28 22:20:03 +00:00
}
echo 'class="qslcardtab nav-item">
2023-11-14 12:35:53 +00:00
<a class="nav-link" id="qsltab" data-bs-toggle="tab" href="#qslcard" role="tab" aria-controls="home" aria-selected="false">'. lang('general_word_qslcard') .'</a>
</li>';
2020-10-28 22:20:03 +00:00
echo '<li class="nav-item">
2023-11-14 12:35:53 +00:00
<a class="nav-link" id="qslmanagementtab" data-bs-toggle="tab" href="#qslupload" role="tab" aria-controls="home" aria-selected="false">'. lang('general_word_qslcard_management') .'</a>
2020-10-28 22:20:03 +00:00
</li>';
}
2020-10-28 22:20:03 +00:00
?>
2023-05-12 17:24:53 +00:00
<?php
if (($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) {
echo '<li ';
if ($row->eqsl_image_file == null) {
echo 'hidden ';
}
echo 'class="eqslcardtab nav-item">
2023-11-14 12:35:53 +00:00
<a class="nav-link" id="eqsltab" data-bs-toggle="tab" href="#eqslcard" role="tab" aria-controls="home" aria-selected="false">'. $this->lang->line('general_word_eqslcard') .'</a>
2023-05-12 17:24:53 +00:00
</li>';
}
?>
2020-10-28 22:20:03 +00:00
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane active" id="qsodetails" role="tabpanel" aria-labelledby="home-tab">
<div class="row">
<div class="col-md">
2020-10-28 22:20:03 +00:00
<table width="100%">
<tr>
<?php
// Get Date format
if($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/cloudlog.php
$custom_date_format = $this->config->item('qso_date_format');
}
?>
<td><?php echo lang('general_word_datetime'); ?></td>
2020-10-28 22:20:03 +00:00
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
Add option to log QSO end times separately Squashed commit of the following: commit 595f620d9ea32cde52cd8094c9ba928b2242ebce Author: phl0 <github@florian-wolters.de> Date: Wed Nov 1 13:58:05 2023 +0100 Update languages commit f670a0605923e3e3e50548cdc6872afce620d2bb Author: phl0 <github@florian-wolters.de> Date: Wed Nov 1 13:55:04 2023 +0100 Added user option for enabling QSO end time logging commit 36d9a95ebbebb6cdcdd382d1460dd858b425e1c7 Merge: 54d5bb53 352931b1 Author: phl0 <github@florian-wolters.de> Date: Wed Nov 1 12:18:39 2023 +0100 Merge branch 'dev' into qsoTime commit 54d5bb535bfe820feb617b2c7205733af7b9f91d Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:14:58 2023 +0200 start/end times for other languages commit c5f6bb0cab5dd3b38d1d74ec1a666c82a71929d6 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:14:42 2023 +0200 Hide end time if only differs in seconds as we only display minutes anyway ... commit d519d88604bf1730a1c2e0631a6047326fa57a56 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:14:29 2023 +0200 use start as end time if end is not set separately commit f2588ad1321df63d6840f33c05700f55eb681f9c Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:13:43 2023 +0200 reset timers on form reset commit 2b7ee4e48c27d0373e74a362f5c5d18d3616cd1e Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:13:27 2023 +0200 Strip seconds from session time variable commit e0c35aa0cfaf2569c1e9254d287a98251a771593 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:13:11 2023 +0200 Adapt contest logging commit 5368ef25f3a59756654092767c863684775f4483 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:12:50 2023 +0200 Make date field a little smaller commit ad2d7e756c101a387b4449ee0fcbfcbaac286d28 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:12:30 2023 +0200 Add button to reset start time commit f56e031946ef80978857da4f49629a51bb98ad57 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:11:09 2023 +0200 Copy start to end time on focus out commit b741d0428deac43efe33f8bf22943c09a994c271 Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:10:45 2023 +0200 Only min and sec for post QSO template commit 77314edd31be56469d1355b95287e580e8414d8b Author: phl0 <github@florian-wolters.de> Date: Fri Oct 27 10:08:49 2023 +0200 Basics for QSO end time logging
2023-11-01 13:24:13 +00:00
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); $timestamp = strtotime($row->COL_TIME_ON); $time_on = date('H:i', $timestamp); echo " at ".$time_on; ?>
<?php $timestamp = strtotime($row->COL_TIME_OFF); $time_off = date('H:i', $timestamp); if ($time_on != $time_off) { echo " - ".$time_off; } ?>
</td>
2020-10-28 22:20:03 +00:00
<?php } else { ?>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td>
<?php } ?>
</tr>
<tr>
<td><?php echo lang('gen_hamradio_callsign'); ?></td>
2023-10-11 11:17:23 +00:00
<td><b><?php echo str_replace("0","&Oslash;",strtoupper($row->COL_CALL)); ?></b> <a target="_blank" href="https://www.qrz.com/db/<?php echo strtoupper($row->COL_CALL); ?>"><img width="16" height="16" src="<?php echo base_url(); ?>images/icons/qrz.png" alt="Lookup <?php echo strtoupper($row->COL_CALL); ?> on QRZ.com"></a> <a target="_blank" href="https://www.hamqth.com/<?php echo strtoupper($row->COL_CALL); ?>"><img width="16" height="16" src="<?php echo base_url(); ?>images/icons/hamqth.png" alt="Lookup <?php echo strtoupper($row->COL_CALL); ?> on HamQTH"></a> <a target="_blank" href="http://www.eqsl.cc/Member.cfm?<?php echo strtoupper($row->COL_CALL); ?>"><img width="16" height="16" src="<?php echo base_url(); ?>images/icons/eqsl.png" alt="Lookup <?php echo strtoupper($row->COL_CALL); ?> on eQSL.cc"></a></td>
2020-10-28 22:20:03 +00:00
</tr>
<tr>
<td><?php echo lang('gen_hamradio_band'); ?></td>
2020-10-28 22:20:03 +00:00
<td><?php echo $row->COL_BAND; ?></td>
</tr>
<?php if($this->config->item('display_freq') == true) { ?>
<tr>
<td><?php echo lang('gen_hamradio_frequency'); ?></td>
2021-05-06 14:44:38 +00:00
<td><?php echo $this->frequency->hz_to_mhz($row->COL_FREQ); ?></td>
2020-10-28 22:20:03 +00:00
</tr>
<?php if($row->COL_FREQ_RX != 0) { ?>
<tr>
<td><?php echo lang('gen_hamradio_frequency_rx'); ?></td>
2021-05-06 14:44:38 +00:00
<td><?php echo $this->frequency->hz_to_mhz($row->COL_FREQ_RX); ?></td>
2020-10-28 22:20:03 +00:00
</tr>
<?php }} ?>
<tr>
<td><?php echo lang('gen_hamradio_mode'); ?></td>
2020-10-28 22:20:03 +00:00
<td><?php echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; ?></td>
</tr>
<tr>
<td><?php echo lang('gen_hamradio_rsts'); ?></td>
<td><?php echo $row->COL_RST_SENT; ?> <?php if ($row->COL_STX) { ?>(<?php printf("%03d", $row->COL_STX);?>)<?php } ?> <?php if ($row->COL_STX_STRING) { ?>(<?php echo $row->COL_STX_STRING;?>)<?php } ?></td>
2020-10-28 22:20:03 +00:00
</tr>
<tr>
<td><?php echo lang('gen_hamradio_rstr'); ?></td>
<td><?php echo $row->COL_RST_RCVD; ?> <?php if ($row->COL_SRX) { ?>(<?php printf("%03d", $row->COL_SRX);?>)<?php } ?> <?php if ($row->COL_SRX_STRING) { ?>(<?php echo $row->COL_SRX_STRING;?>)<?php } ?></td>
2020-10-28 22:20:03 +00:00
</tr>
<?php if($row->COL_GRIDSQUARE != null) { ?>
<tr>
<td>Gridsquare:</td>
<td><?php echo $row->COL_GRIDSQUARE; ?> <a href="javascript:spawnQrbCalculator('<?php echo $row->station_gridsquare . '\',\'' . $row->COL_GRIDSQUARE; ?>')"><i class="fas fa-globe"></i></a></td>
2020-10-28 22:20:03 +00:00
</tr>
<?php } ?>
<?php if($row->COL_GRIDSQUARE != null && strlen($row->COL_GRIDSQUARE) >= 4) { ?>
2020-10-28 22:20:03 +00:00
<!-- Total Distance Between the Station Profile Gridsquare and Logged Square -->
<tr>
<td><?php echo lang('general_total_distance'); //Total distance ?></td>
2020-10-28 22:20:03 +00:00
<td>
<?php
// Cacluate Distance
2023-12-13 07:12:57 +00:00
$distance = $this->qra->distance($row->station_gridsquare, $row->COL_GRIDSQUARE, $measurement_base);
2020-10-28 22:20:03 +00:00
switch ($measurement_base) {
case 'M':
$distance .= " mi";
2020-10-28 22:20:03 +00:00
break;
case 'K':
$distance .= " km";
2020-10-28 22:20:03 +00:00
break;
case 'N':
$distance .= " nmi";
2020-10-28 22:20:03 +00:00
break;
}
echo $distance;
2020-10-28 22:20:03 +00:00
?>
</td>
</tr>
<?php } ?>
<?php if($row->COL_VUCC_GRIDS != null) { ?>
<tr>
<td>Gridsquare (Multi):</td>
<td><?php echo $row->COL_VUCC_GRIDS; ?> <a href="javascript:spawnQrbCalculator('<?php echo $row->station_gridsquare . '\',\'' . $row->COL_VUCC_GRIDS; ?>')"><i class="fas fa-globe"></i></a></td>
<?php
// Cacluate Distance
$distance = $this->qra->distance($row->station_gridsquare, $row->COL_VUCC_GRIDS, $measurement_base);
switch ($measurement_base) {
case 'M':
$distance .= " mi";
break;
case 'K':
$distance .= " km";
break;
case 'N':
$distance .= " nmi";
break;
}
echo $distance;
?>
2020-10-28 22:20:03 +00:00
</tr>
<?php } ?>
<?php if($row->COL_STATE != null) { ?>
<tr>
2023-12-04 13:43:07 +00:00
<td><?php echo $primary_subdivision ?>:</td>
2020-10-28 22:20:03 +00:00
<td><?php echo $row->COL_STATE; ?></td>
</tr>
<?php } ?>
<?php if($row->COL_CNTY != null && $row->COL_CNTY != ",") { ?>
<tr>
<td><?php echo $secondary_subdivision ?>:</td>
<td><?php echo $row->COL_CNTY; ?></td>
</tr>
<?php } ?>
2020-10-28 22:20:03 +00:00
<?php if($row->COL_NAME != null) { ?>
<tr>
<td><?php echo lang('general_word_name'); ?></td>
2020-10-28 22:20:03 +00:00
<td><?php echo $row->COL_NAME; ?></td>
</tr>
<?php } ?>
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?>
<?php if($row->COL_COMMENT != null) { ?>
<tr>
<td><?php echo lang('general_word_comment'); ?></td>
2020-10-28 22:20:03 +00:00
<td><?php echo $row->COL_COMMENT; ?></td>
</tr>
<?php } ?>
<?php } ?>
<?php if($row->COL_SAT_NAME != null) { ?>
<tr>
<td><?php echo lang('gen_hamradio_satellite_name'); ?></td>
2022-08-11 10:41:59 +00:00
<td><a href="https://db.satnogs.org/search/?q=<?php echo $row->COL_SAT_NAME; ?>" target="_blank"><?php echo $row->COL_SAT_NAME; ?></a></td>
2020-10-28 22:20:03 +00:00
</tr>
<?php } ?>
<?php if($row->COL_SAT_MODE != null) { ?>
<tr>
<td><?php echo lang('gen_hamradio_satellite_mode'); ?></td>
<td><?php echo (strlen($row->COL_SAT_MODE) == 2 ? (strtoupper($row->COL_SAT_MODE[0]).'/'.strtoupper($row->COL_SAT_MODE[1])) : strtoupper($row->COL_SAT_MODE)); ?></td>
2020-10-28 22:20:03 +00:00
</tr>
<?php } ?>
<?php if($row->COL_ANT_AZ != null) { ?>
<tr>
<td><?php echo lang('gen_hamradio_ant_az'); ?></td>
2024-02-22 09:57:36 +00:00
<td><?php echo $row->COL_ANT_AZ; ?>&deg; <span style="margin-left: 2px; display: inline-block; transform: rotate(<?php echo (-45+$row->COL_ANT_AZ); ?>deg);"><i class="fas fa-location-arrow fa-xs"></i></span></td>
</tr>
<?php } ?>
<?php if($row->COL_ANT_EL != null) { ?>
<tr>
<td><?php echo lang('gen_hamradio_ant_el'); ?></td>
2024-02-22 09:57:36 +00:00
<td><?php echo $row->COL_ANT_EL; ?>&deg; <span style="margin-left: 2px; display: inline-block; transform: rotate(<?php echo (-$row->COL_ANT_EL); ?>deg);"><i class="fas fa-arrow-right fa-xs"></i></span></td>
</tr>
<?php } ?>
<?php if($row->name != null) { ?>
2020-10-28 22:20:03 +00:00
<tr>
<td><?php echo lang('general_word_country'); ?></td>
<td><?php echo ucwords(strtolower(($row->name)), "- (/"); if (isset($dxccFlag)) { echo " ".$dxccFlag; } if ($row->end != null) { echo ' <span class="badge text-bg-danger">'.lang('gen_hamradio_deleted_dxcc').'</span>'; } ?></td>
2020-10-28 22:20:03 +00:00
</tr>
<?php } ?>
<?php if($row->COL_CONT != null) { ?>
<tr>
<td><?php echo lang('gen_hamradio_continent'); ?></td>
<td>
<?php
switch($row->COL_CONT) {
case "AF":
echo lang('africa');
break;
case "AN":
echo lang('antarctica');
break;
case "AS":
echo lang('asia');
break;
case "EU":
echo lang('europe');
break;
case "NA":
echo lang('northamerica');
break;
case "OC":
echo lang('oceania');
break;
case "SA":
echo lang('southamerica');
break;
}
?>
</td>
</tr>
<?php } ?>
<?php if($row->COL_CONTEST_ID != null) { ?>
<tr>
<td><?php echo lang('contesting_contest_name'); ?></td>
<td><?php echo $row->COL_CONTEST_ID; ?></td>
</tr>
<?php } ?>
2020-10-28 22:20:03 +00:00
<?php if($row->COL_IOTA != null) { ?>
<tr>
<td><?php echo lang('gen_hamradio_iota_reference'); ?></td>
2022-05-09 12:57:26 +00:00
<td><a href="https://www.iota-world.org/iotamaps/?grpref=<?php echo $row->COL_IOTA; ?>" target="_blank"><?php echo $row->COL_IOTA; ?></a></td>
2020-10-28 22:20:03 +00:00
</tr>
<?php } ?>
<?php if($row->COL_SOTA_REF != null) { ?>
<tr>
<td><?php echo lang('gen_hamradio_sota_reference'); ?></td>
<td><a href="https://summits.sota.org.uk/summit/<?php echo $row->COL_SOTA_REF; ?>" target="_blank"><?php echo $row->COL_SOTA_REF; ?></a></td>
2020-10-28 22:20:03 +00:00
</tr>
<?php } ?>
2022-08-15 14:57:37 +00:00
<?php if($row->COL_WWFF_REF != null) { ?>
<tr>
<td><?php echo lang('gen_hamradio_wwff_reference'); ?></td>
2022-10-18 16:54:50 +00:00
<td><a href="https://www.cqgma.org/zinfo.php?ref=<?php echo $row->COL_WWFF_REF; ?>" target="_blank"><?php echo $row->COL_WWFF_REF; ?></a></td>
2022-08-15 14:57:37 +00:00
</tr>
<?php } ?>
2022-10-05 15:05:53 +00:00
<?php if($row->COL_POTA_REF != null) { ?>
<tr>
<td><?php echo lang('gen_hamradio_pota_reference'); ?></td>
<td><a href="https://pota.app/#/park/<?php echo $row->COL_POTA_REF; ?>" target="_blank"><?php echo $row->COL_POTA_REF; ?></a></td>
2022-10-05 15:05:53 +00:00
</tr>
<?php } ?>
2020-11-16 20:21:59 +00:00
<?php if($row->COL_SIG != null) { ?>
<tr>
<td><?php echo lang('gen_hamradio_sig'); ?></td>
2020-11-16 20:21:59 +00:00
<td><?php echo $row->COL_SIG; ?></td>
</tr>
<?php } ?>
<?php if($row->COL_SIG_INFO != null) { ?>
<tr>
<td><?php echo lang('gen_hamradio_sig_info'); ?></td>
2022-07-08 10:18:25 +00:00
<?php
switch ($row->COL_SIG) {
case "GMA":
echo "<td><a href=\"https://www.cqgma.org/zinfo.php?ref=".$row->COL_SIG_INFO."\" target=\"_blank\">".$row->COL_SIG_INFO."</a></td>";
break;
case "MQC":
echo "<td><a href=\"https://www.mountainqrp.it/awards/referenza.php?ref=".$row->COL_SIG_INFO."\" target=\"_blank\">".$row->COL_SIG_INFO."</a></td>";
break;
2022-07-08 10:18:25 +00:00
default:
echo "<td>".$row->COL_SIG_INFO."</td>";
break;
}
?>
2020-11-16 20:21:59 +00:00
</tr>
<?php } ?>
2020-10-28 22:20:03 +00:00
<?php if($row->COL_DARC_DOK != null) { ?>
<tr>
<td><?php echo lang('gen_hamradio_dok'); ?></td>
2022-04-16 16:04:27 +00:00
<?php if (preg_match('/^[A-Y]\d{2}$/', $row->COL_DARC_DOK)) { ?>
<td><a href="https://www.darc.de/<?php echo $row->COL_DARC_DOK; ?>" target="_blank"><?php echo $row->COL_DARC_DOK; ?></a></td>
2024-03-09 07:10:28 +00:00
<?php } else if (preg_match('/^DV[ABCDEFGHIKLMNOPQRSTUVWXY]$/', $row->COL_DARC_DOK)) { ?>
<td><a href="https://www.darc.de/der-club/distrikte/<?php echo strtolower(substr($row->COL_DARC_DOK, 2, 1)); ?>" target="_blank"><?php echo $row->COL_DARC_DOK; ?></a></td>
2022-04-16 16:04:27 +00:00
<?php } else if (preg_match('/^Z\d{2}$/', $row->COL_DARC_DOK)) { ?>
<td><a href="https://<?php echo $row->COL_DARC_DOK; ?>.vfdb.org" target="_blank"><?php echo $row->COL_DARC_DOK; ?></a></td>
<?php } else { ?>
<td><?php echo $row->COL_DARC_DOK; ?></td>
<?php } ?>
2020-10-28 22:20:03 +00:00
</tr>
<?php } ?>
</table>
<?php if($row->COL_QSL_SENT == "Y" || $row->COL_QSL_RCVD == "Y") { ?>
<h3><?php echo lang('qslcard_info'); ?></h3>
2020-10-28 22:20:03 +00:00
2022-11-10 13:45:40 +00:00
<?php if($row->COL_QSL_SENT == "Y") {?>
<?php if ($row->COL_QSL_SENT_VIA == "B") { ?>
<p><?php echo lang('qslcard_sent_bureau'); ?>
2022-11-10 13:45:40 +00:00
<?php } else if($row->COL_QSL_SENT_VIA == "D") { ?>
<p><?php echo lang('qslcard_sent_direct'); ?>
2022-11-10 13:45:40 +00:00
<?php } else if($row->COL_QSL_SENT_VIA == "E") { ?>
<p><?php echo lang('qslcard_sent_electronic'); ?>
2022-11-10 13:45:40 +00:00
<?php } else if($row->COL_QSL_SENT_VIA == "M") { ?>
<p><?php echo lang('qslcard_sent_manager'); ?>
2022-11-10 13:45:40 +00:00
<?php } else { ?>
<p><?php echo lang('qslcard_sent'); ?>
2022-11-10 13:45:40 +00:00
<?php } ?>
2022-12-22 07:32:12 +00:00
<?php if ($row->COL_QSLSDATE != null) { ?>
<?php $timestamp = strtotime($row->COL_QSLSDATE); echo " (".date($custom_date_format, $timestamp).")"; ?></p>
<?php } ?>
2020-10-28 22:20:03 +00:00
<?php } ?>
2022-11-10 13:45:40 +00:00
<?php if($row->COL_QSL_RCVD == "Y") { ?>
<?php if ($row->COL_QSL_RCVD_VIA == "B") { ?>
<p><?php echo lang('qslcard_rcvd_bureau'); ?>
2022-11-10 13:45:40 +00:00
<?php } else if($row->COL_QSL_RCVD_VIA == "D") { ?>
<p><?php echo lang('qslcard_rcvd_direct'); ?>
2022-11-10 13:45:40 +00:00
<?php } else if($row->COL_QSL_RCVD_VIA == "E") { ?>
<p><?php echo lang('qslcard_rcvd_electronic'); ?>
2022-11-10 13:45:40 +00:00
<?php } else if($row->COL_QSL_RCVD_VIA == "M") { ?>
<p><?php echo lang('qslcard_rcvd_manager'); ?>
2022-11-10 13:45:40 +00:00
<?php } else { ?>
<p><?php echo lang('qslcard_rcvd'); ?>
2022-11-10 13:45:40 +00:00
<?php } ?>
2022-12-22 07:32:12 +00:00
<?php if ($row->COL_QSLRDATE != null) { ?>
<?php $timestamp = strtotime($row->COL_QSLRDATE); echo " (".date($custom_date_format, $timestamp).")"; ?></p>
<?php } ?>
2020-10-28 22:20:03 +00:00
<?php } ?>
<?php } ?>
2023-05-27 08:06:30 +00:00
<?php if($row->lotwuser != null) { ?>
2023-08-25 21:08:47 +00:00
<br /><p><?php echo lang('lotw_user'); ?> <a href="https://lotw.arrl.org/lotwuser/act?act=<?php echo $row->COL_CALL;?>" target="_blank"><?php echo lang('lotw_last_upload').'</a>: '; ?><?php $timestamp = strtotime($row->lastupload); echo date($custom_date_format, $timestamp); $timestamp = strtotime($row->lastupload); echo " ".date('H:i', $timestamp);?> UTC.</p>
2023-05-27 08:06:30 +00:00
<?php } ?>
2020-10-28 22:20:03 +00:00
<?php if($row->COL_LOTW_QSL_RCVD == "Y" && $row->COL_LOTW_QSLRDATE != null) { ?>
<h3><?php echo lang('lotw_short'); ?></h3>
<p><?php echo lang('gen_this_qso_was_confirmed_on'); ?> <?php $timestamp = strtotime($row->COL_LOTW_QSLRDATE); echo date($custom_date_format, $timestamp); ?>.</p>
<?php } ?>
<?php if($row->COL_EQSL_QSL_RCVD == "Y" && $row->COL_EQSL_QSLRDATE != null) { ?>
<h3>eQSL</h3>
<p><?php echo lang('gen_this_qso_was_confirmed_on'); ?> <?php $timestamp = strtotime($row->COL_EQSL_QSLRDATE); echo date($custom_date_format, $timestamp); ?>.</p>
2020-10-28 22:20:03 +00:00
<?php } ?>
</div>
<div class="col-md">
2020-10-28 22:20:03 +00:00
2023-12-09 09:44:26 +00:00
<div id="mapqso" class="map-leaflet" style="width: 100%; height: 250px"></div>
2020-10-28 22:20:03 +00:00
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?>
<br>
2023-10-02 16:02:22 +00:00
<div style="display: inline-block;"><p class="editButton"><a class="btn btn-primary" href="<?php echo site_url('qso/edit'); ?>/<?php echo $row->COL_PRIMARY_KEY; ?>" href="javascript:;"><i class="fas fa-edit"></i> <?php echo lang('qso_btn_edit_qso'); ?></a></p></div>
<div style="display: inline-block;"><form method="POST" action="<?php echo site_url('search'); ?>"><input type="hidden" value="<?php echo strtoupper($row->COL_CALL); ?>" name="callsign"><button class="btn btn-primary" type="submit"><i class="fas fa-eye"></i> <?php echo lang('general_more_qso'); ?></button></form></div>
<?php } ?>
<?php
if($row->COL_SAT_NAME != null) {
2023-12-19 15:00:55 +00:00
$twitter_band_sat = $row->COL_SAT_NAME." \u{1F6F0}\u{FE0F}";
$hashtags = "#hamr #cloudlog #amsat";
} else {
$twitter_band_sat = $row->COL_BAND;
$hashtags = "#hamr #cloudlog";
}
2023-04-27 14:42:05 +00:00
if($row->COL_IOTA != null) {
2023-05-04 11:37:15 +00:00
$hashtags .= " #IOTA ".$row->COL_IOTA;
2023-04-27 14:42:05 +00:00
}
if($row->COL_SOTA_REF != null) {
2023-06-01 15:08:53 +00:00
$hashtags .= " #SOTA ".$row->COL_SOTA_REF;
2023-04-27 14:42:05 +00:00
}
if($row->COL_POTA_REF != null) {
2023-05-04 11:37:15 +00:00
$hashtags .= " #POTA ".$row->COL_POTA_REF;
2023-04-27 14:42:05 +00:00
}
if($row->COL_WWFF_REF != null) {
2023-05-04 11:37:15 +00:00
$hashtags .= " #WWFF ".$row->COL_WWFF_REF;
2023-04-27 14:42:05 +00:00
}
if($row->COL_SIG != null && $row->COL_SIG_INFO != null) {
$hashtags .= " #".$row->COL_SIG." ".$row->COL_SIG_INFO;
}
if (!isset($distance)) {
2023-09-03 04:43:31 +00:00
$twitter_string = urlencode("Just worked ".$row->COL_CALL." ");
if ($row->COL_DXCC != 0) {
$twitter_string .= urlencode("in ".ucwords(strtolower(($row->COL_COUNTRY)))." ");
}
$twitter_string .= urlencode("on ".$twitter_band_sat." using ".($row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE)." ".$hashtags);
} else {
2023-09-03 04:43:31 +00:00
$twitter_string = urlencode("Just worked ".$row->COL_CALL." ");
if ($row->COL_DXCC != 0) {
$twitter_string .= urlencode("in ".ucwords(strtolower(($row->COL_COUNTRY)))." ");
if (isset($dxccFlag)) {
$twitter_string .= $dxccFlag." ";
}
2023-09-03 04:43:31 +00:00
}
$distancestring = '';
if ($row->COL_VUCC_GRIDS == null) {
$distancestring = "(Gridsquare: ".$row->COL_GRIDSQUARE." / distance: ".$distance.")";
} else {
if (substr_count($row->COL_VUCC_GRIDS, ',') == 1) {
$distancestring = "(Gridline: ".preg_replace('/\s+/', '', $row->COL_VUCC_GRIDS)." / distance: ".$distance.")";
} else if (substr_count($row->COL_VUCC_GRIDS, ',') == 3) {
$distancestring = "(Gridcorner: ".preg_replace('/\s+/', '', $row->COL_VUCC_GRIDS)." / distance: ".$distance.")";
2023-12-19 14:56:37 +00:00
} else {
$distancestring = "(Grids: ".$row->COL_VUCC_GRIDS.")";
}
}
$twitter_string .= urlencode($distancestring." on ".$twitter_band_sat." using ".($row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE)." ".$hashtags);
}
?>
<div style="display: inline-block;"><a class="btn btn-primary twitter-share-button" target="_blank" href="https://twitter.com/intent/tweet?text=<?php echo $twitter_string; ?>"><i class="fab fa-twitter"></i> Tweet</a></div>
<?php if($this->session->userdata('user_mastodon_url') != null) { echo '<div style="display: inline-block;"><a class="btn btn-primary twitter-share-button" target="_blank" href="'.$this->session->userdata('user_mastodon_url').'/share?text='.$twitter_string.'"><i class="fab fa-mastodon"></i> Toot</a></div>'; } ?>
</div>
</div>
</div>
<div class="tab-pane fade" id="stationdetails" role="tabpanel" aria-labelledby="table-tab">
2023-10-02 19:08:47 +00:00
<h3><?php echo lang('gen_hamradio_station') . ' ' . lang('general_word_details'); ?></h3>
<table width="100%">
2020-10-28 22:20:03 +00:00
<tr>
2023-10-02 16:02:22 +00:00
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('gen_hamradio_callsign'); ?></td>
2020-10-28 22:20:03 +00:00
<td><?php echo $row->station_callsign; ?></td>
</tr>
2022-04-27 19:52:55 +00:00
<tr>
2023-10-02 16:02:22 +00:00
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('general_word_name'); ?></td>
2022-04-27 19:52:55 +00:00
<td><?php echo $row->station_profile_name; ?></td>
</tr>
2020-10-28 22:20:03 +00:00
<tr>
2023-10-02 16:02:22 +00:00
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('gen_hamradio_gridsquare'); ?></td>
2020-10-28 22:20:03 +00:00
<td><?php echo $row->station_gridsquare; ?></td>
</tr>
<?php if($row->station_city) { ?>
<tr>
2023-10-02 16:02:22 +00:00
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('general_word_city'); ?></td>
2020-10-28 22:20:03 +00:00
<td><?php echo $row->station_city; ?></td>
</tr>
<?php } ?>
<?php if($row->station_country) { ?>
<tr>
2023-10-02 16:02:22 +00:00
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('general_word_country'); ?></td>
2023-11-14 12:35:53 +00:00
<td><?php echo ucwords(strtolower(($row->station_country)), "- (/"); if ($row->station_end != null) echo ' <span class="badge text-bg-danger">'.lang('gen_hamradio_deleted_dxcc').'</span>'; ?></td>
2020-10-28 22:20:03 +00:00
</tr>
<?php } ?>
<?php if($row->COL_OPERATOR) { ?>
<tr>
2023-10-02 16:02:22 +00:00
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('gen_hamradio_operator'); ?></td>
2020-10-28 22:20:03 +00:00
<td><?php echo $row->COL_OPERATOR; ?></td>
</tr>
<?php } ?>
<?php if($row->COL_TX_PWR) { ?>
<tr>
2023-10-02 16:02:22 +00:00
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('gen_hamradio_transmit_power'); ?></td>
<td><?php echo $row->COL_TX_PWR; ?> W</td>
2020-10-28 22:20:03 +00:00
</tr>
<?php } ?>
2022-08-17 12:33:15 +00:00
<?php if($row->COL_MY_IOTA) { ?>
<tr>
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('gen_hamradio_iota_reference'); ?></td>
<td><?php echo $row->COL_MY_IOTA; ?></td>
</tr>
<?php } ?>
<?php if($row->COL_MY_SOTA_REF) { ?>
<tr>
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('gen_hamradio_sota_reference'); ?></td>
<td><?php echo $row->COL_MY_SOTA_REF; ?></td>
</tr>
<?php } ?>
2022-08-17 12:33:15 +00:00
<?php if($row->COL_MY_WWFF_REF) { ?>
<tr>
2023-10-02 16:02:22 +00:00
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('gen_hamradio_wwff_reference'); ?></td>
2022-08-17 12:33:15 +00:00
<td><?php echo $row->COL_MY_WWFF_REF; ?></td>
</tr>
<?php } ?>
2022-10-05 15:05:53 +00:00
<?php if($row->COL_MY_POTA_REF) { ?>
<tr>
2023-10-02 16:02:22 +00:00
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('gen_hamradio_pota_reference'); ?></td>
2022-10-05 15:05:53 +00:00
<td><?php echo $row->COL_MY_POTA_REF; ?></td>
</tr>
<?php } ?>
</table>
2020-10-28 22:20:03 +00:00
</div>
<div class="tab-pane fade" id="notesdetails" role="tabpanel" aria-labelledby="table-tab">
2023-10-02 16:02:22 +00:00
<h3><?php echo lang('general_word_notes'); ?></h3>
2023-10-27 07:54:48 +00:00
<?php if (isset($row->COL_NOTES)) { echo nl2br($row->COL_NOTES); } ?>
</div>
2020-10-28 22:20:03 +00:00
<?php
if (($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) {
?>
<div class="tab-pane fade" id="qslupload" role="tabpanel" aria-labelledby="table-tab">
<?php
if (count($qslimages) > 0) {
echo '<table style="width:100%" class="qsltable table table-sm table-bordered table-hover table-striped table-condensed">
<thead>
<tr>
<th style=\'text-align: center\'>QSL image file</th>
<th style=\'text-align: center\'></th>
<th style=\'text-align: center\'></th>
2020-10-28 22:20:03 +00:00
</tr>
</thead><tbody>';
foreach ($qslimages as $qsl) {
echo '<tr>';
echo '<td style=\'text-align: center\'>' . $qsl->filename . '</td>';
echo '<td id="'.$qsl->id.'" style=\'text-align: center\'><button onclick="deleteQsl('.$qsl->id.')" class="btn btn-sm btn-danger">Delete</button></td>';
echo '<td style=\'text-align: center\'><button onclick="viewQsl(\''.$qsl->filename.'\')" class="btn btn-sm btn-success">View</button></td>';
2020-10-28 22:20:03 +00:00
echo '</tr>';
}
echo '</tbody></table>';
}
?>
2023-11-14 12:35:53 +00:00
<p><div class="alert alert-warning" role="alert"><span class="badge text-bg-warning"><?php echo lang('general_word_warning'); ?></span> <?php echo lang('gen_max_file_upload_size'); ?> <?php echo $max_upload; ?>B.</div></p>
<form class="form" id="fileinfo" name="fileinfo" enctype="multipart/form-data">
<div class="row">
<div class="col-md">
<fieldset>
2023-11-14 12:35:53 +00:00
<div class="mb-3">
<label for="qslcardfront"><?php echo lang('qslcard_upload_front'); ?></label>
2023-11-14 12:35:53 +00:00
<input class="form-control" type="file" id="qslcardfront" name="qslcardfront" accept="image/*" >
</div>
2023-06-29 12:57:19 +00:00
<input type="hidden" class="form-control" id="qsoinputid" name="qsoid" value="<?php echo $row->COL_PRIMARY_KEY; ?>">
<button type="button" onclick="uploadQsl();" id="button1id" name="button1id" class="btn btn-primary"><?php echo lang('qslcard_upload_button'); ?></button>
</div>
<div class="col-md">
2023-11-14 12:35:53 +00:00
<div class="mb-3">
<label for="qslcardback"><?php echo lang('qslcard_upload_back'); ?></label>
2023-11-14 12:35:53 +00:00
<input class="form-control" type="file" id="qslcardback" name="qslcardback" accept="image/*">
</div>
2020-10-28 22:20:03 +00:00
</fieldset>
</div>
</div>
</form>
2023-06-29 12:57:19 +00:00
<p>
<div class="row">
<div class="col-md">
2023-06-29 15:53:18 +00:00
<button type="button" onclick="qsl_rcvd(<?php echo $row->COL_PRIMARY_KEY; ?>, 'B');" id="qslrxb" name="qslrxb" class="btn btn-sm btn-success ld-ext-right ld-ext-right-r-B"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_rx_bureau'); ?> <div class="ld ld-ring ld-spin"></div></button>
2020-10-28 22:20:03 +00:00
2023-06-29 15:53:18 +00:00
<button type="button" onclick="qsl_rcvd(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D');" id="qslrxd" name="qslrxd" class="btn btn-sm btn-success ld-ext-right ld-ext-right-r-D"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_rx_direct'); ?> <div class="ld ld-ring ld-spin"></div></button>
2023-06-29 15:53:18 +00:00
<button type="button" onclick="qsl_rcvd(<?php echo $row->COL_PRIMARY_KEY; ?>, 'E');" id="qslrxe" name="qslrxe" class="btn btn-sm btn-success ld-ext-right ld-ext-right-r-E"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_rx_electronic'); ?> <div class="ld ld-ring ld-spin"></div></button>
</div>
2023-06-29 15:53:18 +00:00
</div>
<p>
<div class="row">
<div class="col-md">
2023-10-02 16:07:49 +00:00
<button type="button" onclick="qsl_requested(<?php echo $row->COL_PRIMARY_KEY; ?>, 'B');" id="qsltxb" name="qsltxb" class="btn btn-sm btn-warning ld-ext-right ld-ext-right-t-B"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_requested_bureau'); ?> <div class="ld ld-ring ld-spin"></div></button>
2023-06-29 12:57:19 +00:00
2023-10-02 16:07:49 +00:00
<button type="button" onclick="qsl_requested(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D');" id="qsltxd" name="qsltxd" class="btn btn-sm btn-warning ld-ext-right ld-ext-right-t-D"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_requested_direct'); ?> <div class="ld ld-ring ld-spin"></div></button>
2023-06-29 15:53:18 +00:00
2023-10-02 16:07:49 +00:00
<button type="button" onclick="qsl_ignore(<?php echo $row->COL_PRIMARY_KEY; ?>, 'I');" id="qsltxi" name="qsltxi" class="btn btn-sm btn-warning ld-ext-right ld-ext-right-ignore"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_not_required'); ?> <div class="ld ld-ring ld-spin"></div></button>
2023-06-29 15:53:18 +00:00
</div>
</div>
2020-10-28 22:20:03 +00:00
</div>
<div class="tab-pane fade" id="qslcard" role="tabpanel" aria-labelledby="table-tab">
<?php $this->load->view('qslcard/qslcarousel', $qslimages); ?>
2020-10-28 22:20:03 +00:00
</div>
2023-05-12 17:24:53 +00:00
<div class="tab-pane fade" id="eqslcard" role="tabpanel" aria-labelledby="table-tab">
<?php
if ($row->eqsl_image_file != null) {
2023-07-14 20:21:47 +00:00
echo '<img class="d-block" src="' . base_url() . '/images/eqsl_card_images/' . $row->eqsl_image_file .'" alt="eQSL picture">';
}
2023-05-12 17:24:53 +00:00
?>
</div>
2020-10-28 22:20:03 +00:00
<?php
}
?>
</div>
2020-03-02 20:13:19 +00:00
</div>
2011-07-21 23:10:09 +00:00
<?php
if($row->COL_GRIDSQUARE != null && strlen($row->COL_GRIDSQUARE) >= 4) {
$stn_loc = $this->qra->qra2latlong(trim($row->COL_GRIDSQUARE));
if($stn_loc[0] != 0) {
$lat = $stn_loc[0];
$lng = $stn_loc[1];
}
} elseif($row->COL_VUCC_GRIDS != null) {
$grids = explode(",", $row->COL_VUCC_GRIDS);
if (count($grids) == 2) {
$grid1 = $this->qra->qra2latlong(trim($grids[0]));
$grid2 = $this->qra->qra2latlong(trim($grids[1]));
$coords[]=array('lat' => $grid1[0],'lng'=> $grid1[1]);
$coords[]=array('lat' => $grid2[0],'lng'=> $grid2[1]);
$midpoint = $this->qra->get_midpoint($coords);
$lat = $midpoint[0];
$lng = $midpoint[1];
}
if (count($grids) == 4) {
$grid1 = $this->qra->qra2latlong(trim($grids[0]));
$grid2 = $this->qra->qra2latlong(trim($grids[1]));
$grid3 = $this->qra->qra2latlong(trim($grids[2]));
$grid4 = $this->qra->qra2latlong(trim($grids[3]));
$coords[]=array('lat' => $grid1[0],'lng'=> $grid1[1]);
$coords[]=array('lat' => $grid2[0],'lng'=> $grid2[1]);
$coords[]=array('lat' => $grid3[0],'lng'=> $grid3[1]);
$coords[]=array('lat' => $grid4[0],'lng'=> $grid4[1]);
$midpoint = $this->qra->get_midpoint($coords);
$lat = $midpoint[0];
$lng = $midpoint[1];
}
2013-02-15 00:27:27 +00:00
} else {
2022-07-04 06:46:33 +00:00
if(isset($row->lat)) {
$lat = $row->lat;
} else {
$lat = 0;
}
2022-07-04 06:46:33 +00:00
if(isset($row->long)) {
$lng = $row->long;
} else {
$lng = 0;
}
2013-02-15 00:27:27 +00:00
}
2011-07-21 23:10:09 +00:00
?>
<script>
var lat = <?php echo $lat; ?>;
var long = <?php echo $lng; ?>;
var callsign = "<?php echo $row->COL_CALL; ?>";
</script>
<div hidden id ='lat'><?php echo $lat; ?></div>
<div hidden id ='long'><?php echo $lng; ?></div>
<div hidden id ='callsign'><?php echo $row->COL_CALL; ?></div>
<div hidden id ='qsoid'><?php echo $row->COL_PRIMARY_KEY; ?></div>
2011-07-21 23:10:09 +00:00
<?php } } ?>