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
+56 -51
View File
@@ -1,60 +1,65 @@
<?php
if(!$session->goldclub) include("Templates/Build/16.tpl");
else
{
?>
<div id="build" class="gid16"><a href="#" onClick="return Popup(16,4);" class="build_logo">
<img class="g16" src="img/x.gif" alt="Rally point" title="<?php echo RALLYPOINT;?>" />
</a>
<h1><?php echo RALLYPOINT;?> <span class="level"><?php echo LEVEL;?> <?php echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc"><?php echo RALLYPOINT_DESC;?></p>
<?php include("16_menu.tpl")?>
<div id="raidList">
<?php include("Templates/goldClub/farmlist.tpl"); ?>
</div>
<br />
<?php if( !isset( $hideevasion ) || $hideevasion == 0){ ?>
<table id="raidList" cellpadding="1" cellspacing="1">
// RALLY POINT GOLD CLUB
if (!$session->goldclub) {
include 'Templates/Build/16.tpl';
return;
}
$hideEvasion = isset($hideevasion) ? (int)$hideevasion : 0;
$user = $database->getUserArray($session->uid, 1);
?>
<div id="build" class="gid16">
<a href="#" onclick="return Popup(16,4);" class="build_logo">
<img class="g16" src="img/x.gif" alt="Rally point" title="<?= RALLYPOINT ?>">
</a>
<h1><?= RALLYPOINT ?> <span class="level"><?= LEVEL ?> <?= $village->resarray['f'.$id] ?></span></h1>
<p class="build_desc"><?= RALLYPOINT_DESC ?></p>
<?php include '16_menu.tpl'; ?>
<div id="raidList">
<?php include 'Templates/goldClub/farmlist.tpl'; ?>
</div>
<br>
<?php if ($hideEvasion == 0): ?>
<table id="raidList" cellpadding="1" cellspacing="1">
<thead>
<tr>
<th colspan="4"><?php echo EVASION_SETTINGS;?></th>
</tr>
<tr><th colspan="4"><?= EVASION_SETTINGS ?></th></tr>
<tr>
<td></td>
<td><?php echo VILLAGE; ?></td>
<td><?php echo OWN_TROOPS; ?></td>
<td><?php echo REINFORCEMENT;?></td>
<td><?= VILLAGE ?></td>
<td><?= OWN_TROOPS ?></td>
<td><?= REINFORCEMENT ?></td>
</tr>
</thead>
<tbody>
<?php
for($i = 0; $i <= count($session->villages) - 1; $i++) {
$wref = $session->villages[$i];
$vname = $database->getVillageField($wref, "name");
$vchecked = $database->getVillageField($wref, "evasion");
$reinf = $database->getEnforceVillage($wref, 0);
if($vchecked == 1) $checked = 'checked';
else $checked = '';
?>
<tbody>
<?php foreach ($session->villages as $wref):
$vname = $database->getVillageField($wref, 'name');
$vchecked = $database->getVillageField($wref, 'evasion');
$reinf = $database->getEnforceVillage($wref, 0);
$checked = $vchecked == 1 ? 'checked' : '';
?>
<tr>
<td><input type="checkbox" class="check" name="hideShow" onclick="window.location.href = '?gid=16&t=99&evasion=<?php echo $wref;?>';" <?php echo $checked; ?>></td>
<td><?php echo $vname; ?></td>
<td><div style="text-align: center"><?php echo $database->getUnitsNumber($wref); ?></div></td>
<td><div style="text-align: center"><?php echo count($reinf); ?></div></td>
<td><input type="checkbox" class="check" name="hideShow" onclick="window.location.href='?gid=16&t=99&evasion=<?= $wref ?>';" <?= $checked ?>></td>
<td><?= $vname ?></td>
<td><div style="text-align:center"><?= $database->getUnitsNumber($wref) ?></div></td>
<td><div style="text-align:center"><?= count($reinf) ?></div></td>
</tr>
<?php
}
$user = $database->getUserArray($session->uid, 1);
?>
</tbody>
</table>
<form action="build.php?id=39&t=99" method="POST">
<br />
<?php echo SEND_TROOPS_AWAY_MAX;?> <input class="text" type="text" name="maxevasion" value="<?php echo $user['maxevasion']; ?>" maxlength="3" style="width:50px;"> <?php echo TIMES;?>
<span class="none">(<?php echo COSTS;?>: <img src="<?php echo GP_LOCATE; ?>img/a/gold_g.gif" alt="Gold" title="<?php echo GOLD;?>"/><b>2</b> <?php echo PER_EVASION;?>)</span>
<div class="clear"></div><p><button value="ok" name="s1" id="btn_ok" class="trav_buttons" tabindex="8">OK</button></p></form>
<?php } ?>
</div>
<?php } ?>
<?php endforeach; ?>
</tbody>
</table>
<form action="build.php?id=39&t=99" method="POST">
<br>
<?= SEND_TROOPS_AWAY_MAX ?>
<input class="text" type="text" name="maxevasion" value="<?= $user['maxevasion'] ?>" maxlength="3" style="width:50px;">
<?= TIMES ?>
<span class="none">(<?= COSTS ?>: <img src="<?= GP_LOCATE ?>img/a/gold_g.gif" alt="Gold" title="<?= GOLD ?>"><b>2</b> <?= PER_EVASION ?>)</span>
<div class="clear"></div>
<p><button value="ok" name="s1" id="btn_ok" class="trav_buttons" tabindex="8">OK</button></p>
</form>
<?php endif; ?>
</div>