From ba4719f97a5151de4c79735e3a56275fd0a1d181 Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Fri, 13 Dec 2024 11:42:22 -0600 Subject: [PATCH] Move images, move CSS to file, add router, refactor links --- public/admin.php | 2 +- public/css/dk.css | 76 ++++++++ public/help.php | 8 +- public/{images => img}/background.gif | Bin public/{images => img}/background.jpg | Bin public/{images => img}/bars_green.gif | Bin public/{images => img}/bars_red.gif | Bin public/{images => img}/bars_yellow.gif | Bin public/{images => img}/button_character.gif | Bin public/{images => img}/button_fastspells.gif | Bin public/{images => img}/button_functions.gif | Bin public/{images => img}/button_help.gif | Bin public/{images => img}/button_inventory.gif | Bin public/{images => img}/button_location.gif | Bin public/{images => img}/button_login.gif | Bin public/{images => img}/button_logout.gif | Bin public/{images => img}/button_register.gif | Bin public/{images => img}/button_shoutbox.gif | Bin public/{images => img}/button_spells.gif | Bin public/{images => img}/button_status.gif | Bin public/{images => img}/button_towns.gif | Bin public/{images => img}/compass_01.gif | Bin public/{images => img}/compass_02.gif | Bin public/{images => img}/compass_03.gif | Bin public/{images => img}/compass_04.gif | Bin public/{images => img}/dkforumsbutton.gif | Bin public/{images => img}/help_exploring.jpg | Bin public/{images => img}/help_fighting.jpg | Bin public/{images => img}/icon_armor.gif | Bin public/{images => img}/icon_shield.gif | Bin public/{images => img}/icon_weapon.gif | Bin public/{images => img}/logo.gif | Bin public/{images => img}/map.gif | Bin public/{images => img}/title_exploring.gif | Bin public/{images => img}/title_fighting.gif | Bin public/{images => img}/town_1.gif | Bin public/{images => img}/town_2.gif | Bin public/{images => img}/town_3.gif | Bin public/{images => img}/town_4.gif | Bin public/{images => img}/town_5.gif | Bin public/{images => img}/town_6.gif | Bin public/{images => img}/town_7.gif | Bin public/{images => img}/town_8.gif | Bin public/index.php | 76 +++++++- public/install.php | 8 +- public/login.php | 9 +- public/users.php | 6 +- src/explore.php | 4 +- src/fight.php | 30 +-- src/heal.php | 2 +- src/lib.php | 42 ++--- src/router.php | 183 +++++++++++++++++++ src/towns.php | 52 +++--- templates/admin.php | 2 +- templates/babblebox.php | 4 +- templates/fight.php | 2 +- templates/leftnav.php | 10 +- templates/login.php | 2 +- templates/minimal.php | 4 +- templates/onlinechar.php | 12 +- templates/primary.php | 124 ++++--------- templates/rightnav.php | 12 +- templates/showchar.php | 12 +- templates/towns.php | 8 +- 64 files changed, 481 insertions(+), 209 deletions(-) create mode 100644 public/css/dk.css rename public/{images => img}/background.gif (100%) rename public/{images => img}/background.jpg (100%) rename public/{images => img}/bars_green.gif (100%) rename public/{images => img}/bars_red.gif (100%) rename public/{images => img}/bars_yellow.gif (100%) rename public/{images => img}/button_character.gif (100%) rename public/{images => img}/button_fastspells.gif (100%) rename public/{images => img}/button_functions.gif (100%) rename public/{images => img}/button_help.gif (100%) rename public/{images => img}/button_inventory.gif (100%) rename public/{images => img}/button_location.gif (100%) rename public/{images => img}/button_login.gif (100%) rename public/{images => img}/button_logout.gif (100%) rename public/{images => img}/button_register.gif (100%) rename public/{images => img}/button_shoutbox.gif (100%) rename public/{images => img}/button_spells.gif (100%) rename public/{images => img}/button_status.gif (100%) rename public/{images => img}/button_towns.gif (100%) rename public/{images => img}/compass_01.gif (100%) rename public/{images => img}/compass_02.gif (100%) rename public/{images => img}/compass_03.gif (100%) rename public/{images => img}/compass_04.gif (100%) rename public/{images => img}/dkforumsbutton.gif (100%) rename public/{images => img}/help_exploring.jpg (100%) rename public/{images => img}/help_fighting.jpg (100%) rename public/{images => img}/icon_armor.gif (100%) rename public/{images => img}/icon_shield.gif (100%) rename public/{images => img}/icon_weapon.gif (100%) rename public/{images => img}/logo.gif (100%) rename public/{images => img}/map.gif (100%) rename public/{images => img}/title_exploring.gif (100%) rename public/{images => img}/title_fighting.gif (100%) rename public/{images => img}/town_1.gif (100%) rename public/{images => img}/town_2.gif (100%) rename public/{images => img}/town_3.gif (100%) rename public/{images => img}/town_4.gif (100%) rename public/{images => img}/town_5.gif (100%) rename public/{images => img}/town_6.gif (100%) rename public/{images => img}/town_7.gif (100%) rename public/{images => img}/town_8.gif (100%) create mode 100644 src/router.php diff --git a/public/admin.php b/public/admin.php index 20024fb..d2d1a7b 100644 --- a/public/admin.php +++ b/public/admin.php @@ -99,7 +99,7 @@ function primary() - + diff --git a/public/css/dk.css b/public/css/dk.css new file mode 100644 index 0000000..5f6539c --- /dev/null +++ b/public/css/dk.css @@ -0,0 +1,76 @@ +:root { + --font-size: 12px; +} + +html { + font-size: var(--font-size); + font-family: Verdana, Geneva, Tahoma, sans-serif; +} + +body { + background-image: url('/img/background.jpg'); +} + +table { + border-style: none; + padding: 0px; + font-size: var(--font-size); +} + +td { + border-style: none; + padding: 3px; + vertical-align: top; +} + +td.top { + border-bottom: solid 2px black; +} + +td.left { + width: 180px; + border-right: solid 2px black; +} + +td.right { + width: 180px; + border-left: solid 2px black; +} + +a { + color: #663300; + text-decoration: none; + font-weight: bold; +} + +a:hover { + color: #330000; +} + +.small { + font: 10px verdana; +} + +.highlight { + color: red; +} + +.light { + color: #999999; +} + +.title { + border: solid 1px black; + background-color: #eeeeee; + font-weight: bold; + padding: 5px; + margin: 3px; + font-size: 1.2rem; + font-family: 'Times New Roman', Times, serif; +} + +.copyright { + border: solid 1px black; + background-color: #eeeeee; + font: 10px verdana; +} diff --git a/public/help.php b/public/help.php index ce0ece5..27591f3 100644 --- a/public/help.php +++ b/public/help.php @@ -16,7 +16,7 @@ if (!in_array($page, ['main', 'items', 'levels', 'monsters', 'spells'])) $page = <?= $controlrow["gamename"] ?> Help - + + + {{title}} + + + -
-
Game Open:
Close the game if you are upgrading or working on settings and don't want to cause odd errors for end-users. Closing the game will completely halt all activity.
Game Name:
Default is "Dragon Knight". Change this if you want to change to call your game something different.
Game URL:
Please specify the full URL to your game installation ("http://www.server.com/dkpath/index.php"). This gets used in the registration email sent to users. If you leave this field blank or incorrect, users may not be able to register correctly.
Game URL:
Please specify the full URL to your game installation ("https://www.dragonknight.com/"). This gets used in the registration email sent to users. If you leave this field blank or incorrect, users may not be able to register correctly.
Admin Email:
Please specify your email address. This gets used when the game has to send an email to users.
Map Size:
Default is 250. This is the size of each map quadrant. Note that monster levels increase every 5 spaces, so you should ensure that you have at least (map size / 5) monster levels total, otherwise there will be parts of the map without any monsters, or some monsters won't ever get used. Ex: with a map size of 250, you should have 50 monster levels total.
Email Verification:
Make users verify their email address for added security.
- - - - - - -
-
{{dkgamename}}{{topnav}}
-
{{leftnav}}{{content}}{{rightnav}}

- - - - + +
+ + + + + + + + + +
+
{{dkgamename}}{{topnav}}
+
{{leftnav}}{{content}}{{rightnav}}

+ + + +
+ -THEVERYENDOFYOU; -?> +HTML; diff --git a/templates/rightnav.php b/templates/rightnav.php index d3c9ecc..6eb3705 100644 --- a/templates/rightnav.php +++ b/templates/rightnav.php @@ -1,7 +1,7 @@ -Character +Character {{username}}
Level: {{level}}
@@ -16,12 +16,12 @@ TP: {{currenttp}}

- +
Inventory
Inventory
- - - + + +
WeaponWeapon: {{weaponname}}
ArmorArmor: {{armorname}}
ShieldShield: {{shieldname}}
WeaponWeapon: {{weaponname}}
ArmorArmor: {{armorname}}
ShieldShield: {{shieldname}}
Slot 1: {{slot1name}}
Slot 2: {{slot2name}}
@@ -30,7 +30,7 @@ Slot 3: {{slot3name}}

- + diff --git a/templates/showchar.php b/templates/showchar.php index 882e2cc..bf47026 100644 --- a/templates/showchar.php +++ b/templates/showchar.php @@ -1,7 +1,7 @@ - +
Fast Spells
Fast Spells
{{magiclist}}
Character
Character
{{username}}

@@ -23,12 +23,12 @@ Defense Power: {{defensepower}}

- +
Inventory
Inventory
- - - + + +
WeaponWeapon: {{weaponname}}
ArmorArmor: {{armorname}}
ShieldShield: {{shieldname}}
WeaponWeapon: {{weaponname}}
ArmorArmor: {{armorname}}
ShieldShield: {{shieldname}}
Slot 1: {{slot1name}}
Slot 2: {{slot2name}}
@@ -37,7 +37,7 @@ Slot 3: {{slot3name}}

- + diff --git a/templates/towns.php b/templates/towns.php index 0df9cdb..052b941 100644 --- a/templates/towns.php +++ b/templates/towns.php @@ -1,13 +1,13 @@ - +
Spells
Spells
{{magiclist}}
Welcome to {{name}}
Welcome to {{name}}
Town Options: