Files
TravianZ/Templates/Alliance/attack-attacker.tpl
T
Pietro Fallanca 274d89bfa1 Fixed a lot of bugs/security issues in the alliance
+You can no longer kick people of other alliances
+You can no longer change the forum link with no permissions
+You can no longer make more than 3 total confederation and 3 total NAP
+You can no longer send a diplomacy pact to an alliance with already one
pact or one pending pact
+You can no longer handle diplomacy without permissions
+Fixed security bugs related to invites (sending, deleting etc.)
+You can no longer access to any alliance submenus without permissions
(kick menu, diplomacy menu, etc.)
+Errors are now shown correctly and better handling of them
+New forum link and alliance description are shown correctly after
editing them
+You can no longer access to other alliances informations without being
in it (attack reports, news, etc)
+Corrected some alliance news
+Added some language constants to en.php
+Fixed and changed some database.php functions alliance related
2018-04-15 16:11:43 +02:00

75 lines
2.5 KiB
Smarty

<?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 AND ntype!=16 AND ntype!=17 AND ntype!=20 AND ntype!=21";
$sql = mysqli_query($database->dblink,"SELECT * FROM $prefix WHERE ally = ".(int) $session->alliance." AND $limit ORDER BY time DESC LIMIT 20");
$query = mysqli_num_rows($sql);
$outputList = '';
$name = 1;
if($query == 0) {
$outputList .= "<td colspan=\"4\" class=\"none\">There are no reports available.</td>";
}else{
while($row = mysqli_fetch_array($sql)){
$dataarray = explode(",",$row['data']);
$id = $row["id"];
$uid = $row["uid"];
$ally = $row["ally"];
$topic = $row["topic"];
$ntype = $row["ntype"];
$data = $row["data"];
$time = $row["time"];
$viewed = $row["viewed"];
$archive = $row["archive"];
$outputList .= "<tr>";
$outputList .= "<td class=\"sub\">";
if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
$type2 = '32';
}else{
$type2 = '31';
}
$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 "; }
$outputList .= $database->getUserField($dataarray[0], "username", 0);
$outputList .= $nn;
$outputList .= $database->getUserField($dataarray[28], "username", 0);
$getUserAlly = $database->getUserField($dataarray[28], "alliance", 0);
$getAllyName = $database->getAllianceName($getUserAlly);
if($getUserAlly==$session->alliance || !$getUserAlly){
$allyName = "-";
}else{
$allyName = "<a href=\"allianz.php?aid=".$getUserAlly."\">".$getAllyName."</a>";
}
$outputList .= "<td class=\"al\">".$allyName."</td>";
$date = $generator->procMtime($time);
$outputList .= "<td class=\"dat\">".$date[0]." ".date('H:i',$time)."</td>";
$outputList .= "</tr>";
$name++;
}
}
?>
<table cellpadding="1" cellspacing="1" id="offs">
<thead>
<tr>
<td>Player</td>
<td>Alliance</td>
<td>Date</td>
</tr>
</thead>
<tbody>
<?php echo $outputList; ?>
</tbody>
</table>