fix scouts icons and reports 100% + fix reinforcement attacked types and icons (not 100%)

This commit is contained in:
unknown
2012-04-10 20:31:07 +03:00
parent c2a09eca5e
commit 59842cde63
23 changed files with 2426 additions and 585 deletions
+17 -3
View File
@@ -965,7 +965,13 @@ private function loyaltyRegeneration() {
}
//NEED TO SEND A RAPPORTAGE!!!
$data2 = ''.$database->getVillageField($enforce['from'],"owner").','.$to['wref'].','.addslashes($to['name']).','.$tribe.''.$life.''.$notlife.'';
if($notlife == 0){
$database->addNotice($database->getVillageField($enforce['from'],"owner"),$from['wref'],$ownally,15,'Reinforcement in '.addslashes($to['name']).' was attacked',$data2,$AttackArrivalTime);
}else if($life > $notlife){
$database->addNotice($database->getVillageField($enforce['from'],"owner"),$from['wref'],$ownally,16,'Reinforcement in '.addslashes($to['name']).' was attacked',$data2,$AttackArrivalTime);
}else{
$database->addNotice($database->getVillageField($enforce['from'],"owner"),$from['wref'],$ownally,17,'Reinforcement in '.addslashes($to['name']).' was attacked',$data2,$AttackArrivalTime);
}
//delete reinf sting when its killed all.
if($wrong=='0'){ $database->deleteReinf($enforce['id']); }
}
@@ -1837,15 +1843,23 @@ $crannyimg = "<img src=\"gpack/travian_default/img/g/g23.gif\" height=\"30\" wid
// When all troops die, sends no info.
$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_def[1].','.$unitsdead_deff[1].','.$ger.','.$unitssend_def[2].','.$unitsdead_deff[2].','.$gal.','.$unitssend_def[3].','.$unitsdead_deff[3].','.$nat.','.$unitssend_def[4].','.$unitsdead_deff[4].','.$natar.','.$unitssend_def[5].','.$unitsdead_deff[5].',,,';
$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].',,,';
//Undetected and detected in here.
if($scout){
for($i=1;$i<=10;$i++)
{
if($battlepart['casualties_attacker'][$i]){
if($from['owner'] == 3){
$database->addNotice($to['owner'],$to['wref'],$targetally,0,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
break;
}else if($unitsdead_att == $unitssend_att){
$database->addNotice($to['owner'],$to['wref'],$targetally,20,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
break;
}else{
$database->addNotice($to['owner'],$to['wref'],$targetally,21,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
break;
}
}
}
}
@@ -1868,7 +1882,7 @@ $crannyimg = "<img src=\"gpack/travian_default/img/g/g23.gif\" height=\"30\" wid
$endtime = $this->procDistanceTime($from,$to,min($speeds),1) + $AttackArrivalTime;
//$endtime = $this->procDistanceTime($from,$to,min($speeds),1) + time();
if($type == 1) {
$database->addNotice($from['owner'],$to['wref'],$ownally,0,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
$database->addNotice($from['owner'],$to['wref'],$ownally,18,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
}else {
if ($totaldead_att == 0){
$database->addNotice($from['owner'],$to['wref'],$ownally,1,''.addslashes($from['name']).' attacks '.addslashes($to['name']).'',$data2,$AttackArrivalTime);
@@ -1899,7 +1913,7 @@ $crannyimg = "<img src=\"gpack/travian_default/img/g/g23.gif\" height=\"30\" wid
{
$database->setMovementProc($data['moveid']);
if($type == 1){
$database->addNotice($from['owner'],$to['wref'],$ownally,0,''.addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data_fail,$AttackArrivalTime);
$database->addNotice($from['owner'],$to['wref'],$ownally,19,addslashes($from['name']).' scouts '.addslashes($to['name']).'',$data_fail,$AttackArrivalTime);
}else{
$database->addNotice($from['owner'],$to['wref'],$ownally,3,''.addslashes($from['name']).' attacks '.addslashes($to['name']).'',$data_fail,$AttackArrivalTime);
}
+5 -1
View File
@@ -1,6 +1,6 @@
<?php
$prefix = "".TB_PREFIX."ndata";
$limit = "ntype!=0 AND ntype!=4 AND ntype!=5 AND ntype!=6 AND ntype!=7 AND ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15";
$limit = "ntype!=0 AND ntype!=4 AND ntype!=5 AND ntype!=6 AND ntype!=7 AND ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15 AND ntype!=16 AND ntype!=17 AND ntype!=20 AND ntype!=21";
$sql = mysql_query("SELECT * FROM $prefix WHERE ally = $session->alliance AND $limit ORDER BY time DESC LIMIT 20");
$query = mysql_num_rows($sql);
$outputList = '';
@@ -29,7 +29,11 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
}
$outputList .= "<a href=\"allianz.php?s=3&f=".$type2."\">";
$type = (isset($_GET['t']) && $_GET['t'] == 5)? $archive : $ntype;
if($type==18 or $type==19){
$outputList .= "<img src=\"gpack/travian_default/img/scouts/$type.gif\" title=\"".$topic."\" />";
}else{
$outputList .= "<img src=\"img/x.gif\" class=\"iReport iReport$type\" title=\"".$topic."\">";
}
$outputList .= "</a>";
$outputList .= "<div><a href=\"berichte.php?id=".$id."&aid=".$ally."\">";
if($ntype==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
+5 -1
View File
@@ -1,6 +1,6 @@
<?php
$prefix = "".TB_PREFIX."ndata";
$limit = "ntype!=0 AND ntype!=1 AND ntype!=2 AND ntype!=3 AND ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15";
$limit = "ntype!=1 AND ntype!=2 AND ntype!=3 AND ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15 AND ntype!=16 AND ntype!=17 AND ntype!=18 AND ntype!=19";
$sql = mysql_query("SELECT * FROM $prefix WHERE ally = $session->alliance AND $limit ORDER BY time DESC LIMIT 20");
$query = mysql_num_rows($sql);
$outputList = '';
@@ -30,7 +30,11 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
}
$outputList .= "<a href=\"allianz.php?s=3&f=".$type2."\">";
$type = (isset($_GET['t']) && $_GET['t'] == 5)? $archive : $ntype;
if($type==20 or $type==21){
$outputList .= "<img src=\"gpack/travian_default/img/scouts/$type.gif\" title=\"".$topic."\" />";
}else{
$outputList .= "<img src=\"img/x.gif\" class=\"iReport iReport$type\" title=\"".$topic."\">";
}
$outputList .= "</a>";
$outputList .= "<div><a href=\"berichte.php?id=".$id."&aid=".$ally."\">";
if($ntype==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
+6 -2
View File
@@ -27,7 +27,7 @@ include("alli_menu.tpl");
include "Templates/Alliance/attack-defender.tpl";
}else{
$prefix = "".TB_PREFIX."ndata";
$limit = "ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=15";
$limit = "ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15 AND ntype!=16 AND ntype!=17";
$sql = mysql_query("SELECT * FROM $prefix WHERE ally = $session->alliance AND $limit ORDER BY time DESC LIMIT 20");
$query = mysql_num_rows($sql);
$outputList = '';
@@ -57,7 +57,11 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
}
$outputList .= "<a href=\"allianz.php?s=3&f=".$type2."\">";
$type = (isset($_GET['t']) && $_GET['t'] == 5)? $archive : $ntype;
if($type==18 or $type==19 or $type==20 or $type==21){
$outputList .= "<img src=\"gpack/travian_default/img/scouts/$type.gif\" title=\"".$topic."\" />";
}else{
$outputList .= "<img src=\"img/x.gif\" class=\"iReport iReport$type\" title=\"".$topic."\">";
}
$outputList .= "</a>";
$outputList .= "<div><a href=\"berichte.php?id=".$id."&aid=".$ally."\">";
if($ntype==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
@@ -82,7 +86,7 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
}
}
$getUserAlly = $database->getUserField($getUser,alliance,0);
}else if($ntype==1 or $ntype==2 or $ntype==3){
}else if($ntype==1 or $ntype==2 or $ntype==3 or $ntype==18 or $ntype==19){
$getUserAlly = $database->getUserField($dataarray[28],alliance,0);
}else{
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
+41 -4
View File
@@ -149,7 +149,7 @@ if($oasis['owner'] == 2){
if($session->uid == $database->getVillage($_GET['d'])){
$limit = "ntype=0 and ntype=4 and ntype=5 and ntype=6 and ntype=7";
}else{
$limit = "ntype!=8 and ntype!=9 and ntype!=10 and ntype!=11 and ntype!=12 and ntype!=13 and ntype!=14";
$limit = "ntype!=8 and ntype!=9 and ntype!=10 and ntype!=11 and ntype!=12 and ntype!=13 and ntype!=14 AND ntype!=15 AND ntype!=16 AND ntype!=17";
}
$toWref = $_GET['d'];
if($session->alliance!=0){
@@ -160,7 +160,11 @@ while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']);
$type = $row['ntype'];
echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
}else{
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
}
$date = $generator->procMtime($row['time']);
echo "<a href=\"berichte.php?id=".$row['id']."&vill=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
echo "</td></tr>";
@@ -180,7 +184,11 @@ while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']);
$type = $row['ntype'];
echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
}else{
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
}
$date = $generator->procMtime($row['time']);
echo "<a href=\"berichte.php?id=".$row['id']."&vill=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
echo "</td></tr>";
@@ -238,9 +246,9 @@ while($row = mysql_fetch_array($result)){
<tbody>
<?php
if($session->uid == $database->getVillage($_GET['d'])){
$limit = "ntype=0 and ntype=4 and ntype=5 and ntype=6 and ntype=7";
$limit = "ntype=0 and ntype=4 and ntype=5 and ntype=6 and ntype=7 and ntype=20 and ntype=21";
}else{
$limit = "ntype!=8 and ntype!=9 and ntype!=10 and ntype!=11 and ntype!=12 and ntype!=13 and ntype!=14";
$limit = "ntype!=8 and ntype!=9 and ntype!=10 and ntype!=11 and ntype!=12 and ntype!=13 and ntype!=14 and ntype!=15 and ntype!=16 and ntype!=17";
}
$toWref = $_GET['d'];
if($session->alliance!=0){
@@ -251,7 +259,11 @@ while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']);
$type = $row['ntype'];
echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
}else{
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
}
$date = $generator->procMtime($row['time']);
echo "<a href=\"berichte.php?id=".$row['id']."&vill=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
echo "</td></tr>";
@@ -271,7 +283,11 @@ while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']);
$type = $row['ntype'];
echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
}else{
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
}
$date = $generator->procMtime($row['time']);
echo "<a href=\"berichte.php?id=".$row['id']."&vill=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
echo "</td></tr>";
@@ -358,7 +374,7 @@ while($row = mysql_fetch_array($result)){
if($session->uid == $database->getVillage($_GET['d'])){
$limit = "ntype=0 and ntype=4 and ntype=5 and ntype=6 and ntype=7";
}else{
$limit = "ntype!=8 and ntype!=9 and ntype!=10 and ntype!=11 and ntype!=12 and ntype!=13 and ntype!=14";
$limit = "ntype!=8 and ntype!=9 and ntype!=10 and ntype!=11 and ntype!=12 and ntype!=13 and ntype!=14 AND ntype!=15 AND ntype!=16 AND ntype!=17";
}
$toWref = $_GET['d'];
if($session->alliance!=0){
@@ -369,7 +385,24 @@ while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']);
$type = $row['ntype'];
echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
}else{
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
}
$date = $generator->procMtime($row['time']);
echo "<a href=\"berichte.php?id=".$row['id']."&vill=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
echo "</td></tr>";
}
while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']);
$type = $row['ntype'];
echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
}else{
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
}
$date = $generator->procMtime($row['time']);
echo "<a href=\"berichte.php?id=".$row['id']."&vill=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
echo "</td></tr>";
@@ -389,7 +422,11 @@ while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']);
$type = $row['ntype'];
echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
}else{
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
}
$date = $generator->procMtime($row['time']);
echo "<a href=\"berichte.php?id=".$row['id']."&vill=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
echo "</td></tr>";
+57
View File
@@ -0,0 +1,57 @@
<?php
//reinforcement is underattack
$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" class="defender"><thead>
<tr>
<td class="role">Defender</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> in the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$start = $dataarray[3] == 1? 1 : (($dataarray[3] == 2)? 11 : (($dataarray[3] == 3)? 21 : 31));
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
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>";
}
}
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>";
}
}
?>
</tr></tbody>
</table>
</td></tr></tbody></table>
+57
View File
@@ -0,0 +1,57 @@
<?php
//reinforcement is underattack
$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" class="defender"><thead>
<tr>
<td class="role">Defender</td>
<td colspan="10"><a href="spieler.php?uid=<?php echo $database->getUserField($dataarray[0],"id",0); ?>"><?php echo $database->getUserField($dataarray[0],"username",0); ?></a> in the village <a href="karte.php?d=<?php echo $dataarray[1]."&amp;c=".$generator->getMapCheck($dataarray[1]); ?>"><?php echo $database->getVillageField($dataarray[1],"name"); ?></a></td>
</tr>
</thead>
<tbody class="units">
<tr>
<td>&nbsp;</td>
<?php
$start = $dataarray[3] == 1? 1 : (($dataarray[3] == 2)? 11 : (($dataarray[3] == 3)? 21 : 31));
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
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>";
}
}
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>";
}
}
?>
</tr></tbody>
</table>
</td></tr></tbody></table>
+283
View File
@@ -0,0 +1,283 @@
<?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
$start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == 3)? 21 : 31));
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
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>
+286
View File
@@ -0,0 +1,286 @@
<?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
$start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == 3)? 21 : 31));
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
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>
+256
View File
@@ -0,0 +1,256 @@
<?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
$start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == 3)? 21 : 31));
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
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>";
?>
</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>
+259
View File
@@ -0,0 +1,259 @@
<?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
$start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == 3)? 21 : 31));
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
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>";
?>
</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>
+283
View File
@@ -0,0 +1,283 @@
<?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
$start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == 3)? 21 : 31));
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
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>
+286
View File
@@ -0,0 +1,286 @@
<?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
$start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == 3)? 21 : 31));
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
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>
+283
View File
@@ -0,0 +1,283 @@
<?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
$start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == 3)? 21 : 31));
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
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>
+286
View File
@@ -0,0 +1,286 @@
<?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
$start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == 3)? 21 : 31));
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
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>
+3 -284
View File
@@ -1,285 +1,4 @@
<?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
$start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == 3)? 21 : 31));
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
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 } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</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="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>
$archive = $database->getNotice2($_GET['id'], 'archive');
include("".$archive.".tpl");
?>
+3 -287
View File
@@ -1,288 +1,4 @@
<?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
$start = $dataarray[2] == 1? 1 : (($dataarray[2] == 2)? 11 : (($dataarray[2] == 3)? 21 : 31));
for($i=$start;$i<=($start+9);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
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 } ?>
<tbody class="goods"><tr><th>Bounty</th><td colspan="10">
<div class="res"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $dataarray[23]; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $dataarray[24]; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $dataarray[25]; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $dataarray[26]; ?></div><div class="carry"><img class="car" src="img/x.gif" alt="carry" title="carry" /><?php echo ($dataarray[23]+$dataarray[24]+$dataarray[25]+$dataarray[26])."/".$dataarray[27]; ?></div>
</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="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>
$archive = $database->getNotice2($_GET['id'], 'archive');
include("".$archive."x.tpl");
?>
+8 -1
View File
@@ -1,5 +1,5 @@
<?php
$noticeClass = array("Scout Report","Won as attacker without losses","Won as attacker with losses","Lost as attacker with losses","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Lost as defender without losses","Reinforcement arrived","","Wood Delivered","Clay Delivered","Iron Delivered","Crop Delivered","","Reinforcement Attacked");
$noticeClass = array("Scout Report","Won as attacker without losses","Won as attacker with losses","Lost as attacker with losses","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Lost as defender without losses","Reinforcement arrived","","Wood Delivered","Clay Delivered","Iron Delivered","Crop Delivered","","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Won scouting as attacker","Lost scouting as attacker","Won scouting as defender","Lost scouting as defender");
?>
<form method="post" action="berichte.php" name="msg">
<table cellpadding="1" cellspacing="1" id="overview"
@@ -68,7 +68,14 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
echo "<tr><td class=\"sel\"><input class=\"check\" type=\"checkbox\" name=\"n".$name."\" value=\"".$message->noticearray[$i-1]['id']."\" /></td>
<td class=\"sub\">";
$type = (isset($_GET['t']) && $_GET['t'] == 5)? $message->noticearray[$i-1]['archive'] : $message->noticearray[$i-1]['ntype'];
if($type==15 or $type==16 or $type==17){
$type = $type-11;
echo "<img src=\"img/x.gif\" class=\"iReport iReport$type\" alt=\"".$noticeClass[$type]."\" title=\"".$noticeClass[$type]."\" />";
}else if($type==18 or $type==19 or $type==20 or $type==21){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$noticeClass[$type]."\" title=\"".$noticeClass[$type]."\" />";
}else{
echo "<img src=\"img/x.gif\" class=\"iReport iReport$type\" alt=\"".$noticeClass[$type]."\" title=\"".$noticeClass[$type]."\" />";
}
echo "<div><a href=\"berichte.php?id=".$message->noticearray[$i-1]['id']."\">".$message->noticearray[$i-1]['topic']."</a> ";
if($message->noticearray[$i-1]['viewed'] == 0) {
echo "(new)";
+2 -2
View File
@@ -92,7 +92,7 @@ if($_GET['aid']!=0){
$ally = $database->getNotice2($_GET['id'], 'ally');
if($session->alliance==$ally){
$type = $database->getNotice2($_GET['id'], 'ntype');
if($type==0 or $type==1 or $type==2 or $type==3 or $type==4 or $type==5 or $type==6 or $type==7 or $type==9){
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");
}
}
@@ -108,7 +108,7 @@ if($_GET['aid']!=0){
include("Templates/Notice/".$type.".tpl");
}else if($session->alliance==$ally){
$type = $database->getNotice2($_GET['id'], 'ntype');
if($type==0 or $type==1 or $type==2 or $type==3 or $type==4 or $type==5 or $type==6 or $type==7 or $type==9){
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");
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB