Files
novgorodschi catalin fe6ff01396 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
2026-06-25 10:54:58 +03:00

44 lines
2.0 KiB
Smarty

<?php
#################################################################################
## -= 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;
$current = $_GET['s'] ?? '';
$menu = [
'' => TRAIN,
'2' => CULTURE_POINTS,
'3' => LOYALTY,
'4' => EXPANSION,
];
?>
<div id="textmenu">
<?php
$first = true;
foreach ($menu as $s => $label):
if (!$first) echo ' | ';
$first = false;
$url = 'build.php?id='.(int)$id.($s !== '' ? '&amp;s='.$s : '');
$selected = ($current === (string)$s) ? ' class="selected"' : '';
?>
<a href="<?php echo $url;?>"<?php echo $selected;?>><?php echo $label;?></a>
<?php endforeach; ?>
</div>