diff --git a/GameEngine/Alliance.php b/GameEngine/Alliance.php index 6150a784..7cb4447e 100755 --- a/GameEngine/Alliance.php +++ b/GameEngine/Alliance.php @@ -732,7 +732,7 @@ class Alliance { } // === NOU: nu poți da kick fondatorului === if ($database->isAllianceOwner($targetUID) == $allyId) { - $form->addError("perm", "You cannot expel the alliance founder."); + $form->addError("perm", CANT_REMOVE_LEADER); return; } @@ -823,7 +823,7 @@ class Alliance { // ==================== CAZ SPECIAL: LIDERUL PLEACĂ ==================== if ($isFounder && $memberCount > 1) { if (empty($post['new_founder'])) { - $form->addError("founder", 'Founder was not selected.'); + $form->addError("founder", FOUNDER_LEAVE_NEW); return; } $newFounderID = (int)$post['new_founder']; @@ -839,7 +839,7 @@ class Alliance { } } if (!$valid) { - $form->addError("founder", 'Invalid founder.'); + $form->addError("founder", FOUNDER_LEAVE_INVALID); return; } diff --git a/GameEngine/Data/buidata.php b/GameEngine/Data/buidata.php index 119d6b12..b59fccfa 100755 --- a/GameEngine/Data/buidata.php +++ b/GameEngine/Data/buidata.php @@ -5,8 +5,10 @@ ## Filename buidata.php ## ## Developed by: Akakori ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2011. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ################################################################################# diff --git a/GameEngine/Data/cel.php b/GameEngine/Data/cel.php index 4ddb4397..aaff1790 100755 --- a/GameEngine/Data/cel.php +++ b/GameEngine/Data/cel.php @@ -6,10 +6,10 @@ ## Filename cel.php ## ## Developed by: G3n3s!s & JimJam & LoppyLukas ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## ## -## URLs: https://travianz.org ## -## https://github.com/Shadowss/TravianZ ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/GameEngine/Data/cp.php b/GameEngine/Data/cp.php index 03427922..b787be1e 100755 --- a/GameEngine/Data/cp.php +++ b/GameEngine/Data/cp.php @@ -6,7 +6,10 @@ ## Filename cp.php ## ## Developed by: G3n3s!s & JimJam & LoppyLukas ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## +## ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/GameEngine/Data/hero_full.php b/GameEngine/Data/hero_full.php index 9ab154a0..6dd1ac58 100755 --- a/GameEngine/Data/hero_full.php +++ b/GameEngine/Data/hero_full.php @@ -1,5 +1,18 @@ 0, 100, 300, 600, 1000, 1500, 2100, 2800, 3600, 4500, 5500, 6600, 7800, 9100, 10500, 12000, 13600, 15300, 17100, 19000, 21000, 23100, 25300, 27600, 30000, 32500, 35100, 37800, 40600, 43500, 46500, 49600, 52800, 56100, 59500, 63000, 66600, 70300, 74100, 78000, 82000, 86100, 90300, 94600, 99000, 103500, 108100, 112800, 117600, 122500, 127500, 132600, 137800, 143100, 148500, 154000, 159600, 165300, 171100, 177000, 183000, 189100, 195300, 201600, 208000, 214500, 221100, 227800, 234600, 241500, 248500, 255600, 262800, 270100, 277500, 285000, 292600, 300300, 308100, 316000, 324000, 332100, 340300, 348600, 357000, 365500, 374100, 382800, 391600, 400500, 409500, 418600, 427800, 437100, 446500, 456000, 465600, 475300, 485100, 495000); diff --git a/GameEngine/Data/index.php b/GameEngine/Data/index.php index 9fcb4aed..f26e36e9 100755 --- a/GameEngine/Data/index.php +++ b/GameEngine/Data/index.php @@ -5,7 +5,11 @@ ## Filename index.php ## ## Developed by: aggenkeech ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## +## ## ################################################################################# // prevent direct misuse in weird contexts (optional but safe) diff --git a/GameEngine/Data/resdata.php b/GameEngine/Data/resdata.php index 2eb6816f..945876e1 100755 --- a/GameEngine/Data/resdata.php +++ b/GameEngine/Data/resdata.php @@ -5,7 +5,10 @@ ## --------------------------------------------------------------------------- ## ## Filename resdata.php ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## +## ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/GameEngine/Data/unitdata.php b/GameEngine/Data/unitdata.php index cc611381..f1e0f40e 100755 --- a/GameEngine/Data/unitdata.php +++ b/GameEngine/Data/unitdata.php @@ -5,7 +5,10 @@ ## Filename unitdata.php ## ## Developed by: Akakori ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## +## ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/GameEngine/Form.php b/GameEngine/Form.php index cc61fba7..6d06bf58 100755 --- a/GameEngine/Form.php +++ b/GameEngine/Form.php @@ -11,7 +11,7 @@ ## Refactor: Incremental cleanup (compatibility preserved) ## ## Notes: PHP 7+ / legacy safe ## ## ## -## URLs: http://travian.shadowss.ro ## +## URLs: https://travianz.org ## ## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/GameEngine/Game/WorldWonderName.php b/GameEngine/Game/WorldWonderName.php index 93a12157..ee64b086 100755 --- a/GameEngine/Game/WorldWonderName.php +++ b/GameEngine/Game/WorldWonderName.php @@ -5,7 +5,10 @@ ## Filename WorldWonderName.php ## ## Developed by: Dzoki ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## +## ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/GameEngine/Game/index.php b/GameEngine/Game/index.php index 9fcb4aed..f26e36e9 100755 --- a/GameEngine/Game/index.php +++ b/GameEngine/Game/index.php @@ -5,7 +5,11 @@ ## Filename index.php ## ## Developed by: aggenkeech ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## +## ## ################################################################################# // prevent direct misuse in weird contexts (optional but safe) diff --git a/GameEngine/Generator.php b/GameEngine/Generator.php index 185d3c72..5af5f920 100755 --- a/GameEngine/Generator.php +++ b/GameEngine/Generator.php @@ -7,7 +7,7 @@ ## Version: 18.05.2026 ## ## Filename: Generator.php ## ## Developed by: Dzoki ## -## Refactored by: Shadow (cata7007@gmail.com) ## +## Refactored by: Shadow (cata7007@gmail.com) ## ## License: TravianZ Project ## ## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## ## diff --git a/GameEngine/Lang/en.php b/GameEngine/Lang/en.php index f0ce4590..b09cdc33 100755 --- a/GameEngine/Lang/en.php +++ b/GameEngine/Lang/en.php @@ -8,6 +8,10 @@ // DO NOT REMOVE COPYRIGHT NOTICE! // // Adding tasks, constructions and artefact by: Armando // // Modified , added , fixed , implementd by: Shadow and ronix // +// // +// URLs: https://travianz.org // +// https://github.com/Shadowss/TravianZ // +// // ////////////////////////////////////////////////////////////////////////////////////////////////////// // // // ENGLISH // @@ -79,6 +83,9 @@ define('ALLY_TOO_LOW', 'You must have a level 3 or greater embassy'); define('USER_NOT_IN_YOUR_ALLY', 'This user is not in your alliance!'); define('CANT_EDIT_YOUR_PERMISSIONS', 'You can`t edit your own permissions!'); define('CANT_EDIT_LEADER_PERMISSIONS', 'Alliance leader`s permissions can`t be edited!'); +define('CANT_REMOVE_LEADER', 'You cannot expel the alliance founder!'); +define('FOUNDER_LEAVE_NEW', 'Founder was not selected!'); +define('FOUNDER_LEAVE_INVALID', 'Invalid founder!'); define('NO_PERMISSION', 'You don`t have enough permissions!'); define('NAME_OR_DIPL_EMPTY', 'Name or diplomacy empty'); define('ALLY_DOESNT_EXISTS', 'Alliance does not exist'); diff --git a/GameEngine/Mailer.php b/GameEngine/Mailer.php index 3c125216..6f375260 100755 --- a/GameEngine/Mailer.php +++ b/GameEngine/Mailer.php @@ -7,7 +7,7 @@ ## Developed by: Dixie ## ## Refactored: Shadow (PHP 7+ compatibility, cleanup, safety pass) ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## ## ## URLs: https://travianz.org ## ## https://github.com/Shadowss/TravianZ ## diff --git a/GameEngine/Protection.php b/GameEngine/Protection.php index c295b420..184218ce 100755 --- a/GameEngine/Protection.php +++ b/GameEngine/Protection.php @@ -6,7 +6,10 @@ ## Developed by: SlimShady ## ## Edited by: Dzoki & Dixie ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## +## ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/GameEngine/Technology.php b/GameEngine/Technology.php index c07d5179..cd876129 100755 --- a/GameEngine/Technology.php +++ b/GameEngine/Technology.php @@ -6,7 +6,10 @@ ## Filename Technology.php ## ## Developed by: Dzoki ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## +## ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/GameEngine/Units.php b/GameEngine/Units.php index ab167b3d..0c16dc16 100755 --- a/GameEngine/Units.php +++ b/GameEngine/Units.php @@ -3,15 +3,15 @@ ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## ## Project: TravianZ ## -## Version: 22.06.2015 ## +## Version: 22.06.2015 ## ## Filename Units.php ## ## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ## -## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ## -## Fixed by: InCube - double troops ## +## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ## +## ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2015. All rights reserved. ## -## URLs: http://travian.shadowss.ro ## -## Source code: https://github.com/Shadowss/TravianZ ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/GameEngine/index.php b/GameEngine/index.php index 9fcb4aed..63970c0d 100755 --- a/GameEngine/index.php +++ b/GameEngine/index.php @@ -5,7 +5,10 @@ ## Filename index.php ## ## Developed by: aggenkeech ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## +## ## ################################################################################# // prevent direct misuse in weird contexts (optional but safe) diff --git a/README.md b/README.md index 8df6d085..a32e90b5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # TravianZ -[![Maintenance](https://img.shields.io/maintenance/yes/2025.svg)](https://github.com/Shadowss/TravianZ) +[![Maintenance](https://img.shields.io/maintenance/yes/2026.svg)](https://github.com/Shadowss/TravianZ) [![GitHub Release](https://img.shields.io/github/release/Shadowss/TravianZ/all.svg)](https://github.com/Shadowss/TravianZ) [![GitHub contributors](https://img.shields.io/github/contributors/Shadowss/TravianZ.svg)](https://github.com/Shadowss/TravianZ) [![license](https://img.shields.io/github/license/Shadowss/TravianZ.svg)](https://github.com/Shadowss/TravianZ) @@ -11,9 +11,9 @@ This repository currently targets modern local/server setups with PHP 8.x and Ma ## Project Status -- Version line: `v8.3.5` (legacy naming) +- Version line: `v9` (Incremental Refactor) - Stability: playable and actively maintained -- Migration note: this is not a drop-in upgrade over older `8.3.2` deployments +- Migration note: this is not a drop-in upgrade over older `8.3.4` deployments If you are upgrading from an older installation, do a fresh install and migrate data carefully. @@ -83,8 +83,8 @@ Admin entrypoint: Recent improvements include: -- Users list under the `Users` menu -- Better null/undefined handling in admin templates +- Full incremental refactored GameEngine and Templates folder +- Added cache on Database.php and Automation.php and other important files - Dynamic table prefix support in map tile queries ## Performance Notes diff --git a/install/data/constant_format.tpl b/install/data/constant_format.tpl index 8aedff97..ce1c437c 100644 --- a/install/data/constant_format.tpl +++ b/install/data/constant_format.tpl @@ -9,6 +9,8 @@ ## Copyright: TravianZ (c) 2013-2026. All rights reserved. ## ## Modified by: Shadow and ronix ## ## ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ################################################################################# ////////////////////////////////// diff --git a/install/include/accounts.php b/install/include/accounts.php index f06c1acf..7c696398 100644 --- a/install/include/accounts.php +++ b/install/include/accounts.php @@ -4,12 +4,12 @@ ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## ## Project: TravianZ ## -## Filename accounts.php ## +## Filename accounts.php ## ## Developed by: Dzoki ## ## License: TravianZ Project ## ## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## -## URLs: http://travian.shadowss.ro ## -## Source code: https://github.com/Shadowss/TravianZ ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/install/process.php b/install/process.php index 61385cf2..78dfc160 100644 --- a/install/process.php +++ b/install/process.php @@ -7,11 +7,11 @@ ## Version: 01.09.2013 ## ## Filename process.php ## ## Developed by: Shadow ## -## Fixed by: Shadow / Skype : cata7007 and Armando ## +## Fixed by: Shadow cata7007@gmail.com ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## -## URLs: http://travian.shadowss.ro ## -## Source code: http://github.com/Shadowss/TravianZ/ ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/install/templates/accounts.tpl b/install/templates/accounts.tpl index 03a7fa51..df56b5c1 100644 --- a/install/templates/accounts.tpl +++ b/install/templates/accounts.tpl @@ -3,12 +3,12 @@ ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## ## Project: TravianZ ## -## Filename accounts.php ## +## Filename accounts.php ## ## Developed by: Dzoki ## ## License: TravianZ Project ## ## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## -## URLs: http://travian.shadowss.ro ## -## Source code: https://github.com/Shadowss/TravianZ ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/install/templates/config.tpl b/install/templates/config.tpl index 22b87f5a..cb993566 100644 --- a/install/templates/config.tpl +++ b/install/templates/config.tpl @@ -4,12 +4,12 @@ ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## ## Project: TravianZ ## -## Filename config.php ## +## Filename config.php ## ## Developed by: Dzoki ## ## License: TravianZ Project ## ## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## -## URLs: http://travian.shadowss.ro ## -## Source code: https://github.com/Shadowss/TravianZ ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/install/templates/dataform.tpl b/install/templates/dataform.tpl index 801d98ea..90bb29b5 100644 --- a/install/templates/dataform.tpl +++ b/install/templates/dataform.tpl @@ -8,8 +8,8 @@ ## Developed by: Dzoki ## ## License: TravianZ Project ## ## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## -## URLs: http://travian.shadowss.ro ## -## Source code: https://github.com/Shadowss/TravianZ ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/install/templates/end.tpl b/install/templates/end.tpl index 98348a5b..1228d469 100755 --- a/install/templates/end.tpl +++ b/install/templates/end.tpl @@ -9,8 +9,8 @@ ## Developed by: Dzoki ## ## License: TravianZ Project ## ## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## -## URLs: http://travian.shadowss.ro ## -## Source code: https://github.com/Shadowss/TravianZ ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/install/templates/wdata.tpl b/install/templates/wdata.tpl index 06ed63c9..cd8c3754 100644 --- a/install/templates/wdata.tpl +++ b/install/templates/wdata.tpl @@ -8,8 +8,8 @@ ## Developed by: Dzoki ## ## License: TravianZ Project ## ## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## -## URLs: http://travian.shadowss.ro ## -## Source code: https://github.com/Shadowss/TravianZ ## +## URLs: https://travianz.org ## +## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/var/db/struct.sql b/var/db/struct.sql index 05990198..b28992d1 100644 --- a/var/db/struct.sql +++ b/var/db/struct.sql @@ -3,9 +3,9 @@ -- http://www.phpmyadmin.net -- -- Host: localhost --- Generation Time: Jul 21, 2011 at 02:49 AM --- Server version: 5.5.8 --- PHP Version: 5.3.5 +-- Generation Time: May 15, 2026 at 02:49 AM +-- Server version: 9.0 INCREMENTAL REFACTOR +-- PHP Version: 8.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; @@ -372,7 +372,9 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%attacks` ( `b6` tinyint(1) NULL, `b7` tinyint(1) NULL, `b8` tinyint(1) NULL, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + KEY `vref` (`vref`), + KEY `attack_type` (`attack_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -423,7 +425,8 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%bdata` ( KEY `master` (`master`), KEY `timestamp` (`timestamp`), KEY `master-timestamp` (`master`,`timestamp`) USING BTREE, - KEY `wid` (`wid`) + KEY `wid` (`wid`), + KEY `wid_timestamp` (`wid`,`timestamp`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -1110,7 +1113,9 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%movement` ( PRIMARY KEY (`moveid`), KEY `ref` (`ref`), KEY `from-proc-sort_type` (`from`,`proc`,`sort_type`), - KEY `proc-sort_type-endtime` (`proc`,`sort_type`,`endtime`) + KEY `proc-sort_type-endtime` (`proc`,`sort_type`,`endtime`), + KEY `to_endtime` (`to`,`endtime`), + KEY `from_endtime` (`from`,`endtime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -1280,7 +1285,8 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%research` ( `timestamp` int(11) NULL, PRIMARY KEY (`id`), KEY `vref` (`vref`), - KEY `timestamp` (`timestamp`) + KEY `timestamp` (`timestamp`), + UNIQUE KEY `vref_tech` (`vref`,`tech`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -1673,6 +1679,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%vdata` ( `evasion` tinyint(1) NULL DEFAULT '0', PRIMARY KEY (`wref`), KEY `owner-capital-pop` (`owner`,`capital`,`pop`), + KEY `owner_pop` (`owner`,`pop`), KEY `maxstore` (`maxstore`), KEY `maxcrop` (`maxcrop`), KEY `celebration` (`celebration`),