index allignment

pull/14/head
Tom Early 6 years ago
parent 0486efa69c
commit 1a36aa0569

@ -92,11 +92,11 @@ function MyAndSfxToQrz(string $my, string $sfx)
} }
return $my; return $my;
} }
//https://www.google.com/maps?q=+52.37745,+001.99960 //example URL: https://www.google.com/maps?q=+52.37745,+001.99960
function Maidenhead(string $maid, double $lat, double $lon) function Maidenhead(string $maid, float $lat, float $lon)
{ {
$str = trim($maid); $str = trim($maid);
if (7 != strlen($str)) if (6 > strlen($str))
return $maid; return $maid;
if ($lat >= 0.0) if ($lat >= 0.0)
$slat = '+'.$lat; $slat = '+'.$lat;
@ -175,7 +175,7 @@ foreach($showlist as $section) {
if ($stmnt = $db->prepare($ss)) { if ($stmnt = $db->prepare($ss)) {
if ($result = $stmnt->execute()) { if ($result = $stmnt->execute()) {
while ($row = $result->FetchArray(SQLITE3_NUM)) { while ($row = $result->FetchArray(SQLITE3_NUM)) {
$rstr = MyAndSfxToQrz($row[0], $row[1]).' '.$row[2].' '.$row[3].' '.$row[4].' '.Maidenhead($row[5], $row[6], $row[7]).' '.SecToString(intval($row[4])).'<br>'; $rstr = MyAndSfxToQrz($row[0], $row[1]).' '.$row[2].' '.$row[3].' '.$row[4].' '.Maidenhead($row[5], $row[6], $row[7]).' '.SecToString(intval($row[8])).'<br>';
echo str_replace('*', ' ', str_replace(' ', '&nbsp;', $rstr)), "\n"; echo str_replace('*', ' ', str_replace(' ', '&nbsp;', $rstr)), "\n";
} }
$result->finalize(); $result->finalize();

Loading…
Cancel
Save

Powered by TurnKey Linux.