diff --git a/public/index.php b/public/index.php index 8054d95..0f3ce99 100644 --- a/public/index.php +++ b/public/index.php @@ -114,7 +114,7 @@ function dotown() HTML; } - return parsetemplate(gettemplate("towns"), $townrow); + return render('towns', ['town' => $townrow]); } /** diff --git a/src/actions/fight.php b/src/actions/fight.php index b9b8594..4097603 100644 --- a/src/actions/fight.php +++ b/src/actions/fight.php @@ -200,7 +200,7 @@ function fight() } // Finalize page and display it - display(parsetemplate(gettemplate("fight"), $pagearray), "Fighting"); + display(render('fight', ['page' => $pagearray]), "Fighting"); } function victory() diff --git a/src/actions/users.php b/src/actions/users.php index d52e074..9cdd22c 100644 --- a/src/actions/users.php +++ b/src/actions/users.php @@ -127,8 +127,7 @@ function verify() display("Your account was verified successfully.

You may now continue to the Login Page and start playing the game.

Thanks for playing!","Verify Email",false,false,false); } - $topnav = "\"Log\"Register\"\"Help\""; - display(gettemplate("verify"), "Verify Email", false, false, false); + display(render('verify'), "Verify Email", true, false, false); } function lostpassword() @@ -150,7 +149,7 @@ function lostpassword() } } - display(gettemplate("lostpassword"), "Lost Password", true, false, false); + display(render('lostpassword'), "Lost Password", true, false, false); } function changepassword() @@ -183,8 +182,7 @@ function changepassword() display("Your password was changed successfully.

You have been logged out of the game to avoid errors.

Please log back in to continue playing.","Change Password",false,false,false); } - $topnav = "\"Log\"Register\"\"Help\""; - display(gettemplate("changepassword"), "Change Password", false, false, false); + display(render('changepassword'), "Change Password", true, false, false); } function sendpassemail($emailaddress, $password) diff --git a/templates/changepassword.php b/templates/changepassword.php index 7852c84..79aeb30 100644 --- a/templates/changepassword.php +++ b/templates/changepassword.php @@ -1,14 +1,10 @@ - - - - - - - - -
Use the form below to change your password. All fields are required. New passwords must be 10 alphanumeric characters or less.
Username:
Old Password:
New Password:
Verify New Password:


+
+ + + + + + + +
Use the form below to change your password. All fields are required. New passwords must be 10 alphanumeric characters or less.
Username:
Old Password:
New Password:
Verify New Password:


-THEVERYENDOFYOU; -?> diff --git a/templates/fight.php b/templates/fight.php index 83e8bad..5c3b32e 100644 --- a/templates/fight.php +++ b/templates/fight.php @@ -1,14 +1,10 @@ - -Fighting - -You are fighting a {{monstername}}

-{{monsterhp}} -{{yourturn}} -{{monsterturn}} -{{command}} - + Fighting + + You are fighting a

+ + + + + -THEVERYENDOFYOU; -?> diff --git a/templates/lostpassword.php b/templates/lostpassword.php index 2dd0646..7348325 100644 --- a/templates/lostpassword.php +++ b/templates/lostpassword.php @@ -1,11 +1,7 @@ - - - - - -
If you've lost your password, enter your email address below and you will be sent a new one.
Email Address:
+
+ + + + +
If you've lost your password, enter your email address below and you will be sent a new one.
Email Address:
-THEVERYENDOFYOU; -?> \ No newline at end of file diff --git a/templates/onlinechar.php b/templates/onlinechar.php deleted file mode 100644 index 21102f6..0000000 --- a/templates/onlinechar.php +++ /dev/null @@ -1,39 +0,0 @@ -{{username}}.

- When you're finished, you may return to town.

- - - -
Character
- {{username}}

- - Class: {{charclass}}

- - Level: {{level}}
- Experience: {{experience}}
- Gold: {{gold}}
- Hit Points: {{currenthp}} / {{maxhp}}
- Magic Points: {{currentmp}} / {{maxmp}}
- Travel Points: {{currenttp}} / {{maxtp}}

- - Strength: {{strength}}
- Dexterity: {{dexterity}}
- Attack Power: {{attackpower}}
- Defense Power: {{defensepower}}
-

- - - - -
Inventory
- - - - -
WeaponWeapon: {{weaponname}}
ArmorArmor: {{armorname}}
ShieldShield: {{shieldname}}
- Slot 1: {{slot1name}}
- Slot 2: {{slot2name}}
- Slot 3: {{slot3name}} -

-HTML; diff --git a/templates/towns.php b/templates/towns.php index 417d995..82cbb8a 100644 --- a/templates/towns.php +++ b/templates/towns.php @@ -1,8 +1,6 @@ -
-
Welcome to {{name}}
+
Welcome to <?= $town['name'] ?>
Town Options:
-HTML; diff --git a/templates/verify.php b/templates/verify.php index d0b0a48..d2c6746 100644 --- a/templates/verify.php +++ b/templates/verify.php @@ -1,14 +1,10 @@ - - - - - - - -
Thank you for registering a character. Please enter your username, email address, and the verification code - that was emailed to you to unlock your character.
Username:
Email Address:
Verification Code:


- -HTML; +
+ + + + + + +
Thank you for registering a character. Please enter your username, email address, and the verification code + that was emailed to you to unlock your character.
Username:
Email Address:
Verification Code:


+