This commit is contained in:
Shadow
2013-12-02 19:01:40 +02:00
parent 3815cd8c49
commit 709e1fefa5
18 changed files with 722 additions and 493 deletions
+7 -3
View File
@@ -2563,7 +2563,7 @@ $wallimg = "<img src=\"".GP_LOCATE."img/g/g3".$targettribe."Icon.gif\" height=\"
for($i=1;$i<=10;$i++){
if($battlepart['casualties_attacker'][$i]){
if($from['owner'] == 3){
$database->addNotice($to['owner'],$to['wref'],$targetally,0,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
$database->addNotice($to['owner'],$to['wref'],$targetally,20,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
break;
}else if($unitsdead_att == $unitssend_att && $defspy){ //fix by ronix
$database->addNotice($to['owner'],$to['wref'],$targetally,20,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
@@ -2724,8 +2724,12 @@ $wallimg = "<img src=\"".GP_LOCATE."img/g/g3".$targettribe."Icon.gif\" height=\"
$endtime += $AttackArrivalTime;
if($type == 1) {
if($from['owner'] == 3) { //fix natar report by ronix
$database->addNotice($to['owner'],$to['wref'],$targetally,0,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
} else $database->addNotice($from['owner'],$to['wref'],$ownally,21,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
$database->addNotice($to['owner'],$to['wref'],$targetally,20,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
}elseif ($totaldead_att == 0 && $totaltraped_att == 0){
$database->addNotice($from['owner'],$to['wref'],$ownally,18,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
}else{
$database->addNotice($from['owner'],$to['wref'],$ownally,21,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
}
}else {
if ($totaldead_att == 0 && $totaltraped_att == 0){
$database->addNotice($from['owner'],$to['wref'],$ownally,1,''.addslashes($from['name']).' attacks '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
+3 -3
View File
@@ -158,7 +158,7 @@ class MYSQL_DB {
$q = "SELECT $field FROM " . TB_PREFIX . "users where username = '$ref'";
}
$result = mysql_query($q, $this->connection) or die(mysql_error());
if(mysql_num_rows($result)) {
if($result) {
$dbarray = mysql_fetch_array($result);
return $dbarray[$field];
}elseif($field=="username"){
@@ -841,10 +841,10 @@ class MYSQL_DB {
function getVillageField($ref, $field) {
$q = "SELECT $field FROM " . TB_PREFIX . "vdata where wref = $ref";
$result = mysql_query($q, $this->connection);
if(mysql_num_rows($result)) {
if($result){
$dbarray = mysql_fetch_array($result);
return $dbarray[$field];
}elseif($field=="name"){
}elseif($field=="name"){
return "??";
}else return 0;
}
+30 -59
View File
@@ -2,6 +2,28 @@
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[147]) and $dataarray[147]!=0){$colspan="11";}else{$colspan="10";}
if(isset($dataarray[149]) and $dataarray[149]!=0){$colspan2="11";}else{$colspan2="10";}
//attacker
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
//defender
if ($database->getUserField($dataarray[28],'username',0)!="??") {
$defuser_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[28],'id',0)."\">".$database->getUserField($dataarray[28],'username',0)."</a>";
}else{
$defuser_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[29],'name')!="??") {
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$database->getVillageField($dataarray[29],'name')."</a>";
}else{
$deffrom_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -23,7 +45,7 @@ if(isset($dataarray[149]) and $dataarray[149]!=0){$colspan2="11";}else{$colspan2
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> 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="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
@@ -136,13 +158,7 @@ $start=1; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='1'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -191,13 +207,7 @@ $start=11;?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='2'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -245,13 +255,7 @@ $start=21; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='3'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -300,13 +304,7 @@ $start=31; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid=">'.$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>
<tbody class="units">
<tr>
@@ -317,9 +315,6 @@ $start=31; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
@@ -329,9 +324,6 @@ for($i=98;$i<=107;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
@@ -341,10 +333,6 @@ for($i=108;$i<=117;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
@@ -355,26 +343,16 @@ $start=41; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="10"><?php if($targettribe=='5'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
@@ -384,9 +362,6 @@ for($i=119;$i<=128;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
@@ -396,12 +371,8 @@ for($i=129;$i<=138;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
</td></tr></tbody></table>
+11 -1
View File
@@ -1,5 +1,15 @@
<?php
$dataarray = explode(",",$message->readingNotice['data']);
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -20,7 +30,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<tr><td colspan="2" class="report_content">
<table cellpadding="1" cellspacing="1" id="trade"><thead><tr>
<td>&nbsp;</td>
<td><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>><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr></thead><tbody><tr>
<th>Resources</th>
<td>
+11 -1
View File
@@ -1,5 +1,15 @@
<?php
$dataarray = explode(",",$message->readingNotice['data']);
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
};
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -20,7 +30,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<tr><td colspan="2" class="report_content">
<table cellpadding="1" cellspacing="1" id="trade"><thead><tr>
<td>&nbsp;</td>
<td><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>><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr></thead><tbody><tr>
<th>Resources</th>
<td>
+11 -1
View File
@@ -1,5 +1,15 @@
<?php
$dataarray = explode(",",$message->readingNotice['data']);
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -20,7 +30,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<tr><td colspan="2" class="report_content">
<table cellpadding="1" cellspacing="1" id="trade"><thead><tr>
<td>&nbsp;</td>
<td><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>><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr></thead><tbody><tr>
<th>Resources</th>
<td>
+11 -1
View File
@@ -1,5 +1,15 @@
<?php
$dataarray = explode(",",$message->readingNotice['data']);
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -20,7 +30,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<tr><td colspan="2" class="report_content">
<table cellpadding="1" cellspacing="1" id="trade"><thead><tr>
<td>&nbsp;</td>
<td><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>><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr></thead><tbody><tr>
<th>Resources</th>
<td>
+11 -1
View File
@@ -1,5 +1,15 @@
<?php
$dataarray = explode(",",$message->readingNotice['data']);
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -20,7 +30,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<tr><td colspan="2" class="report_content">
<table cellpadding="1" cellspacing="1" id="trade"><thead><tr>
<td>&nbsp;</td>
<td><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>><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr></thead><tbody><tr>
<th>Resources</th>
<td>
+70 -9
View File
@@ -1,5 +1,36 @@
<?php
############################################################
## DO NOT REMOVE THIS NOTICE ##
## FIX BY RONIX ##
## TRAVIANZ ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
$colspan="10";
if(isset($dataarray[150]) and $dataarray[150]!=0){$colspan2="11";}else{$colspan2="10";}
//attacker
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
//defender
if ($database->getUserField($dataarray[28],'username',0)!="??") {
$defuser_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[28],'id',0)."\">".$database->getUserField($dataarray[28],'username',0)."</a>";
}else{
$defuser_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->isVillageOases($dataarray[29])){
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$dataarray[30]."</a>";
}elseif($database->getVillageField($dataarray[29],'name')!="??") {
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$database->getVillageField($dataarray[29],'name')."</a>";
}else{
$deffrom_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -21,7 +52,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<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="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
@@ -61,9 +92,9 @@ for($i=152;$i<=161;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
if ($dataarray[161]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[161]</td>";
if(isset($dataarray[148]) and $dataarray[148]!=0){
if ($dataarray[162]==0) $tdclass='class="none"'; else $tdclass="";
echo "<td $tdclass>$dataarray[162]</td>";
}
}
echo "</tr></tbody>";
@@ -107,7 +138,7 @@ $start=1; ?>
<thead>
<tr>
<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="<?php echo $colspan2; ?>"><?php if($targettribe=='1'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -118,6 +149,9 @@ $start=1; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '1' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) {
@@ -127,6 +161,9 @@ for($i=35;$i<=44;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '1' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td>$dataarray[150]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
@@ -136,6 +173,10 @@ for($i=45;$i<=54;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '1' and isset($dataarray[150]) and $dataarray[150]!=0){
if ($dataarray[151]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[151]</td>";
}
?>
</tr></tbody></table>
@@ -146,7 +187,7 @@ $start=11;?>
<thead>
<tr>
<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="<?php echo $colspan2; ?>"><?php if($targettribe=='2'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -157,6 +198,9 @@ $start=11;?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '2' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) {
@@ -166,6 +210,9 @@ for($i=56;$i<=65;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '2' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td>$dataarray[150]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) {
@@ -175,6 +222,10 @@ for($i=66;$i<=75;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '2' and isset($dataarray[150]) and $dataarray[150]!=0){
if ($dataarray[151]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[151]</td>";
}
?>
</tr></tbody></table>
<?php } ?>
@@ -184,7 +235,7 @@ $start=21; ?>
<thead>
<tr>
<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="<?php echo $colspan2; ?>"><?php if($targettribe=='3'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -195,6 +246,9 @@ $start=21; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '3' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) {
@@ -204,6 +258,9 @@ for($i=77;$i<=86;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '3' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td>$dataarray[150]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) {
@@ -213,6 +270,10 @@ for($i=87;$i<=96;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '3' and isset($dataarray[150]) and $dataarray[150]!=0){
if ($dataarray[151]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[151]</td>";
}
?>
</tr></tbody></table>
@@ -223,7 +284,7 @@ $start=31; ?>
<thead>
<tr>
<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],"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>
<tbody class="units">
<tr>
@@ -262,7 +323,7 @@ $start=41; ?>
<thead>
<tr>
<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 $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
+45 -17
View File
@@ -1,5 +1,35 @@
<?php
############################################################
## DO NOT REMOVE THIS NOTICE ##
## FIX BY RONIX ##
## TRAVIANZ ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
$colspan2="10";
//attacker
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
//defender
if ($database->getUserField($dataarray[28],'username',0)!="??") {
$defuser_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[28],'id',0)."\">".$database->getUserField($dataarray[28],'username',0)."</a>";
}else{
$defuser_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->isVillageOases($dataarray[29])){
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$dataarray[30]."</a>";
}elseif($database->getVillageField($dataarray[29],'name')!="??") {
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$database->getVillageField($dataarray[29],'name')."</a>";
}else{
$deffrom_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -21,7 +51,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<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="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
@@ -51,9 +81,9 @@ for($i=13;$i<=22;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($dataarray[152] != 0 or $dataarray[153] != 0 or $dataarray[154] != 0 or $dataarray[155] != 0 or $dataarray[156] != 0 or $dataarray[157] != 0 or $dataarray[158] != 0 or $dataarray[159] != 0 or $dataarray[160] != 0 or $dataarray[161] != 0){
if($dataarray[153] != 0 or $dataarray[154] != 0 or $dataarray[155] != 0 or $dataarray[156] != 0 or $dataarray[157] != 0 or $dataarray[158] != 0 or $dataarray[159] != 0 or $dataarray[160] != 0 or $dataarray[161] != 0 or $dataarray[162] != 0){
echo "</tr><tr><th>Prisoners</th>";
for($i=152;$i<=161;$i++) {
for($i=153;$i<=162;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
@@ -61,15 +91,13 @@ for($i=152;$i<=161;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
if ($dataarray[161]==0) $tdclass='class="none"'; else $tdclass='';
echo "<td $tdclass>$dataarray[161]</td>";
}
}
if(isset($dataarray[171]) && $dataarray[171] !=''){
echo $dataarray[171];
}
echo "</tr></tbody>";?>
if(isset($dataarray[171]) && $dataarray[171] !=''){ //troop not return
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[171]; ?>
</td></tr></tbody>
<?php }?>
</table>
<?php
@@ -82,7 +110,7 @@ $start=1; ?>
<thead>
<tr>
<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="<?php echo $colspan2; ?>"><?php if($targettribe=='1'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -121,7 +149,7 @@ $start=11;?>
<thead>
<tr>
<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="<?php echo $colspan2; ?>"><?php if($targettribe=='2'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -159,7 +187,7 @@ $start=21; ?>
<thead>
<tr>
<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="<?php echo $colspan2; ?>"><?php if($targettribe=='3'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -198,7 +226,7 @@ $start=31; ?>
<thead>
<tr>
<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],"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>
<tbody class="units">
<tr>
@@ -237,7 +265,7 @@ $start=41; ?>
<thead>
<tr>
<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 $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -270,4 +298,4 @@ for($i=129;$i<=138;$i++) {
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
</td></tr></tbody></table>
+35 -59
View File
@@ -1,7 +1,34 @@
<?php
############################################################
## DO NOT REMOVE THIS NOTICE ##
## FIX BY RONIX ##
## TRAVIANZ ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[147]) and $dataarray[147]!=0){$colspan="11";}else{$colspan="10";}
if(isset($dataarray[149]) and $dataarray[149]!=0){$colspan2="11";}else{$colspan2="10";}
//attacker
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
//defender
if ($database->getUserField($dataarray[28],'username',0)!="??") {
$defuser_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[28],'id',0)."\">".$database->getUserField($dataarray[28],'username',0)."</a>";
}else{
$defuser_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[29],'name')!="??") {
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$database->getVillageField($dataarray[29],'name')."</a>";
}else{
$deffrom_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -23,7 +50,7 @@ if(isset($dataarray[149]) and $dataarray[149]!=0){$colspan2="11";}else{$colspan2
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> 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="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
@@ -136,13 +163,7 @@ $start=1; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='1'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -191,13 +212,7 @@ $start=11;?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='2'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -245,13 +260,7 @@ $start=21; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='3'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -300,13 +309,7 @@ $start=31; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid=">'.$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>
<tbody class="units">
<tr>
@@ -317,9 +320,6 @@ $start=31; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
@@ -329,9 +329,6 @@ for($i=98;$i<=107;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
@@ -341,10 +338,6 @@ for($i=108;$i<=117;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
@@ -355,26 +348,16 @@ $start=41; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="10"><?php if($targettribe=='5'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
@@ -384,9 +367,6 @@ for($i=119;$i<=128;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
@@ -396,12 +376,8 @@ for($i=129;$i<=138;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
</td></tr></tbody></table>
+70 -9
View File
@@ -1,5 +1,36 @@
<?php
############################################################
## DO NOT REMOVE THIS NOTICE ##
## FIX BY RONIX ##
## TRAVIANZ ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
$colspan="10";
if(isset($dataarray[150]) and $dataarray[150]!=0){$colspan2="11";}else{$colspan2="10";}
//attacker
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
//defender
if ($database->getUserField($dataarray[28],'username',0)!="??") {
$defuser_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[28],'id',0)."\">".$database->getUserField($dataarray[28],'username',0)."</a>";
}else{
$defuser_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->isVillageOases($dataarray[29])){
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$dataarray[30]."</a>";
}elseif($database->getVillageField($dataarray[29],'name')!="??") {
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$database->getVillageField($dataarray[29],'name')."</a>";
}else{
$deffrom_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -21,7 +52,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<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="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
@@ -61,9 +92,9 @@ for($i=152;$i<=161;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
if ($dataarray[161]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[161]</td>";
if(isset($dataarray[148]) and $dataarray[148]!=0){
if ($dataarray[162]==0) $tdclass='class="none"'; else $tdclass="";
echo "<td $tdclass>$dataarray[162]</td>";
}
}
echo "</tr></tbody>";
@@ -107,7 +138,7 @@ $start=1; ?>
<thead>
<tr>
<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="<?php echo $colspan2; ?>"><?php if($targettribe=='1'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -118,6 +149,9 @@ $start=1; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '1' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) {
@@ -127,6 +161,9 @@ for($i=35;$i<=44;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '1' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td>$dataarray[150]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
@@ -136,6 +173,10 @@ for($i=45;$i<=54;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '1' and isset($dataarray[150]) and $dataarray[150]!=0){
if ($dataarray[151]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[151]</td>";
}
?>
</tr></tbody></table>
@@ -146,7 +187,7 @@ $start=11;?>
<thead>
<tr>
<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="<?php echo $colspan2; ?>"><?php if($targettribe=='2'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -157,6 +198,9 @@ $start=11;?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '2' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) {
@@ -166,6 +210,9 @@ for($i=56;$i<=65;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '2' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td>$dataarray[150]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) {
@@ -175,6 +222,10 @@ for($i=66;$i<=75;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '2' and isset($dataarray[150]) and $dataarray[150]!=0){
if ($dataarray[151]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[151]</td>";
}
?>
</tr></tbody></table>
<?php } ?>
@@ -184,7 +235,7 @@ $start=21; ?>
<thead>
<tr>
<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="<?php echo $colspan2; ?>"><?php if($targettribe=='3'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -195,6 +246,9 @@ $start=21; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '3' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) {
@@ -204,6 +258,9 @@ for($i=77;$i<=86;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '3' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td>$dataarray[150]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) {
@@ -213,6 +270,10 @@ for($i=87;$i<=96;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '3' and isset($dataarray[150]) and $dataarray[150]!=0){
if ($dataarray[151]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[151]</td>";
}
?>
</tr></tbody></table>
@@ -223,7 +284,7 @@ $start=31; ?>
<thead>
<tr>
<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],"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>
<tbody class="units">
<tr>
@@ -262,7 +323,7 @@ $start=41; ?>
<thead>
<tr>
<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 $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
+70 -9
View File
@@ -1,5 +1,36 @@
<?php
############################################################
## DO NOT REMOVE THIS NOTICE ##
## FIX BY RONIX ##
## TRAVIANZ ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
$colspan="10";
if(isset($dataarray[150]) and $dataarray[150]!=0){$colspan2="11";}else{$colspan2="10";}
//attacker
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
//defender
if ($database->getUserField($dataarray[28],'username',0)!="??") {
$defuser_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[28],'id',0)."\">".$database->getUserField($dataarray[28],'username',0)."</a>";
}else{
$defuser_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->isVillageOases($dataarray[29])){
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$dataarray[30]."</a>";
}elseif($database->getVillageField($dataarray[29],'name')!="??") {
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$database->getVillageField($dataarray[29],'name')."</a>";
}else{
$deffrom_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -21,7 +52,7 @@ $dataarray = explode(",",$message->readingNotice['data']);
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<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="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
@@ -61,9 +92,9 @@ for($i=152;$i<=161;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
if ($dataarray[161]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[161]</td>";
if(isset($dataarray[148]) and $dataarray[148]!=0){
if ($dataarray[162]==0) $tdclass='class="none"'; else $tdclass="";
echo "<td $tdclass>$dataarray[162]</td>";
}
}
echo "</tr></tbody>";
@@ -107,7 +138,7 @@ $start=1; ?>
<thead>
<tr>
<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="<?php echo $colspan2; ?>"><?php if($targettribe=='1'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -118,6 +149,9 @@ $start=1; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '1' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) {
@@ -127,6 +161,9 @@ for($i=35;$i<=44;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '1' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td>$dataarray[150]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
@@ -136,6 +173,10 @@ for($i=45;$i<=54;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '1' and isset($dataarray[150]) and $dataarray[150]!=0){
if ($dataarray[151]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[151]</td>";
}
?>
</tr></tbody></table>
@@ -146,7 +187,7 @@ $start=11;?>
<thead>
<tr>
<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="<?php echo $colspan2; ?>"><?php if($targettribe=='2'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -157,6 +198,9 @@ $start=11;?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '2' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) {
@@ -166,6 +210,9 @@ for($i=56;$i<=65;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '2' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td>$dataarray[150]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) {
@@ -175,6 +222,10 @@ for($i=66;$i<=75;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '2' and isset($dataarray[150]) and $dataarray[150]!=0){
if ($dataarray[151]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[151]</td>";
}
?>
</tr></tbody></table>
<?php } ?>
@@ -184,7 +235,7 @@ $start=21; ?>
<thead>
<tr>
<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="<?php echo $colspan2; ?>"><?php if($targettribe=='3'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -195,6 +246,9 @@ $start=21; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '3' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) {
@@ -204,6 +258,9 @@ for($i=77;$i<=86;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '3' and isset($dataarray[150]) and $dataarray[150]!=0){
echo "<td>$dataarray[150]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) {
@@ -213,6 +270,10 @@ for($i=87;$i<=96;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '3' and isset($dataarray[150]) and $dataarray[150]!=0){
if ($dataarray[151]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[151]</td>";
}
?>
</tr></tbody></table>
@@ -223,7 +284,7 @@ $start=31; ?>
<thead>
<tr>
<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],"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>
<tbody class="units">
<tr>
@@ -262,7 +323,7 @@ $start=41; ?>
<thead>
<tr>
<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 $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
+153 -130
View File
@@ -1,34 +1,57 @@
<?php
############################################################
## DO NOT REMOVE THIS NOTICE ##
## ADVOCAITE ROCKS TRAVIANX NUTS ##
## GIT HUB REV ##
## DO NOT REMOVE THIS NOTICE ##
## ADVOCAITE ROCKS TRAVIANX NUTS ##
## FIX BY RONIX ##
## TRAVIANZ ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[151]) and $dataarray[151]!=0){$colspan="11";}else{$colspan="10";}
$colspan2 = 10;
//attacker
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
//defender
if ($database->getUserField($dataarray[28],'username',0)!="??") {
$defuser_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[28],'id',0)."\">".$database->getUserField($dataarray[28],'username',0)."</a>";
}else{
$defuser_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[29],'name')!="??") {
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$database->getVillageField($dataarray[29],'name')."</a>";
}else{
$deffrom_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<tr>
<?php
<tr>
<?php
$date = $generator->procMtime($message->readingNotice['time']); ?>
<td class="sent">Sent:</td>
<td>on <?php echo $date[0]."<span> at ".$date[1]; ?></span> <span>hour</span></td>
</tr>
</thead>
<tbody>
<tr><td colspan="2" class="empty"></td></tr>
<tr><td colspan="2" class="report_content">
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<td class="sent">Sent:</td>
<td>on <?php echo $date[0]."<span> at ".$date[1]; ?></span> <span>hour</span></td>
</tr>
</thead>
<tbody>
<tr><td colspan="2" class="empty"></td></tr>
<tr><td colspan="2" class="report_content">
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> 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="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
@@ -38,112 +61,112 @@ $colspan2 = 10;
$tribe = $dataarray[2];
$start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if(isset($dataarray[151]) and $dataarray[151]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[151]) and $dataarray[151]!=0){
echo "<td>$dataarray[151]</td>";
echo "<td>$dataarray[151]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[151]) and $dataarray[151]!=0){
if ($dataarray[152]==0) $tdclass='class="none"'; else $tdclass='';
echo "<td $tdclass>$dataarray[152]</td>";
if ($dataarray[152]==0) $tdclass='class="none"'; else $tdclass='';
echo "<td $tdclass>$dataarray[152]</td>";
}
if($dataarray[153] != 0 or $dataarray[154] != 0 or $dataarray[155] != 0 or $dataarray[156] != 0 or $dataarray[157] != 0 or $dataarray[158] != 0 or $dataarray[159] != 0 or $dataarray[160] != 0 or $dataarray[161] != 0 or $dataarray[162] != 0){
echo "</tr><tr><th>Prisoners</th>";
for($i=153;$i<=162;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[151]) and $dataarray[151]!=0){
if ($dataarray[163]==0) $tdclass='class="none"'; else $tdclass='';
echo "<td $tdclass>$dataarray[163]</td>";
if ($dataarray[163]==0) $tdclass='class="none"'; else $tdclass='';
echo "<td $tdclass>$dataarray[163]</td>";
}
}
if ($dataarray[165]!='' and $dataarray[166]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[165]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[166]; ?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[165]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[166]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[167]!='' and $dataarray[168]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[167]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[168]; ?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[167]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[168]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[169]!='' and $dataarray[170]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[169]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[170]; ?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[169]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[170]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[172]!='' and $dataarray[173]!=''){ //hero
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[172]; ?>" src="img/x.gif" alt="Hero" title="Hero" />
<?php echo $dataarray[173]; ?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[172]; ?>" src="img/x.gif" alt="Hero" title="Hero" />
<?php echo $dataarray[173]; ?>
</td></tr></tbody>
<?php }
if(isset($dataarray[171]) && $dataarray[171] !=''){ //troop not return
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[171]; ?>
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[171]; ?>
</td></tr></tbody>
<?php }?>
</td></tr></tbody>
</table>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[31]=='1'){
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?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>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='1'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
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>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == "?") {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
@@ -152,7 +175,7 @@ for($i=35;$i<=44;$i++) {
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == "?") {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
@@ -164,25 +187,25 @@ for($i=45;$i<=54;$i++) {
<?php }
if ($dataarray[31]=='2'){
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?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>
<tbody class="units">
<tr>
<td>&nbsp;</td>
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='2'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
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>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == "?") {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
@@ -191,7 +214,7 @@ for($i=56;$i<=65;$i++) {
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == "?") {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
@@ -202,25 +225,25 @@ for($i=66;$i<=75;$i++) {
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[31]=='3'){
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?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>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='3'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
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>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == "?") {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
@@ -229,7 +252,7 @@ for($i=77;$i<=86;$i++) {
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == "?") {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
@@ -241,25 +264,25 @@ for($i=87;$i<=96;$i++) {
<?php } ?>
<?php if ($dataarray[31]=='4'){
$start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?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>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid=">'.$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>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
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>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == "?") {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
@@ -268,7 +291,7 @@ for($i=98;$i<=107;$i++) {
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == "?") {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
@@ -280,25 +303,25 @@ for($i=108;$i<=117;$i++) {
<?php } ?>
<?php if ($dataarray[31]=='5'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?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>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="10"><?php if($targettribe=='5'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
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>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == "?") {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
@@ -307,7 +330,7 @@ for($i=119;$i<=128;$i++) {
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == "?") {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
+37 -60
View File
@@ -1,7 +1,34 @@
<?php
############################################################
## DO NOT REMOVE THIS NOTICE ##
## FIX BY RONIX ##
## TRAVIANZ ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[147]) and $dataarray[147]!=0){$colspan="11";}else{$colspan="10";}
if(isset($dataarray[149]) and $dataarray[149]!=0){$colspan2="11";}else{$colspan2="10";}
//attacker
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
//defender
if ($database->getUserField($dataarray[28],'username',0)!="??") {
$defuser_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[28],'id',0)."\">".$database->getUserField($dataarray[28],'username',0)."</a>";
}else{
$defuser_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[29],'name')!="??") {
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$database->getVillageField($dataarray[29],'name')."</a>";
}else{
$deffrom_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -23,7 +50,7 @@ if(isset($dataarray[149]) and $dataarray[149]!=0){$colspan2="11";}else{$colspan2
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> 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="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
@@ -124,9 +151,9 @@ if ($dataarray[165]!='' and $dataarray[166]!=''){ //hero
</td></tr></tbody>
<?php }
if(isset($dataarray[164]) && $dataarray[164] !=''){ //troop not return
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[164]; ?>
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[164]; ?>
</td></tr></tbody>
<?php }?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="<?php echo $colspan; ?>">
@@ -142,13 +169,7 @@ $start=1; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='1'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -197,13 +218,7 @@ $start=11;?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='2'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -251,13 +266,7 @@ $start=21; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='3'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -306,13 +315,7 @@ $start=31; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid=">'.$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>
<tbody class="units">
<tr>
@@ -323,9 +326,6 @@ $start=31; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
@@ -335,9 +335,6 @@ for($i=98;$i<=107;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
@@ -347,10 +344,6 @@ for($i=108;$i<=117;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
@@ -361,13 +354,7 @@ $start=41; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="10"><?php if($targettribe=='5'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -378,9 +365,6 @@ $start=41; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
@@ -390,9 +374,6 @@ for($i=119;$i<=128;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
@@ -402,12 +383,8 @@ for($i=129;$i<=138;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
</td></tr></tbody></table>
+36 -59
View File
@@ -1,7 +1,34 @@
<?php
############################################################
## DO NOT REMOVE THIS NOTICE ##
## FIX BY RONIX ##
## TRAVIANZ ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[147]) and $dataarray[147]!=0){$colspan="11";}else{$colspan="10";}
if(isset($dataarray[149]) and $dataarray[149]!=0){$colspan2="11";}else{$colspan2="10";}
//attacker
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
//defender
if ($database->getUserField($dataarray[28],'username',0)!="??") {
$defuser_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[28],'id',0)."\">".$database->getUserField($dataarray[28],'username',0)."</a>";
}else{
$defuser_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[29],'name')!="??") {
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$database->getVillageField($dataarray[29],'name')."</a>";
}else{
$deffrom_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -23,7 +50,7 @@ if(isset($dataarray[149]) and $dataarray[149]!=0){$colspan2="11";}else{$colspan2
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> 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="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
@@ -125,8 +152,8 @@ if ($dataarray[165]!='' and $dataarray[166]!=''){ //hero
<?php }
if(isset($dataarray[164]) && $dataarray[164] !=''){ //troop not return
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[164]; ?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[164]; ?>
</td></tr></tbody>
<?php }?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="<?php echo $colspan; ?>">
@@ -142,13 +169,7 @@ $start=1; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='1'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -197,13 +218,7 @@ $start=11;?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='2'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -251,13 +266,7 @@ $start=21; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='3'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -306,13 +315,7 @@ $start=31; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid=">'.$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>
<tbody class="units">
<tr>
@@ -323,9 +326,6 @@ $start=31; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
@@ -335,9 +335,6 @@ for($i=98;$i<=107;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
@@ -347,10 +344,6 @@ for($i=108;$i<=117;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
@@ -361,13 +354,7 @@ $start=41; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="10"><?php if($targettribe=='5'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -378,9 +365,6 @@ $start=41; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
@@ -390,9 +374,6 @@ for($i=119;$i<=128;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
@@ -402,12 +383,8 @@ for($i=129;$i<=138;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
</td></tr></tbody></table>
+34 -57
View File
@@ -1,7 +1,34 @@
<?php
############################################################
## DO NOT REMOVE THIS NOTICE ##
## FIX BY RONIX ##
## TRAVIANZ ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[147]) and $dataarray[147]!=0){$colspan="11";}else{$colspan="10";}
if(isset($dataarray[149]) and $dataarray[149]!=0){$colspan2="11";}else{$colspan2="10";}
//attacker
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
//defender
if ($database->getUserField($dataarray[28],'username',0)!="??") {
$defuser_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[28],'id',0)."\">".$database->getUserField($dataarray[28],'username',0)."</a>";
}else{
$defuser_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[29],'name')!="??") {
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$database->getVillageField($dataarray[29],'name')."</a>";
}else{
$deffrom_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -23,7 +50,7 @@ if(isset($dataarray[149]) and $dataarray[149]!=0){$colspan2="11";}else{$colspan2
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> 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="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
@@ -136,13 +163,7 @@ $start=1; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='1'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -191,13 +212,7 @@ $start=11;?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='2'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -245,13 +260,7 @@ $start=21; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="<?php echo $colspan2; ?>"><?php if($targettribe=='3'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -300,13 +309,7 @@ $start=31; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="10"><?php if($targettribe=='4'){ echo'<a href="spieler.php?uid=">'.$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>
<tbody class="units">
<tr>
@@ -317,9 +320,6 @@ $start=31; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
@@ -329,9 +329,6 @@ for($i=98;$i<=107;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
@@ -341,10 +338,6 @@ for($i=108;$i<=117;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '4' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
@@ -355,13 +348,7 @@ $start=41; ?>
<thead>
<tr>
<td class="role">Defender</th>
<?php
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php }else{ ?>
<td colspan="<?php echo $colspan2; ?>"><?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>
<?php } ?>
<td colspan="10"><?php if($targettribe=='5'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -372,9 +359,6 @@ $start=41; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
@@ -384,9 +368,6 @@ for($i=119;$i<=128;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
@@ -396,12 +377,8 @@ for($i=129;$i<=138;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '5' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
</td></tr></tbody></table>
+77 -14
View File
@@ -1,7 +1,34 @@
<?php
############################################################
## DO NOT REMOVE THIS NOTICE ##
## FIX BY RONIX ##
## TRAVIANZ ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";}
$colspan2 = 10;
if(isset($dataarray[149]) and $dataarray[149]!=0){$colspan2="11";}else{$colspan2="10";}
//attacker
if ($database->getUserField($dataarray[0],'username',0)!="??") {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[0],'id',0)."\">".$database->getUserField($dataarray[0],'username',0)."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[1],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[1]."&c=".$generator->getMapCheck($dataarray[1])."\">".$database->getVillageField($dataarray[1],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
}
//defender
if ($database->getUserField($dataarray[28],'username',0)!="??") {
$defuser_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[28],'id',0)."\">".$database->getUserField($dataarray[28],'username',0)."</a>";
}else{
$defuser_url="<font color=\"grey\"><b>??</b></font>";
}
if($database->getVillageField($dataarray[29],'name')!="??") {
$deffrom_url="<a href=\"karte.php?d=".$dataarray[29]."&c=".$generator->getMapCheck($dataarray[29])."\">".$database->getVillageField($dataarray[29],'name')."</a>";
}else{
$deffrom_url="<font color=\"grey\"><b>??</b></font>";
}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -23,7 +50,7 @@ $colspan2 = 10;
<table cellpadding="1" cellspacing="1" id="attacker"><thead>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan; ?>"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> 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="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
@@ -60,7 +87,7 @@ for($i=13;$i<=22;$i++) {
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
if ($dataarray[148]==0) $tdclass='class="none"'; else $tdclass="";
echo "<td $tdclass>$dataarray[148]</td>";
}
if($dataarray[151] != 0 or $dataarray[152] != 0 or $dataarray[153] != 0 or $dataarray[154] != 0 or $dataarray[155] != 0 or $dataarray[156] != 0 or $dataarray[157] != 0 or $dataarray[158] != 0 or $dataarray[159] != 0 or $dataarray[160] != 0){
@@ -74,7 +101,7 @@ for($i=151;$i<=160;$i++) {
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
if ($dataarray[161]==0){$tdclass='class="none"';}
if ($dataarray[161]==0) $tdclass='class="none"'; else $tdclass="";
echo "<td $tdclass>$dataarray[161]</td>";
}
}
@@ -113,15 +140,21 @@ if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
<?php echo $dataarray[162]; ?>
</td></tr></tbody>
<?php }
<?php }
if ($dataarray[165]!='' and $dataarray[166]!=''){ //hero
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[165]; ?>" src="img/x.gif" alt="Hero" title="Hero" />
<?php echo $dataarray[166]; ?>
</td></tr></tbody>
<?php } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="<?php echo $colspan; ?>">
<?php }
if(isset($dataarray[164]) && $dataarray[164] !=''){ //troop not return
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[164]; ?>
</td></tr></tbody>
<?php }?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="<?php echo $colspan; ?>">
<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>
@@ -135,7 +168,7 @@ $start=1; ?>
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?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="<?php echo $colspan2; ?>"><?php if($targettribe=='1'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -146,6 +179,9 @@ $start=1; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) {
@@ -155,6 +191,9 @@ for($i=35;$i<=44;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
@@ -164,6 +203,10 @@ for($i=45;$i<=54;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
@@ -174,7 +217,7 @@ $start=11;?>
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?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="<?php echo $colspan2; ?>"><?php if($targettribe=='2'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -185,6 +228,9 @@ $start=11;?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) {
@@ -194,6 +240,9 @@ for($i=56;$i<=65;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) {
@@ -203,6 +252,10 @@ for($i=66;$i<=75;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
<?php } ?>
@@ -212,7 +265,7 @@ $start=21; ?>
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?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="<?php echo $colspan2; ?>"><?php if($targettribe=='3'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -223,6 +276,9 @@ $start=21; ?>
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) {
@@ -232,6 +288,9 @@ for($i=77;$i<=86;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) {
@@ -241,6 +300,10 @@ for($i=87;$i<=96;$i++) {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '3' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
@@ -252,7 +315,7 @@ $start=31; ?>
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?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],"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>
<tbody class="units">
<tr>
@@ -291,7 +354,7 @@ $start=41; ?>
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?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="<?php echo $colspan2; ?>"><?php if($targettribe=='5'){ echo $defuser_url." from the village ".$deffrom_url; } else { echo"Reinforcement"; } ?></td>
</tr></thead>
<tbody class="units">
<tr>
@@ -331,7 +394,7 @@ $start=31; ?>
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?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],"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>
<tbody class="units">
<tr>
@@ -370,7 +433,7 @@ $start=41; ?>
<thead>
<tr>
<td class="role">Defender</th>
<td colspan="<?php echo $colspan2; ?>"><?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>
<tbody class="units">
<tr>