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
+38 -53
View File
@@ -1,55 +1,40 @@
<?php if($session->access!=BANNED){ ?>
<?php
// 18_create.tpl - EMBESSY / CREATE
global $form, $session;
$isBanned = $session->access == BANNED;
$disabled = $isBanned ? 'disabled' : '';
$tagValue = htmlspecialchars($form->getValue("ally1"));
$nameValue = htmlspecialchars($form->getValue("ally2"));
$maxTag = $isBanned ? 8 : 15;
$maxName = $isBanned ? 25 : 50;
?>
<table cellpadding="1" cellspacing="1" id="found">
<form method="post" action="build.php">
<input type="hidden" name="ft" value="ali1">
<thead><tr>
<th colspan="2"><?php echo FOUND_ALLIANCE; ?></th>
</tr></thead>
<tbody><tr>
<th><?php echo TAG; ?></th>
<td class="tag">
<input class="text" name="ally1" value="<?php echo $form->getValue("ally1"); ?>" maxlength="15">
<span class="error"><?php echo $form->getError("ally1"); ?></span>
</td>
</tr>
<tr>
<th><?php echo NAME; ?></th>
<td class="nam">
<input class="text" name="ally2" value="<?php echo $form->getValue("ally2"); ?>" maxlength="50">
<span class="error"><?php echo $form->getError("ally2"); ?></span>
</td>
<form method="post" action="build.php">
<input type="hidden" name="ft" value="ali1">
<thead><tr><th colspan="2"><?php echo FOUND_ALLIANCE;?></th></tr></thead>
<tbody>
<tr>
<th><?php echo TAG;?></th>
<td class="tag">
<input class="text" name="ally1" value="<?php echo $tagValue;?>" maxlength="<?php echo $maxTag;?>" <?php echo $disabled;?>>
<span class="error"><?php echo $form->getError("ally1");?></span>
</td>
</tr>
<tr>
<th><?php echo NAME;?></th>
<td class="nam">
<input class="text" name="ally2" value="<?php echo $nameValue;?>" maxlength="<?php echo $maxName;?>" <?php echo $disabled;?>>
<span class="error"><?php echo $form->getError("ally2");?></span>
</td>
</tr>
</tbody>
</table>
</tr></tbody>
</table>
<p><button value="ok" name="s1" id="btn_ok" class="trav_buttons" alt="OK" /> Ok </button></form></p><table cellpadding="1" cellspacing="1" id="join">
<?php }else{ ?>
<table cellpadding="1" cellspacing="1" id="found">
<form method="post" action="build.php">
<input type="hidden" name="ft" value="ali1">
<thead><tr>
<th colspan="2"><?php echo FOUND_ALLIANCE; ?></th>
</tr></thead>
<tbody><tr>
<th><?php echo TAG; ?></th>
<td class="tag">
<input class="text" name="ally1" disabled="disabled" value="<?php echo $form->getValue("ally1"); ?>" maxlength="8">
<span class="error"><?php echo $form->getError("ally1"); ?></span>
</td>
</tr>
<tr>
<th><?php echo NAME; ?></th>
<td class="nam">
<input class="text" name="ally2" disabled="disabled" value="<?php echo $form->getValue("ally2"); ?>" maxlength="25">
<span class="error"><?php echo $form->getError("ally2"); ?></span>
</td>
</tr></tbody>
</table>
<?php
echo "".NO_CREATE_ALLIANCE."";
?></br><?php
}
?>
<?php if (!$isBanned):?>
<p><button type="submit" name="s1" id="btn_ok" class="trav_buttons">Ok</button></p>
</form>
<?php else:?>
</form>
<p><?php echo NO_CREATE_ALLIANCE;?></p>
<?php endif;?>