// session_start(); require_once '../php/EPConfigFile.php'; require_once '../php/EPListProvider.php'; require_once '../php/EPPersistentDataManager.php'; require_once '../php/EPConfigFile.php'; require_once '../php/EPBonusMalus.php'; require_once '../php/EPGear.php'; $epListP = new EPListProvider('../php/config.ini'); $persistManager = new EPPersistentDataManager('../php/config.ini'); $_SESSION['gearList'] = $epListP->getListGears(); $_SESSION['bmList'] = $epListP->getListBonusMalus(); if (isset($_POST['addGear'])) { $bmlistInject = array(); if (isset($_POST['selectedBM'])) { foreach ($_POST['selectedBM'] as $bm) { $bmObj = $epListP->getBonusMalusByName($bm); array_push($bmlistInject, $bmObj); } } $arm_k = "0"; if (!empty($_POST['armorKinetic'])) { $arm_k = $_POST['armorKinetic']; } $arm_e = "0"; if (!empty($_POST['armorEnergy'])) { $arm_e = $_POST['armorEnergy']; } $arm_p = "0"; if (!empty($_POST['armorPenetration'])) { $arm_p = $_POST['armorPenetration']; }
foreach ($_POST['selectedGroups'] as $g) { array_push($glistInject, $g); } } $arrayNewGroups = explode(";", $_POST['newGroups']); if ($arrayNewGroups != null || $arrayNewGroups != "") { foreach ($arrayNewGroups as $h) { if (!empty($h)) { array_push($glistInject, $h); } } } $bmlistInject = array(); if (isset($_POST['selectedBms'])) { foreach ($_POST['selectedBms'] as $g) { $bmToAdd = $epListP->getBonusMalusByName($g); array_push($bmlistInject, $bmToAdd); } } $name = ""; if (isset($_POST['name']) && $_POST['name'] != null && $_POST['name'] != "") { $name = $_POST['name']; } else { die("Name is mandatory"); } $apply = ""; if (isset($_POST['apply']) && $_POST['apply'] != null && $_POST['apply'] != "") { $apply = $_POST['apply']; } else { die("No Apply !? WTF dude !"); }