Currently: = user()->currentaction ?>
latitude;
$lon = user()->longitude;
if ($lat < 0) { $lat = ($lat * -1) . "S"; } else { $lat .= "N"; }
if ($lon < 0) { $lon = ($lon * -1) . "W"; } else { $lon .= "E"; }
?>
Latitude: = $lat ?>
Longitude: = $lon ?>
View Map
currentaction == 'In Town') {
$town = get_town_by_xy((int) user()->latitude, (int) user()->longitude);
echo "Welcome to {$town['name']}.
";
}
?>
Travel To:
towns);
$towns = db()->query('SELECT * FROM towns ORDER BY id;');
$mapped = false;
while ($row = $towns->fetchArray(SQLITE3_ASSOC)) {
$mapped = true;
if (in_array($row['id'], $town_list)) {
echo <<{$row['name']}
HTML;
}
}
if (!$mapped) echo 'You have no towns mapped.';
?>