Reports refactor #1

-Removed 29 files from the "Templates/Notice" folder, there were a lot
of duplicated/very similar kinds of report. Now, there are only 6 kinds
of report (9.tpl isn't counted)
+Changed a lot of codes in some .tpl reports, into a foreach

Automation.php:

+Modified report data, for the refactored report system
+Some clean-up

Battle.php:

+Fixed catapults and rams, they weren't able to destroy completely a building
+Fixed a possible division by 0 error
This commit is contained in:
iopietro
2018-04-19 20:14:54 +02:00
parent 06fc62752a
commit 882215cd2a
41 changed files with 426 additions and 9017 deletions
+75 -100
View File
@@ -1327,8 +1327,8 @@ class Automation {
$rom = $ger = $gal = $nat = $natar = 0;
$Defender = $database->getUnit($data['to'], false);
$enforcementarray = $database->getEnforceVillage($data['to'], 0);
if(count($enforcementarray) > 0) {
foreach($enforcementarray as $enforce) {
for($i=1;$i<=50;$i++) {
if (!isset($enforDefender['u'.$i])) {
@@ -1343,29 +1343,18 @@ class Automation {
$enforDefender['hero'] += $enforce['hero'];
}
}
for($i=1;$i<=50;$i++){
for($i = 1; $i <= 50; $i++){
$def_ab[$i]=0;
if(!isset($Defender['u'.$i])){
$Defender['u'.$i] = 0;
} else {
if($Defender['u'.$i]=='' || $Defender['u'.$i] <= 0){
$Defender['u'.$i] = 0;
} else {
if($i<=10){ $rom='1'; }
else if($i<=20){ $ger='1'; }
else if($i<=30){ $gal='1'; }
else if($i<=40){ $nat='1'; }
else if($i<=50){ $natar='1'; }
}
if(!isset($Defender['u'.$i]) || empty($Defender['u'.$i]) || $Defender['u'.$i] < 0) {
$Defender['u'.$i] = 0;
}
}
if(!isset($Defender['hero'])){
$Defender['hero'] = '0';
} else {
if($Defender['hero']=='' or $Defender['hero'] <= 0){
$Defender['hero'] = 0;
}
if(!isset($Defender['hero']) || empty($Defender['hero']) || $Defender['hero'] < 0) {
$Defender['hero'] = 0;
}
//get attack units
$Attacker = array();
$start = ($owntribe-1)*10+1;
@@ -1481,28 +1470,15 @@ class Automation {
$enforDefender['hero'] += $enforce['hero'];
}
}
for($i=1;$i<=50;$i++){
if(!isset($Defender['u'.$i])){
$Defender['u'.$i] = '0';
} else {
if($Defender['u'.$i]=='' or $Defender['u'.$i]<='0'){
$Defender['u'.$i] = '0';
} else {
if($i<=10){ $rom='1'; }
else if($i<=20){ $ger='1'; }
else if($i<=30){ $gal='1'; }
else if($i<=40){ $nat='1'; }
else if($i<=50){ $natar='1'; }
}
}
for($i = 1; $i <= 50; $i++){
if(!isset($Defender['u'.$i]) || empty($Defender['u'.$i]) || $Defender['u'.$i] < 0) {
$Defender['u'.$i] = 0;
}
}
if(!isset($Defender['hero'])){
$Defender['hero'] = '0';
} else {
if($Defender['hero']=='' or $Defender['hero']<'0'){
$Defender['hero'] = '0';
}
if(!isset($Defender['hero']) || empty($Defender['hero']) || $Defender['hero'] < 0) {
$Defender['hero'] = 0;
}
//get attack units
@@ -1637,13 +1613,15 @@ class Automation {
while($traps > 0)
{
//There are some traps left, let's distribute them
for($i = 1; $i <= 10 && $traps > 0; $i++, $traps--)
for($i = 1; $i <= 10 && $traps > 0; $i++)
{
${'traped'.$i}++;
if($data['t'.$i] != 0)
{
${'traped'.$i}++;
$traps--;
}
}
}
$GLOBALS['logging']->debug($traped1." ".$multiplier." ".$traps." ".$totalTroops);
}
}
}
@@ -1718,31 +1696,37 @@ class Automation {
$unitssend_att_check=$unitssend_att;
}
//Resetting the enforcements array
for($i = 1; $i <= 50; $i++) $DefenderEnf['u'.$i] = 0;
// our reinforcements count could have changed at this point, thus the re-select
$enforcementarray2 = $database->getEnforceVillage($data['to'],0);
$enforcementarray2 = $database->getEnforceVillage($data['to'], 0);
if(count($enforcementarray2) > 0) {
foreach($enforcementarray2 as $enforce2) {
//TODO: Heroes must be divided by tribe
$Defender['hero'] += $enforce2['hero'];
for ($i=1;$i<=50;$i++) {
$Defender['u'.$i]+= $enforce2['u'.$i];
for($i = 1; $i <= 50; $i++) {
$DefenderEnf['u'.$i] += $enforce2['u'.$i];
}
}
}
}
$totalsend_alldef = 0;
$unitssend_def = [];
//Own troops
$ownTroops = array_slice($Defender, ($targettribe - 1) * 10 + 1, 10);
$totalsend_alldef = array_sum($ownTroops);
$unitssend_def[0] = implode(",", $ownTroops);
//Reinforcements
for($i = 1; $i <= 5; $i++){
$reinfTroops = array_slice($DefenderEnf, ($i - 1) * 10, 10);
$totalsend_alldef += array_sum($reinfTroops);
$unitssend_def[$i] = implode(",", $reinfTroops);
}
$unitssend_def[1] = ''.$Defender['u1'].','.$Defender['u2'].','.$Defender['u3'].','.$Defender['u4'].','.$Defender['u5'].','.$Defender['u6'].','.$Defender['u7'].','.$Defender['u8'].','.$Defender['u9'].','.$Defender['u10'].'';
$unitssend_def[2] = ''.$Defender['u11'].','.$Defender['u12'].','.$Defender['u13'].','.$Defender['u14'].','.$Defender['u15'].','.$Defender['u16'].','.$Defender['u17'].','.$Defender['u18'].','.$Defender['u19'].','.$Defender['u20'].'';
$unitssend_def[3] = ''.$Defender['u21'].','.$Defender['u22'].','.$Defender['u23'].','.$Defender['u24'].','.$Defender['u25'].','.$Defender['u26'].','.$Defender['u27'].','.$Defender['u28'].','.$Defender['u29'].','.$Defender['u30'].'';
$unitssend_def[4] = ''.$Defender['u31'].','.$Defender['u32'].','.$Defender['u33'].','.$Defender['u34'].','.$Defender['u35'].','.$Defender['u36'].','.$Defender['u37'].','.$Defender['u38'].','.$Defender['u39'].','.$Defender['u40'].'';
$unitssend_def[5] = ''.$Defender['u41'].','.$Defender['u42'].','.$Defender['u43'].','.$Defender['u44'].','.$Defender['u45'].','.$Defender['u46'].','.$Defender['u47'].','.$Defender['u48'].','.$Defender['u49'].','.$Defender['u50'].'';
$herosend_def = $Defender['hero'];
$totalsend_alldef[1] = $Defender['u1']+$Defender['u2']+$Defender['u3']+$Defender['u4']+$Defender['u5']+$Defender['u6']+$Defender['u7']+$Defender['u8']+$Defender['u9']+$Defender['u10'];
$totalsend_alldef[2] = $Defender['u11']+$Defender['u12']+$Defender['u13']+$Defender['u14']+$Defender['u15']+$Defender['u16']+$Defender['u17']+$Defender['u18']+$Defender['u19']+$Defender['u20'];
$totalsend_alldef[3] = $Defender['u21']+$Defender['u22']+$Defender['u23']+$Defender['u24']+$Defender['u25']+$Defender['u26']+$Defender['u27']+$Defender['u28']+$Defender['u29']+$Defender['u30'];
$totalsend_alldef[4] = $Defender['u31']+$Defender['u32']+$Defender['u33']+$Defender['u34']+$Defender['u35']+$Defender['u36']+$Defender['u37']+$Defender['u38']+$Defender['u39']+$Defender['u40'];
$totalsend_alldef[5] = $Defender['u41']+$Defender['u42']+$Defender['u43']+$Defender['u44']+$Defender['u45']+$Defender['u46']+$Defender['u47']+$Defender['u48']+$Defender['u49']+$Defender['u50'];
$totalsend_alldef = $totalsend_alldef[1]+$totalsend_alldef[2]+$totalsend_alldef[3]+$totalsend_alldef[4]+$totalsend_alldef[5]+$herosend_def;
$unitssend_deff[0] = '?,?,?,?,?,?,?,?,?,?,';
$unitssend_deff[1] = '?,?,?,?,?,?,?,?,?,?,';
$unitssend_deff[2] = '?,?,?,?,?,?,?,?,?,?,';
$unitssend_deff[3] = '?,?,?,?,?,?,?,?,?,?,';
@@ -1754,7 +1738,7 @@ class Automation {
################FIXED BY SONGER################
#################################################
for($i=1;$i<=11;$i++){
for($i = 1; $i <= 11; $i++){
//MUST TO BE FIX : This is only for defender and still not properly coded
if (isset($battlepart['casualties_attacker']) && isset($battlepart['casualties_attacker'][$i]) && $battlepart['casualties_attacker'][$i] <= 0) {
${'dead'.$i} = 0;
@@ -1794,22 +1778,8 @@ class Automation {
$start = ($targettribe-1)*10+1;
$end = ($targettribe*10);
if ( $targettribe == 1 ) {
$u = "";
$rom = '1';
} else if ( $targettribe == 2 ) {
$u = "1";
$ger = '1';
} else if ( $targettribe == 3 ) {
$u = "2";
$gal = '1';
} else if ( $targettribe == 4 ) {
$u = "3";
$nat = '1';
} else {
$u = "4";
$natar = '1';
} //FIX
if ($targettribe == 1) $u = "";
else $u = $targettribe - 1;
$unitModifications_units = [];
$unitModifications_amounts = [];
@@ -1847,23 +1817,22 @@ class Automation {
$life=''; $notlife=''; $wrong='0';
if($enforce['from'] != 0){
$tribe = $database->getUserArray($database->getVillageField($enforce['from'],"owner"), 1)["tribe"];
}else{
$tribe = 4;
}
else $tribe = 4;
$start = ($tribe-1)*10+1;
$end = ($tribe*10);
unset($dead);
if ( $tribe == 1 ) {
$rom = '1';
} else if ( $tribe == 2 ) {
$ger = '1';
} else if ( $tribe == 3 ) {
$gal = '1';
} else if ( $tribe == 4 ) {
$nat = '1';
} else {
$natar = '1';
switch($tribe)
{
case 1: $rom = 1; break;
case 2: $ger = 1; break;
case 3: $gal = 1; break;
case 4: $nat = 1; break;
case 5:
default: $natar = 1; break;
}
$enforceModificationsById = [];
@@ -1939,17 +1908,22 @@ class Automation {
}
}
$totalsend_att = $data['t1']+$data['t2']+$data['t3']+$data['t4']+$data['t5']+$data['t6']+$data['t7']+$data['t8']+$data['t9']+$data['t10']+$data['t11'];
for ($i=1;$i<=50;$i++) {
for ($i = 1; $i <= 50; $i++) {
if (!isset($alldead[$i])) {
$alldead[$i] = 0;
}
$alldead[$i] += (isset($owndead[$i]) ? $owndead[$i] : 0);
}
$unitsdead_def[0] = implode(",", $owndead);
$unitsdead_def[1] = ''.$alldead['1'].','.$alldead['2'].','.$alldead['3'].','.$alldead['4'].','.$alldead['5'].','.$alldead['6'].','.$alldead['7'].','.$alldead['8'].','.$alldead['9'].','.$alldead['10'].'';
$unitsdead_def[2] = ''.$alldead['11'].','.$alldead['12'].','.$alldead['13'].','.$alldead['14'].','.$alldead['15'].','.$alldead['16'].','.$alldead['17'].','.$alldead['18'].','.$alldead['19'].','.$alldead['20'].'';
$unitsdead_def[3] = ''.$alldead['21'].','.$alldead['22'].','.$alldead['23'].','.$alldead['24'].','.$alldead['25'].','.$alldead['26'].','.$alldead['27'].','.$alldead['28'].','.$alldead['29'].','.$alldead['30'].'';
$unitsdead_def[4] = ''.$alldead['31'].','.$alldead['32'].','.$alldead['33'].','.$alldead['34'].','.$alldead['35'].','.$alldead['36'].','.$alldead['37'].','.$alldead['38'].','.$alldead['39'].','.$alldead['40'].'';
$unitsdead_def[5] = ''.$alldead['41'].','.$alldead['42'].','.$alldead['43'].','.$alldead['44'].','.$alldead['45'].','.$alldead['46'].','.$alldead['47'].','.$alldead['48'].','.$alldead['49'].','.$alldead['50'].'';
//No troops returned
$unitsdead_deff[0] = '?,?,?,?,?,?,?,?,?,?,';
$unitsdead_deff[1] = '?,?,?,?,?,?,?,?,?,?,';
$unitsdead_deff[2] = '?,?,?,?,?,?,?,?,?,?,';
$unitsdead_deff[3] = '?,?,?,?,?,?,?,?,?,?,';
@@ -2283,7 +2257,7 @@ class Automation {
if (isset($empty)){
$info_ram = "".$ram_pic.",There is no wall to destroy.";
} elseif ($newLevel == 0){
$info_ram = "".$ram_pic.",Wall destroyed.";
$info_ram = "".$ram_pic.",Wall <b>destroyed</b>.";
$database->setVillageLevel($data['to'], ["f".$wallid, "f".$wallid."t"], [0, 0]);
$pop = $this->recountPop($data['to']);
}elseif ($newLevel == $walllevel){
@@ -2785,7 +2759,7 @@ class Automation {
else $info_spy = "".$spy_pic.", There are no informations to show";
}
$data2 = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.',0,0,0,0,0,'.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_def[1].','.$unitsdead_def[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_def[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_def[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_def[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_def[5].','.$info_ram.','.$info_cat.','.$info_chief.','.$info_spy.',,'.$data['t11'].','.$dead11.','.$herosend_def.','.$deadhero.','.$unitstraped_att;
$data2 = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.',0,0,0,0,0,'.$to['owner'].','.$to['wref'].','.addslashes($to['name']).',,,'.$targettribe.','.$unitssend_def[0].','.$unitsdead_def[0].','.$rom.','.$unitssend_def[1].','.$unitsdead_def[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_def[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_def[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_def[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_def[5].','.$info_ram.','.$info_cat.','.$info_chief.','.$info_spy.',,'.$data['t11'].','.$dead11.','.$herosend_def.','.$deadhero.','.$unitstraped_att;
}
else{
if(isset($village_destroyed) && $village_destroyed == 1 && $can_destroy==1){
@@ -2795,12 +2769,12 @@ class Automation {
<img class=\"unit u".$catp_pic."\" src=\"img/x.gif\" alt=\"Catapult\" title=\"Catapult\" /> The village has been destroyed.</td></tr></tbody>";
}
}
$data2 = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.','.$steal[0].','.$steal[1].','.$steal[2].','.$steal[3].','.$battlepart['bounty'].','.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_def[1].','.$unitsdead_def[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_def[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_def[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_def[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_def[5].','.$info_ram.','.$info_cat.','.$info_chief.','.(isset($info_spy) ? $info_spy : '').',,'.$data['t11'].','.$dead11.','.$herosend_def.','.$deadhero.','.$unitstraped_att;
$data2 = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.','.$steal[0].','.$steal[1].','.$steal[2].','.$steal[3].','.$battlepart['bounty'].','.$to['owner'].','.$to['wref'].','.addslashes($to['name']).',,,'.$targettribe.','.$unitssend_def[0].','.$unitsdead_def[0].','.$rom.','.$unitssend_def[1].','.$unitsdead_def[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_def[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_def[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_def[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_def[5].','.$info_ram.','.$info_cat.','.$info_chief.','.(isset($info_spy) ? $info_spy : '').',,'.$data['t11'].','.$dead11.','.$herosend_def.','.$deadhero.','.$unitstraped_att;
}
// When all troops die, sends no info...send info
$info_troop= "None of your soldiers have returned";
$data_fail = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.','.$steal[0].','.$steal[1].','.$steal[2].','.$steal[3].','.$battlepart['bounty'].','.$to['owner'].','.$to['wref'].','.addslashes($to['name']).','.$targettribe.',,,'.$rom.','.$unitssend_deff[1].','.$unitsdead_deff[1].','.$ger.','.$unitssend_deff[2].','.$unitsdead_deff[2].','.$gal.','.$unitssend_deff[3].','.$unitsdead_deff[3].','.$nat.','.$unitssend_deff[4].','.$unitsdead_deff[4].','.$natar.','.$unitssend_deff[5].','.$unitsdead_deff[5].',,,'.$data['t11'].','.$dead11.','.$unitstraped_att.',,'.$info_ram.','.$info_cat.','.$info_chief.','.$info_troop.','.$info_hero;
$data_fail = ''.$from['owner'].','.$from['wref'].','.$owntribe.','.$unitssend_att.','.$unitsdead_att.','.$steal[0].','.$steal[1].','.$steal[2].','.$steal[3].','.$battlepart['bounty'].','.$to['owner'].','.$to['wref'].','.addslashes($to['name']).',,,'.$targettribe.','.$unitssend_deff[0].','.$unitsdead_deff[0].','.$rom.','.$unitssend_deff[1].','.$unitsdead_deff[1].','.$ger.','.$unitssend_deff[2].','.$unitsdead_deff[2].','.$gal.','.$unitssend_deff[3].','.$unitsdead_deff[3].','.$nat.','.$unitssend_deff[4].','.$unitsdead_deff[4].','.$natar.','.$unitssend_deff[5].','.$unitsdead_deff[5].',,,'.$data['t11'].','.$dead11.','.$unitstraped_att.',,'.$info_ram.','.$info_cat.','.$info_chief.','.$info_troop.','.$info_hero;
//Undetected and detected in here.
if(!empty($scout)){
@@ -2811,7 +2785,7 @@ class Automation {
$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);
$database->addNotice($to['owner'],$to['wref'],$targetally,20,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2.',,'.$info_troop,$AttackArrivalTime);
break;
}else if($defspy){ //fix by ronix
$database->addNotice($to['owner'],$to['wref'],$targetally,21,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
@@ -3166,6 +3140,7 @@ class Automation {
unset(
$Attacker
,$Defender
,$DefenderEnf
,$enforce
,$unitssend_att
,$unitssend_def
+8 -5
View File
@@ -872,15 +872,18 @@ class Battle {
{
if($moral < 1) $moral = 1;
elseif($moral > 3) $moral = 3;
$needMax = round(($moral * (pow($actualLevel, 2) + $actualLevel + 1) / (8 * $upDown)) + 0.5);
$needMax = round(($moral * (pow($actualLevel, 2) + $actualLevel + 1) / ($upDown == 0 ? 1 : 8 * $upDown)) + 0.5);
for($i = $actualLevel-1; $i >= 1; $i--)
{
$need = ($moral * (pow($i, 2) + $i + 1) / (8 * $upDown)) + 0.5;
if(min($realAttackers, $totalAttackers)/($needMax-$need) <= 1) break;
$need = ($moral * (pow($i, 2) + $i + 1) / ($upDown == 0 ? 1 : 8 * $upDown)) + 0.5;
if(min($realAttackers, $totalAttackers) / ($needMax - $need) <= 1) {
$i++;
break;
}
}
return $i + 1;
return $i;
}
};
+7 -6
View File
@@ -897,7 +897,7 @@ class MYSQLi_DB implements IDbConnection {
if ($result) {
// will return the result
} elseif($field=="username") {
$result = "??";
$result = "[?]";
} else {
$result = 0;
}
@@ -2030,7 +2030,7 @@ class MYSQLi_DB implements IDbConnection {
if($result){
// will return the result
}elseif($field=="name"){
$result = "??";
$result = "[?]";
}else $result = 0;
return $result;
@@ -4235,10 +4235,11 @@ References: User ID/Message ID, Mode
function addNotice($uid, $toWref, $ally, $type, $topic, $data, $time = 0) {
list($uid, $toWref, $ally, $type, $topic, $data, $time) = $this->escape_input((int) $uid, (int) $toWref, (int) $ally, (int) $type, $topic, $data, (int) $time);
if($time == 0) {
$time = time();
}
//We don't need to send reports to Nature or Natars
if($uid == 2 || $uid == 3) return;
if($time == 0) $time = time();
$q = "INSERT INTO " . TB_PREFIX . "ndata (id, uid, toWref, ally, topic, ntype, data, time, viewed) values (0,'$uid','$toWref','$ally','$topic',$type,'$data',$time,0)";
return mysqli_query($this->dblink,$q);
}
+34
View File
@@ -363,6 +363,40 @@ class Message {
}
}
/**
* Not all notices have a corresponding .tpl file but with this function it's like they had it
*
* @param int $type The type of the report (notice)
* @return int Returns the new report type
*/
public function getReportType($type)
{
switch($type)
{
case 2:
case 4:
case 5:
case 6:
case 7:
case 18:
case 20:
case 21: return 1;
case 11:
case 12:
case 13:
case 14: return 10;
case 16:
case 17: return 15;
case 19: return 3;
}
return $type;
}
public function loadNotes() {
global $session;
if(file_exists("GameEngine/Notes/" . md5($session->username) . ".txt")) {
-284
View File
@@ -1,284 +0,0 @@
<?php
$dataarray = explode(",",$message->readingNotice['data']);
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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 "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
</table>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }
if ($dataarray[55]=='1'){
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[76]=='1'){
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[97]=='1'){
$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],"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
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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-287
View File
@@ -1,287 +0,0 @@
<?php
$topic = $database->getNotice2($_GET['id'], 'topic');
$time = $database->getNotice2($_GET['id'], 'time');
$data = $database->getNotice2($_GET['id'], 'data');
$dataarray = explode(",",$data);
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $topic; ?></th>
</tr>
<tr>
<?php
$date = $generator->procMtime($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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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 "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
</table>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }
if ($dataarray[55]=='1'){
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[76]=='1'){
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[97]=='1'){
$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],"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
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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
+137 -314
View File
@@ -1,380 +1,203 @@
<?php
$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>";
$colspan = (isset($dataarray[168]) && $dataarray[168] > 0) ? 11 : 10;
$colspan2 = (isset($dataarray[170]) && $dataarray[170] > 0) ? 11 : 10;
$spy = !empty($dataarray[167]) && !empty($dataarray[166]) && empty($dataarray[185]);
//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->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>";
}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>
<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 <span><?php echo $date[0]." 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 ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
<td colspan="<?php echo $colspan ?>"><?php echo ($user_url ? $user_url : 'Natar Counterforce'); ?> <?php echo ($from_url ? 'from the village '.$from_url : '');?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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>";
$tribe = $dataarray[2] ? $dataarray[2] : 5;
$start = ($tribe - 1) * 10 + 1;
for($i = $start; $i <= ($start + 9); $i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
if (isset($dataarray[168]) && $dataarray[168] > 0){
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>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
for($i = 3; $i <= 12; $i++) {
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
else echo "<td>".$dataarray[$i]."</td>";
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
echo "<td>$dataarray[147]</td>";
if (isset($dataarray[168]) && $dataarray[168] > 0){
echo "<td>$dataarray[168]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
for($i = 13; $i <= 22; $i++) {
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
else echo "<td>".$dataarray[$i]."</td>";
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
if ($dataarray[148]==0) $tdclass='class="none"'; else $tdclass='';
echo "<td $tdclass>$dataarray[148]</td>";
if(isset($dataarray[168]) && $dataarray[168] > 0){
if ($dataarray[169] == 0) $tdclass='class="none"'; else $tdclass='';
echo "<td $tdclass>$dataarray[169]</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 or $dataarray[161] != 0){
if(!$spy && ($dataarray[172] > 0 || $dataarray[173] > 0 || $dataarray[174] > 0 || $dataarray[175] > 0 || $dataarray[176] > 0 || $dataarray[177] > 0 || $dataarray[178] > 0 || $dataarray[179] > 0 || $dataarray[180] > 0 || $dataarray[181] > 0 || $dataarray[182] > 0)){
echo "</tr><tr><th>Prisoners</th>";
for($i=151;$i<=160;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
for($i = 172; $i <= 181; $i++) {
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
else 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[168]) && $dataarray[168] > 0){
if ($dataarray[182] == 0) $tdclass='class="none"'; else $tdclass='';
echo "<td $tdclass>$dataarray[182]</td>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
if (!empty($dataarray[160]) && !empty($dataarray[161])){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[160]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[161]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
if (!empty($dataarray[162]) && !empty($dataarray[163])){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[162]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[163]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
if (!empty($dataarray[164]) && !empty($dataarray[165])){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[164]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[165]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
<?php }
if ($spy){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
<?php echo $dataarray[167]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
if (!empty($dataarray[183])){ //release prisoners
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[162]; ?>
<?php echo $dataarray[183]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[165]!='' and $dataarray[166]!=''){ //hero
<?php }
if (!empty($dataarray[186]) && !empty($dataarray[187])){ //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]; ?>
<img class="unit u<?php echo $dataarray[186]; ?>" src="img/x.gif" alt="Hero" title="Hero" />
<?php echo $dataarray[187]; ?>
</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>
<?php }
if(isset($dataarray[185]) && !empty($dataarray[185])){ //No troops returned
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[185]; ?>
</td></tr></tbody>
<?php }elseif(empty($dataarray[166]) && empty($dataarray[167])){?>
<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>
<?php } //Defender(s)
$defArray = [1, $dataarray[55], $dataarray[76], $dataarray[97], $dataarray[118], $dataarray[139]];
$targetTribe = $dataarray[33];
foreach($defArray as $index => $value){
if($value == 0) continue;
$target = ($index == 0 ? $targetTribe : $index) - 1;
$start = $target * 10 + 1;
$troopsStart = $index * 21 + 35 - ($index == 0 ? 1 : 0);
?>
<table cellpadding="1" cellspacing="1" class="defender">
<thead>
<tr>
<td class="role">Defender</td>
<td colspan="<?php echo $colspan2; ?>"><?php echo ($index == 0) ? $defuser_url." from the village ".$deffrom_url : "Reinforcement"; ?></td>
</tr></thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='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 $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>";
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){
if(isset($dataarray[170]) && $dataarray[170] > 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) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
for($i = $troopsStart; $i <= $troopsStart + 9; $i++) {
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
else echo "<td>".$dataarray[$i]."</td>";
}
if($targettribe == '1' and isset($dataarray[149]) and $dataarray[149]!=0){
echo "<td>$dataarray[149]</td>";
if(isset($dataarray[170]) && $dataarray[170] > 0){
echo "<td>$dataarray[170]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
for($i = $troopsStart + 10; $i <= $troopsStart + 19; $i++) {
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
else echo "<td>".$dataarray[$i]."</td>";
}
if(isset($dataarray[170]) && $dataarray[170] > 0){
if ($dataarray[171] == 0){$tdclass1='class="none"';}
echo "<td $tdclass1>$dataarray[171]</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>
<?php }
if ($dataarray[55]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[97]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
</td></tr></tbody></table>
+8 -9
View File
@@ -1,15 +1,14 @@
<?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->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>";
}
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>";
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>
@@ -22,7 +21,7 @@ if($database->getVillageField($dataarray[1],'name')!="??") {
<?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>
<td>on <span><?php echo $date[0]." at ".$date[1]; ?></span> <span>hour</span></td>
</tr>
</thead>
<tbody>
-43
View File
@@ -1,43 +0,0 @@
<?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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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="trade"><thead><tr>
<td>&nbsp;</td>
<td><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr></thead><tbody><tr>
<th>Resources</th>
<td>
<img class="r1" src="img/x.gif" alt="Wood" title="Wood" /><?php echo $dataarray[2]; ?> |
<img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[3]; ?> |
<img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[4]; ?> |
<img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[5]; ?>
</td></tr></tbody>
</table></td></tr></tbody></table>
-43
View File
@@ -1,43 +0,0 @@
<?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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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="trade"><thead><tr>
<td>&nbsp;</td>
<td><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr></thead><tbody><tr>
<th>Resources</th>
<td>
<img class="r1" src="img/x.gif" alt="Wood" title="Wood" /><?php echo $dataarray[2]; ?> |
<img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[3]; ?> |
<img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[4]; ?> |
<img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[5]; ?>
</td></tr></tbody>
</table></td></tr></tbody></table>
-43
View File
@@ -1,43 +0,0 @@
<?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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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="trade"><thead><tr>
<td>&nbsp;</td>
<td><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr></thead><tbody><tr>
<th>Resources</th>
<td>
<img class="r1" src="img/x.gif" alt="Wood" title="Wood" /><?php echo $dataarray[2]; ?> |
<img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[3]; ?> |
<img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[4]; ?> |
<img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[5]; ?>
</td></tr></tbody>
</table></td></tr></tbody></table>
-43
View File
@@ -1,43 +0,0 @@
<?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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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="trade"><thead><tr>
<td>&nbsp;</td>
<td><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr></thead><tbody><tr>
<th>Resources</th>
<td>
<img class="r1" src="img/x.gif" alt="Wood" title="Wood" /><?php echo $dataarray[2]; ?> |
<img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[3]; ?> |
<img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[4]; ?> |
<img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[5]; ?>
</td></tr></tbody>
</table></td></tr></tbody></table>
+25 -33
View File
@@ -1,17 +1,16 @@
<?php
//reinforcement is underattack
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[24]) and $dataarray[24]!=0){$colspan="11";}else{$colspan="10";}
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>";
$colspan = (isset($dataarray[24]) && $dataarray[24] > 0) ? 10 : 11;
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>";
}
if($database->getVillageField($dataarray[26],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[26]."&c=".$generator->getMapCheck($dataarray[26])."\">".$database->getVillageField($dataarray[26],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
else $user_url = "<font color=\"grey\"><b>[?]</b></font>";
if($database->getVillageField($dataarray[26], 'name') != "[?]") {
$from_url = "<a href=\"karte.php?d=".$dataarray[26]."&c=".$generator->getMapCheck($dataarray[26])."\">".$database->getVillageField($dataarray[26], 'name')."</a>";
}
else $from_url = "<font color=\"grey\"><b>[?]</b></font>";
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -21,10 +20,9 @@ if($database->getVillageField($dataarray[26],'name')!="??") {
</tr>
<tr>
<?php
$date = $generator->procMtime($message->readingNotice['time']); ?>
<?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>
<td>on <span><?php echo $date[0]." at ".$date[1]; ?></span> <span>hour</span></td>
</tr>
</thead>
<tbody>
@@ -41,39 +39,33 @@ if($database->getVillageField($dataarray[26],'name')!="??") {
<td>&nbsp;</td>
<?php
$tribe = $dataarray[3];
$start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) {
$start = ($tribe - 1) * 10 + 1;
for($i = $start; $i <= ($start + 9); $i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
if(isset($dataarray[24]) && $dataarray[24] > 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=4;$i<=13;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
for($i = 4; $i <= 13; $i++) {
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
else echo "<td>".$dataarray[$i]."</td>";
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
if(isset($dataarray[24]) && $dataarray[24] > 0){
echo "<td>$dataarray[24]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=14;$i<=23;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
for($i = 14; $i <= 23; $i++) {
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
else echo "<td>".$dataarray[$i]."</td>";
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
if ($dataarray[25]==0){$tdclass='class="none"';}
if(isset($dataarray[24]) && $dataarray[24] > 0){
if ($dataarray[25] == 0){$tdclass = 'class="none"';}
echo "<td $tdclass>$dataarray[25]</td>";
}
?>
</tr></tbody>
</table>
</td></tr></tbody></table>
</td></tr></tbody></table>
-79
View File
@@ -1,79 +0,0 @@
<?php
//reinforcement is underattack
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[24]) and $dataarray[24]!=0){$colspan="11";}else{$colspan="10";}
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[26],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[26]."&c=".$generator->getMapCheck($dataarray[26])."\">".$database->getVillageField($dataarray[26],'name')."</a>";
}else{
$from_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>
<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" class="defender"><thead>
<tr>
<td class="role">Defender</td>
<td colspan="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$tribe = $dataarray[3];
$start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=4;$i<=13;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
echo "<td>$dataarray[24]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=14;$i<=23;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
if ($dataarray[25]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[25]</td>";
}
?>
</tr></tbody>
</table>
</td></tr></tbody></table>
-79
View File
@@ -1,79 +0,0 @@
<?php
//reinforcement is underattack
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[24]) and $dataarray[24]!=0){$colspan="11";}else{$colspan="10";}
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[26],'name')!="??") {
$from_url="<a href=\"karte.php?d=".$dataarray[26]."&c=".$generator->getMapCheck($dataarray[26])."\">".$database->getVillageField($dataarray[26],'name')."</a>";
}else{
$from_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>
<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" class="defender"><thead>
<tr>
<td class="role">Defender</td>
<td colspan="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$tribe = $dataarray[3];
$start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=4;$i<=13;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
echo "<td>$dataarray[24]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=14;$i<=23;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[24]) and $dataarray[24]!=0){
if ($dataarray[25]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[25]</td>";
}
?>
</tr></tbody>
</table>
</td></tr></tbody></table>
-359
View File
@@ -1,359 +0,0 @@
<?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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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 "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=152;$i<=161;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</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>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
</table>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='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 $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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php } ?>
<?php if ($dataarray[97]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-301
View File
@@ -1,301 +0,0 @@
<?php
$topic = $database->getNotice2($_GET['id'], 'topic');
$time = $database->getNotice2($_GET['id'], 'time');
$data = $database->getNotice2($_GET['id'], 'data');
$dataarray = explode(",",$data);
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $topic; ?></th>
</tr>
<tr>
<?php
$date = $generator->procMtime($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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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 "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=152;$i<=161;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
</table>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }
if ($dataarray[55]=='1'){
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[76]=='1'){
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[97]=='1'){
$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],"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
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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-302
View File
@@ -1,302 +0,0 @@
<?php
############################################################
## DO NOT REMOVE THIS NOTICE ##
## FIX BY RONIX ##
## TRAVIANZ ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
$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->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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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 "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</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>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
}
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
$targettribe=$dataarray['31'];
if ($dataarray[34]=='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 $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 "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }
if ($dataarray[55]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[76]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[97]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-274
View File
@@ -1,274 +0,0 @@
<?php
$topic = $database->getNotice2($_GET['id'], 'topic');
$time = $database->getNotice2($_GET['id'], 'time');
$data = $database->getNotice2($_GET['id'], 'data');
$dataarray = explode(",",$data);
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $topic; ?></th>
</tr>
<tr>
<?php
$date = $generator->procMtime($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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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 "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=152;$i<=161;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
?>
</table>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }
if ($dataarray[55]=='1'){
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[76]=='1'){
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[97]=='1'){
$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],"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
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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-403
View File
@@ -1,403 +0,0 @@
<?php
$topic = $database->getNotice2($_GET['id'], 'topic');
$time = $database->getNotice2($_GET['id'], 'time');
$data = $database->getNotice2($_GET['id'], 'data');
$dataarray = explode(",",$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";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $topic; ?></th>
</tr>
<tr>
<?php
$date = $generator->procMtime($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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=151;$i<=160;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[162]; ?>
</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>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[97]=='1'){
$start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
-388
View File
@@ -1,388 +0,0 @@
<?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->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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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>";
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
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 or $dataarray[161] != 0){
echo "</tr><tr><th>Prisoners</th>";
for($i=151;$i<=160;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[162]; ?>
</td></tr></tbody>
<?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; ?>">
<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>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='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 $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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if($targettribe == '2' and isset($dataarray[149]) and $dataarray[149]!=0){
if ($dataarray[150]==0){$tdclass1='class="none"';}
if (!isset($tdclass1)) {
$tdclass1 = '';
}
echo "<td $tdclass1>$dataarray[150]</td>";
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[76]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[97]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-359
View File
@@ -1,359 +0,0 @@
<?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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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 "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=152;$i<=161;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</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>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
</table>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='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 $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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php } ?>
<?php if ($dataarray[97]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-301
View File
@@ -1,301 +0,0 @@
<?php
$topic = $database->getNotice2($_GET['id'], 'topic');
$time = $database->getNotice2($_GET['id'], 'time');
$data = $database->getNotice2($_GET['id'], 'data');
$dataarray = explode(",",$data);
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $topic; ?></th>
</tr>
<tr>
<?php
$date = $generator->procMtime($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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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 "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=152;$i<=161;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
</table>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }
if ($dataarray[55]=='1'){
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[76]=='1'){
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[97]=='1'){
$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],"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
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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-359
View File
@@ -1,359 +0,0 @@
<?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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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 "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=152;$i<=161;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</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>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
</table>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='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 $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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php } ?>
<?php if ($dataarray[97]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-301
View File
@@ -1,301 +0,0 @@
<?php
$topic = $database->getNotice2($_GET['id'], 'topic');
$time = $database->getNotice2($_GET['id'], 'time');
$data = $database->getNotice2($_GET['id'], 'data');
$dataarray = explode(",",$data);
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $topic; ?></th>
</tr>
<tr>
<?php
$date = $generator->procMtime($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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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 "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=152;$i<=161;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="10">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php } ?>
</table>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }
if ($dataarray[55]=='1'){
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[76]=='1'){
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[97]=='1'){
$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],"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
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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
+13 -23
View File
@@ -1,15 +1,7 @@
<?php
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[14]) and $dataarray[14]!=0){$colspan="11";}else{$colspan="10";}
if($dataarray[15] == 1){
$image = "peace";
}else if($dataarray[15] == 2){
$image = "xmas";
}else if($dataarray[15] == 3){
$image = "newy";
}else{
$image = "easter";
}
$colspan = (isset($dataarray[14]) && $dataarray[14] > 0) ? 11 : 10;
if($dataarray[15] == 1){
$message1 = "".$database->getUserField($dataarray[0],"username",0)." visited ".$database->getUserField($dataarray[2],"username",0)."'s troops";
}else if($dataarray[15] == 2){
@@ -31,7 +23,7 @@ $message1 = "".$database->getUserField($dataarray[0],"username",0)." wishes you
<?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>
<td>on <span><?php echo $date[0]." at ".$date[1]; ?></span> <span>hour</span></td>
</tr>
</thead>
<tbody>
@@ -48,29 +40,27 @@ $message1 = "".$database->getUserField($dataarray[0],"username",0)." wishes you
<td>&nbsp;</td>
<?php
$tribe = $dataarray[3];
$start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) {
$start = ($tribe - 1) * 10 + 1;
for($i = $start; $i <= ($start + 9); $i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if(isset($dataarray[14]) and $dataarray[14]!=0){
if(isset($dataarray[14]) && $dataarray[14] > 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=4;$i<=13;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
for($i = 4; $i <= 13; $i++) {
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
else echo "<td>".$dataarray[$i]."</td>";
}
if(isset($dataarray[14]) and $dataarray[14]!=0){
if(isset($dataarray[14]) && $dataarray[14] > 0){
echo "<td>$dataarray[14]</td>";
}
?>
</tbody>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img src="<?php echo GP_LOCATE; ?>img/r/<?php echo $image; ?>.gif" alt="Peace" title="Peace" />
<img src="<?php echo GP_LOCATE; ?>img/r/<?php echo (["peace", "xmas", "newy", "easter"])[$dataarray[15]-1]; ?>.gif" alt="Peace" title="Peace" />
<?php echo $message1; ?>
</td></tr></tbody>
</table>
-403
View File
@@ -1,403 +0,0 @@
<?php
$topic = $database->getNotice2($_GET['id'], 'topic');
$time = $database->getNotice2($_GET['id'], 'time');
$data = $database->getNotice2($_GET['id'], 'data');
$dataarray = explode(",",$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";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $topic; ?></th>
</tr>
<tr>
<?php
$date = $generator->procMtime($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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=151;$i<=160;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[162]; ?>
</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>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[97]=='1'){
$start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
+76 -254
View File
@@ -6,32 +6,33 @@
## TRAVIANZ ##
############################################################
$dataarray = explode(",",$message->readingNotice['data']);
if(isset($dataarray[151]) and $dataarray[151]!=0){$colspan="11";}else{$colspan="10";}
$colspan = (isset($dataarray[173]) && $dataarray[173] > 0) ? 11 : 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>";
//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>";
}
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>";
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->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>";
}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>
@@ -44,7 +45,7 @@ if($database->isVillageOases($dataarray[29])){
<?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>
<td>on <span><?php echo $date[0]." at ".$date[1]; ?></span> <span>hour</span></td>
</tr>
</thead>
<tbody>
@@ -61,286 +62,107 @@ if($database->isVillageOases($dataarray[29])){
<td>&nbsp;</td>
<?php
$tribe = $dataarray[2];
$start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) {
$start = ($tribe - 1) * 10 + 1;
for($i = $start; $i <= ($start + 9); $i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if(isset($dataarray[151]) and $dataarray[151]!=0){
if(isset($dataarray[173]) && $dataarray[173] > 0){
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>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
for($i = 3; $i <= 12; $i++) {
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
else echo "<td>".$dataarray[$i]."</td>";
}
if(isset($dataarray[151]) and $dataarray[151]!=0){
echo "<td>$dataarray[151]</td>";
if(isset($dataarray[173]) && $dataarray[173] > 0){
echo "<td>$dataarray[173]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
for($i = 13; $i <= 22; $i++) {
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
else 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(isset($dataarray[173]) && $dataarray[173] > 0){
if ($dataarray[174] == 0) $tdclass='class="none"'; else $tdclass='';
echo "<td $tdclass>$dataarray[174]</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 or $dataarray[163] != 0){
if($dataarray[175] > 0 || $dataarray[176] > 0 || $dataarray[177] > 0 || $dataarray[178] > 0 || $dataarray[179] > 0 || $dataarray[180] > 0 || $dataarray[181] > 0 || $dataarray[182] > 0 || $dataarray[183] > 0 || $dataarray[184] > 0 || $dataarray[185] > 0){
echo "</tr><tr><th>Prisoners</th>";
for($i=153;$i<=162;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
for($i = 175; $i <= 184; $i++) {
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
else 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(isset($dataarray[173]) && $dataarray[173] > 0){
if ($dataarray[185]==0) $tdclass='class="none"'; else $tdclass='';
echo "<td $tdclass>$dataarray[185]</td>";
}
}
if ($dataarray[165]!='' and $dataarray[166]!=''){ //ram
if (!empty($dataarray[187]) && !empty($dataarray[188])){ //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]; ?>
<img class="unit u<?php echo $dataarray[187]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[188]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[167]!='' and $dataarray[168]!=''){ //cata
if (!empty($dataarray[189]) && !empty($dataarray[190])){ //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]; ?>
<img class="unit u<?php echo $dataarray[189]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[190]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[169]!='' and $dataarray[170]!=''){ //chief
if (!empty($dataarray[191]) && !empty($dataarray[192])){ //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]; ?>
<img class="unit u<?php echo $dataarray[191]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[192]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[172]!='' and $dataarray[173]!=''){ //hero
if (!empty($dataarray[194]) && !empty($dataarray[195])){ //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]; ?>
<img class="unit u<?php echo $dataarray[194]; ?>" src="img/x.gif" alt="Hero" title="Hero" />
<?php echo $dataarray[195]; ?>
</td></tr></tbody>
<?php }
if(isset($dataarray[171]) && $dataarray[171] !=''){ //troop not return
if(isset($dataarray[193]) && !empty($dataarray[193])){ //No troops returned
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[171]; ?>
<?php echo $dataarray[193]; ?>
</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 $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 "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
$target = $dataarray[33] - 1;
$start = ($target * 10) + 1;
$troopsStart = ($target * 21) + 35;
?>
</tr></tbody></table>
<table cellpadding="1" cellspacing="1" class="defender">
<thead>
<tr>
<td class="role">Defender</td>
<td colspan="<?php echo $colspan2; ?>"><?php echo $defuser_url." from the village ".$deffrom_url; ?></td>
</tr></thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?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 $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++) {
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 "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
?>
</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 $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 "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
?>
</tr></tbody></table>
for($i = $troopsStart; $i <= $troopsStart + 9; $i++) echo "<td class=\"none\">?</td>";
<?php } ?>
<?php if ($dataarray[31]=='4'){
$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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
for($i = $troopsStart + 10; $i <= $troopsStart + 19; $i++) echo "<td class=\"none\">?</td>";
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[31]=='5'){
$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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
</td></tr></tbody></table>
-290
View File
@@ -1,290 +0,0 @@
<?php
############################################################
## DO NOT REMOVE THIS NOTICE ##
## ADVOCAITE ROCKS TRAVIANX NUTS ##
## GIT HUB REV ##
############################################################
$topic = $database->getNotice2($_GET['id'], 'topic');
$time = $database->getNotice2($_GET['id'], 'time');
$data = $database->getNotice2($_GET['id'], 'data');
$dataarray = explode(",",$data);
if($dataarray[151]!='' and $dataarray[151]!=0){$colspan="11";}else{$colspan="10";}
$colspan2 = 10;
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $topic; ?></th>
</tr>
<tr>
<?php
$date = $generator->procMtime($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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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>";
}
if ($dataarray[151]!="" and $dataarray[151]!=0){
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>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if ($dataarray[151]!="" and $dataarray[151]!=0){
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>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if ($dataarray[151]!="" and $dataarray[151]!=0){
if ($dataarray[152]==0){$tdclass='class="none"';}
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>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[151]) and $dataarray[151]!=0){
if ($dataarray[163]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[163]</td>";
}
}
echo "</tr></tbody>"; ?>
</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
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 "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
?>
</tr></tbody></table>
<?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>
<?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 "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
?>
</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
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 "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
?>
</tr></tbody></table>
<?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
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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
?>
</tr></tbody></table>
<?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
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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == "?") {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td class=\"none\">?</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-396
View File
@@ -1,396 +0,0 @@
<?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
$usr = $database->getUserField($dataarray[0],'username',0);
if ($usr && $usr!="??") {
$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>";
}
$villageName = $database->getVillageField($dataarray[1],'name');
if($villageName && $villageName!="??") {
$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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan ?>"><?php echo ($user_url ? $user_url : 'Natar Counterforce'); ?> <?php echo ($from_url ? 'from the village '.$from_url : '');?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$tribe = ($dataarray[2] ? $dataarray[2] : 5);
$start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
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 or $dataarray[161] != 0){
echo "</tr><tr><th>Prisoners</th>";
for($i=151;$i<=160;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[162]; ?>
</td></tr></tbody>
<?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 }
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>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='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 $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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[97]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-403
View File
@@ -1,403 +0,0 @@
<?php
$topic = $database->getNotice2($_GET['id'], 'topic');
$time = $database->getNotice2($_GET['id'], 'time');
$data = $database->getNotice2($_GET['id'], 'data');
$dataarray = explode(",",$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";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $topic; ?></th>
</tr>
<tr>
<?php
$date = $generator->procMtime($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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=151;$i<=160;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[162]; ?>
</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>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[97]=='1'){
$start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
-392
View File
@@ -1,392 +0,0 @@
<?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->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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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>";
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
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 or $dataarray[161] != 0){
echo "</tr><tr><th>Prisoners</th>";
for($i=151;$i<=160;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[162]; ?>
</td></tr></tbody>
<?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 }
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>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='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 $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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[97]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-403
View File
@@ -1,403 +0,0 @@
<?php
$topic = $database->getNotice2($_GET['id'], 'topic');
$time = $database->getNotice2($_GET['id'], 'time');
$data = $database->getNotice2($_GET['id'], 'data');
$dataarray = explode(",",$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";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $topic; ?></th>
</tr>
<tr>
<?php
$date = $generator->procMtime($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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=151;$i<=160;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[162]; ?>
</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>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[97]=='1'){
$start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
-386
View File
@@ -1,386 +0,0 @@
<?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->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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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>";
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
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 or $dataarray[161] != 0){
echo "</tr><tr><th>Prisoners</th>";
for($i=151;$i<=160;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[162]; ?>
</td></tr></tbody>
<?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; ?>">
<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>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='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 $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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[97]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
</td></tr></tbody></table>
-403
View File
@@ -1,403 +0,0 @@
<?php
$topic = $database->getNotice2($_GET['id'], 'topic');
$time = $database->getNotice2($_GET['id'], 'time');
$data = $database->getNotice2($_GET['id'], 'data');
$dataarray = explode(",",$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";}
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $topic; ?></th>
</tr>
<tr>
<?php
$date = $generator->procMtime($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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=151;$i<=160;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[162]; ?>
</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>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='1'){
$start=1; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$start=11;?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$start=21; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[97]=='1'){
$start=31; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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 } ?>
</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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
-471
View File
@@ -1,471 +0,0 @@
<?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->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>
<tr>
<th>Subject:</th>
<th><?php echo $message->readingNotice['topic']; ?></th>
</tr>
<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>
<tr>
<td class="role">Attacker</td>
<td colspan="<?php echo $colspan ?>"><?php echo $user_url;?> from the village <?php echo $from_url;?></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if(isset($dataarray[147]) and $dataarray[147]!=0){
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 or $dataarray[161] != 0){
echo "</tr><tr><th>Prisoners</th>";
for($i=151;$i<=160;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php } ?>
<?php if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[162]; ?>
</td></tr></tbody>
<?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 }
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>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='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 $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 == '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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if ($dataarray[55]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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 } ?>
<?php if ($dataarray[76]=='1'){
$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>";
}
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) {
echo "<td class=\"none\">0</td>";
}
else {
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) {
echo "<td class=\"none\">0</td>";
}
else {
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>
<?php }
if($dataarray[98]==1 and $dataarray[31]!=4){
if ($dataarray[97]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=118;$i<=127;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[128]=='1'){
$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 $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 "</tr><tr><th>Troops</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=139;$i<=148;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }
}else{
if ($dataarray[97]=='1'){
$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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$start=41; ?>
<table cellpadding="1" cellspacing="1" class="defender">
<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>
</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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }} ?>
</td></tr></tbody></table>
-404
View File
@@ -1,404 +0,0 @@
<?php
$topic = $database->getNotice2($_GET['id'], 'topic');
$time = $database->getNotice2($_GET['id'], 'time');
$data = $database->getNotice2($_GET['id'], 'data');
$dataarray = explode(",",$data);
if(isset($dataarray[147]) and $dataarray[147] != 0){$colspan="11";}else{$colspan="10";}
$colspan2 = 10;
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
<tr>
<th>Subject:</th>
<th><?php echo $topic; ?></th>
</tr>
<tr>
<?php
$date = $generator->procMtime($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>
<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>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$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>";
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<=12;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
echo "<td>$dataarray[147]</td>";
}
echo "<tr><th>Casualties</th>";
for($i=13;$i<=22;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
if (isset($dataarray[147]) and $dataarray[147] != 0){
if ($dataarray[148]==0){$tdclass='class="none"';}
echo "<td $tdclass>$dataarray[148]</td>";
}
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){
echo "</tr><tr><th>Prisoners</th>";
for($i=151;$i<=160;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
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>";
}
}
echo "</tr></tbody>";
if ($dataarray[139]!='' and $dataarray[140]!=''){ //ram
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[139]; ?>" src="img/x.gif" alt="Ram" title="Ram" />
<?php echo $dataarray[140]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[141]!='' and $dataarray[142]!=''){ //cata
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[141]; ?>" src="img/x.gif" alt="Catapult" title="Catapult" />
<?php echo $dataarray[142]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[143]!='' and $dataarray[144]!=''){ //chief
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<img class="unit u<?php echo $dataarray[143]; ?>" src="img/x.gif" alt="Chief" title="Chief" />
<?php echo $dataarray[144]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[145]!='' and $dataarray[146]!=''){ //spy
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[146]; ?>
</td></tr></tbody>
<?php }
if ($dataarray[162]!='' and $dataarray[162]!=''){ //release prisoners
?>
<tbody class="goods"><tr><th>Information</th><td colspan="<?php echo $colspan; ?>">
<?php echo $dataarray[162]; ?>
</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>
<?php
$targettribe=$dataarray['31'];
if ($dataarray[34]=='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
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 "</tr><tr><th>Troops</th>";
for($i=35;$i<=44;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=45;$i<=54;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }
if ($dataarray[55]=='1'){
$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>
<?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 "</tr><tr><th>Troops</th>";
for($i=56;$i<=65;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=66;$i<=75;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[76]=='1'){
$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
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 "</tr><tr><th>Troops</th>";
for($i=77;$i<=86;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=87;$i<=96;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }
if($dataarray[98]==1 and $dataarray[31]!=4){
if ($dataarray[97]=='1'){
$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
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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=118;$i<=127;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[128]=='1'){
$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
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 "</tr><tr><th>Troops</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=139;$i<=148;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }
}else{
if ($dataarray[97]=='1'){
$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
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 "</tr><tr><th>Troops</th>";
for($i=98;$i<=107;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=108;$i<=117;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php } ?>
<?php if ($dataarray[118]=='1'){
$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
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 "</tr><tr><th>Troops</th>";
for($i=119;$i<=128;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
echo "<tr><th>Casualties</th>";
for($i=129;$i<=138;$i++) {
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
}
?>
</tr></tbody></table>
<?php }} ?>
</td></tr></tbody></table>
+25 -28
View File
@@ -1,16 +1,16 @@
<?php
$dataarray = explode(",",$message->readingNotice['data']);
if($dataarray[13]!='' or $dataarray!=0){$colspan="11";}else{$colspan="10";}
if ($database->getUserField($dataarray[1],'username',0)!="??" || $dataarray[1] == 0) {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[1],"id",0)."\">".($dataarray[1] == 0 ? "taskmaster" : $database->getUserField($dataarray[1],'username',0))."</a>";
}else{
$user_url="<font color=\"grey\"><b>??</b></font>";
$colspan = (!empty($dataarray[13]) && $dataarray[13] > 0) ? 11 : 10;
if ($database->getUserField($dataarray[1], 'username', 0) != "[?]" || $dataarray[1] == 0) {
$user_url="<a href=\"spieler.php?uid=".$database->getUserField($dataarray[1], "id", 0)."\">".($dataarray[1] == 0 ? "taskmaster" : $database->getUserField($dataarray[1], 'username', 0))."</a>";
}
if($database->getVillageField($dataarray[0],'name')!="??" || $dataarray[0] == 0) {
$from_url=($dataarray[0] == 0)? "village of the elders" : "<a href=\"karte.php?d=".$dataarray[0]."&c=".$generator->getMapCheck($dataarray[0])."\">".$database->getVillageField($dataarray[0],'name')."</a>";
}else{
$from_url="<font color=\"grey\"><b>??</b></font>";
else $user_url="<font color=\"grey\"><b>[?]</b></font>";
if($database->getVillageField($dataarray[0],'name') != "[?]" || $dataarray[0] == 0) {
$from_url=($dataarray[0] == 0)? "village of the elders" : "<a href=\"karte.php?d=".$dataarray[0]."&c=".$generator->getMapCheck($dataarray[0])."\">".$database->getVillageField($dataarray[0], 'name')."</a>";
}
else $from_url="<font color=\"grey\"><b>[?]</b></font>";
?>
<table cellpadding="1" cellspacing="1" id="report_surround">
<thead>
@@ -23,7 +23,7 @@ if($database->getVillageField($dataarray[0],'name')!="??" || $dataarray[0] == 0)
<?php
$date = $generator->procMtime($message->readingNotice['time']); ?>
<td class="sent">Sent:</td>
<td>on <?php echo $date[0]."<span> at ".$date[1]; ?></span><span> </span></td>
<td>on <span><?php echo $date[0]." at ".$date[1]; ?></span><span> </span></td>
</tr>
</thead>
<tbody>
@@ -37,30 +37,27 @@ if($database->getVillageField($dataarray[0],'name')!="??" || $dataarray[0] == 0)
<td>&nbsp;</td>
<?php
$tribe = $dataarray[2];
$start = ($tribe-1)*10+1;
for($i=$start;$i<=($start+9);$i++) {
$start = ($tribe - 1) * 10 + 1;
for($i = $start; $i <= ($start + 9); $i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($dataarray[13]!=0){
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" /></td>";
}
if($dataarray[13] > 0) echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" /></td>";
echo "</tr><tr><th>Troops</th>";
for($i=3;$i<13;$i++) {
$unitarray['u'.($i-3+$start).''] = $dataarray[$i];
if($dataarray[$i] == 0) {
echo "<td class=\"none\">0</td>";
}
else {
echo "<td>".$dataarray[$i]."</td>";
}
for($i = 3; $i < 13; $i++) {
$unitarray['u'.($i - 3 + $start)] = $dataarray[$i];
if($dataarray[$i] == 0) echo "<td class=\"none\">0</td>";
else echo "<td>".$dataarray[$i]."</td>";
}
if($dataarray[13] != 0) {
echo "<td>".$dataarray[13]."</td>";
$unitarray['hero'] = 1;
if($dataarray[13] > 0) {
echo "<td>".$dataarray[13]."</td>";
$unitarray['hero'] = 1;
}
?></tr></tbody>
<tbody class="infos"><tr><th>upkeep</th><td colspan="11">
<?php echo $technology->getUpkeep($unitarray,$dataarray[2]); ?><img src="img/x.gif" class="r4" title="Crop" alt="Crop" />per hour</td>
<?php echo $technology->getUpkeep($unitarray, $dataarray[2]); ?><img src="img/x.gif" class="r4" title="Crop" alt="Crop" />per hour</td>
</tr></tbody>
</table></td></tr></tbody></table>
</table></td></tr></tbody></table>
+1 -2
View File
@@ -1,4 +1,3 @@
<?php
$archive = $database->getNotice2($_GET['id'], 'archive');
include("".$archive.".tpl");
include($database->getNotice2($_GET['id'], 'archive').".tpl");
?>
-4
View File
@@ -1,4 +0,0 @@
<?php
$archive = $database->getNotice2($_GET['id'], 'archive');
include("".$archive."x.tpl");
?>
+17 -40
View File
@@ -93,50 +93,27 @@ if(isset($_GET['newdid'])) {
?>
</div>
<?php
if ( isset( $_GET['aid'] ) ) {
if ( $_GET['aid'] != 0 ) {
if ( $session->alliance == $_GET['aid'] ) {
if ( isset( $_GET['id'] ) ) {
$ally = $database->getNotice2( preg_replace( "/[^a-zA-Z0-9_-]/", "", $_GET['id'] ), 'ally' );
if ( $session->alliance == $ally ) {
$type = $database->getNotice2( preg_replace( "/[^a-zA-Z0-9_-]/", "", $_GET['id'] ), 'ntype' );
if ( $type != 10 or $type != 11 or $type != 12 or $type != 13 or $type != 14 or $type != 15 or $type != 16 or $type != 17 ) {
include( "Templates/Notice/" . $type . "x.tpl" );
}
}
}
}
if (isset($_GET['id']))
{
if (isset($_GET['aid']) && $_GET['aid'] > 0 && $_GET['aid'] == $session->alliance)
{
$type = $database->getNotice2($_GET['id'], 'ntype');
if ($type >= 10 && $type <= 17) unset($type);
}
} else if ( isset( $_GET['vill'] ) ) {
if ( isset( $_GET['id'] ) ) {
$ally = $database->getNotice2( $_GET['id'], 'ally' );
if ( $database->getNotice2( preg_replace( "/[^a-zA-Z0-9_-]/", "", $_GET['id'] ), 'uid' ) == $session->uid ) {
$type = ( $message->readingNotice['ntype'] == 9 ) ? $message->readingNotice['archive'] : $message->readingNotice['ntype'];
include( "Templates/Notice/" . $type . ".tpl" );
} else if ( $session->alliance == $ally ) {
$type = $database->getNotice2( $_GET['id'], 'ntype' );
if ( $type != 10 or $type != 11 or $type != 12 or $type != 13 or $type != 14 or $type != 15 or $type != 16 or $type != 17 ) {
include( "Templates/Notice/" . $type . "x.tpl" );
}
}
elseif(isset($_GET['vill']) && $database->getNotice2($_GET['id'], 'ally') == $session->alliance)
{
$type = $database->getNotice2($_GET['id'], 'ntype');
if ($type >= 10 && $type <= 17) unset($type);
}
} else if ( isset( $_GET['id'] ) ) {
if ( $database->getNotice2( preg_replace( "/[^a-zA-Z0-9_-]/", "", $_GET['id'] ), 'uid' ) == $session->uid ) {
$type = ( $message->readingNotice['ntype'] == 9 ) ? $message->readingNotice['archive'] : $message->readingNotice['ntype'];
include( "Templates/Notice/" . $type . ".tpl" );
elseif($database->getNotice2(preg_replace("/[^a-zA-Z0-9_-]/", "", $_GET['id']), 'uid') == $session->uid)
{
$type = ($message->readingNotice['ntype'] == 9) ? $message->readingNotice['archive'] : $message->readingNotice['ntype'];
}
} else {
include( "Templates/Notice/all.tpl" );
if(isset($type)) include("Templates/Notice/".$message->getReportType($type).".tpl");
unset($type);
}
else include("Templates/Notice/all.tpl");
?>
</div>