$OtherFleets = doquery("SELECT * FROM {{table}} WHERE `fleet_target_owner` = '" . $user['id'] . "';", 'fleets'); $Record = 2000; while ($FleetRow = mysql_fetch_array($OtherFleets)) { if ($FleetRow['fleet_owner'] != $user['id']) { if ($FleetRow['fleet_mission'] != 8) { $Record++; $StartTime = $FleetRow['fleet_start_time']; $StayTime = $FleetRow['fleet_end_stay']; if ($StartTime > time()) { $Label = "ofs"; $fpage[$StartTime] = BuildFleetEventTable($FleetRow, 0, false, $Label, $Record); } if ($FleetRow['fleet_mission'] == 5) { $Label = "oft"; if ($StayTime > time()) { $fpage[$StayTime] = BuildFleetEventTable($FleetRow, 1, false, $Label, $Record); } } } } } mysql_free_result($OtherFleets); $Order = $user['planet_sort_order'] == 1 ? "DESC" : "ASC"; $Sort = $user['planet_sort']; $QryPlanets = "SELECT * FROM {{table}} WHERE `id_owner` = '" . $user['id'] . "' ORDER BY "; if ($Sort == 0) { $QryPlanets .= "`id` " . $Order; } elseif ($Sort == 1) { $QryPlanets .= "`galaxy`, `system`, `planet`, `planet_type` " . $Order; } elseif ($Sort == 2) { $QryPlanets .= "`name` " . $Order;
$FleetRow['fleet_resource_crystal'] = 0; $FleetRow['fleet_resource_deuterium'] = 0; $Label = "fs"; if ($StartTime > time()) { $fpage[$StartTime] = BuildFleetEventTable($FleetRow, 0, $FleetType, $Label, $Record); } if ($FleetRow['fleet_mission'] != 4) { $Label = "ft"; if ($StayTime > time()) { $fpage[$StayTime] = BuildFleetEventTable($FleetRow, 1, $FleetType, $Label, $Record); } if ($FleetType == true) { // On n'affiche les flottes en retour que pour les flottes du possesseur de la planete $Label = "fe"; if ($EndTime > time()) { $fpage[$EndTime] = BuildFleetEventTable($FleetRow, 2, $FleetType, $Label, $Record); } } } } // End While } if (count($fpage) > 0) { ksort($fpage); foreach ($fpage as $FleetTime => $FleetContent) { $Fleets .= $FleetContent . "\n"; } } } $parse['phl_fleets_table'] = $Fleets; $page = parsetemplate($PageTPL, $parse);