Fix Some PHP 8+ view error in Build & Credits

Fix Some PHP 8+ view error in Build & Credits

TO DO :  Full audit in build directory
This commit is contained in:
novgorodschi catalin
2026-06-25 10:54:58 +03:00
parent 23708a2e54
commit fe6ff01396
99 changed files with 1969 additions and 176 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
################################################################################# #################################################################################
$hero_levels = array(0 => 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, $hero_levels = array(0 => 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); 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, 495000);
//ROMAN UNITS //ROMAN UNITS
+20 -3
View File
@@ -1,10 +1,27 @@
<?php <?php
// WOODCUTER #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : WOODCUTER ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
// — pregătire date // — PREPARING DATA
$field = 'f' . $id; $field = 'f' . $id;
$currentLevel = (int) ($village->resarray[$field] ?? 0); $currentLevel = (int) ($village->resarray[$field] ?? 0);
$buildingType = $village->resarray[$field . 't'] ?? 0; $buildingType = $village->resarray[$field . 't'] ?? 0;
@@ -14,7 +31,7 @@ $currentProd = $bid1[$currentLevel]['prod'] * SPEED;
$isMax = $building->isMax($buildingType, $id); $isMax = $building->isMax($buildingType, $id);
$maxLevel = ($village->capital == 1) ? 20 : 10; $maxLevel = ($village->capital == 1) ? 20 : 10;
// calculează nivelul următor luând în calcul queue-urile // calculates the next level taking into account queues
$nextLevelRaw = $currentLevel + 1 + $loopsame + $doublebuild + $master; $nextLevelRaw = $currentLevel + 1 + $loopsame + $doublebuild + $master;
$nextLevel = min($nextLevelRaw, $maxLevel); $nextLevel = min($nextLevelRaw, $maxLevel);
$nextProd = $bid1[$nextLevel]['prod'] * SPEED; $nextProd = $bid1[$nextLevel]['prod'] * SPEED;
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// WAREHOUSE #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : WAREHOUSE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// GRANARY #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : GRANARY ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
+18 -2
View File
@@ -1,8 +1,24 @@
<?php <?php
// BLACKSMITH #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : BLACKSMITH ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
// nu ai next.tpl aici în original, îl las așa
$field = 'f' . $id; $field = 'f' . $id;
$currentLevel = (int) ($village->resarray[$field] ?? 0); $currentLevel = (int) ($village->resarray[$field] ?? 0);
$hasBlacksmith = $building->getTypeLevel(12) > 0; $hasBlacksmith = $building->getTypeLevel(12) > 0;
+21 -4
View File
@@ -1,6 +1,23 @@
<?php <?php
// BLACKSMITH UPGRADES #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : BLACKSMITH UPGRADES ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$abdata = $database->getABTech($village->wid); $abdata = $database->getABTech($village->wid);
$ABups = $technology->getABUpgrades('b'); $ABups = $technology->getABUpgrades('b');
@@ -26,7 +43,7 @@ $end = $session->tribe * 10 - 2;
$unitName = $technology->getUnitName($i); $unitName = $technology->getUnitName($i);
$current = (int)$abdata['b'.$j]; $current = (int)$abdata['b'.$j];
// câte upgrade-uri sunt deja în coadă pentru unitatea asta //how many upgrades are already in the queue for this unit
$ups = 0; $ups = 0;
foreach ($ABups as $up) { foreach ($ABups as $up) {
if (in_array('b'.$j, $up)) $ups++; if (in_array('b'.$j, $up)) $ups++;
@@ -64,7 +81,7 @@ $end = $session->tribe * 10 - 2;
<?php endif;?> <?php endif;?>
<?php <?php
// mesaj resurse insuficiente //insufficient resources message
if ($next['wood'] > $village->awood || $next['clay'] > $village->aclay || $next['iron'] > $village->airon || $next['crop'] > $village->acrop) { if ($next['wood'] > $village->awood || $next['clay'] > $village->aclay || $next['iron'] > $village->airon || $next['crop'] > $village->acrop) {
if ($village->getProd('crop') > 0 || $village->acrop > $next['crop']) { if ($village->getProd('crop') > 0 || $village->acrop > $next['crop']) {
$time = $technology->calculateAvaliable(12, $next); $time = $technology->calculateAvaliable(12, $next);
@@ -124,7 +141,7 @@ $end = $session->tribe * 10 - 2;
<?php $count = 0; foreach ($ABups as $black): <?php $count = 0; foreach ($ABups as $black):
$count++; $count++;
$ABUnit = (int)substr($black['tech'], 1, 2); $ABUnit = (int)substr($black['tech'], 1, 2);
$abdata['b'.$ABUnit]++; // incrementează pentru afișare corectă $abdata['b'.$ABUnit]++; // increment for correct display
$unit = ($session->tribe - 1) * 10 + $ABUnit; $unit = ($session->tribe - 1) * 10 + $ABUnit;
$unitName = $technology->getUnitName($unit); $unitName = $technology->getUnitName($unit);
$date = $generator->procMtime($black['timestamp']); $date = $generator->procMtime($black['timestamp']);
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// ARMOURY #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : ARMOURY ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$field = 'f' . $id; $field = 'f' . $id;
$currentLevel = isset($village->resarray[$field]) ? (int)$village->resarray[$field] : 0; $currentLevel = isset($village->resarray[$field]) ? (int)$village->resarray[$field] : 0;
+19 -2
View File
@@ -1,6 +1,23 @@
<?php <?php
// ARMOURY UPGRADES #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : ARMOURY UPGRADES ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$abdata = $database->getABTech($village->wid); $abdata = $database->getABTech($village->wid);
$ABups = $technology->getABUpgrades('a'); $ABups = $technology->getABUpgrades('a');
@@ -26,7 +43,7 @@ $end = $session->tribe * 10 - 2;
$unitName = $technology->getUnitName($i); $unitName = $technology->getUnitName($i);
$current = (int)$abdata['a'.$j]; $current = (int)$abdata['a'.$j];
// câte upgrade-uri sunt deja în coadă pentru unitatea asta // how many upgrades are already in the queue for this unit
$ups = 0; $ups = 0;
foreach ($ABups as $up) { foreach ($ABups as $up) {
if (in_array('a'.$j, $up)) $ups++; if (in_array('a'.$j, $up)) $ups++;
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// TOURNAMENT SQUARE #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : TOURNAMENT SQUARE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// MAIN BUILDING #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : MAIN BUILDING ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// MAIN BUILDING DEMOLISH #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : MAIN BUILDING DEMOLISH ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$ty = isset($_GET['ty'])? $_GET['ty'] : ''; $ty = isset($_GET['ty'])? $_GET['ty'] : '';
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// RALLY POINT #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RALLYPOINT ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
if (isset($_GET['refresh'])) { if (isset($_GET['refresh'])) {
$village->unitarray = $database->getUnit($village->wid, false); $village->unitarray = $database->getUnit($village->wid, false);
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// RALLY POINT GOLD CLUB #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RALLY POINT GOLD CLUB ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
if (!$session->goldclub) { if (!$session->goldclub) {
include 'Templates/Build/16.tpl'; include 'Templates/Build/16.tpl';
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// RALLY POINT INCOMMING TROOPS #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RALLY POINT INCOMMING TROOPS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include_once 'GameEngine/Data/unitdata.php'; include_once 'GameEngine/Data/unitdata.php';
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// RALLY POINT MENU #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RALLYPOINT MENU ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$t = isset($_GET['t']) ? (int)$_GET['t'] : 0; $t = isset($_GET['t']) ? (int)$_GET['t'] : 0;
$isOverview = ($t === 0) || ($t === 99 && !$session->goldclub); $isOverview = ($t === 0) || ($t === 99 && !$session->goldclub);
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// RALLY POINT TROOPS #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RALLYPOINT TROOPS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$tribe = $session->tribe; $tribe = $session->tribe;
$start = ($tribe - 1) * 10 + 1; $start = ($tribe - 1) * 10 + 1;
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// RALLY POINT WALKING #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RALLY POINT WALKING ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$outgoing = $database->getMovement(3, $village->wid, 0); $outgoing = $database->getMovement(3, $village->wid, 0);
?> ?>
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 17.tpl - MARKETPLACE
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : MARKETPLACE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database, $session, $village, $market, $generator, $form, $id; global $database, $session, $village, $market, $generator, $form, $id;
$merchantAvail = (int)$market->merchantAvail(); $merchantAvail = (int)$market->merchantAvail();
+21 -2
View File
@@ -1,5 +1,24 @@
<?php <?php
// 17_1.tpl - MARKETPLACE / OFFERS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : MARKETPLACE OFFERS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database, $session, $village, $market, $generator, $id; global $database, $session, $village, $market, $generator, $id;
$u = isset($_GET['u']) ? max(0, (int)$_GET['u']) : 0; $u = isset($_GET['u']) ? max(0, (int)$_GET['u']) : 0;
@@ -61,7 +80,7 @@ $resIcon = [
<div class="clear"></div> <div class="clear"></div>
<?php <?php
// erori // ERRORS
if (isset($_GET['e1'])) echo '<p class="error2">'.NOT_ENOUGH_RESOURCES.'</p>'; if (isset($_GET['e1'])) echo '<p class="error2">'.NOT_ENOUGH_RESOURCES.'</p>';
elseif (isset($_GET['e2'])) echo '<p class="error2">'.INVALID_OFFER.'</p>'; elseif (isset($_GET['e2'])) echo '<p class="error2">'.INVALID_OFFER.'</p>';
elseif (isset($_GET['e3'])) echo '<p class="error2">'.NOT_ENOUGH_MERCHANTS.'</p>'; elseif (isset($_GET['e3'])) echo '<p class="error2">'.NOT_ENOUGH_MERCHANTS.'</p>';
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 17_2.tpl - MARKETPLACE / SELL
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : MARKETPLACE SELL ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database, $session, $village, $market, $id; global $database, $session, $village, $market, $id;
$res = [ $res = [
+21 -2
View File
@@ -1,5 +1,24 @@
<?php <?php
// 17_3.tpl - MARKETPLACE / NPC Trade
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : MARKETPLACE NPC TRADE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database, $session, $village, $id; global $database, $session, $village, $id;
if ($session->gold <= 2) { if ($session->gold <= 2) {
@@ -26,7 +45,7 @@ $totalRes = $awood + $aclay + $airon + $acrop;
$maxstore = max(0, (int)$village->maxstore); $maxstore = max(0, (int)$village->maxstore);
$maxcrop = max(0, (int)$village->maxcrop); $maxcrop = max(0, (int)$village->maxcrop);
// valori prefill din GET // PREFILL VALUE FROM GET
$r = []; $r = [];
for ($i = 1; $i <= 4; $i++) { for ($i = 1; $i <= 4; $i++) {
$r[$i] = isset($_GET['r'.$i])? max(0, (int)$_GET['r'.$i]) : ''; $r[$i] = isset($_GET['r'.$i])? max(0, (int)$_GET['r'.$i]) : '';
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 17_4.tpl - MARKETPLACE / COMERCIAL ROUTE
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : MARKETPLACE COMERCIAL ROUTE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database, $session, $village, $generator, $id; global $database, $session, $village, $generator, $id;
if (!($session->goldclub == 1 && count($database->getProfileVillages($session->uid)) > 1)) { if (!($session->goldclub == 1 && count($database->getProfileVillages($session->uid)) > 1)) {
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 17_create.tpl - MARKETPLACE / CREATE ROUTE
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : MARKETPLACE CREATE ROUTE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database, $session, $village; global $database, $session, $village;
$villages = $session->villages?? []; $villages = $session->villages?? [];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 17_edit.tpl - MARKETPLACE / EDIT ROUTES
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : MARKETPLACE EDIT ROUTES ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database; global $database;
$routeid = isset($_POST['routeid'])? (int)$_POST['routeid'] : 0; $routeid = isset($_POST['routeid'])? (int)$_POST['routeid'] : 0;
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 17_menu.tpl - MENU MARKETPLACE
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : MARKETPLACE MENU ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database, $session, $id; global $database, $session, $id;
$t = isset($_GET['t'])? (int)$_GET['t'] : 0; $t = isset($_GET['t'])? (int)$_GET['t'] : 0;
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 18.tpl - EMBESSY
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : EMBESSY ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $session, $id, $alliance, $database, $form; global $village, $session, $id, $alliance, $database, $form;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 18_create.tpl - EMBESSY / CREATE
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : EMBESSY CREATE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $form, $session; global $form, $session;
$isBanned = $session->access == BANNED; $isBanned = $session->access == BANNED;
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 19.tpl - BARRAKS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : BARRACKS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $technology, $generator, $session, $id; global $village, $building, $technology, $generator, $session, $id;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+21 -2
View File
@@ -1,12 +1,31 @@
<?php <?php
// 19_train.tpl - UNIT LIST BARRAKS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : BARRAKS UNIT LIST ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $session, $technology, $village, $database, $generator, $building, $bid19, $id; global $session, $technology, $village, $database, $generator, $building, $bid19, $id;
$tribe = (int)$session->tribe; $tribe = (int)$session->tribe;
$units = ($tribe !== 4) ? range(($tribe-1)*10+1, ($tribe-1)*10+4) : range(31, 40); $units = ($tribe !== 4) ? range(($tribe-1)*10+1, ($tribe-1)*10+4) : range(31, 40);
foreach ($units as $i) { foreach ($units as $i) {
// skip unități invalide // SKIP INVALID UNITS
if ($tribe !== 4 && ($i == 4 || $i == 23 || $i == 24)) continue; if ($tribe !== 4 && ($i == 4 || $i == 23 || $i == 24)) continue;
if (!($technology->getTech($i) || $i % 10 == 1)) continue; if (!($technology->getTech($i) || $i % 10 == 1)) continue;
+19 -2
View File
@@ -1,10 +1,27 @@
<?php <?php
// CLAYPIT #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : CLAYPIT ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
// — pregătire date // — PREPARING DATA
$field = 'f' . $id; $field = 'f' . $id;
$currentLevel = (int) ($village->resarray[$field] ?? 0); $currentLevel = (int) ($village->resarray[$field] ?? 0);
$buildingType = $village->resarray[$field . 't'] ?? 0; $buildingType = $village->resarray[$field . 't'] ?? 0;
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 20.tpl - STABLE
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : STABLE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $technology, $generator, $session, $id; global $village, $building, $technology, $generator, $session, $id;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 20_train.tpl - STABLE UNIT TRAIN
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : STABLE TRAIN UNIT ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $session, $technology, $village, $database, $generator, $building, $bid20, $bid41, $id; global $session, $technology, $village, $database, $generator, $building, $bid20, $bid41, $id;
$tribe = (int)$session->tribe; $tribe = (int)$session->tribe;
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 21.tpl - WORKSHOP
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : WORKSHOP ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $technology, $generator, $session, $database, $id, $bid21; global $village, $building, $technology, $generator, $session, $database, $id, $bid21;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 22.tpl - ACADEMY
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : ACADEMY ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $session, $id; global $village, $building, $session, $id;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 22_1.tpl - ACADEMY - ROMAN UNITS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : ACADEMY ROMAN UNITS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $technology, $generator, $village, $session, $building, $bid22, $id; global $technology, $generator, $village, $session, $building, $bid22, $id;
$acares = $technology->grabAcademyRes(); $acares = $technology->grabAcademyRes();
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 22_2.tpl - ACADEMY TEUTON UNITS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : ACADEMY TEUTON UNITS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $technology, $generator, $village, $session, $building, $bid22, $id; global $technology, $generator, $village, $session, $building, $bid22, $id;
$acares = $technology->grabAcademyRes(); $acares = $technology->grabAcademyRes();
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 22_3.tpl - ACADEMY GAULS UNITS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : ACADEMY GAUL UNITS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $technology, $generator, $village, $session, $building, $bid22, $id; global $technology, $generator, $village, $session, $building, $bid22, $id;
$acares = $technology->grabAcademyRes(); $acares = $technology->grabAcademyRes();
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 22_4.tpl - NATARS ACADEMY RESEARCH
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : ACADEMY NATAR UNITS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $technology, $generator, $village, $session, $building, $bid22, $id; global $technology, $generator, $village, $session, $building, $bid22, $id;
$acares = $technology->grabAcademyRes(); $acares = $technology->grabAcademyRes();
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 22_5.tpl - ACADEMY RESEARCH TRIBE 5
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : ACADEMY NATURE UNITS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $technology, $generator, $village, $session, $building, $bid22, $id; global $technology, $generator, $village, $session, $building, $bid22, $id;
$acares = $technology->grabAcademyRes(); $acares = $technology->grabAcademyRes();
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 23.tpl - Cranny
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : CRANNY ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $session, $village, $database, $bid23, $id, $loopsame, $doublebuild, $master; global $session, $village, $database, $bid23, $id, $loopsame, $doublebuild, $master;
include("next.tpl"); include("next.tpl");
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 24.tpl - Town Hall
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : TOWNHALL ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $id; global $village, $building, $id;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
?> ?>
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 24_1.tpl - TOWNHALL CELEBRATIONS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : TOWNHALL CELEBRATIONS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $database, $generator, $building, $session, $cel, $gc, $bid24, $id, $technology; global $village, $database, $generator, $building, $session, $cel, $gc, $bid24, $id, $technology;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 24_2.tpl - TOWNHALL TIMER
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : TOWNHALL TIMING ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database, $village, $generator, $session; global $database, $village, $generator, $session;
$timeleft = (int)$database->getVillageField($village->wid, 'celebration'); $timeleft = (int)$database->getVillageField($village->wid, 'celebration');
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 25.tpl - Residence
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RESIDENCE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $id; global $village, $id;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 25_2.tpl - RESIDENCE CULTURE POINTS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RESIDENCE CULTURE POINTS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $database, $session, $id; global $village, $database, $session, $id;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 25_3.tpl - Residence loyalty
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RESIDENCE LOYALTY ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $database, $id; global $village, $database, $id;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 25_4.tpl - RESIDENCE EXPANSION
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RESIDENCE EXPANSION ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $database, $generator, $id; global $village, $database, $generator, $id;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 25_create.tpl - RESIDENCE TRAIN UNITS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RESIDENCE TRAIN UNIT ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $id, $technology, $village, $generator; global $id, $technology, $village, $generator;
$i = 20; // Settler (sau 19 pentru Chief la Palace) $i = 20; // Settler (sau 19 pentru Chief la Palace)
+20 -2
View File
@@ -1,6 +1,24 @@
<?php <?php
// 25_menu.tpl - RESIDENCE MENU
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RESIDENCE MENU ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $id; global $id;
$s = $_GET['s'] ?? null; $s = $_GET['s'] ?? null;
?> ?>
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 25_progress.tpl - RESIDENCE TRAINING UNITS PROGRESS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RESIDENCE TRAINING UNITS PROGRESS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $technology, $generator, $session; global $technology, $generator, $session;
$trainlist = $technology->getTrainingList(4); $trainlist = $technology->getTrainingList(4);
+20 -3
View File
@@ -1,10 +1,27 @@
<?php <?php
// 25_train.tpl - RESIDENCE TRAINING UNITS PROGRESS #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : RESIDENCE TRAINING UNITS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$slots = $database->getAvailableExpansionTraining(); $slots = $database->getAvailableExpansionTraining();
if ($slots['settlers'] + $slots['chiefs']>0) { ?> if ($slots['settlers'] + $slots['chiefs']>0) { ?>
<form method="POST" name="snd" action="build.php"> <form method="POST" name="snd" action="build.php">
<input type="hidden" name="id" value="<?php echo $id; ?>" /> <input type="hidden" name="id" value="<?php echo $id; ?>" />
+27 -8
View File
@@ -1,15 +1,34 @@
<?php <?php
// PALACE - gid 26 - refactorizat
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : PALACE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
if(time() - (!empty($_SESSION['time_p']) ? $_SESSION['time_p'] : 0) > 5){ if(time() - (!empty($_SESSION['time_p']) ? $_SESSION['time_p'] : 0) > 5){
$_SESSION['time_p'] = ''; $_SESSION['time_p'] = '';
$_SESSION['error_p'] = ''; $_SESSION['error_p'] = '';
} }
// --- LOGICA SCHIMBARE CAPITALA --- // --- CHANGE CAPITAL LOGIC ---
if($_POST && $_GET['action'] == 'change_capital' && !$village->capital){ if($_POST && $_GET['action'] == 'change_capital' && !$village->capital){
$pass = $_POST['pass']; $pass = $_POST['pass'];
$query = mysqli_query($database->dblink, 'SELECT password FROM `'.TB_PREFIX.'users` WHERE `id` = '.(int)$session->uid); $query = mysqli_query($database->dblink, 'SELECT password FROM `'.TB_PREFIX.'users` WHERE `id` = '.(int)$session->uid);
$data = mysqli_fetch_assoc($query); $data = mysqli_fetch_assoc($query);
// 1. Verifică parola // 1. CHECK PASSWORD
if(password_verify($pass, $data['password'])){ if(password_verify($pass, $data['password'])){
$query1 = mysqli_query($database->dblink, 'SELECT wref FROM `'.TB_PREFIX.'vdata` WHERE `owner` = '.(int)$session->uid.' AND `capital` = 1'); $query1 = mysqli_query($database->dblink, 'SELECT wref FROM `'.TB_PREFIX.'vdata` WHERE `owner` = '.(int)$session->uid.' AND `capital` = 1');
$data1 = mysqli_fetch_assoc($query1); $data1 = mysqli_fetch_assoc($query1);
@@ -17,25 +36,25 @@ if($_POST && $_GET['action'] == 'change_capital' && !$village->capital){
$newWid = (int)$village->wid; $newWid = (int)$village->wid;
if($oldWid != $newWid){ if($oldWid != $newWid){
// ia datele ambelor sate // TAKE BOTH VILLAGE DATA
$query2 = mysqli_query($database->dblink, 'SELECT * FROM `'.TB_PREFIX.'fdata` WHERE `vref` = '.$oldWid); $query2 = mysqli_query($database->dblink, 'SELECT * FROM `'.TB_PREFIX.'fdata` WHERE `vref` = '.$oldWid);
$data2 = mysqli_fetch_assoc($query2); $data2 = mysqli_fetch_assoc($query2);
$query3 = mysqli_query($database->dblink, 'SELECT * FROM `'.TB_PREFIX.'fdata` WHERE `vref` = '.$newWid); $query3 = mysqli_query($database->dblink, 'SELECT * FROM `'.TB_PREFIX.'fdata` WHERE `vref` = '.$newWid);
$data3 = mysqli_fetch_assoc($query3); $data3 = mysqli_fetch_assoc($query3);
// 1. taie resursele vechii capitale la nivel 10 // 1. REMOVE RESOURCE OLD CAPITAL TO LEVEL 10
for($i = 1; $i <= 18; ++$i){ for($i = 1; $i <= 18; ++$i){
if($data2['f'.$i] > 10){ if($data2['f'.$i] > 10){
mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'` = 10 WHERE `vref` = '.$oldWid); mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'` = 10 WHERE `vref` = '.$oldWid);
} }
} }
// 2. șterge Zidarul din vechea capitală // 2. DELETE STONEMANSON LODGE FROM OLD CAPITAL
for($i = 19; $i <= 40; ++$i){ for($i = 19; $i <= 40; ++$i){
if($data2['f'.$i.'t'] == 34){ if($data2['f'.$i.'t'] == 34){
mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'t` = 0, `f'.$i.'` = 0 WHERE `vref` = '.$oldWid); mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'t` = 0, `f'.$i.'` = 0 WHERE `vref` = '.$oldWid);
} }
} }
// 3. FIX: șterge clădirile specifice capitalei din NOUA capitală // 3. DELETE CAPITAL-SPECIFIC BUILDINGS FROM THE NEW CAPITAL
$capitalOnly = [29,30,38,39,42]; $capitalOnly = [29,30,38,39,42];
for($i = 19; $i <= 40; ++$i){ for($i = 19; $i <= 40; ++$i){
if(in_array((int)$data3['f'.$i.'t'], $capitalOnly)){ if(in_array((int)$data3['f'.$i.'t'], $capitalOnly)){
@@ -46,7 +65,7 @@ if($_POST && $_GET['action'] == 'change_capital' && !$village->capital){
$database->changeCapital($oldWid, 0); $database->changeCapital($oldWid, 0);
$database->changeCapital($newWid); $database->changeCapital($newWid);
// 4. FIX BUG-UL TĂU: recount populație instant // 4. RECOUNT POPULATION
if(!isset($automation)){ if(!isset($automation)){
include_once("GameEngine/Automation.php"); include_once("GameEngine/Automation.php");
} }
+22 -3
View File
@@ -1,17 +1,36 @@
<?php <?php
// 26_2.tpl - PALACE / POINT CULTURE
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : PALACE CULTURE POINTS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database, $session, $village; global $database, $session, $village;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
$isNatar = (int)$database->getVillageField($village->wid, 'natar') === 1; $isNatar = (int)$database->getVillageField($village->wid, 'natar') === 1;
// ia datele o singură dată // TAKE DATA ONCE
$cpVillage = $isNatar ? 0 : (int)$database->getVillageField($village->wid, 'cp'); $cpVillage = $isNatar ? 0 : (int)$database->getVillageField($village->wid, 'cp');
$cpTotal = (int)$database->getVSumField($session->uid, 'cp'); $cpTotal = (int)$database->getVSumField($session->uid, 'cp');
$villages = $database->getProfileVillages($session->uid); $villages = $database->getProfileVillages($session->uid);
$totalVillages = count($villages); $totalVillages = count($villages);
// calcul pentru următorul sat - fără variable variables // calculation for the next village - without variables
$cpMode = CP; // 0 = normal, 1 = speed $cpMode = CP; // 0 = normal, 1 = speed
$cpArrayName = 'cp' . $cpMode; $cpArrayName = 'cp' . $cpMode;
$cpArray = $GLOBALS[$cpArrayName] ?? []; $cpArray = $GLOBALS[$cpArrayName] ?? [];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 26_3.tpl - PALACE / LOIALITY
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : PALACE LOYALITY ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database, $village; global $database, $village;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+23 -4
View File
@@ -1,16 +1,35 @@
<?php <?php
// 26_4.tpl - PALACE / CONQUERED VILLAGES
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : PALACE CONQUERED VILLAGES ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database, $village, $generator; global $database, $village, $generator;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
// ia toate 3 sloturile o singură dată // TAKE ALL SLOTS ONE TIME
$slots = [ $slots = [
(int)$database->getVillageField($village->wid, 'exp1'), (int)$database->getVillageField($village->wid, 'exp1'),
(int)$database->getVillageField($village->wid, 'exp2'), (int)$database->getVillageField($village->wid, 'exp2'),
(int)$database->getVillageField($village->wid, 'exp3'), (int)$database->getVillageField($village->wid, 'exp3'),
]; ];
$slots = array_filter($slots); // elimină 0 $slots = array_filter($slots); // REMOVE 0
?> ?>
<div id="build" class="gid26"> <div id="build" class="gid26">
<h1><?php echo PALACE; ?> <span class="level"><?php echo LEVEL.' '.$level; ?></span></h1> <h1><?php echo PALACE; ?> <span class="level"><?php echo LEVEL.' '.$level; ?></span></h1>
@@ -41,7 +60,7 @@ $slots = array_filter($slots); // elimină 0
<?php if (!empty($slots)): <?php if (!empty($slots)):
$i = 1; $i = 1;
foreach ($slots as $wid): foreach ($slots as $wid):
// un singur set de date per sat // ONE DATA TYPE PER VILLAGE
$coor = $database->getCoor($wid); $coor = $database->getCoor($wid);
$villageData = $database->getVillage($wid); // conține name, owner, pop, created $villageData = $database->getVillage($wid); // conține name, owner, pop, created
$ownerName = $database->getUserField($villageData['owner'], 'username', 0); $ownerName = $database->getUserField($villageData['owner'], 'username', 0);
+22 -3
View File
@@ -1,10 +1,29 @@
<?php <?php
// 26_create.tpl - PALACE / TRAIN SETTLERS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : PALACE TRAIN SETTLERS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $technology, $generator, $id; global $village, $technology, $generator, $id;
$unitId = 20; // colonist $unitId = 20; // SETTLERS
$unitName = $technology->getUnitName($unitId); $unitName = $technology->getUnitName($unitId);
$costs = $GLOBALS['u'.$unitId]; // $u20 din config $costs = $GLOBALS['u'.$unitId];
$maxTrain = $technology->maxUnit($unitId); $maxTrain = $technology->maxUnit($unitId);
$available = (int)($village->unitarray['u'.$unitId]?? 0); $available = (int)($village->unitarray['u'.$unitId]?? 0);
$trainTime = $generator->getTimeFormat(round($costs['time'] / SPEED)); $trainTime = $generator->getTimeFormat(round($costs['time'] / SPEED));
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 26_menu.tpl - PALACE / MENU
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : PALACE MENU ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $id; global $id;
$current = $_GET['s'] ?? ''; $current = $_GET['s'] ?? '';
+22 -3
View File
@@ -1,8 +1,27 @@
<?php <?php
// 26_progress.tpl - PALACE / TRAIN PROGRESS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : PALACE TRAIN PROGRESS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $technology, $generator, $session; global $technology, $generator, $session;
$trainList = $technology->getTrainingList(4); // unit 4 = pentru chief? păstrez ID-ul tău $trainList = $technology->getTrainingList(4); // UNIT 4 = FOR CHIEFTAIN
if (!empty($trainList)): if (!empty($trainList)):
$trainCount = 0; $trainCount = 0;
$nextFinished = ''; $nextFinished = '';
@@ -20,7 +39,7 @@ if (!empty($trainList)):
$trainCount++; $trainCount++;
$isFirst = ($trainCount === 1); $isFirst = ($trainCount === 1);
// timp rămas // REMAINING TIME
$remaining = max(0, (int)$train['timestamp'] - time()); $remaining = max(0, (int)$train['timestamp'] - time());
$duration = $isFirst? $remaining : (int)$train['eachtime'] * (int)$train['amt']; $duration = $isFirst? $remaining : (int)$train['eachtime'] * (int)$train['amt'];
+21 -2
View File
@@ -1,5 +1,24 @@
<?php <?php
// 26_train.tpl - PALACE / Antrenare coloniști și șefi
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : PALACE TRAIN CHEF/COLONIST ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $database, $session, $village, $technology, $generator, $building, $bid26, $id; global $database, $session, $village, $technology, $generator, $building, $bid26, $id;
$slots = $database->getAvailableExpansionTraining(); $slots = $database->getAvailableExpansionTraining();
@@ -35,7 +54,7 @@ if ($totalSlots > 0): ?>
$maxUnit = min($maxByTech, $slotLimit); $maxUnit = min($maxByTech, $slotLimit);
$available = (int)($village->unitarray['u'.$i] ?? 0); $available = (int)($village->unitarray['u'.$i] ?? 0);
// timp cu bonus palat și artefacte // TIME WITH PALACE BONUS AND ARTEFACT
$baseTime = $costs['time'] * ($bid26[$village->resarray['f'.$id]]['attri'] / 100) / SPEED; $baseTime = $costs['time'] * ($bid26[$village->resarray['f'.$id]]['attri'] / 100) / SPEED;
$duration = $database->getArtifactsValueInfluence($session->uid, $village->wid, 5, round($baseTime)); $duration = $database->getArtifactsValueInfluence($session->uid, $village->wid, 5, round($baseTime));
+23
View File
@@ -1,3 +1,26 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : TREASURY ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
?>
<body> <body>
<div id="build" class="gid27"> <div id="build" class="gid27">
<a href="#" onclick="return Popup(27,4);" class="build_logo"><img class="building g27" src="img/x.gif" alt="<?php echo TREASURY; ?>" title="<?php echo TREASURY; ?>"></a> <a href="#" onclick="return Popup(27,4);" class="build_logo"><img class="building g27" src="img/x.gif" alt="<?php echo TREASURY; ?>" title="<?php echo TREASURY; ?>"></a>
+22 -1
View File
@@ -1,4 +1,25 @@
<?php <?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : TREASURY ARTEFACTS AREEA ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include_once("GameEngine/Artifacts.php"); include_once("GameEngine/Artifacts.php");
$ownArtifacts = $database->getOwnArtefactsInfo($session->uid ?? 0); $ownArtifacts = $database->getOwnArtefactsInfo($session->uid ?? 0);
@@ -67,7 +88,7 @@ if(count($artifacts) == 0) {
foreach($artifacts as $artifact){ foreach($artifacts as $artifact){
$coordinates = $database->getCoor($artifact['vref']); $coordinates = $database->getCoor($artifact['vref']);
$distance = $database->getDistance($village->coor['x'], $village->coor['y'], $coordinates['x'], $coordinates['y']); $distance = $database->getDistance($village->coor['x'], $village->coor['y'], $coordinates['x'], $coordinates['y']);
// cheia unică previne suprascrierea când 2 artefacte sunt la aceeași distanță // unique key prevents overwriting when 2 artifacts are at the same distance
$rows[$distance.'_'.$artifact['id']] = ['dist' => $distance, 'data' => $artifact]; $rows[$distance.'_'.$artifact['id']] = ['dist' => $distance, 'data' => $artifact];
} }
+23
View File
@@ -1,3 +1,26 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : TREASURY SMALL ARTEFACTS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
?>
<body> <body>
<div id="build" class="gid27"> <div id="build" class="gid27">
<a href="#" onclick="return Popup(27,4);" class="build_logo"><img class="building g27" src="img/x.gif" alt="<?php echo TREASURY; ?>" title="<?php echo TREASURY; ?>"></a> <a href="#" onclick="return Popup(27,4);" class="build_logo"><img class="building g27" src="img/x.gif" alt="<?php echo TREASURY; ?>" title="<?php echo TREASURY; ?>"></a>
+23
View File
@@ -1,3 +1,26 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : TREASURY LARGE ARTEFACTS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
?>
<body> <body>
<div id="build" class="gid27"> <div id="build" class="gid27">
<a href="#" onclick="return Popup(27,4);" class="build_logo"><img class="building g27" src="img/x.gif" alt="<?php echo TREASURY; ?>" title="<?php echo TREASURY; ?>"></a> <a href="#" onclick="return Popup(27,4);" class="build_logo"><img class="building g27" src="img/x.gif" alt="<?php echo TREASURY; ?>" title="<?php echo TREASURY; ?>"></a>
+23
View File
@@ -1,3 +1,26 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : TREASURY MENU ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
?>
<div id="textmenu"> <div id="textmenu">
<a href="build.php?id=<?php echo $id ?? 0; ?>"<?php if(($_GET['t'] ?? 0) == 0 || ($_GET['t'] ?? 0) == 1) echo ' class="selected"'; ?>><?php echo OWN_ARTEFACTS; ?></a> <a href="build.php?id=<?php echo $id ?? 0; ?>"<?php if(($_GET['t'] ?? 0) == 0 || ($_GET['t'] ?? 0) == 1) echo ' class="selected"'; ?>><?php echo OWN_ARTEFACTS; ?></a>
+20
View File
@@ -1,4 +1,24 @@
<?php <?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : TREASURY SHOW ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include_once("GameEngine/Artifacts.php"); include_once("GameEngine/Artifacts.php");
$showId = (int)($_GET['show'] ?? 0); $showId = (int)($_GET['show'] ?? 0);
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 28.tpl - TRADEOFFICE
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : TRADEOFFICE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $bid28, $id, $loopsame, $doublebuild, $master; global $village, $building, $bid28, $id, $loopsame, $doublebuild, $master;
include("next.tpl"); include("next.tpl");
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 29.tpl - GREATBARRACKS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : GREATBARRACKS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $technology, $generator, $session, $id; global $village, $building, $technology, $generator, $session, $id;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 29_train.tpl - GREATBARRACKS TRAIN
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : GREATBARRAKS TRAIN ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $session, $technology, $village, $database, $building, $bid29, $generator, $id; global $session, $technology, $village, $database, $building, $bid29, $generator, $id;
$start = ($session->tribe - 1) * 10 + 1; $start = ($session->tribe - 1) * 10 + 1;
+19 -2
View File
@@ -1,10 +1,27 @@
<?php <?php
// IRONMINE #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : IRONMINE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
// — pregătire date // — PREPARING DATA
$field = 'f' . $id; $field = 'f' . $id;
$currentLevel = (int) ($village->resarray[$field] ?? 0); $currentLevel = (int) ($village->resarray[$field] ?? 0);
$buildingType = $village->resarray[$field . 't'] ?? 0; $buildingType = $village->resarray[$field . 't'] ?? 0;
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 30.tpl - GREATSTABLE
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : GREATSTABLE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $technology, $generator, $session, $id; global $village, $building, $technology, $generator, $session, $id;
$level = (int)$village->resarray['f'.$id]; $level = (int)$village->resarray['f'.$id];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 30_train.tpl - GREATSTABLE TRAIN
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : GREATSTABLE TRAIN ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $session, $technology, $village, $database, $building, $bid30, $bid41, $generator, $id; global $session, $technology, $village, $database, $building, $bid30, $bid41, $generator, $id;
$start = ($session->tribe - 1) * 10 + 3; $start = ($session->tribe - 1) * 10 + 3;
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 31.tpl - CITYWALL
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : CITYWALL ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $bid31, $id, $loopsame, $doublebuild, $master; global $village, $building, $bid31, $id, $loopsame, $doublebuild, $master;
include("next.tpl"); include("next.tpl");
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 32.tpl - EARTHWALL
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : EARTHWALL ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $bid32, $id, $loopsame, $doublebuild, $master; global $village, $building, $bid32, $id, $loopsame, $doublebuild, $master;
include("next.tpl"); include("next.tpl");
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 33.tpl - PALISADE
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : PALISADE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $bid33, $id, $loopsame, $doublebuild, $master; global $village, $building, $bid33, $id, $loopsame, $doublebuild, $master;
include("next.tpl"); include("next.tpl");
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// 34.tpl STONEMASON #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : STONEMASON ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include("next.tpl"); include("next.tpl");
?> ?>
+18 -2
View File
@@ -1,7 +1,23 @@
<?php <?php
// 35.tpl
// 35.tpl - BREWERY #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : BREWERY ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $bid35, $id, $loopsame, $doublebuild, $master; global $village, $building, $bid35, $id, $loopsame, $doublebuild, $master;
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 36.tpl - TRAPS
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : TRAPS ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $technology, $generator, $database, $session, $bid19, $bid36, $id, $loopsame, $doublebuild, $master; global $village, $building, $technology, $generator, $database, $session, $bid19, $bid36, $id, $loopsame, $doublebuild, $master;
include("next.tpl"); include("next.tpl");
+19 -8
View File
@@ -1,12 +1,23 @@
<?php <?php
/*-------------------------------------------------------*\ #################################################################################
| ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* | ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
+---------------------------------------------------------+ ## --------------------------------------------------------------------------- ##
| Developed by: Manni < manuel_mannhardt@web.de > | ## Filename : HEROSMANSION ##
| Dzoki < dzoki.travian@gmail.com > | ## Type : BUILDING TEMPLATE ##
| Copyright: TravianX Project All rights reserved | ## --------------------------------------------------------------------------- ##
\*-------------------------------------------------------*/ ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$hero_info = $units->Hero($session->uid); $hero_info = $units->Hero($session->uid);
$heroes = $units->Hero($session->uid, 1); $heroes = $units->Hero($session->uid, 1);
@@ -118,4 +129,4 @@
} }
include ("upgrade.tpl"); ?> include ("upgrade.tpl"); ?>
</div> </div>
+41 -19
View File
@@ -1,13 +1,23 @@
<?php <?php
/*-------------------------------------------------------*\ #################################################################################
| ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* | ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
+---------------------------------------------------------+ ## --------------------------------------------------------------------------- ##
| Developed by: Manni < manuel_mannhardt@web.de > | ## Filename : HEROSMANSION VIEW PAGE ##
| Dzoki < dzoki.travian@gmail.com > | ## Type : BUILDING TEMPLATE ##
| Reworked by: Esfomeado < vps1992@live.com.pt > | ## --------------------------------------------------------------------------- ##
| Copyright: TravianX Project All rights reserved | ## Refactored by : Shadow ##
\*-------------------------------------------------------*/ ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include_once("GameEngine/Data/hero_full.php"); include_once("GameEngine/Data/hero_full.php");
global $database; global $database;
@@ -95,21 +105,33 @@ if (isset($_POST['name']) && !empty($_POST['name'])) {
<tr> <tr>
<td colspan="5" class="empty"></td> <td colspan="5" class="empty"></td>
</tr> </tr>
<tr> <tr>
<?php if($hero_info['experience'] < 495000){ ?> <?php
<th title="<?php echo TZ_UNTIL_THE_NEXT_LEVEL; ?>"><?php echo EXPERIENCE; ?>:</th> $maxExp = 495000;
<td class="val"><?php echo (int) (($hero_info['experience'] - $hero_levels[$hero_info['level']]) / ($hero_levels[$hero_info['level']+1] - $hero_levels[$hero_info['level']])*100) ?>%</td> $curLevel = (int)$hero_info['level'];
<td class="xp"><img class="bar" src="img/x.gif" style="width:<?php echo ($hero_info['experience'] - $hero_levels[$hero_info['level']]) / ($hero_levels[$hero_info['level']+1] - $hero_levels[$hero_info['level']])*100*2 ?>px;" alt="<?php echo ($hero_info['experience'] - $hero_levels[$hero_info['level']]) / ($hero_levels[$hero_info['level']+1] - $hero_levels[$hero_info['level']])*100 ?>%" title="<?php echo ($hero_info['experience'] - $hero_levels[$hero_info['level']]) / ($hero_levels[$hero_info['level']+1] - $hero_levels[$hero_info['level']])*100 ?>%" /></td> $curExp = (int)$hero_info['experience'];
// fallback-uri ca să nu mai dea notice
$expCurrent = $hero_levels[$curLevel] ?? 0;
$expNext = $hero_levels[$curLevel + 1] ?? $maxExp;
if($curExp < $maxExp && $expNext > $expCurrent && $curLevel < 100){
$percent = ($curExp - $expCurrent) / ($expNext - $expCurrent) * 100;
$percent = max(0, min(100, $percent));
?>
<th title="<?php echo TZ_UNTIL_THE_NEXT_LEVEL; ?>"><?php echo EXPERIENCE; ?>:</th>
<td class="val"><?php echo (int)$percent; ?>%</td>
<td class="xp"><img class="bar" src="img/x.gif" style="width:<?php echo $percent*2; ?>px;" alt="<?php echo (int)$percent; ?>%" title="<?php echo (int)$percent; ?>%" /></td>
<td class="up"></td> <td class="up"></td>
<td class="rem"><?php echo $hero_info['points']; ?></td> <td class="rem"><?php echo $hero_info['points']; ?></td>
<?php }else{ ?> <?php }else{ ?>
<th title="<?php echo TZ_UNTIL_THE_NEXT_LEVEL; ?>"><?php echo EXPERIENCE; ?>:</th> <th title="<?php echo TZ_UNTIL_THE_NEXT_LEVEL; ?>"><?php echo EXPERIENCE; ?>:</th>
<td class="val">100%</td> <td class="val">100%</td>
<td class="xp"><img class="bar" src="img/x.gif" style="width:200px;" alt="100%" title="100%" /></td> <td class="xp"><img class="bar" src="img/x.gif" style="width:200px;" alt="100%" title="100%" /></td>
<td class="up"></td> <td class="up"></td>
<td class="rem"><?php echo $hero_info['points']; ?></td> <td class="rem"><?php echo $hero_info['points']; ?></td>
<?php } ?> <?php } ?>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<?php if(isset($_GET['e'])){ <?php if(isset($_GET['e'])){
@@ -159,4 +181,4 @@ if (isset($_POST['name']) && !empty($_POST['name'])) {
exit; exit;
} }
} }
?> ?>
+20 -3
View File
@@ -1,6 +1,23 @@
<?php <?php
/* Hero's mansion oases page
Copyright: Travianx Project */ #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : HEROMANSION OASIS PAGE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$oasisarray = $database->getOasis($village->wid); $oasisarray = $database->getOasis($village->wid);
if(isset($_GET['gid']) && $_GET['gid'] == 37 && isset($_GET['del']) && $database->getOasisField($_GET['del'], 'owner') == $session->uid){ if(isset($_GET['gid']) && $_GET['gid'] == 37 && isset($_GET['del']) && $database->getOasisField($_GET['del'], 'owner') == $session->uid){
+24 -7
View File
@@ -1,3 +1,27 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : HEROSMANSION REVIVE PAGE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
?>
<table cellpadding="1" cellspacing="1" class="build_details"> <table cellpadding="1" cellspacing="1" class="build_details">
<thead> <thead>
<tr> <tr>
@@ -6,13 +30,6 @@
</thead> </thead>
<?php <?php
/*-------------------------------------------------------*\
| ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* |
+---------------------------------------------------------+
| Developed by: Manni < manuel_mannhardt@web.de > |
| Dzoki < dzoki.travian@gmail.com > |
| Copyright: TravianX Project All rights reserved |
\*-------------------------------------------------------*/
// check if there is a hero in revive already // check if there is a hero in revive already
$reviving = $training = false; $reviving = $training = false;
+17 -13
View File
@@ -1,18 +1,22 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Project: TravianZ ## ## Filename : HEROSMANSION TRAIN PAGE ##
## Version: 01.09.2013 ## ## Type : BUILDING TEMPLATE ##
## Filename : 37_train.tpl ## ## --------------------------------------------------------------------------- ##
## Developed by: Dzok ## ## Refactored by : Shadow ##
## Fixed by: Shadow / Skype : cata7007 ## ## Redesign by : Shadow ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2013. All rights reserved. ## ## Contact : cata7007@gmail.com ##
## URLs: http://travian.shadowss.ro ## ## Project : TravianZ ##
## Source code: http://github.com/yi12345/TravianZ ## ## Test Server : https://travianz.org ##
## ## ## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
//check if there is unit needed in the village //check if there is unit needed in the village
@@ -669,4 +673,4 @@ $output.="<tr>
echo $output; echo $output;
} }
?> ?>
</table> </table>
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 38.tpl - GREATWAREHOUSE
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : GREATWAREHOUSE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $bid38, $id, $loopsame, $doublebuild, $master; global $village, $building, $bid38, $id, $loopsame, $doublebuild, $master;
include("next.tpl"); include("next.tpl");
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 39.tpl - GREATGRANARY
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : GREATGRANARY ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $bid39, $id, $loopsame, $doublebuild, $master; global $village, $building, $bid39, $id, $loopsame, $doublebuild, $master;
include("next.tpl"); include("next.tpl");
+19 -2
View File
@@ -1,10 +1,27 @@
<?php <?php
// CROPLAND #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : CROPLAND ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
// — pregătire date // — PREPARING DATA
$field = 'f' . $id; $field = 'f' . $id;
$currentLevel = (int) ($village->resarray[$field] ?? 0); $currentLevel = (int) ($village->resarray[$field] ?? 0);
$buildingType = $village->resarray[$field . 't'] ?? 0; $buildingType = $village->resarray[$field . 't'] ?? 0;
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 41.tpl - HORSEDRINKING
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : HORSEDRINKING ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $bid41, $id, $loopsame, $doublebuild, $master; global $village, $building, $bid41, $id, $loopsame, $doublebuild, $master;
include("next.tpl"); include("next.tpl");
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 42.tpl - GREATWORKSHOP
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : GREATWORKSHOP ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $technology, $generator, $session, $id; global $village, $building, $technology, $generator, $session, $id;
include("next.tpl"); include("next.tpl");
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// 42_train.tpl -
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : GREATWORKSHOP TRAINING ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $session, $technology, $village, $generator, $database, $building, $bid42, $id; global $session, $technology, $village, $generator, $database, $building, $bid42, $id;
$success = 0; $success = 0;
+19 -2
View File
@@ -1,6 +1,23 @@
<?php <?php
// SAWMILL #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : SAWMILL ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
@@ -11,7 +28,7 @@ $buildingType = $village->resarray[$field . 't'] ?? 0;
$currentBonus = $currentLevel > 0 ? $bid5[$currentLevel]['attri'] : 0; $currentBonus = $currentLevel > 0 ? $bid5[$currentLevel]['attri'] : 0;
$isMax = $building->isMax($buildingType, $id); $isMax = $building->isMax($buildingType, $id);
$maxLevel = 5; // sawmill e max 5 $maxLevel = 5; // sawmill is max level 5
$nextLevelRaw = $currentLevel + 1 + $loopsame + $doublebuild + $master; $nextLevelRaw = $currentLevel + 1 + $loopsame + $doublebuild + $master;
$nextLevel = min($nextLevelRaw, $maxLevel); $nextLevel = min($nextLevelRaw, $maxLevel);
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// BRICKYARD #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : BRICKYARD ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// IRONFOUNDRY #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : IRONFOUNDRY ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// GRAINMILL #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : GRAINMILL ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
+18 -1
View File
@@ -1,6 +1,23 @@
<?php <?php
// BAKERY #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : BAKERY ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include 'next.tpl'; include 'next.tpl';
+20
View File
@@ -1,4 +1,24 @@
<?php <?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : AVAILABLE PAGE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$artifactsSum = $database->getArtifactsSumByKind($session->uid, $village->wid, 6); $artifactsSum = $database->getArtifactsSumByKind($session->uid, $village->wid, 6);
$GreatGranaryWarehouseBuildable = $artifactsSum['small'] > 0 || $artifactsSum['great'] > 0; $GreatGranaryWarehouseBuildable = $artifactsSum['small'] > 0 || $artifactsSum['great'] > 0;
+15 -4
View File
@@ -1,11 +1,22 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename index.php ## ## Filename : INDEX 404 ERROR ##
## Developed by: aggenkeech ## ## Type : BUILDING TEMPLATE ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
// prevent direct misuse in weird contexts (optional but safe) // prevent direct misuse in weird contexts (optional but safe)
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// next.tpl - calculează offset-ul pentru nivelul următor
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : NEXT PAGE (OFFSET) ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $building, $database, $village, $id; global $building, $database, $village, $id;
$loopsame = ($building->isCurrent($id) || $building->isLoop($id)) ? 1 : 0; $loopsame = ($building->isCurrent($id) || $building->isLoop($id)) ? 1 : 0;
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// upgrade.tpl
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : UPGRADE PAGE ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $database, $generator, $session, $technology, $id; global $village, $building, $database, $generator, $session, $technology, $id;
$bid = (int)$village->resarray['f'.$id.'t']; $bid = (int)$village->resarray['f'.$id.'t'];
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// ww.tpl - World Wonder
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : WORLD WONDER ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $building, $village, $database, $id, $session; global $building, $village, $database, $id, $session;
$loopsame = ($building->isCurrent($id) || $building->isLoop($id)) ? 1 : 0; $loopsame = ($building->isCurrent($id) || $building->isLoop($id)) ? 1 : 0;
+20 -1
View File
@@ -1,5 +1,24 @@
<?php <?php
// wwupgrade.tpl
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : WW UPGRADES ##
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## Test Server : https://travianz.org ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2026. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
global $village, $building, $database, $generator, $session, $id; global $village, $building, $database, $generator, $session, $id;
$bid = (int)$village->resarray['f'.$id.'t']; $bid = (int)$village->resarray['f'.$id.'t'];