mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-13 23:01:02 +00:00
more fixes
This commit is contained in:
@@ -20,5 +20,57 @@ if(!$session->goldclub) {
|
||||
<div id="raidList">
|
||||
<?php include "Templates/goldClub/farmlist.tpl"; ?>
|
||||
</div>
|
||||
<br />
|
||||
<table cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4">evasion settings</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></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 = ''; }
|
||||
?>
|
||||
<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>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$user = $database->getUserArray($session->uid, 1);
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<form action="build.php?id=39&t=99" method="POST">
|
||||
<br />
|
||||
<tr>
|
||||
Send troops away a maximun of <input class="text" type="text" name="maxevasion" value="<?php echo $user['maxevasion']; ?>" maxlength="3" style="width:50px;"> times
|
||||
<span class="none">(costs: <img src="<?php echo GP_LOCATE; ?>img/a/gold_g.gif" alt="Gold" title="Gold"/><b>2</b> 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" <?php if(!$market->merchantAvail()) { echo "DISABLED"; }?>/></p></form>
|
||||
</tr>
|
||||
</form>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@@ -136,7 +136,6 @@ if ($units[$y]['sort_type']==3){
|
||||
|
||||
|
||||
$to = $database->getMInfo($units[$y]['vref']);
|
||||
if($units[$y]['from'] != 0){
|
||||
?>
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
@@ -205,76 +204,6 @@ if($units[$y]['from'] != 0){
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="role"><a>?</a></td>
|
||||
<td colspan="<?php if($units[$y]['t11'] != 0) {echo"11";}else{echo"10";}?>"><a href="karte.php?d=<?php echo $to['wref']."&c=".$generator->getMapCheck($to['wref']); ?>"><?php echo "Returning to ".$to['name']; ?></a></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="units">
|
||||
<?php
|
||||
$tribe = $session->tribe;
|
||||
$start = ($tribe-1)*10+1;
|
||||
$end = ($tribe*10);
|
||||
echo "<tr><th> </th>";
|
||||
for($i=$start;$i<=($end);$i++) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
}
|
||||
if($units[$y]['t11'] != 0) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr><th>Troops</th>
|
||||
<?php
|
||||
for($i=1;$i<($units[$y]['t11'] != 0?12:11);$i++) {
|
||||
if($units[$y]['t'.$i] == 0) {
|
||||
echo "<td class=\"none\">0</td>";
|
||||
}
|
||||
else {
|
||||
echo "<td>";
|
||||
echo $units[$y]['t'.$i]."</td>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?php
|
||||
$totalres = $res['wood']+$res['clay']+$res['iron']+$res['crop'];
|
||||
if($units[$y]['attack_type']!=2 and $units[$y]['attack_type']!=1 and $totalres != ""){?>
|
||||
<tr><th>Bounty</th>
|
||||
|
||||
<td colspan="<?php if($units[$y]['t11'] == 0) {echo"10";}else{echo"11";}?>">
|
||||
<?php
|
||||
$totalcarry = $units[$y]['t1']*${'u'.$start.''}['cap']+$units[$y]['t2']*${'u'.($start+1).''}['cap']+$units[$y]['t3']*${'u'.($start+2).''}['cap']+$units[$y]['t4']*${'u'.($start+3).''}['cap']+$units[$y]['t5']*${'u'.($start+4).''}['cap']+$units[$y]['t6']*${'u'.($start+5).''}['cap']+$units[$y]['t7']*${'u'.($start+6).''}['cap']+$units[$y]['t8']*${'u'.($start+7).''}['cap']+$units[$y]['t9']*${'u'.($start+8).''}['cap']+$units[$y]['t10']*${'u'.($start+9).''}['cap'];
|
||||
echo "<div class=\"in small\"><img class=\"r1\" src=\"img/x.gif\" alt=\"Lumber\" title=\"Lumber\" />".$res['wood']."<img class=\"r2\" src=\"img/x.gif\" alt=\"Clay\" title=\"Clay\" />".$res['clay']."<img class=\"r3\" src=\"img/x.gif\" alt=\"Iron\" title=\"Iron\" />".$res['iron']."<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"Crop\" />".$res['crop']."</div>";
|
||||
echo "<div class=\"in small\"><img class=\"car\" src=\"gpack/travian_default/img/a/car.gif\" alt=\"carry\" title=\"carry\"/>".$totalres."/".$totalcarry."</div>";
|
||||
?>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrival</th>
|
||||
<td colspan="<?php if($units[$y]['t11'] == 0) {echo"10";}else{echo"11";}?>">
|
||||
<?php
|
||||
echo "<div class=\"in small\"><span id=timer".$timer.">".$generator->getTimeFormat($units[$y]['endtime']-time())."</span> h</div>";
|
||||
$datetime = $generator->procMtime($units[$y]['endtime']);
|
||||
echo "<div class=\"at small\">";
|
||||
if($datetime[0] != "today") {
|
||||
echo "on ".$datetime[0]." ";
|
||||
}
|
||||
echo "at ".$datetime[1]."</div>";
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
echo "<img class=\"unit u".$train['unit']."\" src=\"img/x.gif\" alt=\"".$train['name']."\" title=\"".$train['name']."\" />";
|
||||
echo $train['amt']." ".$train['name']."</td><td class=\"dur\">";
|
||||
if ($TrainCount == 1 ) {
|
||||
$NextFinished = $generator->getTimeFormat(($train['timestamp']-time())-($train['amt']-1)*$train['eachtime']);
|
||||
$NextFinished = $generator->getTimeFormat($train['timestamp2']-time());
|
||||
echo "<span id=timer1>".$generator->getTimeFormat($train['timestamp']-time())."</span>";
|
||||
} else {
|
||||
echo $generator->getTimeFormat($train['eachtime']*$train['amt']);
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
echo "<img class=\"unit u".$train['unit']."\" src=\"img/x.gif\" alt=\"".$train['name']."\" title=\"".$train['name']."\" />";
|
||||
echo $train['amt']." ".$train['name']."</td><td class=\"dur\">";
|
||||
if ($TrainCount == 1) {
|
||||
$NextFinished = $generator->getTimeFormat(($train['timestamp']-time())-($train['amt']-1)*$train['eachtime']);
|
||||
$NextFinished = $generator->getTimeFormat($train['timestamp2']-time());
|
||||
echo "<span id=timer1>".$generator->getTimeFormat($train['timestamp']-time())."</span>";
|
||||
} else {
|
||||
echo $generator->getTimeFormat($train['eachtime']*$train['amt']);
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
echo "<img class=\"unit u".$train['unit']."\" src=\"img/x.gif\" alt=\"".$train['name']."\" title=\"".$train['name']."\" />";
|
||||
echo $train['amt']." ".$train['name']."</td><td class=\"dur\">";
|
||||
if ($TrainCount == 1 ) {
|
||||
$NextFinished = $generator->getTimeFormat(($train['timestamp']-time())-($train['amt']-1)*$train['eachtime']);
|
||||
$NextFinished = $generator->getTimeFormat($train['timestamp2']-time());
|
||||
echo "<span id=timer1>".$generator->getTimeFormat($train['timestamp']-time())."</span>";
|
||||
} else {
|
||||
echo $generator->getTimeFormat($train['eachtime']*$train['amt']);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
echo "<img class=\"unit u".$train['unit']."\" src=\"img/x.gif\" alt=\"".$train['name']."\" title=\"".$train['name']."\" />";
|
||||
echo $train['amt']." ".$train['name']."</td><td class=\"dur\">";
|
||||
if ($TrainCount == 1 ) {
|
||||
$NextFinished = $generator->getTimeFormat(($train['timestamp']-time())-($train['amt']-1)*$train['eachtime']);
|
||||
$NextFinished = $generator->getTimeFormat($train['timestamp2']-time());
|
||||
echo "<span id=timer1>".$generator->getTimeFormat($train['timestamp']-time())."</span>";
|
||||
} else {
|
||||
echo $generator->getTimeFormat($train['eachtime']*$train['amt']);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
echo "<img class=\"unit u".$train['unit']."\" src=\"img/x.gif\" alt=\"".$train['name']."\" title=\"".$train['name']."\" />";
|
||||
echo $train['amt']." ".$train['name']."</td><td class=\"dur\">";
|
||||
if ($TrainCount == 1 ) {
|
||||
$NextFinished = $generator->getTimeFormat(($train['timestamp']-time())-($train['amt']-1)*$train['eachtime']);
|
||||
$NextFinished = $generator->getTimeFormat($train['timestamp2']-time());
|
||||
echo "<span id=timer1>".$generator->getTimeFormat($train['timestamp']-time())."</span>";
|
||||
} else {
|
||||
echo $generator->getTimeFormat($train['eachtime']*$train['amt']);
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
echo "<img class=\"unit u".$train['unit']."\" src=\"img/x.gif\" alt=\"".$train['name']."\" title=\"".$train['name']."\" />";
|
||||
echo $train['amt']." ".$train['name']."</td><td class=\"dur\">";
|
||||
if ($TrainCount == 1 ) {
|
||||
$NextFinished = $generator->getTimeFormat(($train['timestamp']-time())-($train['amt']-1)*$train['eachtime']);
|
||||
$NextFinished = $generator->getTimeFormat($train['timestamp2']-time());
|
||||
echo "<span id=timer1>".$generator->getTimeFormat($train['timestamp']-time())."</span>";
|
||||
} else {
|
||||
echo $generator->getTimeFormat($train['eachtime']*$train['amt']);
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
echo "<img class=\"unit u".$train['unit']."\" src=\"img/x.gif\" alt=\"".$train['name']."\" title=\"".$train['name']."\" />";
|
||||
echo $train['amt']." ".$train['name']."</td><td class=\"dur\">";
|
||||
if ($TrainCount == 1 ) {
|
||||
$NextFinished = $generator->getTimeFormat(($train['timestamp']-time())-($train['amt']-1)*$train['eachtime']);
|
||||
$NextFinished = $generator->getTimeFormat($train['timestamp2']-time());
|
||||
echo "<span id=timer1>".$generator->getTimeFormat($train['timestamp']-time())."</span>";
|
||||
} else {
|
||||
echo $generator->getTimeFormat($train['eachtime']*$train['amt']);
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
echo "<img class=\"unit u".$train['unit']."\" src=\"img/x.gif\" alt=\"".$train['name']."\" title=\"".$train['name']."\" />";
|
||||
echo $train['amt']." ".$train['name']."</td><td class=\"dur\">";
|
||||
if ($TrainCount == 1 ) {
|
||||
$NextFinished = $generator->getTimeFormat(($train['timestamp']-time())-($train['amt']-1)*$train['eachtime']);
|
||||
$NextFinished = $generator->getTimeFormat($train['timestamp2']-time());
|
||||
echo "<span id=timer1>".$generator->getTimeFormat($train['timestamp']-time())."</span>";
|
||||
} else {
|
||||
echo $generator->getTimeFormat($train['eachtime']*$train['amt']);
|
||||
|
||||
Reference in New Issue
Block a user