<title>Manage Aptitude</title> </head> <body> <?php error_reporting(E_ALL); error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); ini_set('display_errors', '1'); // session_start(); require_once 'EPPersistentDataManager.php'; require_once '../php/EPConfigFile.php'; require_once '../php/EPListProvider.php'; require_once '../php/EPConfigFile.php'; require_once '../php/EPAptitude.php'; $epListP = new EPListProvider('../php/config.ini'); $persistManager = new EPPersistentDataManager('../php/config.ini'); $_SESSION['aptitudesList'] = $epListP->getListAptitudesComplete(); $_SESSION['groupsList'] = $epListP->getListGroups(); if (isset($_POST['addAptitude'])) { $glistInject = array(); foreach ($_POST['selectedGroups'] as $g) { array_push($glistInject, $g); } $arrayNewGroups = explode(";", $_POST['newGroups']); foreach ($arrayNewGroups as $h) { array_push($glistInject, $h); } $newAptitude = new EPAptitude($_POST['name'], $_POST['abr'], $_POST['desc'], $glistInject, 0, 0, 0, $epListP->configValues->getValue('RulesValues', 'AbsoluteAptitudesMaxValue')); if (!$persistManager->persistAptitude($newAptitude)) { echo $persistManager->getLastError(); echo "<br><br>"; } else {