forked from halo-battle/game
Correctifs sur la page de préparation d'envoie des flotte
This commit is contained in:
parent
52e4266218
commit
c56099e3b0
8 changed files with 125 additions and 58 deletions
|
|
@ -5,7 +5,29 @@ if (!defined('INDEX')) {
|
|||
}
|
||||
|
||||
$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).";");
|
||||
$sql = "";
|
||||
if ($planete->id_user != null) {
|
||||
$sql = "id_user = " . $planete->id_user . " ";
|
||||
}
|
||||
if ($planete->id != null) {
|
||||
if ($sql != "") {
|
||||
$sql .= " OR ";
|
||||
}
|
||||
$sql .= "end_planete = " . $planete->id . " ";
|
||||
}
|
||||
if ($planete->id_alliance != null) {
|
||||
if ($sql != "") {
|
||||
$sql .= " OR ";
|
||||
}
|
||||
$sql .= "id_alliance = " . $planete->id_alliance . " ";
|
||||
}
|
||||
if ($planete->id_alliance != null) {
|
||||
if ($sql != "") {
|
||||
$sql .= " OR ";
|
||||
}
|
||||
$sql .= "end_planete = " . $planete->id_alliance . " ";
|
||||
}
|
||||
$flottes = $bdd->query("SELECT id FROM $table_flottes WHERE (" . $sql . ") AND (start_time + end_time) <= ".time()." AND last < ".(time()-10).";");
|
||||
$bdd->deconnexion();
|
||||
|
||||
if (!empty($flottes)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue