fix some hero problems

This commit is contained in:
unknown
2012-05-20 16:50:12 +03:00
parent 5d82ddb51a
commit 04eee11d75
8 changed files with 47 additions and 10 deletions
+12 -1
View File
@@ -1,6 +1,7 @@
<?php
//reinforcement is underattack
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[24]) and $dataarray[24]!=0){$colspan="11";}else{$colspan="10";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -22,7 +23,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<table cellpadding="1" cellspacing="1" class="defender"><thead>
<tr>
<td class="role">Defender</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> in the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> in the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -34,6 +35,9 @@ $start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=4;$i<=13;$i++) {
if($dataarray[$i] == 0) {
@@ -43,6 +47,9 @@ for($i=4;$i<=13;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
echo "<td>$dataarray[24]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=14;$i<=23;$i++) {
if($dataarray[$i] == 0) {
@@ -52,6 +59,10 @@ for($i=14;$i<=23;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
if ($dataarray[25]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[25]</td>";
}
?>
</tr></tbody>
</table>
+12 -1
View File
@@ -1,6 +1,7 @@
<?php
//reinforcement is underattack
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[24]) and $dataarray[24]!=0){$colspan="11";}else{$colspan="10";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -22,7 +23,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<table cellpadding="1" cellspacing="1" class="defender"><thead>
<tr>
<td class="role">Defender</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> in the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> in the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -34,6 +35,9 @@ $start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=4;$i<=13;$i++) {
if($dataarray[$i] == 0) {
@@ -43,6 +47,9 @@ for($i=4;$i<=13;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
echo "<td>$dataarray[24]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=14;$i<=23;$i++) {
if($dataarray[$i] == 0) {
@@ -52,6 +59,10 @@ for($i=14;$i<=23;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
if ($dataarray[25]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[25]</td>";
}
?>
</tr></tbody>
</table>
+12 -1
View File
@@ -1,6 +1,7 @@
<?php
//reinforcement is underattack
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[24]) and $dataarray[24]!=0){$colspan="11";}else{$colspan="10";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -22,7 +23,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<table cellpadding="1" cellspacing="1" class="defender"><thead>
<tr>
<td class="role">Defender</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> in the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
<td colspan="<?php echo $colspan ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> in the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
@@ -34,6 +35,9 @@ $start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=4;$i<=13;$i++) {
if($dataarray[$i] == 0) {
@@ -43,6 +47,9 @@ for($i=4;$i<=13;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
echo "<td>$dataarray[24]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=14;$i<=23;$i++) {
if($dataarray[$i] == 0) {
@@ -52,6 +59,10 @@ for($i=14;$i<=23;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
if ($dataarray[25]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[25]</td>";
}
?>
</tr></tbody>
</table>
+1 -1
View File
@@ -106,7 +106,7 @@ $tocoor = $database->getCoor($enforce['vref']);
echo"<span class=\"none\">(".$enforce['u6'].")</span></td>";
if($enforce['hero']>0){
?>
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="hero" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="t11" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['hero'].")</span></td>";
}
+1 -1
View File
@@ -106,7 +106,7 @@ $tocoor = $database->getCoor($enforce['vref']);
echo"<span class=\"none\">(".$enforce['u26'].")</span></td>";
if($enforce['hero']>0){
?>
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="hero" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="t11" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['hero'].")</span></td>";
}
+1 -1
View File
@@ -107,7 +107,7 @@ $tocoor = $database->getCoor($enforce['vref']);
echo"<span class=\"none\">(".$enforce['u36'].")</span></td>";
if($enforce['hero']>0){
?>
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="hero" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="t11" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['hero'].")</span></td>";
}
+1 -1
View File
@@ -105,7 +105,7 @@ $tocoor = $database->getCoor($enforce['vref']);
echo"<span class=\"none\">(".$enforce['u6'].")</span></td>";
if($enforce['hero']>0){
?>
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="hero" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="t11" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
<?php
echo"<span class=\"none\">(".$enforce['hero'].")</span></td>";
}