mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Update][Distance] used HTMX to load the results and handled errors in qra.php
This commit is contained in:
@@ -55,7 +55,14 @@ class Qra {
|
||||
$stn = qra2latlong($rx);
|
||||
|
||||
// Feed in Lat Longs plus the unit type
|
||||
$total_distance = distance($my[0], $my[1], $stn[0], $stn[1], $unit);
|
||||
try
|
||||
{
|
||||
$total_distance = distance($my[0], $my[1], $stn[0], $stn[1], $unit);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$total_distance = 0;
|
||||
}
|
||||
|
||||
// Return the distance
|
||||
return $total_distance;
|
||||
|
||||
@@ -54,7 +54,8 @@
|
||||
</div>
|
||||
<div class="tab-pane fade" id="distance" role="tabpanel" aria-labelledby="distance-tab">
|
||||
<p class="card-text">Here you can update QSOs with missing distance information.</p>
|
||||
<p><a class="btn btn-primary" href="<?php echo site_url('update/update_distances');?>">Update distance data</a></p>
|
||||
<p><a class="btn btn-primary" hx-get="<?php echo site_url('update/update_distances');?>" hx-target="#distance_results" href="<?php echo site_url('update/update_distances');?>">Update distance data</a></p>
|
||||
<div id="distance_results"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user