General fixes

+Fixed a bug in the farm list that permitted to attack the same village
troops were sent
+Fixed a bug that permitted to delete others raid lists
+Fixed a bug that permitted to view broken reports
+Fixed a bug that permitted to insert 0 troops in the raid list
+Fixed the broken graphic of the raid/farm list
+Fixed a bug that didn't permit to send more than 2 raids at a time (in
the raid list)
+General improovements and bug fixing
+Some clean-up
This commit is contained in:
iopietro
2018-05-03 23:07:11 +02:00
parent e751a0c01f
commit 49bc3c5073
13 changed files with 280 additions and 373 deletions
+1 -7
View File
@@ -8,14 +8,8 @@
<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>
<div id="textmenu">
<a href="build.php?id=<?php echo $id; ?>"><?php echo OVERVIEW;?></a> |
<a href="a2b.php"><?php echo SEND_TROOPS;?></a> |
<a href="warsim.php"><?php echo Q20_RESP1;?></a> <?php if($session->goldclub==1){ ?>|
<a href="build.php?id=<?php echo $id; ?>&amp;t=99">Gold Club</a>
<?php } ?>
</div>
<?php
include_once("16_menu.tpl");
$units_type = $database->getMovement("34",$village->wid,1);
$settlers = $database->getMovement("7",$village->wid,1);
$oasis_incoming = 0;
+23 -41
View File
@@ -1,78 +1,60 @@
<?php
if(!$session->goldclub) {
include "Templates/Build/16.tpl";
}else{
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="textmenu">
<a href="build.php?id=<?php echo $id; ?>"><?php echo OVERVIEW;?></a> |
<a href="a2b.php"><?php echo SEND_TROOPS;?></a> |
<a href="warsim.php"><?php echo Q20_RESP1;?></a> <?php if($session->goldclub==1){ ?>|
<a href="build.php?id=<?php echo $id; ?>&amp;t=99">Gold Club</a>
<?php } ?>
</div>
<div id="raidList">
<?php include "Templates/goldClub/farmlist.tpl"; ?>
</div>
<div id="raidList">
<?php include("Templates/goldClub/farmlist.tpl"); ?>
</div>
<br />
<?php if($hideevasion == 0){ ?>
<table cellpadding="1" cellspacing="1">
<table id="raidList" cellpadding="1" cellspacing="1">
<thead>
<tr>
<th colspan="4"><?php echo EVASION_SETTINGS;?></th>
</tr>
<tr>
<td></td>
<td><?php echo MULTI_V_HEADER; ?></td>
<td><?php echo VILLAGE; ?></td>
<td><?php echo OWN_TROOPS; ?></td>
<td><?php echo 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 = ''; }
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 = '';
?>
<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><?php echo $database->getUnitsNumber($wref); ?></td>
<td><?php echo count($reinf); ?></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>
</tr>
<?php
}
$user = $database->getUserArray($session->uid, 1);
?>
</tbody>
</table>
</table>
<form action="build.php?id=39&t=99" method="POST">
<br />
<tr>
<?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>
</tr>
<tr>
<div class="clear"></div><p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" tabindex="8" alt="OK"/></p></form>
</tr>
</form>
<?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 } ?>
+8
View File
@@ -0,0 +1,8 @@
<div id="textmenu">
<a href="build.php?id=<?php echo $id; ?>" <?php if(!isset($_GET['t']) || (isset($_GET['t']) && $_GET['t'] == 99 && !$session->goldclub)) echo "class=\"selected\""; ?> ><?php echo OVERVIEW;?></a> |
<a href="a2b.php"><?php echo SEND_TROOPS;?></a> |
<a href="warsim.php"><?php echo Q20_RESP1;?></a>
<?php if($session->goldclub == 1){ ?>|
<a href="build.php?id=<?php echo $id; ?>&amp;t=99" <?php if(isset($_GET['t']) && $_GET['t'] == 99) echo "class=\"selected\""; ?> >Gold Club</a>
<?php } ?>
</div>
+4 -4
View File
@@ -1,7 +1,7 @@
<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; ?>&amp;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; ?>&amp;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; ?>&amp;s=4" <?php if(isset($_GET['s']) && $_GET['s'] == 4) { echo "class=\"selected\""; } ?>><?php echo EXPANSION; ?></a>
<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; ?>&amp;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; ?>&amp;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; ?>&amp;s=4" <?php if(isset($_GET['s']) && $_GET['s'] == 4) echo "class=\"selected\""; ?>><?php echo EXPANSION; ?></a>
</div>