mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-14 16:46:08 +00:00
dd64b1e6c7
Refactor GoldClub
49 lines
1.2 KiB
Smarty
49 lines
1.2 KiB
Smarty
<?php
|
|
|
|
$start = ($session->tribe - 1) * 10 + 1;
|
|
$end = $start + 5;
|
|
|
|
/* build unit list once (keeps alignment safe) */
|
|
$units = [];
|
|
|
|
for ($i = $start; $i <= $end; $i++) {
|
|
|
|
if (in_array($i, [4, 14, 23])) {
|
|
continue;
|
|
}
|
|
|
|
$units[] = $i;
|
|
}
|
|
|
|
?>
|
|
|
|
<table class="transparent" id="raidList" cellspacing="1" cellpadding="1">
|
|
|
|
<tr>
|
|
<?php foreach ($units as $i): ?>
|
|
<td>
|
|
<label for="t<?php echo $i - $start + 1; ?>">
|
|
<img class="unit u<?php echo $i; ?>"
|
|
title="<?php echo $technology->getUnitName($i); ?>"
|
|
src="img/x.gif">
|
|
</label>
|
|
</td>
|
|
<?php endforeach; ?>
|
|
</tr>
|
|
|
|
<tr>
|
|
<?php foreach ($units as $i): ?>
|
|
<?php $index = $i - $start + 1; ?>
|
|
|
|
<td>
|
|
<input class="text"
|
|
id="t<?php echo $index; ?>"
|
|
type="text"
|
|
name="t<?php echo $index; ?>"
|
|
value="<?php echo (isset(${'t'.$index}) && ${'t'.$index} > 0) ? ${'t'.$index} : 0; ?>">
|
|
</td>
|
|
|
|
<?php endforeach; ?>
|
|
</tr>
|
|
|
|
</table> |