mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-28 06:07:14 +00:00
Refactor + BugFix
1. Fix a bug in Admin Panel that you can edit by yourself your rank, now you cannot edit your rank anymore. 2. Now Alliance Leader can edit his own Position 3. Fix negative value on Demolition Building, now in database at lvl is appear new level not -1 4. Refactor Ajax map, now all is alligned (Ajax folder and Map folder) 5. Fix bug from Palace (when change capital now Automation recount population automaticaly on old capital and new capital)
This commit is contained in:
@@ -1,7 +1,25 @@
|
||||
<?php
|
||||
// 26_menu.tpl - PALACE / MENU
|
||||
global $id;
|
||||
|
||||
<div id="textmenu">
|
||||
<a href="build.php?id=<?php echo $id; ?>" <?php if(!isset($_GET['s'])) { echo "class=\"selected\""; } ?>><?php echo TRAIN; ?></a>
|
||||
| <a href="build.php?id=<?php echo $id; ?>&s=2" <?php if(isset($_GET['s']) && $_GET['s'] == 2) { echo "class=\"selected\""; } ?>><?php echo CULTURE_POINTS; ?></a>
|
||||
| <a href="build.php?id=<?php echo $id; ?>&s=3" <?php if(isset($_GET['s']) && $_GET['s'] == 3) { echo "class=\"selected\""; } ?>><?php echo LOYALTY; ?></a>
|
||||
| <a href="build.php?id=<?php echo $id; ?>&s=4" <?php if(isset($_GET['s']) && $_GET['s'] == 4) { echo "class=\"selected\""; } ?>><?php echo EXPANSION; ?></a>
|
||||
$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 !== '' ? '&s='.$s : '');
|
||||
$selected = ($current === (string)$s) ? ' class="selected"' : '';
|
||||
?>
|
||||
<a href="<?php echo $url;?>"<?php echo $selected;?>><?php echo $label;?></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user