Réactive l'envois de flotte #18

Merged
nemunaire merged 15 commits from task/fix_envoi_flotte into master 2021-01-30 17:36:33 +00:00
Showing only changes of commit b1e1cc6117 - Show all commits

View File

@ -9,25 +9,26 @@ require_once("Class/JSON.php");
require_once("Class/flotte.php");
require_once("Class/planete.php");
if (isset($SESS) && isset($SESS->values['connected']) && $SESS->values['connected'] && !empty($SESS->values['id']) && !empty($SESS->level) && !empty($SESS->values['idPlan'])) {
if (isset($SESS) && isset($SESS->values['connected']) && $SESS->values['connected'] && !empty($SESS->values['id']) && !empty($SESS->values['idPlan'])) {
$idPrep = gpc("cds_temp", "post");
$json = new Services_JSON();
$nbtrajet = 2;
if (empty($config['flottes']) && $SESS->level <= 1) {
$datas = array(
'root' => array(
'destination' => '<input class="dest" type="text" id="amas" name="amas" maxlength="2" value="'.gpc('galaxie', 'post').'" />:<input class="dest" type="text" id="ss" name="ss" maxlength="2" value="'.gpc('ss', 'post').'" />:<input class="dest" type="text" id="plan" name="pos" maxlength="2" value="'.gpc('pos', 'post').'" />',
'temps' => '-',
'deblok' => '<span style="color: #FF0000;"><b>Les flottes sont désactivés pour le moment.</b></span>',
'conso' => '-',
'tactique' => '',
'places' => ''
)
);
header("X-JSON: ".$json->encode($datas));
exit;
}
// Décommenter pour bloquer l'envoi de flotte a toute personne non admin
// if (empty($config['flottes']) && $SESS->level <= 1) {
// $datas = array(
// 'root' => array(
// 'destination' => '<input class="dest" type="text" id="amas" name="amas" maxlength="2" value="'.gpc('galaxie', 'post').'" />:<input class="dest" type="text" id="ss" name="ss" maxlength="2" value="'.gpc('ss', 'post').'" />:<input class="dest" type="text" id="plan" name="pos" maxlength="2" value="'.gpc('pos', 'post').'" />',
// 'temps' => '-',
// 'deblok' => '<span style="color: #FF0000;"><b>Les flottes sont désactivés pour le moment.</b></span>',
// 'conso' => '-',
// 'tactique' => '',
// 'places' => ''
// )
// );
// header("X-JSON: ".$json->encode($datas));
// exit;
// }
$destin = gpc('fav_dest', 'post');