mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-24 03:57:15 +00:00
Additions
+Added the possibility to send units to another villages (spy, reinforcement, normal attack and raid) +Added the possibility to set the spying type and the catapult targets +Some changes in the DB
This commit is contained in:
+38
-160
@@ -1,161 +1,39 @@
|
||||
<h1>{$smarty.const.SEND_TROOPS}</h1>
|
||||
<table id="troops" cellpadding="1" cellspacing="1">
|
||||
<tbody>
|
||||
{$quantity = [[1, 4, 7 ,9], [2, 5, 8 ,10], [3, 6, 11]]}
|
||||
{$quantityCount = count($quantity) - 1}
|
||||
{$class = [
|
||||
1 => 'line-first column-first large',
|
||||
4 => 'line-first large',
|
||||
7 => 'line-first regular',
|
||||
9 => 'line-first column-last small',
|
||||
2 => 'column-first large',
|
||||
5 => 'large',
|
||||
8 => 'regular',
|
||||
10 => 'column-last small',
|
||||
3 => 'line-last column-first large',
|
||||
6 => 'line-last large',
|
||||
11 => 'line-last regular'
|
||||
]}
|
||||
|
||||
<input name="b" value="1" type="hidden">
|
||||
|
||||
|
||||
<table id="troops" cellpadding="1" cellspacing="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="line-first column-first large"><img class="unit u1"
|
||||
src="img/x.gif" title="Legionnaire"
|
||||
onclick="document.snd.t1.value=''; return false;" alt="Legionnaire">
|
||||
<input class="text"
|
||||
<?php if ($village->unitarray['u1']<=0) {echo ' disabled="disabled"';}?>
|
||||
name="t1" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u1'] > 0) {
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t1.value=" . $village->unitarray['u1'] . "; return false;\">(" . $village->unitarray['u1'] . ")</a></td>";
|
||||
} else {
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<td class="line-first large"><img class="unit u4" src="img/x.gif"
|
||||
title="Equites Legati" alt="Equites Legati"> <input class="text"
|
||||
<?php if ($village->unitarray['u4']<=0) {echo ' disabled="disabled"';}?>
|
||||
name="t4" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u4'] > 0) {
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t4.value=" . $village->unitarray['u4'] . "; return false;\">(" . $village->unitarray['u4'] . ")</a></td>";
|
||||
} else {
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<td class="line-first regular"><img class="unit u7" src="img/x.gif"
|
||||
title="Battering Ram" alt="Battering Ram"> <input class="text"
|
||||
<?php if ($village->unitarray['u7']<=0) {echo ' disabled="disabled"';}?>
|
||||
name="t7" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u7'] > 0) {
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t7.value=" . $village->unitarray['u7'] . "; return false;\">(" . $village->unitarray['u7'] . ")</a></td>";
|
||||
} else {
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="line-first column-last small"><img class="unit u9"
|
||||
src="img/x.gif" title="Senator" alt="Senator"> <input class="text"
|
||||
<?php if ($village->unitarray['u9']<=0) {echo ' disabled="disabled"';}?>
|
||||
name="t9" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u9'] > 0) {
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t9.value=" . $village->unitarray['u9'] . "; return false;\">(" . $village->unitarray['u9'] . ")</a></td>";
|
||||
} else {
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column-first large"><img class="unit u2" src="img/x.gif"
|
||||
title="Praetorian" alt="Praetorian"> <input class="text"
|
||||
<?php if ($village->unitarray['u2']<=0) {echo ' disabled="disabled"';}?>
|
||||
name="t2" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u2'] > 0) {
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t2.value=" . $village->unitarray['u2'] . "; return false;\">(" . $village->unitarray['u2'] . ")</a></td>";
|
||||
} else {
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<td class="large"><img class="unit u5" src="img/x.gif"
|
||||
title="Equites Imperatoris" alt="Equites Imperatoris"> <input
|
||||
class="text"
|
||||
<?php if ($village->unitarray['u5']<=0) {echo ' disabled="disabled"';}?>
|
||||
name="t5" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u5'] > 0) {
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t5.value=" . $village->unitarray['u5'] . "; return false;\">(" . $village->unitarray['u5'] . ")</a></td>";
|
||||
} else {
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<td class="regular"><img class="unit u8" src="img/x.gif"
|
||||
title="Fire Catapult" alt="Fire Catapult"> <input class="text"
|
||||
<?php if ($village->unitarray['u8']<=0) {echo ' disabled="disabled"';}?>
|
||||
name="t8" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u8'] > 0) {
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t8.value=" . $village->unitarray['u8'] . "; return false;\">(" . $village->unitarray['u8'] . ")</a></td>";
|
||||
} else {
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<td class="column-last small"><img class="unit u10" src="img/x.gif"
|
||||
title="Settler" alt="Settler"> <input class="text"
|
||||
<?php if ($village->unitarray['u10']<=0) {echo ' disabled="disabled"';}?>
|
||||
name="t10" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u10'] > 0) {
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t10.value=" . $village->unitarray['u10'] . "; return false;\">(" . $village->unitarray['u10'] . ")</a></td>";
|
||||
} else {
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line-last column-first large"><img class="unit u3"
|
||||
src="img/x.gif" title="Imperian" alt="Imperian"> <input
|
||||
class="text"
|
||||
<?php if ($village->unitarray['u3']<=0) {echo ' disabled="disabled"';}?>
|
||||
name="t3" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u3'] > 0) {
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t3.value=" . $village->unitarray['u3'] . "; return false;\">(" . $village->unitarray['u3'] . ")</a></td>";
|
||||
} else {
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<td class="line-last large"><img class="unit u6" src="img/x.gif"
|
||||
title="Equites Caesaris" alt="Equites Caesaris"> <input
|
||||
class="text"
|
||||
<?php if ($village->unitarray['u6']<=0) {echo ' disabled="disabled"';}?>
|
||||
name="t6" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u6'] > 0) {
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t6.value=" . $village->unitarray['u6'] . "; return false;\">(" . $village->unitarray['u6'] . ")</a></td>";
|
||||
} else {
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<td class="line-last regular"><?php
|
||||
if ($village->unitarray['hero'] > 0) {
|
||||
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
|
||||
}
|
||||
?></td>
|
||||
<td class="line-last column-last"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{for $i = 0 to $quantityCount}
|
||||
<tr>
|
||||
{for $j = 0 to count($quantity[$i]) - 1}
|
||||
{$type = $quantity[$i][$j]}
|
||||
{if $type == 11 && $villagePresentUnits.unitsArray[$type].amount == 0}
|
||||
{continue}
|
||||
{/if}
|
||||
<td class="{$class[$type]}">
|
||||
<img class="unit u{if $type <= 10}{($tribe - 1) * 10 + $type}{else}hero{/if}" src="assets/img/x.gif" onclick="document.getElementsByName('units[{$type}]')[0].value=''; return false;" title="{if $type <= 10}{$villagePresentUnits.unitsArray[$type].name}{else}{$smarty.const.U0}{/if}" alt="{if $type <= 10}{$villagePresentUnits.unitsArray[$type].name}{else}{$smarty.const.U0}{/if}">
|
||||
<input class="text" {if $villagePresentUnits.unitsArray[$type].amount == 0}disabled="disabled"{/if} name="units[{$type}]" maxlength="6" type="text" {if $units[$type] > 0}value="{$units[$type]}"{/if}>
|
||||
{if $villagePresentUnits.unitsArray[$type].amount > 0}
|
||||
<a href="#" onclick="document.getElementsByName('units[{$type}]')[0].value={$villagePresentUnits.unitsArray[$type].amount}; return false;">({$villagePresentUnits.unitsArray[$type].amount})</a>
|
||||
{else}
|
||||
<span class="none">(0)</span>
|
||||
{/if}
|
||||
</td>
|
||||
{/for}
|
||||
</tr>
|
||||
{/for}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user