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:
novgorodschi catalin
2026-05-18 09:18:35 +03:00
parent 2bce101a27
commit 55e6dd60b5
96 changed files with 6176 additions and 6763 deletions
+19 -17
View File
@@ -1,17 +1,19 @@
<div id="textmenu">
<a href="build.php?id=<?php echo $id; ?>"<?php if(!isset($_GET['t'])) { echo "class=\"selected\""; } ?>"><?php echo SEND_RESOURCES;?></a>
| <a href="build.php?id=<?php echo $id; ?>&amp;t=1" <?php if(isset($_GET['t']) && $_GET['t'] == 1) { echo "class=\"selected\""; } ?>><?php echo BUY;?></a>
| <a href="build.php?id=<?php echo $id; ?>&amp;t=2" <?php if(isset($_GET['t']) && $_GET['t'] == 2) { echo "class=\"selected\""; } ?>><?php echo OFFER;?></a>
<?php if($session->userinfo['gold'] > 2) {
?>
| <a href="build.php?id=<?php echo $id; ?>&amp;t=3" <?php if(isset($_GET['t']) && $_GET['t'] == 3) { echo "class=\"selected\""; } ?>><?php echo NPC_TRADING;?></a>
<?php
}
?>
<?php if($session->goldclub == 1 && count($database->getProfileVillages($session->uid)) > 1) {
?>
| <a href="build.php?id=<?php echo $id; ?>&amp;t=4" <?php if(isset($_GET['t']) && $_GET['t'] == 4) { echo "class=\"selected\""; } ?>><?php echo TRADE_ROUTES;?></a>
<?php
}
?>
</div>
<?php
// 17_menu.tpl - MENU MARKETPLACE
global $database, $session, $id;
$t = isset($_GET['t'])? (int)$_GET['t'] : 0;
$hasGold = (int)$session->userinfo['gold'] > 2;
$hasRoutes = $session->goldclub == 1 && count($database->getProfileVillages($session->uid)) > 1;
?>
<div id="textmenu">
<a href="build.php?id=<?php echo (int)$id;?>" <?php if($t===0) echo 'class="selected"';?>><?php echo SEND_RESOURCES;?></a>
| <a href="build.php?id=<?php echo (int)$id;?>&amp;t=1" <?php if($t===1) echo 'class="selected"';?>><?php echo BUY;?></a>
| <a href="build.php?id=<?php echo (int)$id;?>&amp;t=2" <?php if($t===2) echo 'class="selected"';?>><?php echo OFFER;?></a>
<?php if ($hasGold):?>
| <a href="build.php?id=<?php echo (int)$id;?>&amp;t=3" <?php if($t===3) echo 'class="selected"';?>><?php echo NPC_TRADING;?></a>
<?php endif;?>
<?php if ($hasRoutes):?>
| <a href="build.php?id=<?php echo (int)$id;?>&amp;t=4" <?php if($t===4) echo 'class="selected"';?>><?php echo TRADE_ROUTES;?></a>
<?php endif;?>
</div>