diff --git a/public/admin.php b/public/admin.php
index 3f25424..a5a2f77 100644
--- a/public/admin.php
+++ b/public/admin.php
@@ -33,7 +33,7 @@ if (isset($_GET["do"])) {
function donothing() {
- $page = "Welcome to the Dragon Knight Administration section. Use the links on the left bar to control and edit various elements of the game.
Please note that the control panel has been created mostly as a shortcut for certain individual settings. It is meant for use primarily with editing one thing at a time. If you need to completely replace an entire table (say, to replace all stock monsters with your own new ones), it is suggested that you use a more in-depth database tool such as phpMyAdmin. Also, you may want to have a copy of the Dragon Knight development kit, available from the Dragon Knight homepage.
Also, you should be aware that certain portions of the DK code are dependent on the formatting of certain database results (for example, the special attributes on item drops). While I have attempted to point these out throughout the admin script, you should definitely pay attention and be careful when editing some fields, because mistakes in the database content may result in script errors or your game breaking completely.";
+ $page = "Welcome to the Dragon Knight Administration section. Use the links on the left bar to control and edit various elements of the game.
Please note that the control panel has been created mostly as a shortcut for certain individual settings. It is meant for use primarily with editing one thing at a time. If you need to completely replace an entire table (say, to replace all stock monsters with your own new ones), it is suggested that you use a more in-depth database tool such as phpMyAdmin. Also, you may want to have a copy of the Dragon Knight development kit, available from the Dragon Knight homepage.
Also, you should be aware that certain portions of the DK code are dependent on the formatting of certain database results (for example, the special attributes on item drops). While I have attempted to point these out throughout the admin script, you should definitely pay attention and be careful when editing some fields, because mistakes in the database content may result in script errors or your game breaking completely.";
admindisplay($page, "Admin Home");
}
@@ -44,44 +44,44 @@ function main() {
extract($_POST);
$errors = 0;
$errorlist = "";
- if ($gamename == "") { $errors++; $errorlist .= "Game name is required. "; }
- if (($gamesize % 5) != 0) { $errors++; $errorlist .= "Map size must be divisible by five. "; }
- if (!is_numeric($gamesize)) { $errors++; $errorlist .= "Map size must be a number. "; }
- if ($forumtype == 2 && $forumaddress == "") { $errors++; $errorlist .= "You must specify a forum address when using the External setting. "; }
- if ($class1name == "") { $errors++; $errorlist .= "Class 1 name is required. "; }
- if ($class2name == "") { $errors++; $errorlist .= "Class 2 name is required. "; }
- if ($class3name == "") { $errors++; $errorlist .= "Class 3 name is required. "; }
+ if ($gamename == "") { $errors++; $errorlist .= "Game name is required. "; }
+ if (($gamesize % 5) != 0) { $errors++; $errorlist .= "Map size must be divisible by five. "; }
+ if (!is_numeric($gamesize)) { $errors++; $errorlist .= "Map size must be a number. "; }
+ if ($forumtype == 2 && $forumaddress == "") { $errors++; $errorlist .= "You must specify a forum address when using the External setting. "; }
+ if ($class1name == "") { $errors++; $errorlist .= "Class 1 name is required. "; }
+ if ($class2name == "") { $errors++; $errorlist .= "Class 2 name is required. "; }
+ if ($class3name == "") { $errors++; $errorlist .= "Class 3 name is required. "; }
if ($errors == 0) {
$query = doquery("UPDATE {{table}} SET gamename='$gamename',gamesize='$gamesize',forumtype='$forumtype',forumaddress='$forumaddress',compression='$compression',class1name='$class1name',class2name='$class2name',class3name='$class3name',diff1name='$diff1name',diff2name='$diff2name',diff3name='$diff3name',diff2mod='$diff2mod',diff3mod='$diff3mod',gameopen='$gameopen',verifyemail='$verifyemail',gameurl='$gameurl',adminemail='$adminemail',shownews='$shownews',showonline='$showonline',showbabble='$showbabble' WHERE id='1' LIMIT 1", "control");
admindisplay("Settings updated.","Main Settings");
} else {
- admindisplay("Errors:
$errorlist
Please go back and try again.", "Main Settings");
+ admindisplay("Errors:
$errorlist
Please go back and try again.", "Main Settings");
}
}
global $controlrow;
$page = <<Main Settings
-These options control several major settings for the overall game engine.
+Main Settings
+These options control several major settings for the overall game engine.
@@ -111,7 +111,7 @@ END;
function items() {
$query = doquery("SELECT id,name FROM {{table}} ORDER BY id", "items");
- $page = "Edit Items Click an item's name to edit it.
\n";
+ $page = "Edit Items Click an item's name to edit it.
\n";
$count = 1;
while ($row = mysql_fetch_array($query)) {
if ($count == 1) { $page .= "
\n"; $count = 2; }
@@ -130,18 +130,18 @@ function edititem($id) {
extract($_POST);
$errors = 0;
$errorlist = "";
- if ($name == "") { $errors++; $errorlist .= "Name is required. "; }
- if ($buycost == "") { $errors++; $errorlist .= "Cost is required. "; }
- if (!is_numeric($buycost)) { $errors++; $errorlist .= "Cost must be a number. "; }
- if ($attribute == "") { $errors++; $errorlist .= "Attribute is required. "; }
- if (!is_numeric($attribute)) { $errors++; $errorlist .= "Attribute must be a number. "; }
+ if ($name == "") { $errors++; $errorlist .= "Name is required. "; }
+ if ($buycost == "") { $errors++; $errorlist .= "Cost is required. "; }
+ if (!is_numeric($buycost)) { $errors++; $errorlist .= "Cost must be a number. "; }
+ if ($attribute == "") { $errors++; $errorlist .= "Attribute is required. "; }
+ if (!is_numeric($attribute)) { $errors++; $errorlist .= "Attribute must be a number. "; }
if ($special == "" || $special == " ") { $special = "X"; }
if ($errors == 0) {
$query = doquery("UPDATE {{table}} SET name='$name',type='$type',buycost='$buycost',attribute='$attribute',special='$special' WHERE id='$id' LIMIT 1", "items");
admindisplay("Item updated.","Edit Items");
} else {
- admindisplay("Errors:
$errorlist
Please go back and try again.", "Edit Items");
+ admindisplay("Errors:
$errorlist
Please go back and try again.", "Edit Items");
}
}
@@ -151,29 +151,29 @@ function edititem($id) {
$row = mysql_fetch_array($query);
$page = <<Edit Items
+Edit Items
-Special Codes:
-Special codes can be added in the item's Special field to give it extra user attributes. Special codes are in the format attribute,value. Attribute can be any database field from the Users table - however, it is suggested that you only use the ones from the list below, otherwise things can get freaky. Value may be any positive or negative whole number. For example, if you want a weapon to give an additional 50 max hit points, the special code would be maxhp,50.
-Suggested user fields for special codes:
-maxhp - max hit points
-maxmp - max magic points
-maxtp - max travel points
-goldbonus - gold bonus, in percent
-expbonus - experience bonus, in percent
-strength - strength (which also adds to attackpower)
-dexterity - dexterity (which also adds to defensepower)
-attackpower - total attack power
+Special Codes:
+Special codes can be added in the item's Special field to give it extra user attributes. Special codes are in the format attribute,value. Attribute can be any database field from the Users table - however, it is suggested that you only use the ones from the list below, otherwise things can get freaky. Value may be any positive or negative whole number. For example, if you want a weapon to give an additional 50 max hit points, the special code would be maxhp,50.
+Suggested user fields for special codes:
+maxhp - max hit points
+maxmp - max magic points
+maxtp - max travel points
+goldbonus - gold bonus, in percent
+expbonus - experience bonus, in percent
+strength - strength (which also adds to attackpower)
+dexterity - dexterity (which also adds to defensepower)
+attackpower - total attack power
defensepower - total defense power
END;
@@ -189,7 +189,7 @@ END;
function drops() {
$query = doquery("SELECT id,name FROM {{table}} ORDER BY id", "drops");
- $page = "Edit Drops Click an item's name to edit it.
\n";
+ $page = "Edit Drops Click an item's name to edit it.
\n";
$count = 1;
while ($row = mysql_fetch_array($query)) {
if ($count == 1) { $page .= "
\n"; $count = 2; }
@@ -208,17 +208,17 @@ function editdrop($id) {
extract($_POST);
$errors = 0;
$errorlist = "";
- if ($name == "") { $errors++; $errorlist .= "Name is required. "; }
- if ($mlevel == "") { $errors++; $errorlist .= "Monster level is required. "; }
- if (!is_numeric($mlevel)) { $errors++; $errorlist .= "Monster level must be a number. "; }
- if ($attribute1 == "" || $attribute1 == " " || $attribute1 == "X") { $errors++; $errorlist .= "First attribute is required. "; }
+ if ($name == "") { $errors++; $errorlist .= "Name is required. "; }
+ if ($mlevel == "") { $errors++; $errorlist .= "Monster level is required. "; }
+ if (!is_numeric($mlevel)) { $errors++; $errorlist .= "Monster level must be a number. "; }
+ if ($attribute1 == "" || $attribute1 == " " || $attribute1 == "X") { $errors++; $errorlist .= "First attribute is required. "; }
if ($attribute2 == "" || $attribute2 == " ") { $attribute2 = "X"; }
if ($errors == 0) {
$query = doquery("UPDATE {{table}} SET name='$name',mlevel='$mlevel',attribute1='$attribute1',attribute2='$attribute2' WHERE id='$id' LIMIT 1", "drops");
admindisplay("Item updated.","Edit Drops");
} else {
- admindisplay("Errors:
$errorlist
Please go back and try again.", "Edit Drops");
+ admindisplay("Errors:
$errorlist
Please go back and try again.", "Edit Drops");
}
}
@@ -228,28 +228,28 @@ function editdrop($id) {
$row = mysql_fetch_array($query);
$page = <<Edit Drops
+Edit Drops
-Special Codes:
-Special codes are used in the two attribute fields to give the item properties. The first attribute field must contain a special code, but the second one may be left empty ("X") if you wish. Special codes are in the format attribute,value. Attribute can be any database field from the Users table - however, it is suggested that you only use the ones from the list below, otherwise things can get freaky. Value may be any positive or negative whole number. For example, if you want a weapon to give an additional 50 max hit points, the special code would be maxhp,50.
-Suggested user fields for special codes:
-maxhp - max hit points
-maxmp - max magic points
-maxtp - max travel points
-goldbonus - gold bonus, in percent
-expbonus - experience bonus, in percent
-strength - strength (which also adds to attackpower)
-dexterity - dexterity (which also adds to defensepower)
-attackpower - total attack power
+Special Codes:
+Special codes are used in the two attribute fields to give the item properties. The first attribute field must contain a special code, but the second one may be left empty ("X") if you wish. Special codes are in the format attribute,value. Attribute can be any database field from the Users table - however, it is suggested that you only use the ones from the list below, otherwise things can get freaky. Value may be any positive or negative whole number. For example, if you want a weapon to give an additional 50 max hit points, the special code would be maxhp,50.
+Suggested user fields for special codes:
+maxhp - max hit points
+maxmp - max magic points
+maxtp - max travel points
+goldbonus - gold bonus, in percent
+expbonus - experience bonus, in percent
+strength - strength (which also adds to attackpower)
+dexterity - dexterity (which also adds to defensepower)
+attackpower - total attack power
defensepower - total defense power
END;
@@ -261,7 +261,7 @@ END;
function towns() {
$query = doquery("SELECT id,name FROM {{table}} ORDER BY id", "towns");
- $page = "Edit Towns Click an town's name to edit it.
\n";
+ $page = "Edit Towns Click an town's name to edit it.
\n";
$count = 1;
while ($row = mysql_fetch_array($query)) {
if ($count == 1) { $page .= "
\n"; $count = 2; }
@@ -280,25 +280,25 @@ function edittown($id) {
extract($_POST);
$errors = 0;
$errorlist = "";
- if ($name == "") { $errors++; $errorlist .= "Name is required. "; }
- if ($latitude == "") { $errors++; $errorlist .= "Latitude is required. "; }
- if (!is_numeric($latitude)) { $errors++; $errorlist .= "Latitude must be a number. "; }
- if ($longitude == "") { $errors++; $errorlist .= "Longitude is required. "; }
- if (!is_numeric($longitude)) { $errors++; $errorlist .= "Longitude must be a number. "; }
- if ($innprice == "") { $errors++; $errorlist .= "Inn Price is required. "; }
- if (!is_numeric($innprice)) { $errors++; $errorlist .= "Inn Price must be a number. "; }
- if ($mapprice == "") { $errors++; $errorlist .= "Map Price is required. "; }
- if (!is_numeric($mapprice)) { $errors++; $errorlist .= "Map Price must be a number. "; }
+ if ($name == "") { $errors++; $errorlist .= "Name is required. "; }
+ if ($latitude == "") { $errors++; $errorlist .= "Latitude is required. "; }
+ if (!is_numeric($latitude)) { $errors++; $errorlist .= "Latitude must be a number. "; }
+ if ($longitude == "") { $errors++; $errorlist .= "Longitude is required. "; }
+ if (!is_numeric($longitude)) { $errors++; $errorlist .= "Longitude must be a number. "; }
+ if ($innprice == "") { $errors++; $errorlist .= "Inn Price is required. "; }
+ if (!is_numeric($innprice)) { $errors++; $errorlist .= "Inn Price must be a number. "; }
+ if ($mapprice == "") { $errors++; $errorlist .= "Map Price is required. "; }
+ if (!is_numeric($mapprice)) { $errors++; $errorlist .= "Map Price must be a number. "; }
- if ($travelpoints == "") { $errors++; $errorlist .= "Travel Points is required. "; }
- if (!is_numeric($travelpoints)) { $errors++; $errorlist .= "Travel Points must be a number. "; }
- if ($itemslist == "") { $errors++; $errorlist .= "Items List is required. "; }
+ if ($travelpoints == "") { $errors++; $errorlist .= "Travel Points is required. "; }
+ if (!is_numeric($travelpoints)) { $errors++; $errorlist .= "Travel Points must be a number. "; }
+ if ($itemslist == "") { $errors++; $errorlist .= "Items List is required. "; }
if ($errors == 0) {
$query = doquery("UPDATE {{table}} SET name='$name',latitude='$latitude',longitude='$longitude',innprice='$innprice',mapprice='$mapprice',travelpoints='$travelpoints',itemslist='$itemslist' WHERE id='$id' LIMIT 1", "towns");
admindisplay("Town updated.","Edit Towns");
} else {
- admindisplay("Errors:
$errorlist
Please go back and try again.", "Edit Towns");
+ admindisplay("Errors:
$errorlist
Please go back and try again.", "Edit Towns");
}
}
@@ -308,17 +308,17 @@ function edittown($id) {
$row = mysql_fetch_array($query);
$page = <<Edit Towns
+Edit Towns
@@ -337,13 +337,13 @@ function monsters() {
$statrow = mysql_fetch_array($statquery);
$query = doquery("SELECT id,name FROM {{table}} ORDER BY id", "monsters");
- $page = "Edit Monsters ";
+ $page = "Edit Monsters ";
if (($controlrow["gamesize"]/5) != $statrow["level"]) {
- $page .= "Note: Your highest monster level does not match with your entered map size. Highest monster level should be ".($controlrow["gamesize"]/5).", yours is ".$statrow["level"].". Please fix this before opening the game to the public.
";
- } else { $page .= "Monster level and map size match. No further actions are required for map compatibility.
"; }
+ $page .= "Note: Your highest monster level does not match with your entered map size. Highest monster level should be ".($controlrow["gamesize"]/5).", yours is ".$statrow["level"].". Please fix this before opening the game to the public.
";
+ } else { $page .= "Monster level and map size match. No further actions are required for map compatibility.
"; }
- $page .= "Click an monster's name to edit it.
\n";
+ $page .= "Click an monster's name to edit it.
\n";
$count = 1;
while ($row = mysql_fetch_array($query)) {
if ($count == 1) { $page .= "
\n"; $count = 2; }
@@ -362,25 +362,25 @@ function editmonster($id) {
extract($_POST);
$errors = 0;
$errorlist = "";
- if ($name == "") { $errors++; $errorlist .= "Name is required. "; }
- if ($maxhp == "") { $errors++; $errorlist .= "Max HP is required. "; }
- if (!is_numeric($maxhp)) { $errors++; $errorlist .= "Max HP must be a number. "; }
- if ($maxdam == "") { $errors++; $errorlist .= "Max Damage is required. "; }
- if (!is_numeric($maxdam)) { $errors++; $errorlist .= "Max Damage must be a number. "; }
- if ($armor == "") { $errors++; $errorlist .= "Armor is required. "; }
- if (!is_numeric($armor)) { $errors++; $errorlist .= "Armor must be a number. "; }
- if ($level == "") { $errors++; $errorlist .= "Monster Level is required. "; }
- if (!is_numeric($level)) { $errors++; $errorlist .= "Monster Level must be a number. "; }
- if ($maxexp == "") { $errors++; $errorlist .= "Max Exp is required. "; }
- if (!is_numeric($maxexp)) { $errors++; $errorlist .= "Max Exp must be a number. "; }
- if ($maxgold == "") { $errors++; $errorlist .= "Max Gold is required. "; }
- if (!is_numeric($maxgold)) { $errors++; $errorlist .= "Max Gold must be a number. "; }
+ if ($name == "") { $errors++; $errorlist .= "Name is required. "; }
+ if ($maxhp == "") { $errors++; $errorlist .= "Max HP is required. "; }
+ if (!is_numeric($maxhp)) { $errors++; $errorlist .= "Max HP must be a number. "; }
+ if ($maxdam == "") { $errors++; $errorlist .= "Max Damage is required. "; }
+ if (!is_numeric($maxdam)) { $errors++; $errorlist .= "Max Damage must be a number. "; }
+ if ($armor == "") { $errors++; $errorlist .= "Armor is required. "; }
+ if (!is_numeric($armor)) { $errors++; $errorlist .= "Armor must be a number. "; }
+ if ($level == "") { $errors++; $errorlist .= "Monster Level is required. "; }
+ if (!is_numeric($level)) { $errors++; $errorlist .= "Monster Level must be a number. "; }
+ if ($maxexp == "") { $errors++; $errorlist .= "Max Exp is required. "; }
+ if (!is_numeric($maxexp)) { $errors++; $errorlist .= "Max Exp must be a number. "; }
+ if ($maxgold == "") { $errors++; $errorlist .= "Max Gold is required. "; }
+ if (!is_numeric($maxgold)) { $errors++; $errorlist .= "Max Gold must be a number. "; }
if ($errors == 0) {
$query = doquery("UPDATE {{table}} SET name='$name',maxhp='$maxhp',maxdam='$maxdam',armor='$armor',level='$level',maxexp='$maxexp',maxgold='$maxgold',immune='$immune' WHERE id='$id' LIMIT 1", "monsters");
admindisplay("Monster updated.","Edit monsters");
} else {
- admindisplay("Errors:
$errorlist
Please go back and try again.", "Edit monsters");
+ admindisplay("Errors:
$errorlist
Please go back and try again.", "Edit monsters");
}
}
@@ -390,18 +390,18 @@ function editmonster($id) {
$row = mysql_fetch_array($query);
$page = <<Edit Monsters
+Edit Monsters
@@ -419,7 +419,7 @@ END;
function spells() {
$query = doquery("SELECT id,name FROM {{table}} ORDER BY id", "spells");
- $page = "Edit Spells Click an spell's name to edit it.
\n";
+ $page = "Edit Spells Click an spell's name to edit it.
\n";
$count = 1;
while ($row = mysql_fetch_array($query)) {
if ($count == 1) { $page .= "
\n"; $count = 2; }
@@ -438,17 +438,17 @@ function editspell($id) {
extract($_POST);
$errors = 0;
$errorlist = "";
- if ($name == "") { $errors++; $errorlist .= "Name is required. "; }
- if ($mp == "") { $errors++; $errorlist .= "MP is required. "; }
- if (!is_numeric($mp)) { $errors++; $errorlist .= "MP must be a number. "; }
- if ($attribute == "") { $errors++; $errorlist .= "Attribute is required. "; }
- if (!is_numeric($attribute)) { $errors++; $errorlist .= "Attribute must be a number. "; }
+ if ($name == "") { $errors++; $errorlist .= "Name is required. "; }
+ if ($mp == "") { $errors++; $errorlist .= "MP is required. "; }
+ if (!is_numeric($mp)) { $errors++; $errorlist .= "MP must be a number. "; }
+ if ($attribute == "") { $errors++; $errorlist .= "Attribute is required. "; }
+ if (!is_numeric($attribute)) { $errors++; $errorlist .= "Attribute must be a number. "; }
if ($errors == 0) {
$query = doquery("UPDATE {{table}} SET name='$name',mp='$mp',attribute='$attribute',type='$type' WHERE id='$id' LIMIT 1", "spells");
admindisplay("Spell updated.","Edit Spells");
} else {
- admindisplay("Errors:
$errorlist
Please go back and try again.", "Edit Spells");
+ admindisplay("Errors:
$errorlist
Please go back and try again.", "Edit Spells");
}
}
@@ -458,14 +458,14 @@ function editspell($id) {
$row = mysql_fetch_array($query);
$page = <<Edit Spells
+Edit Spells
@@ -493,7 +493,7 @@ function levels() {
}
$page = <<Edit Levels Select a level number from the dropdown box to edit it.
+Edit Levels Select a level number from the dropdown box to edit it.
\n";
$page .= "If you've changed your mind, you may also return back to town.\n";
$title = "Buy Items";
@@ -83,14 +83,14 @@ function buy2($id)
global $userrow;
$townrow = get_town_by_xy($userrow['longitude'], $userrow['latitude']);
- if ($townrow === false) display("Cheat attempt detected.
Get a life, loser.", "Error");
+ if ($townrow === false) display("Cheat attempt detected.
Get a life, loser.", "Error");
$townitems = explode(",", $townrow["itemslist"]);
- if (!in_array($id, $townitems)) display("Cheat attempt detected.
Get a life, loser.", "Error");
+ if (!in_array($id, $townitems)) display("Cheat attempt detected.
Get a life, loser.", "Error");
$item = get_item($id);
if ($userrow["gold"] < $item["buycost"]) {
- display("You do not have enough gold to buy this item.
You may return to town, store, or use the direction buttons on the left to start exploring.", "Buy Items");
+ display("You do not have enough gold to buy this item.
You may return to town, store, or use the direction buttons on the left to start exploring.", "Buy Items");
}
$type_to_row_mapping = [1 => 'weaponid', 2 => 'armorid', 3 => 'shieldid'];
@@ -98,9 +98,9 @@ function buy2($id)
if ($current_equipped_id != 0) {
$item2 = get_item($current_equipped_id);
- $page = "If you are buying the ".$item["name"].", then I will buy your ".$item2["name"]." for ".ceil($item2["buycost"] / 2)." gold. Is that ok?
";
+ $page = "If you are buying the ".$item["name"].", then I will buy your ".$item2["name"]." for ".ceil($item2["buycost"] / 2)." gold. Is that ok?
";
} else {
- $page = "You are buying the ".$item["name"].", is that ok?
";
+ $page = "You are buying the ".$item["name"].", is that ok?
";
}
display($page, "Buy Items");
@@ -117,14 +117,14 @@ function buy3($id)
global $userrow;
$townrow = get_town_by_xy($userrow['longitude'], $userrow['latitude']);
- if ($townrow === false) display("Cheat attempt detected.
Get a life, loser.", "Error");
+ if ($townrow === false) display("Cheat attempt detected.
Get a life, loser.", "Error");
$townitems = explode(",", $townrow["itemslist"]);
- if (!in_array($id, $townitems)) display("Cheat attempt detected.
Get a life, loser.", "Error");
+ if (!in_array($id, $townitems)) display("Cheat attempt detected.
Get a life, loser.", "Error");
$item = get_item($id);
if ($userrow["gold"] < $item["buycost"]) {
- display("You do not have enough gold to buy this item.
You may return to town, store, or use the direction buttons on the left to start exploring.", "Buy Items");
+ display("You do not have enough gold to buy this item.
You may return to town, store, or use the direction buttons on the left to start exploring.", "Buy Items");
}
$type_mapping = [
@@ -212,7 +212,7 @@ function buy3($id)
$stmt = db()->query("UPDATE users SET " . implode(", ", $updateFields) . " WHERE id = ?;", $updateValues);
if ($stmt === false) exit("Failed to purchase and equip $id. Go back and try again.");
- display("Thank you for purchasing this item.
You may return to town, store, or use the direction buttons on the left to start exploring.", "Buy Items");
+ display("Thank you for purchasing this item.
You may return to town, store, or use the direction buttons on the left to start exploring.", "Buy Items");
}
/**
@@ -224,8 +224,8 @@ function maps()
$mappedtowns = explode(",", $userrow["towns"]);
- $page = "Buying maps will put the town in your Travel To box, and it won't cost you as many TP to get there.
\n";
- $page .= "Click a town name to purchase its map.
\n";
+ $page = "Buying maps will put the town in your Travel To box, and it won't cost you as many TP to get there.
\n";
+ $page .= "Click a town name to purchase its map.
\n";
$page .= "
\n";
$towns = db()->query('SELECT * FROM towns ORDER BY id;');
@@ -243,7 +243,7 @@ function maps()
}
}
- $page .= "
\n";
+ $page .= "
\n";
$page .= "If you've changed your mind, you may also return back to town.\n";
display($page, "Buy Maps");
@@ -259,10 +259,10 @@ function maps2($id)
$townrow = get_town_by_id($id);
if ($userrow["gold"] < $townrow["mapprice"]) {
- display("You do not have enough gold to buy this map.
You may return to town, store, or use the direction buttons on the left to start exploring.", "Buy Maps");
+ display("You do not have enough gold to buy this map.
You may return to town, store, or use the direction buttons on the left to start exploring.", "Buy Maps");
}
- $page = "You are buying the ".$townrow["name"]." map. Is that ok?
";
+ $page = "You are buying the ".$townrow["name"]." map. Is that ok?
";
display($page, "Buy Maps");
}
@@ -279,7 +279,7 @@ function maps3($id)
$townrow = get_town_by_id($id);
if ($userrow["gold"] < $townrow["mapprice"]) {
- display("You do not have enough gold to buy this map.
You may return to town, store, or use the direction buttons on the left to start exploring.", "Buy Maps");
+ display("You do not have enough gold to buy this map.
You may return to town, store, or use the direction buttons on the left to start exploring.", "Buy Maps");
}
$mappedtowns = $userrow["towns"].",$id";
@@ -287,7 +287,7 @@ function maps3($id)
db()->query('UPDATE users SET towns=?, gold=? WHERE id=?;', [$mappedtowns, $newgold, $userrow['id']]);
- display("Thank you for purchasing this map.
You may return to town, store, or use the direction buttons on the left to start exploring.", "Buy Maps");
+ display("Thank you for purchasing this map.
You may return to town, store, or use the direction buttons on the left to start exploring.", "Buy Maps");
}
/**
@@ -306,7 +306,7 @@ function travelto($id, bool $usepoints = true)
display("You do not have enough TP to travel here. Please go back and try again when you get more TP.", "Travel To");
}
$mapped = explode(",",$userrow["towns"]);
- if (!in_array($id, $mapped)) { display("Cheat attempt detected.
Get a life, loser.", "Error"); }
+ if (!in_array($id, $mapped)) { display("Cheat attempt detected.
Get a life, loser.", "Error"); }
}
if (($userrow["latitude"] == $townrow["latitude"]) && ($userrow["longitude"] == $townrow["longitude"])) {
diff --git a/templates/admin.php b/templates/admin.php
index d10fbb2..00d9de0 100644
--- a/templates/admin.php
+++ b/templates/admin.php
@@ -51,28 +51,28 @@ a:hover {