fix attacker hero in defender repport

This commit is contained in:
unknown
2012-05-04 13:18:03 +03:00
parent 4edea6643c
commit 77f6cf2bdd
4 changed files with 740 additions and 700 deletions
+163 -153
View File
@@ -1,24 +1,25 @@
<?php <?php
$dataarray = explode(",",$message->readingNotice['data']); $dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";}
?> ?>
<table cellpadding="1" cellspacing="1" id="report_surround"> <table cellpadding="1" cellspacing="1" id="report_surround">
<thead> <thead>
<tr> <tr>
<th>Subject:</th> <th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th> <th><?php echo $message->readingNotice['topic']; ?></th>
</tr> </tr>
<tr> <tr>
<?php <?php
$date = $generator->procMtime($message->readingNotice['time']); ?> $date = $generator->procMtime($message->readingNotice['time']); ?>
<td class="sent">Sent:</td> <td class="sent">Sent:</td>
<td>on <?php echo $date[0]."<span> at ".$date[1]; ?></span> <span>hour</span></td> <td>on <?php echo $date[0]."<span> at ".$date[1]; ?></span> <span>hour</span></td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr><td colspan="2" class="empty"></td></tr> <tr><td colspan="2" class="empty"></td></tr>
<tr><td colspan="2" class="report_content"> <tr><td colspan="2" class="report_content">
<table cellpadding="1" cellspacing="1" id="attacker"><thead> <table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr> <tr>
<td class="role">Attacker</td> <td class="role">Attacker</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> from 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="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from 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>
@@ -31,47 +32,56 @@ $dataarray = explode(",",$message->readingNotice['data']);
$tribe = $dataarray[2]; $tribe = $dataarray[2];
$start = ($tribe-1)*10+1; $start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) { for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) { for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>"; echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?> ?>
<tbody class="goods"><tr><th>Information</th><td colspan="10"> <tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" /> <img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?> <?php echo $dataarray[140]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } <?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?> ?>
<tbody class="goods"><tr><th>Information</th><td colspan="10"> <tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" /> <img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?> <?php echo $dataarray[142]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } <?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?> ?>
<tbody class="goods"><tr><th>Information</th><td colspan="10"> <tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" /> <img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?> <?php echo $dataarray[144]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } ?> <?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy <?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
@@ -81,8 +91,8 @@ if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
<?php echo $dataarray[146]; ?> <?php echo $dataarray[146]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } ?> <?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10"> <tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div> <div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</td></tr></tbody></table> </td></tr></tbody></table>
<?php <?php
@@ -91,37 +101,37 @@ $targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){ if ($dataarray[34]=='1'){
$start=1; ?> $start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='1'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='1'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) { for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) { for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -130,37 +140,37 @@ for($i=45;$i<=54;$i++) {
<?php } <?php }
if ($dataarray[55]=='1'){ if ($dataarray[55]=='1'){
$start=11;?> $start=11;?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='2'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='2'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) { for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) { for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -168,37 +178,37 @@ for($i=66;$i<=75;$i++) {
<?php } ?> <?php } ?>
<?php if ($dataarray[76]=='1'){ <?php if ($dataarray[76]=='1'){
$start=21; ?> $start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='3'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='3'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) { for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) { for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -208,37 +218,37 @@ for($i=87;$i<=96;$i++) {
if($dataarray[98]==1 and $dataarray[31]!=4){ if($dataarray[98]==1 and $dataarray[31]!=4){
if ($dataarray[97]=='1'){ if ($dataarray[97]=='1'){
$start=31; ?> $start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) { for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=118;$i<=127;$i++) { for($i=118;$i<=127;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -247,77 +257,77 @@ for($i=118;$i<=127;$i++) {
<?php } ?> <?php } ?>
<?php if ($dataarray[128]=='1'){ <?php if ($dataarray[128]=='1'){
$start=41; ?> $start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=129;$i<=138;$i++) { for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=139;$i<=148;$i++) { for($i=139;$i<=148;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
</tr></tbody></table> </tr></tbody></table>
<?php } <?php }
}else{ }else{
if ($dataarray[97]=='1'){ if ($dataarray[97]=='1'){
$start=31; ?> $start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) { for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) { for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -326,37 +336,37 @@ for($i=108;$i<=117;$i++) {
<?php } ?> <?php } ?>
<?php if ($dataarray[118]=='1'){ <?php if ($dataarray[118]=='1'){
$start=41; ?> $start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) { for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) { for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
+163 -153
View File
@@ -1,24 +1,25 @@
<?php <?php
$dataarray = explode(",",$message->readingNotice['data']); $dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";}
?> ?>
<table cellpadding="1" cellspacing="1" id="report_surround"> <table cellpadding="1" cellspacing="1" id="report_surround">
<thead> <thead>
<tr> <tr>
<th>Subject:</th> <th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th> <th><?php echo $message->readingNotice['topic']; ?></th>
</tr> </tr>
<tr> <tr>
<?php <?php
$date = $generator->procMtime($message->readingNotice['time']); ?> $date = $generator->procMtime($message->readingNotice['time']); ?>
<td class="sent">Sent:</td> <td class="sent">Sent:</td>
<td>on <?php echo $date[0]."<span> at ".$date[1]; ?></span> <span>hour</span></td> <td>on <?php echo $date[0]."<span> at ".$date[1]; ?></span> <span>hour</span></td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr><td colspan="2" class="empty"></td></tr> <tr><td colspan="2" class="empty"></td></tr>
<tr><td colspan="2" class="report_content"> <tr><td colspan="2" class="report_content">
<table cellpadding="1" cellspacing="1" id="attacker"><thead> <table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr> <tr>
<td class="role">Attacker</td> <td class="role">Attacker</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> from 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="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from 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>
@@ -31,47 +32,56 @@ $dataarray = explode(",",$message->readingNotice['data']);
$tribe = $dataarray[2]; $tribe = $dataarray[2];
$start = ($tribe-1)*10+1; $start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) { for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) { for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>"; echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?> ?>
<tbody class="goods"><tr><th>Information</th><td colspan="10"> <tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" /> <img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?> <?php echo $dataarray[140]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } <?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?> ?>
<tbody class="goods"><tr><th>Information</th><td colspan="10"> <tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" /> <img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?> <?php echo $dataarray[142]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } <?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?> ?>
<tbody class="goods"><tr><th>Information</th><td colspan="10"> <tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" /> <img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?> <?php echo $dataarray[144]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } ?> <?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy <?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
@@ -81,8 +91,8 @@ if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
<?php echo $dataarray[146]; ?> <?php echo $dataarray[146]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } ?> <?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10"> <tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div> <div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</td></tr></tbody></table> </td></tr></tbody></table>
<?php <?php
@@ -91,37 +101,37 @@ $targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){ if ($dataarray[34]=='1'){
$start=1; ?> $start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='1'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='1'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) { for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) { for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -130,37 +140,37 @@ for($i=45;$i<=54;$i++) {
<?php } <?php }
if ($dataarray[55]=='1'){ if ($dataarray[55]=='1'){
$start=11;?> $start=11;?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='2'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='2'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) { for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) { for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -168,37 +178,37 @@ for($i=66;$i<=75;$i++) {
<?php } ?> <?php } ?>
<?php if ($dataarray[76]=='1'){ <?php if ($dataarray[76]=='1'){
$start=21; ?> $start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='3'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='3'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) { for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) { for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -208,37 +218,37 @@ for($i=87;$i<=96;$i++) {
if($dataarray[98]==1 and $dataarray[31]!=4){ if($dataarray[98]==1 and $dataarray[31]!=4){
if ($dataarray[97]=='1'){ if ($dataarray[97]=='1'){
$start=31; ?> $start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) { for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=118;$i<=127;$i++) { for($i=118;$i<=127;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -247,77 +257,77 @@ for($i=118;$i<=127;$i++) {
<?php } ?> <?php } ?>
<?php if ($dataarray[128]=='1'){ <?php if ($dataarray[128]=='1'){
$start=41; ?> $start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=129;$i<=138;$i++) { for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=139;$i<=148;$i++) { for($i=139;$i<=148;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
</tr></tbody></table> </tr></tbody></table>
<?php } <?php }
}else{ }else{
if ($dataarray[97]=='1'){ if ($dataarray[97]=='1'){
$start=31; ?> $start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) { for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) { for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -326,37 +336,37 @@ for($i=108;$i<=117;$i++) {
<?php } ?> <?php } ?>
<?php if ($dataarray[118]=='1'){ <?php if ($dataarray[118]=='1'){
$start=41; ?> $start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) { for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) { for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
+163 -153
View File
@@ -1,24 +1,25 @@
<?php <?php
$dataarray = explode(",",$message->readingNotice['data']); $dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";}
?> ?>
<table cellpadding="1" cellspacing="1" id="report_surround"> <table cellpadding="1" cellspacing="1" id="report_surround">
<thead> <thead>
<tr> <tr>
<th>Subject:</th> <th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th> <th><?php echo $message->readingNotice['topic']; ?></th>
</tr> </tr>
<tr> <tr>
<?php <?php
$date = $generator->procMtime($message->readingNotice['time']); ?> $date = $generator->procMtime($message->readingNotice['time']); ?>
<td class="sent">Sent:</td> <td class="sent">Sent:</td>
<td>on <?php echo $date[0]."<span> at ".$date[1]; ?></span> <span>hour</span></td> <td>on <?php echo $date[0]."<span> at ".$date[1]; ?></span> <span>hour</span></td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr><td colspan="2" class="empty"></td></tr> <tr><td colspan="2" class="empty"></td></tr>
<tr><td colspan="2" class="report_content"> <tr><td colspan="2" class="report_content">
<table cellpadding="1" cellspacing="1" id="attacker"><thead> <table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr> <tr>
<td class="role">Attacker</td> <td class="role">Attacker</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> from 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="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from 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>
@@ -31,47 +32,56 @@ $dataarray = explode(",",$message->readingNotice['data']);
$tribe = $dataarray[2]; $tribe = $dataarray[2];
$start = ($tribe-1)*10+1; $start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) { for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) { for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>"; echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?> ?>
<tbody class="goods"><tr><th>Information</th><td colspan="10"> <tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" /> <img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?> <?php echo $dataarray[140]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } <?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?> ?>
<tbody class="goods"><tr><th>Information</th><td colspan="10"> <tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" /> <img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?> <?php echo $dataarray[142]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } <?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?> ?>
<tbody class="goods"><tr><th>Information</th><td colspan="10"> <tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" /> <img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?> <?php echo $dataarray[144]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } ?> <?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy <?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
@@ -81,8 +91,8 @@ if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
<?php echo $dataarray[146]; ?> <?php echo $dataarray[146]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } ?> <?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10"> <tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div> <div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</td></tr></tbody></table> </td></tr></tbody></table>
<?php <?php
@@ -91,37 +101,37 @@ $targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){ if ($dataarray[34]=='1'){
$start=1; ?> $start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='1'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='1'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) { for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) { for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -130,37 +140,37 @@ for($i=45;$i<=54;$i++) {
<?php } <?php }
if ($dataarray[55]=='1'){ if ($dataarray[55]=='1'){
$start=11;?> $start=11;?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='2'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='2'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) { for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) { for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -168,37 +178,37 @@ for($i=66;$i<=75;$i++) {
<?php } ?> <?php } ?>
<?php if ($dataarray[76]=='1'){ <?php if ($dataarray[76]=='1'){
$start=21; ?> $start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='3'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='3'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) { for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) { for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -208,37 +218,37 @@ for($i=87;$i<=96;$i++) {
if($dataarray[98]==1 and $dataarray[31]!=4){ if($dataarray[98]==1 and $dataarray[31]!=4){
if ($dataarray[97]=='1'){ if ($dataarray[97]=='1'){
$start=31; ?> $start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) { for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=118;$i<=127;$i++) { for($i=118;$i<=127;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -247,77 +257,77 @@ for($i=118;$i<=127;$i++) {
<?php } ?> <?php } ?>
<?php if ($dataarray[128]=='1'){ <?php if ($dataarray[128]=='1'){
$start=41; ?> $start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=129;$i<=138;$i++) { for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=139;$i<=148;$i++) { for($i=139;$i<=148;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
</tr></tbody></table> </tr></tbody></table>
<?php } <?php }
}else{ }else{
if ($dataarray[97]=='1'){ if ($dataarray[97]=='1'){
$start=31; ?> $start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) { for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) { for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -326,37 +336,37 @@ for($i=108;$i<=117;$i++) {
<?php } ?> <?php } ?>
<?php if ($dataarray[118]=='1'){ <?php if ($dataarray[118]=='1'){
$start=41; ?> $start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) { for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) { for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
+163 -153
View File
@@ -1,24 +1,25 @@
<?php <?php
$dataarray = explode(",",$message->readingNotice['data']); $dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";}
?> ?>
<table cellpadding="1" cellspacing="1" id="report_surround"> <table cellpadding="1" cellspacing="1" id="report_surround">
<thead> <thead>
<tr> <tr>
<th>Subject:</th> <th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th> <th><?php echo $message->readingNotice['topic']; ?></th>
</tr> </tr>
<tr> <tr>
<?php <?php
$date = $generator->procMtime($message->readingNotice['time']); ?> $date = $generator->procMtime($message->readingNotice['time']); ?>
<td class="sent">Sent:</td> <td class="sent">Sent:</td>
<td>on <?php echo $date[0]."<span> at ".$date[1]; ?></span> <span>hour</span></td> <td>on <?php echo $date[0]."<span> at ".$date[1]; ?></span> <span>hour</span></td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr><td colspan="2" class="empty"></td></tr> <tr><td colspan="2" class="empty"></td></tr>
<tr><td colspan="2" class="report_content"> <tr><td colspan="2" class="report_content">
<table cellpadding="1" cellspacing="1" id="attacker"><thead> <table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr> <tr>
<td class="role">Attacker</td> <td class="role">Attacker</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> from 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="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> from 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>
@@ -31,47 +32,56 @@ $dataarray = explode(",",$message->readingNotice['data']);
$tribe = $dataarray[2]; $tribe = $dataarray[2];
$start = ($tribe-1)*10+1; $start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) { for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) { for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
echo "</tr></tbody>"; echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?> ?>
<tbody class="goods"><tr><th>Information</th><td colspan="10"> <tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" /> <img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?> <?php echo $dataarray[140]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } <?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?> ?>
<tbody class="goods"><tr><th>Information</th><td colspan="10"> <tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" /> <img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?> <?php echo $dataarray[142]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } <?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?> ?>
<tbody class="goods"><tr><th>Information</th><td colspan="10"> <tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" /> <img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?> <?php echo $dataarray[144]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } ?> <?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy <?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
@@ -81,8 +91,8 @@ if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
<?php echo $dataarray[146]; ?> <?php echo $dataarray[146]; ?>
</td></tr></tbody> </td></tr></tbody>
<?php } ?> <?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10"> <tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div> <div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</td></tr></tbody></table> </td></tr></tbody></table>
<?php <?php
@@ -91,37 +101,37 @@ $targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){ if ($dataarray[34]=='1'){
$start=1; ?> $start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='1'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='1'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) { for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) { for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -130,37 +140,37 @@ for($i=45;$i<=54;$i++) {
<?php } <?php }
if ($dataarray[55]=='1'){ if ($dataarray[55]=='1'){
$start=11;?> $start=11;?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='2'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='2'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) { for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) { for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -168,37 +178,37 @@ for($i=66;$i<=75;$i++) {
<?php } ?> <?php } ?>
<?php if ($dataarray[76]=='1'){ <?php if ($dataarray[76]=='1'){
$start=21; ?> $start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='3'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='3'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) { for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) { for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -208,37 +218,37 @@ for($i=87;$i<=96;$i++) {
if($dataarray[98]==1 and $dataarray[31]!=4){ if($dataarray[98]==1 and $dataarray[31]!=4){
if ($dataarray[97]=='1'){ if ($dataarray[97]=='1'){
$start=31; ?> $start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) { for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=118;$i<=127;$i++) { for($i=118;$i<=127;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -247,77 +257,77 @@ for($i=118;$i<=127;$i++) {
<?php } ?> <?php } ?>
<?php if ($dataarray[128]=='1'){ <?php if ($dataarray[128]=='1'){
$start=41; ?> $start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=129;$i<=138;$i++) { for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=139;$i<=148;$i++) { for($i=139;$i<=148;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
</tr></tbody></table> </tr></tbody></table>
<?php } <?php }
}else{ }else{
if ($dataarray[97]=='1'){ if ($dataarray[97]=='1'){
$start=31; ?> $start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) { for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) { for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>
@@ -326,37 +336,37 @@ for($i=108;$i<=117;$i++) {
<?php } ?> <?php } ?>
<?php if ($dataarray[118]=='1'){ <?php if ($dataarray[118]=='1'){
$start=41; ?> $start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender"> <table cellpadding="1" cellspacing="1" class="defender">
<thead> <thead>
<tr> <tr>
<td class="role">Defender</th> <td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td> <td colspan="10"><?php if($targettribe=='5'){ echo'<a href="spieler.php?uid='.$database->getUserField($dataarray[28],"id",0).'">'.$database->getUserField($dataarray[28],"username",0).'</a> from the village <a href="karte.php?d='.$dataarray[29].'&amp;c='.$generator->getMapCheck($dataarray[29]).'">'.stripslashes($dataarray[30]).'</a>'; } else { echo"Reinforcement"; } ?></td>
</tr></thead> </tr></thead>
<tbody class="units"> <tbody class="units">
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php <?php
for($i=$start;$i<=($start+9);$i++) { 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>"; echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
} }
echo "</tr><tr><th>Troops</th>"; echo "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) { for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
echo "<tr><th>Casualties</th>"; echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) { for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) { if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>"; echo "<td class=\"none\">0</td>";
} }
else { else {
echo "<td>".$dataarray[$i]."</td>"; echo "<td>".$dataarray[$i]."</td>";
} }
} }
?> ?>