Hi again, This isn't much at all, however i noticed many games with the standard monorail, All i have done is cleaned the code and changed it around a little bit.
Feel free to use!
Screenshots:




monorail.php:
<?php
include_once(DIRNAME(__FILE__) . '/globals.php');
echo "<h3>The Monorail</h3>";
$_GET['travel'] = abs((int) $_GET['travel']);
if (!$_GET['travel']) {
echo "Welcome to the Monorail Station, It costs \$1000 for a ticket.<br /> Where would you like to travel today?<br /><br />";
$q = $db->query("SELECT * FROM cities WHERE cityid != {$ir['location']} AND cityminlevel <= {$ir['level']}");
echo "<table width='80%' cellspacing='1' class='table'><tr><th>Name</th><th>Description</th><th>Min Level</th><th>Action</th></tr>";
while ($r = $db->fetch_row($q)) {
echo "<tr><td>{$r['cityname']}</td><td>{$r['citydesc']}</td><td>{$r['cityminlevel']}</td><td><a href='monorail.php?travel={$r['cityid']}'>Travel</a></td></tr>";
}
echo "</table>";
} else {
if ($ir['money'] < 1000) {
echo "<b>Error:</b> You do not have enough money, It costs \$1000 for a ticket.<br /><br /> > <a href='monorail.php'>Back</a>";
} else if (((int) $_GET['travel']) != $_GET['travel']) {
echo "<b>Error:</b> Invalid city ID, Please try again!<br /><br /> > <a href='monorail.php'>Back</a>";
} else {
$q = $db->query("SELECT * FROM cities WHERE cityid = {$_GET['travel']} AND cityminlevel <= {$ir['level']}");
if (!$db->num_rows($q)) {
echo "<b>Error:</b> Either the city does not exist or you are not a high enough level!<br /><br /> > <a href='monorail.php'>Back</a>";
} else {
$db->query("UPDATE users SET money=money-1000,location={$_GET['travel']} WHERE userid=$userid");
$r = $db->fetch_row($q);
echo "<b>Success:</b> You have paid \$1000 and travelled to {$r['cityname']} on the monorail!<br /><br /> > <a href='monorail.php'>Back</a>";
}
}
}
$h->endpage();
?>Thanks!