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
+27 -14
View File
@@ -1,16 +1,29 @@
<div id="build" class="gid12"><a href="#" onClick="return Popup(12,4);" class="build_logo">
<img class="building g12" src="img/x.gif" alt="Blacksmith" title="<?php echo BLACKSMITH; ?>" />
</a>
<h1><?php echo BLACKSMITH; ?> <span class="level"><?php echo LEVEL; ?> <?php echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc"><?php echo BLACKSMITH_DESC; ?></p>
<?php
if ($building->getTypeLevel(12) > 0) {
include("12_upgrades.tpl");
} else {
echo "<p><b><?php echo UPGRADES_COMMENCE_BLACKSMITH; ?></b><br>\n";
}
include("upgrade.tpl");
// BLACKSMITH
// nu ai next.tpl aici în original, îl las așa
$field = 'f' . $id;
$currentLevel = (int) ($village->resarray[$field] ?? 0);
$hasBlacksmith = $building->getTypeLevel(12) > 0;
?>
</p>
</div>
<div id="build" class="gid12">
<a href="#" onclick="return Popup(12,4);" class="build_logo">
<img class="building g12" src="img/x.gif" alt="<?= BLACKSMITH ?>" title="<?= BLACKSMITH ?>">
</a>
<h1>
<?= BLACKSMITH ?>
<span class="level"><?= LEVEL ?> <?= $currentLevel ?></span>
</h1>
<p class="build_desc"><?= BLACKSMITH_DESC ?></p>
<?php if ($hasBlacksmith): ?>
<?php include '12_upgrades.tpl'; ?>
<?php else: ?>
<p><b><?= UPGRADES_COMMENCE_BLACKSMITH ?></b></p>
<?php endif; ?>
<?php include 'upgrade.tpl'; ?>
</div>