* All rights reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * --> NOTICE <-- * This file is part of the core development branch, changing its contents will * make you unable to use the automatic updates manager. Please refer to the * documentation for further information about customizing XNova. * */ define('INSIDE' , true); define('INSTALL' , false); require_once dirname(__FILE__) .'/common.php'; $maxfleet = doquery("SELECT COUNT(fleet_owner) AS `actcnt` FROM {{table}} WHERE `fleet_owner` = '".$user['id']."';", 'fleets', true); $MaxFlyingFleets = $maxfleet['actcnt']; //Compteur de flotte en expéditions et nombre d'expédition maximum $MaxExpedition = $user[$resource[124]]; if ($MaxExpedition >= 1) { $maxexpde = doquery("SELECT COUNT(fleet_owner) AS `expedi` FROM {{table}} WHERE `fleet_owner` = '".$user['id']."' AND `fleet_mission` = '15';", 'fleets', true); $ExpeditionEnCours = $maxexpde['expedi']; $EnvoiMaxExpedition = 1 + floor( $MaxExpedition / 3 ); } $MaxFlottes = 1 + $user[$resource[108]]; CheckPlanetUsedFields($planetrow); includeLang('fleet'); $missiontype = array( 1 => $lang['type_mission'][1], 2 => $lang['type_mission'][2], 3 => $lang['type_mission'][3], 4 => $lang['type_mission'][4], 5 => $lang['type_mission'][5], 6 => $lang['type_mission'][6], 7 => $lang['type_mission'][7], 8 => $lang['type_mission'][8], 9 => $lang['type_mission'][9], 15 => $lang['type_mission'][15] ); // Histoire de recuperer les infos passées par galaxy $galaxy = $_GET['galaxy']; $system = $_GET['system']; $planet = $_GET['planet']; $planettype = $_GET['planettype']; $target_mission = $_GET['target_mission']; if (!$galaxy) { $galaxy = $planetrow['galaxy']; } if (!$system) { $system = $planetrow['system']; } if (!$planet) { $planet = $planetrow['planet']; } if (!$planettype) { $planettype = $planetrow['planet_type']; } $page = "\n"; $page .= "\n"; $page .= "
"; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; // $page .= ""; $page .= ""; $page .= ""; $page .= ""; // Gestion des flottes du joueur actif $fq = doquery("SELECT * FROM {{table}} WHERE fleet_owner={$user[id]}", "fleets"); $i = 0; while ($f = mysql_fetch_array($fq)) { $i++; $page .= ""; // (01) Fleet ID $page .= ""; // (02) Fleet Mission $page .= ""; // (03) Fleet Mission $page .= ""; // (04) Fleet From (Planete d'origine) $page .= ""; // (05) Fleet Start Time $page .= ""; // (06) Fleet Target (Planete de destination) $page .= ""; // (07) Fleet Target Time $page .= ""; // (08) Fleet Back Time // $page .= ""; // (09) Fleet Back In $page .= ""; // (10) Orders $page .= ""; // Fin de ligne $page .= ""; } // Y a pas de flottes en vol ... on met des '-' if ($i == 0) { $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; // $page .= ""; $page .= ""; $page .= ""; $page .= ""; } if ($MaxFlottes == $MaxFlyingFleets) { $page .= ""; } $page .= "
"; $page .= ""; $page .= ""; $page .= ""; $page .= "
"; $page .= $lang['fl_title']." ".$MaxFlyingFleets." ".$lang['fl_sur']." ".$MaxFlottes; $page .= ""; $page .= $ExpeditionEnCours."/".$EnvoiMaxExpedition." ".$lang['fl_expttl']; $page .= "
"; $page .= "
".$lang['fl_id']."".$lang['fl_mission']."".$lang['fl_count']."".$lang['fl_from']."".$lang['fl_start_t']."".$lang['fl_dest']."".$lang['fl_dest_t']."".$lang['fl_back_t']."".$lang['fl_back_in']."".$lang['fl_order']."
".$i.""; $page .= "". $missiontype[$f[fleet_mission]] .""; if (($f['fleet_start_time'] + 1) == $f['fleet_end_time']) { $page .= "
".$lang['fl_back_to'].""; } else { $page .= "
".$lang['fl_get_to'].""; } $page .= "
$b) { if ($b != '') { $e++; $a = explode(",", $b); $page .= $lang['tech'][$a[0]]. ":". $a[1] ."\n"; if ($e > 1) { $page .= "\t"; } } } $page .= "\">". pretty_number($f[fleet_amount]) ."[".$f[fleet_start_galaxy].":".$f[fleet_start_system].":".$f[fleet_start_planet]."]". gmdate("d. M Y H:i:s", $f['fleet_start_time']) ."[".$f[fleet_end_galaxy].":".$f[fleet_end_system].":".$f[fleet_end_planet]."]". gmdate("d. M Y H:i:s", $f['fleet_end_time']) ."
". pretty_time(floor($f['fleet_end_time'] + 1 - time())) ."
". pretty_time(floor($f['fleet_end_time'] + 1 - time())) ."
"; if ($f['fleet_mess'] == 0) { $page .= "
"; $page .= ""; $page .= ""; $page .= "
"; if ($f[fleet_mission] == 1) { $page .= "
"; $page .= ""; $page .= ""; $page .= "
"; } } else { $page .= " - "; } $page .= "
----------
".$lang['fl_noslotfree']."
"; $page .= "
"; // Selection d'une nouvelle mission $page .= "
"; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; if (!$planetrow) { message($lang['fl_noplanetrow'], $lang['fl_error']); } // Prise des coordonnées sur la ligne de commande $galaxy = intval($_GET['galaxy']); $system = intval($_GET['system']); $planet = intval($_GET['planet']); $planettype = intval($_GET['planettype']); $target_mission = intval($_GET['target_mission']); $ShipData = ""; foreach ($reslist['fleet'] as $n => $i) { if ($planetrow[$resource[$i]] > 0) { $page .= ""; $page .= ""; $page .= ""; // Satelitte Solaire (eux ne peuvent pas bouger !) if ($i == 212) { $page .= ""; } else { $page .= ""; $page .= ""; } $page .= ""; } $have_ships = true; } $btncontinue = ""; $page .= ""; if (!$have_ships) { // Il n'y a pas de vaisseaux sur cette planete $page .= ""; $page .= ""; $page .= $btncontinue; } else { $page .= ""; $page .= ""; $page .= ""; if ($MaxFlottes > $MaxFlyingFleets) { $page .= $btncontinue; } } $page .= ""; $page .= "
".$lang['fl_new_miss']."
".$lang['fl_fleet_typ']."".$lang['fl_fleet_disp']."--
" . $lang['tech'][$i] . "". pretty_number ($planetrow[$resource[$i]]); $ShipData .= ""; $ShipData .= ""; $ShipData .= ""; $ShipData .= ""; $page .= "".$lang['fl_selmax']."
". $lang['fl_noships'] ."
". $lang['fl_unselectall'] ."". $lang['fl_selectall'] ."
"; $page .= $ShipData; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= ""; $page .= "
"; $page .= "
"; display($page, $lang['fl_title']); // Updated by Chlorel. 16 Jan 2008 (String extraction, bug corrections, code uniformisation // Created by Perberos. All rights reversed (C) 2006 ?>