Exemple #1
0
                     if ($flags['train']) {
                         if (isset($_GET['unitId'], $_POST['quantity'])) {
                             $status = $node->removeUnit($_GET['unitId'], $_POST['quantity'], $node->modules[$_GET['slotId']]['module']);
                             if ($status == 'done') {
                                 header('Location: module.php?action=get&nodeId=' . $node->data['id'] . '&slotId=' . $_GET['slotId']);
                             } else {
                                 $message = $ui[$status];
                             }
                         }
                     } else {
                         $message = $ui['featureDisabled'];
                     }
                     break;
                 case 'cancelUnit':
                     if (isset($_GET['trainId'])) {
                         $status = $node->cancelUnit($_GET['trainId'], $node->modules[$_GET['slotId']]['module']);
                         if ($status == 'done') {
                             header('Location: module.php?action=get&nodeId=' . $node->data['id'] . '&slotId=' . $_GET['slotId']);
                         } else {
                             $message = $ui[$status];
                         }
                     }
                     break;
             }
         } else {
             $message = $ui['noSlot'];
         }
     } else {
         $message = $ui['noSlot'];
     }
 } else {