$battle_count = count($clan_api_battleinfo);
//var_dump($battle_count);die;
echo "<table border=\"1\">";
echo "<tr><th>Zeit</th><th width=\"5px\"> </th><th>Gefechtstyp</th><th width=\"5px\"> </th><th>Angriffstyp</th><th width=\"5px\"> </th><th>Gegner</th><th width=\"5px\"> </th><th>Clantag</th><th width=\"5px\"> </th><th>Provinz</th><th width=\"5px\"> </th><th>Karte</th></tr>";
echo "<tr><td colspan=\"13\"> </td></tr>";
for ($i = 0; $i < $battle_count; $i++){
$time = date("d.m.Y - H:i",$clan_api_battleinfo[$i]["time"]);
// mehr abfragen hier die nur zusammen gesetzt für die anzeige der gefechte wichtig sind....
// wichtig wäre nur der Punkt time, wo alle Gefechte für den tag drin sind... die eingekürzt werden müssen in der
// Anzeige unten der Tabelle.... Sprich Nur die Tabelle füllen für den Zeitraum $time >= $now && $time <= $now
// +2 stunden
//--------------------------------------------------------------
echo "<tr>";
echo "<td>".$time."</td><td width=\"5px\"></td><td>".$attack_type."</td><td width=\"5px\"></td><td>".$battle_type."</td><td width=\"5px\"></td><td>".$competitor_name."</td><td width=\"5px\"></td><td>".$competitor_tag."</td><td width=\"5px\"></td><td>".$province_name."</td><td width=\"5px\"></td><td>".$arena_name."</td>";
echo "</tr>";
echo "<tr><td colspan=\"13\"> </td></tr>";
// -------------------------------------------------------------
}
//var_dump($member_counts);die;
echo "</table>";
} catch( Exception $e) {
//exit('Error: '.$e->getMessage());
echo "<table border=\"1\">";
echo "<tr><th>Zeit</th><th width=\"5px\"> </th><th>Gefechtstyp</th><th width=\"5px\"> </th><th>Angriffstyp</th><th width=\"5px\"> </th><th>Gegner</th><th width=\"5px\"> </th><th>Clantag</th><th width=\"5px\"> </th><th>Provinz</th><th width=\"5px\"> </th><th>Karte</th></tr>";
echo "<tr><td colspan=\"13\"> </td></tr>";
echo "</table>";
}
Bei dem script werden alle gefechte aus der wot api angezeigt. Nun möchte ich aber die Anzeige einschränken . SO das alles zwischen now und + 2 stunden nur angezeigt wird.... sprich alles vergangene soll ausgeblendet werden. da im moment das so nicht seitens der wot /wg api gemacht wird...
verwendete ilch Version: 2.1.x
betroffene Homepage: locahost


