From ef52bddf9a14bf0c2b93e2a03a76ce8c1c0a65a1 Mon Sep 17 00:00:00 2001 From: novgorodschi catalin Date: Tue, 14 Jul 2026 14:49:23 +0300 Subject: [PATCH] New Register Page With 3 Step Wizard New Register Page With 3 Step Wizard --- anmelden.php | 540 +++++++++++++++++++++++++++++++++------- img/reg/badge_new.png | Bin 0 -> 10094 bytes img/reg/bot_c.png | Bin 0 -> 117 bytes img/reg/bot_l.png | Bin 0 -> 540 bytes img/reg/bot_r.png | Bin 0 -> 448 bytes img/reg/btn_green.png | Bin 0 -> 1203 bytes img/reg/bullet_v1.png | Bin 0 -> 2350 bytes img/reg/bullet_v2.png | Bin 0 -> 2446 bytes img/reg/bullet_v3.png | Bin 0 -> 2435 bytes img/reg/bullet_v6.png | Bin 0 -> 3124 bytes img/reg/bullet_v7.png | Bin 0 -> 2604 bytes img/reg/bullet_v8.png | Bin 0 -> 2318 bytes img/reg/bullet_v9.png | Bin 0 -> 2446 bytes img/reg/hdr_c.png | Bin 0 -> 430 bytes img/reg/hdr_l.png | Bin 0 -> 3720 bytes img/reg/hdr_r.png | Bin 0 -> 3905 bytes img/reg/map.png | Bin 0 -> 197106 bytes img/reg/portrait_v1.png | Bin 0 -> 73968 bytes img/reg/portrait_v2.png | Bin 0 -> 80072 bytes img/reg/portrait_v3.png | Bin 0 -> 80863 bytes img/reg/portrait_v6.png | Bin 0 -> 81973 bytes img/reg/portrait_v7.png | Bin 0 -> 66773 bytes img/reg/portrait_v8.png | Bin 0 -> 60613 bytes img/reg/portrait_v9.png | Bin 0 -> 1170 bytes img/reg/quad_0.png | Bin 0 -> 36327 bytes img/reg/quad_1.png | Bin 0 -> 33735 bytes img/reg/quad_2.png | Bin 0 -> 29276 bytes img/reg/quad_3.png | Bin 0 -> 34981 bytes img/reg/quad_4.png | Bin 0 -> 32815 bytes img/reg/side_l.png | Bin 0 -> 195 bytes img/reg/side_r.png | Bin 0 -> 108 bytes img/reg/silhouettes.png | Bin 0 -> 9391 bytes img/reg/thumb_v1.png | Bin 0 -> 15648 bytes img/reg/thumb_v2.png | Bin 0 -> 16190 bytes img/reg/thumb_v3.png | Bin 0 -> 15946 bytes img/reg/thumb_v6.png | Bin 0 -> 15639 bytes img/reg/thumb_v7.png | Bin 0 -> 15295 bytes img/reg/thumb_v8.png | Bin 0 -> 13821 bytes img/reg/thumb_v9.png | Bin 0 -> 462 bytes 39 files changed, 453 insertions(+), 87 deletions(-) create mode 100644 img/reg/badge_new.png create mode 100644 img/reg/bot_c.png create mode 100644 img/reg/bot_l.png create mode 100644 img/reg/bot_r.png create mode 100644 img/reg/btn_green.png create mode 100644 img/reg/bullet_v1.png create mode 100644 img/reg/bullet_v2.png create mode 100644 img/reg/bullet_v3.png create mode 100644 img/reg/bullet_v6.png create mode 100644 img/reg/bullet_v7.png create mode 100644 img/reg/bullet_v8.png create mode 100644 img/reg/bullet_v9.png create mode 100644 img/reg/hdr_c.png create mode 100644 img/reg/hdr_l.png create mode 100644 img/reg/hdr_r.png create mode 100644 img/reg/map.png create mode 100644 img/reg/portrait_v1.png create mode 100644 img/reg/portrait_v2.png create mode 100644 img/reg/portrait_v3.png create mode 100644 img/reg/portrait_v6.png create mode 100644 img/reg/portrait_v7.png create mode 100644 img/reg/portrait_v8.png create mode 100644 img/reg/portrait_v9.png create mode 100644 img/reg/quad_0.png create mode 100644 img/reg/quad_1.png create mode 100644 img/reg/quad_2.png create mode 100644 img/reg/quad_3.png create mode 100644 img/reg/quad_4.png create mode 100644 img/reg/side_l.png create mode 100644 img/reg/side_r.png create mode 100644 img/reg/silhouettes.png create mode 100644 img/reg/thumb_v1.png create mode 100644 img/reg/thumb_v2.png create mode 100644 img/reg/thumb_v3.png create mode 100644 img/reg/thumb_v6.png create mode 100644 img/reg/thumb_v7.png create mode 100644 img/reg/thumb_v8.png create mode 100644 img/reg/thumb_v9.png diff --git a/anmelden.php b/anmelden.php index cdab60af..d56f1100 100644 --- a/anmelden.php +++ b/anmelden.php @@ -4,7 +4,7 @@ ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## ## Filename : anmelden.php ## -## Type : In Game Registration Page ## +## Type : In Game Registration Page (3 step wizard) ## ## --------------------------------------------------------------------------- ## ## Developed by : Dzoki ## ## Refactored by : Shadow ## @@ -31,6 +31,131 @@ include('GameEngine/Account.php'); AccessLogger::logRequest(); $invited=(isset($_GET['uid'])) ? filter_var($_GET['uid'], FILTER_SANITIZE_NUMBER_INT):$form->getError('invt'); + +/* + * --------------------------------------------------------------------------- + * Registration wizard data + * --------------------------------------------------------------------------- + * Every label below can be overridden from the language files: if a constant + * with the given name exists it wins, otherwise the English fallback is used. + * No changes are required in lang/*.php for the page to work. + */ +if (!function_exists('regText')) { + function regText($constant, $fallback) { + return defined($constant) ? constant($constant) : $fallback; + } +} + +/* id => tribe definition. The order of this array is the order of the cards. */ +$regTribes = array( + 3 => array( /* Gauls */ + 'name' => TRIBE3, + 'flag' => true, + 'best' => true, + 'lines' => array( + regText('TRIBE3_L1', 'Low time requirements'), + regText('TRIBE3_L2', 'Loot protection and good defense'), + regText('TRIBE3_L3', 'Excellent, fast cavalry'), + regText('TRIBE3_L4', 'Well suited to new players'), + ), + ), + 1 => array( /* Romans */ + 'name' => TRIBE1, + 'flag' => true, + 'best' => false, + 'lines' => array( + regText('TRIBE1_L1', 'Moderate time requirements'), + regText('TRIBE1_L2', 'Can develop villages the fastest'), + regText('TRIBE1_L3', 'Very strong but expensive troops'), + regText('TRIBE1_L4', 'Hard to play for new players'), + ), + ), + 2 => array( /* Teutons */ + 'name' => TRIBE2, + 'flag' => true, + 'best' => false, + 'lines' => array( + regText('TRIBE2_L1', 'High time requirements'), + regText('TRIBE2_L2', 'Good at looting in early game'), + regText('TRIBE2_L3', 'Strong, cheap infantry'), + regText('TRIBE2_L4', 'For aggressive players'), + ), + ), + 7 => array( /* Egyptians */ + 'name' => defined('TRIBE7') ? TRIBE7 : 'Egyptians', + 'flag' => (defined('NEW_FUNCTION_TRIBE_EGIPTEANS') && NEW_FUNCTION_TRIBE_EGIPTEANS), + 'best' => false, + 'lines' => array( + regText('TRIBE7_L1', 'Low time requirements'), + regText('TRIBE7_L2', 'More resources available'), + regText('TRIBE7_L3', 'Excellent defensive units'), + regText('TRIBE7_L4', 'Well suited to new players'), + ), + ), + 6 => array( /* Huns */ + 'name' => defined('TRIBE6') ? TRIBE6 : 'Huns', + 'flag' => (defined('NEW_FUNCTION_TRIBE_HUNS') && NEW_FUNCTION_TRIBE_HUNS), + 'best' => false, + 'lines' => array( + regText('TRIBE6_L1', 'High time requirements'), + regText('TRIBE6_L2', 'Impressively strong cavalry'), + regText('TRIBE6_L3', 'Reliant on others for protection'), + regText('TRIBE6_L4', 'Not recommended for new players!'), + ), + ), + 8 => array( /* Spartans */ + 'name' => defined('TRIBE8') ? TRIBE8 : 'Spartans', + 'flag' => (defined('NEW_FUNCTION_TRIBE_SPARTANS') && NEW_FUNCTION_TRIBE_SPARTANS), + 'best' => false, + 'lines' => array( + regText('TRIBE8_L1', 'Moderate time requirements'), + regText('TRIBE8_L2', 'Efficient crop consumption'), + regText('TRIBE8_L3', 'Easier recovery from battles'), + regText('TRIBE8_L4', 'Recommended for active new players'), + ), + ), + 9 => array( /* Vikings */ + 'name' => defined('TRIBE9') ? TRIBE9 : 'Vikings', + 'flag' => (defined('NEW_FUNCTION_TRIBE_VIKINGS') && NEW_FUNCTION_TRIBE_VIKINGS), + 'best' => false, + 'lines' => array( + regText('TRIBE9_L1', 'High time requirements'), + regText('TRIBE9_L2', 'Fearless raiders, strong offense'), + regText('TRIBE9_L3', 'Weak defense in the early game'), + regText('TRIBE9_L4', 'Not recommended for new players!'), + ), + ), +); + +/* Drop every tribe that is disabled by the install feature flags. */ +foreach ($regTribes as $tribeId => $tribeData) { + if (!$tribeData['flag']) { + unset($regTribes[$tribeId]); + } +} + +/* Starting positions: 0 = random, 1 = NW (-|+), 2 = NE (+|+), 3 = SW (-|-), 4 = SE (+|-) */ +$regQuadrants = array( + 0 => array('name' => RANDOM, 'coords' => ''), + 1 => array('name' => NW, 'coords' => '(-|+)'), + 2 => array('name' => NE, 'coords' => '(+|+)'), + 3 => array('name' => SW, 'coords' => '(-|-)'), + 4 => array('name' => SE, 'coords' => '(+|-)'), +); + +/* Values coming back from a failed POST (Account::Signup redirects here). */ +$regErrors = ($form->returnErrors() > 0); +$regTribe = (int) $form->getValue('vid'); +if (!isset($regTribes[$regTribe])) { + reset($regTribes); + $regTribe = (int) key($regTribes); // first card = Gauls (the recommended tribe) +} +$regQuad = (int) $form->getValue('kid'); +if (!isset($regQuadrants[$regQuad])) { + $regQuad = 0; +} +/* When the server rejected the form we jump straight back to the recap step. */ +$regStep = $regErrors ? 3 : 1; ?> @@ -49,6 +174,116 @@ $invited=(isset($_GET['uid'])) ? filter_var($_GET['uid'], FILTER_SANITIZE_NUMBER + + @@ -63,92 +298,104 @@ if(REG_OPEN == true){ ?>

register for the game

-
registration
-

- -
+ + + - - - - - - - - - - - - - - - -
+
+
 
+
+ + +
+

+ +
    + $tribeData) { ?> +
  • + <?php echo htmlspecialchars($tribeData['name'], ENT_QUOTES, 'UTF-8'); ?> +
  • + +
+ +
+ $tribeData) { ?> +
+ + + recommended for new players + +

+
    + +
  • + +
+
+ +
+ + +
+ + +
+

+ +
+ world map + +
+ +
+ +
+ + + « +
+ + +
+

+ +
+
+

 

+
+ +
+
+

 

+
+ +
+
+ +
+ + getError('name'); ?> -
- - getError('email'); ?> -
- - getError('pw'); ?> -
+
- - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - > - - - - - - - > - - - - - - - > - - - - - - -
choose tribestarting position
 
  
  
  
  
+
-