this is going to be boring
<?php
/*************************************/
/* ezRPG script */
/* Written by Chris from WA */
/*
http://code.google.com/p/ezrpg */
/*
http://www.bbgamezone.com/ */
/*************************************/
include("lib.php");
define("PAGENAME", "Wanna Go Somewhere?");
$player = check_user($secret_key, $db);
$query = $db->execute("select `Cost` from `Cities`");
while ($getcity3 = $query->fetchrow())
$buscost = $getcity3['Cost'];
$cityid = $_GET['id'];
if ($_GET['act'] == "go")
{
if ($player->gold < $buscost)
{
include("templates/private_header.php");
echo "Hey everyone look, this wanna be gansta thinks this bus is free!<p>";
echo "<a href=\"home.php\">Home</a>\n";
include("templates/private_footer.php");
exit;
}
//if player already in this city
If ($player->City_ID == $cityid)
{
include("templates/private_header.php");
echo "Are you high? You're already here moron<p>";
echo "<a href=\"home.php\">Home</a>\n";
include("templates/private_footer.php");
exit;
}
else
{
//update City
$query = $db->execute ("UPDATE players SET City_ID=$cityid where id=$player->id");
$query = $db->execute ("UPDATE players set `gold`=? where `id`=?", array($player->gold - $buscost, $player->id));
}
$player = check_user($secret_key, $db);
include("templates/private_header.php");
echo "You have arrived at your destination";
echo "<p><a href=\"home.php\">Home</a>\n";
include("templates/private_footer.php");
exit;
}
include("templates/private_header.php");
echo "Welcome to CAC Bus Lines
";
echo "Where please purchase your ticket and step onto the bus.
The cost of the ticket from your current location is listed below.<p>";
echo "<table width=\"100%\" border=\"1\">\n";
echo "<th width=\"199\" class=\"cellheader\">Destination</th>";
echo "<th width=\"217\" class=\"cellheader\"> Cost</th>";
$querycity2 = $db->execute("SELECT * FROM Cities Where $player->level >= Minimum_Level");
while ($getcity2 = $querycity2->fetchrow())
{
echo "<tr>";
echo "<td width=\"199\"><a href='bus.php?act=go&id={$getcity2['City_ID']}'>{$getcity2['City_Name']}</a></td>\n";
echo "<td width=\"217\">";
echo "$$cost";
echo "</td>\n";
echo "</tr>\n";
}
echo "</table>\n";
include("templates/private_footer.php");
?>