}
    $arrayNewGroups = explode(";", $_POST['newGroups']);
    foreach ($arrayNewGroups as $h) {
        array_push($glistInject, $h);
    }
    $newStat = new EPStat($_POST['name'], $_POST['desc'], $_POST['abr'], $glistInject, 0, $_SESSION['cc']);
    if (!$persistManager->persistStat($newStat)) {
        echo $persistManager->getLastError();
        echo "<br><br>";
    } else {
        $_SESSION['statList'] = $epListP->getListStats($configValues, $_SESSION['cc']);
        echo "<b> Stat Added ! </b><br><br>";
    }
} else {
    if (isset($_POST['deleteStat'])) {
        if (!$persistManager->deleteStat($_POST['deleteStat'])) {
            echo $persistManager->getLastError();
            echo "<br><br>";
        } else {
            $_SESSION['statList'] = $epListP->getListStats($configValues, $_SESSION['cc']);
            echo "<b> Stat Deleted ! </b><br><br>";
        }
    }
}
?>
        <form action="./stat.php" method="post">
            <input type="hidden" name="addStat" value="yep">
            <label>Stat name<input type="text" name="name"></label>
            <br>
            <label>Description</label>
            <br>
Beispiel #2
0
     echo $persistManager->getLastError();
     echo "<br>";
 } else {
     echo "Skill prefix Deleted ! <br>";
 }
 //Stat
 echo "<br><br>STAT DELETION------------------------------------------ <br><br>";
 $todelstat = new EPStat('STAT_TODELETE', "", EPStat::$DAMAGEBONUS, array("TODELETE1"));
 if (isset($todelstat)) {
     if (!$persistManager->persistStat($todelstat)) {
         echo $persistManager->getLastError();
         echo "<br>";
     } else {
         echo "Stat added ! <br>";
     }
     if (!$persistManager->deleteStat($todelstat->name)) {
         echo $persistManager->getLastError();
         echo "<br>";
     } else {
         echo "Stat Deleted ! <br>";
     }
 } else {
     echo "Stat To Deleted not created ! <br>";
 }
 //Trait
 echo "<br><br>TRAIT DELETION------------------------------------------ <br><br>";
 $todelbm = new EPBonusMalus("TODELETE1", EPBonusMalus::$ON_APTITUDE, 5);
 $todeltrait = new EPTrait("TRAIT_TODELETE", "", EPTrait::$POSITIVE_TRAIT, EPTrait::$MORPH_TRAIT, 10, array($todelbm));
 if (!$persistManager->persistTrait($todeltrait)) {
     echo $persistManager->getLastError();
     echo "<br>";