game/onyx2/include/flottes.php
2020-11-21 16:07:49 +01:00

18 lines
577 B
PHP

<?php
if (!defined('INDEX')) {
header('Location: ../');
exit;
}
$bdd->reconnexion();
$flottes = $bdd->query("SELECT id FROM $table_flottes WHERE (id_user = ".$planete->id_user." OR end_planete = ".$planete->id." OR id_alliance = ".$planete->id_alliance." OR end_planete = ".$planete->id_alliance.") AND (start_time + end_time) <= ".time()." AND last < ".(time()-10).";");
$bdd->deconnexion();
if (!empty($flottes)) {
foreach ($flottes as $flotte) {
$flotte = new Flotte($flotte['id']);
$flotte->check_mission();
}
}
unset($flottes, $flotte);