2024-12-13 12:40:13 -06:00
|
|
|
<section>
|
|
|
|
<div class="title"><img src="/img/button_location.gif" alt="Location" title="Location"></div>
|
2024-12-17 22:10:49 -06:00
|
|
|
Currently: <?= user()->currentaction ?><br>
|
2024-12-18 17:00:23 -06:00
|
|
|
<?php
|
|
|
|
$lat = user()->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 ?><br>
|
|
|
|
Longitude: <?= $lon ?><br>
|
2024-12-13 12:40:13 -06:00
|
|
|
<a href="javascript:openmappopup()">View Map</a><br>
|
2024-12-19 10:04:03 -06:00
|
|
|
<form action="/move" method="post" hx-post="/move" hx-target="#middle" class="move-compass">
|
|
|
|
<button name="direction" value="north" class="north">North</button>
|
2024-12-13 12:40:13 -06:00
|
|
|
<div class="mid">
|
2024-12-19 10:04:03 -06:00
|
|
|
<button name="direction" value="west" class="west">West</button>
|
|
|
|
<button name="direction" value="east" class="east">East</button>
|
2024-12-13 12:40:13 -06:00
|
|
|
</div>
|
2024-12-19 10:04:03 -06:00
|
|
|
<button name="direction" value="south" class="south">South</button>
|
2024-12-12 18:36:30 -06:00
|
|
|
</form>
|
2024-12-13 12:40:13 -06:00
|
|
|
</section>
|
2017-02-05 10:49:37 -06:00
|
|
|
|
2024-12-13 12:47:29 -06:00
|
|
|
<section>
|
|
|
|
<div class="title"><img src="/img/button_towns.gif" alt="Towns" title="Towns"></div>
|
2024-12-17 22:10:49 -06:00
|
|
|
<?php
|
2024-12-18 17:00:23 -06:00
|
|
|
if (user()->currentaction == 'In Town') {
|
|
|
|
$town = get_town_by_xy((int) user()->latitude, (int) user()->longitude);
|
|
|
|
echo "Welcome to <b>{$town['name']}</b>.<br><br>";
|
|
|
|
}
|
2024-12-17 22:10:49 -06:00
|
|
|
?>
|
2024-12-12 18:36:30 -06:00
|
|
|
Travel To:<br>
|
2024-12-18 17:00:23 -06:00
|
|
|
<?php
|
|
|
|
$town_list = explode(",", user()->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)) {
|
2024-12-19 10:04:03 -06:00
|
|
|
echo <<<HTML
|
|
|
|
<a href="/gotown/{$row['id']}" hx-get="/gotown/{$row['id']}" hx-target="#middle">{$row['name']}</a><br>
|
|
|
|
HTML;
|
2024-12-18 17:00:23 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!$mapped) echo 'You have no towns mapped.';
|
|
|
|
?>
|
2024-12-13 12:47:29 -06:00
|
|
|
</section>
|
2017-02-05 10:49:37 -06:00
|
|
|
|
2024-12-13 12:47:29 -06:00
|
|
|
<section>
|
|
|
|
<div class="title"><img src="/img/button_functions.gif" alt="Functions" title="Functions"></div>
|
2024-12-19 10:04:03 -06:00
|
|
|
<a href="/" hx-get="/" hx-target="#middle">Home</a><br>
|
|
|
|
<a href="/forum" hx-get="/forum" hx-target="#middle">Forum</a><br>
|
2024-12-16 19:58:46 -06:00
|
|
|
<a href="/settings">Settings</a><br>
|
2024-12-13 15:24:08 -06:00
|
|
|
<a href="/changepassword">Change Password</a><br>
|
2024-12-13 14:57:48 -06:00
|
|
|
<a href="/logout">Log Out</a><br>
|
2024-12-17 22:10:49 -06:00
|
|
|
<?php if (user()->authlevel === 1): ?>
|
|
|
|
<a href="/admin">Admin</a><br>
|
|
|
|
<?php endif; ?>
|
2024-12-13 14:57:48 -06:00
|
|
|
<a href="/help">Help</a>
|
2024-12-13 12:47:29 -06:00
|
|
|
</section>
|