kopia lustrzana https://github.com/magicbug/Cloudlog
[Update][Distance] used HTMX to load the results and handled errors in qra.php
rodzic
a5c11fe1a1
commit
944ab40e5e
|
@ -55,7 +55,14 @@ class Qra {
|
|||
$stn = qra2latlong($rx);
|
||||
|
||||
// Feed in Lat Longs plus the unit type
|
||||
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>
|
||||
|
|
Ładowanie…
Reference in New Issue