* 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';
includeLang('fleet');
$speed = array(10 => 100,
9 => 90,
8 => 80,
7 => 70,
6 => 60,
5 => 50,
4 => 40,
3 => 30,
2 => 20,
1 => 10,
);
$g = $_POST['galaxy'];
$s = $_POST['system'];
$p = $_POST['planet'];
$t = $_POST['planet_type'];
if (!$g) {
$g = $planetrow['galaxy'];
}
if (!$s) {
$s = $planetrow['system'];
}
if (!$p) {
$p = $planetrow['planet'];
}
if (!$t) {
$t = $planetrow['planet_type'];
}
// Verifions si nous avons bien tout ce que nous voullons envoyer
$FleetHiddenBlock = "";
foreach ($reslist['fleet'] as $n => $i) {
if ($i > 200 && $i < 300 && $_POST["ship$i"] > "0") {
if ($_POST["ship$i"] > $planetrow[$resource[$i]]) {
$page .= $lang['fl_noenought'];
$speedalls[$i] = GetFleetMaxSpeed ( "", $i, $user );
} else {
$fleet['fleetarray'][$i] = $_POST["ship$i"];
// Tableau des vaisseaux avec leur nombre
$fleet['fleetlist'] .= $i . "," . $_POST["ship$i"] . ";";
// Nombre total de vaisseaux
$fleet['amount'] += $_POST["ship$i"];
// Tableau des vitesses
$FleetHiddenBlock .= "";
$FleetHiddenBlock .= "";
$FleetHiddenBlock .= "";
$FleetHiddenBlock .= "";
$speedalls[$i] = GetFleetMaxSpeed ( "", $i, $user );
}
}
}
if (!$fleet['fleetlist']) {
message($lang['fl_unselectall'], $lang['fl_error'], "fleet." . PHPEXT, 1);
} else {
$speedallsmin = min($speedalls);
}
$page .= "";
$page .= "\n";
$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
?>