function __construct($configPath)
 {
     $this->errors = array();
     $this->configValues = new EPConfigFile($configPath);
     $databasePDO = $this->configValues->getValue('SQLValues', 'databasePDO');
     $databaseUser = $this->configValues->getValue('SQLValues', 'databaseUser');
     $databasePassword = $this->configValues->getValue('SQLValues', 'databasePassword');
     try {
         self::$database = new PDO($databasePDO, $databaseUser, $databasePassword);
         if (!self::$database->query("SELECT * FROM `aptitude`")) {
             throw new PDOException('Aptitude table in Database is empty!  Database connection Error?');
         }
     } catch (PDOException $e) {
         error_log('Database connection failed: ');
         error_log('  ' . $databasePDO);
         error_log('  ' . $e->getMessage());
         error_log('  Current Dir:  ' . getcwd());
     }
 }
    <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/EPBackground.php';
require_once '../php/EPTrait.php';
require_once '../php/EPGear.php';
require_once '../php/EPPsySleight.php';
$epListP = new EPListProvider('../php/config.ini');
$persistManager = new EPPersistentDataManager('../php/config.ini');
$_SESSION['backgroundList'] = $epListP->getListBackgrounds();
$_SESSION['traitList'] = $epListP->getListTraits();
$_SESSION['gearList'] = $epListP->getListGears();
$_SESSION['psyList'] = $epListP->getListPsySleights();
$_SESSION['morphList'] = $epListP->getListMorph();
$_SESSION['aiList'] = $epListP->getListAi();
if (isset($_POST['addBook'])) {
    $totalInject = array();
    if (isset($_POST['selectedBackground'])) {
        foreach ($_POST['selectedBackground'] as $b) {
            array_push($totalInject, $b);
        }
    }
    if (isset($_POST['selectedTraits'])) {
        foreach ($_POST['selectedTraits'] as $t) {
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Manage Stats</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/EPStat.php';
$epListP = new EPListProvider('../php/config.ini');
$persistManager = new EPPersistentDataManager('../php/config.ini');
$configValues = new EPConfigFile('./config.ini');
$_SESSION['statList'] = $epListP->getListStats($configValues, $_SESSION['cc']);
$_SESSION['groupsList'] = $epListP->getListGroups();
if (isset($_POST['addStat'])) {
    $glistInject = array();
    foreach ($_POST['selectedGroups'] as $g) {
        array_push($glistInject, $g);
    }
    $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();
Beispiel #4
0
        <title>Manage Gear</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 '../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";
Beispiel #5
0
            echo "With Bonus malus : <br>";
            foreach ($bonusMalus as $o) {
                echo $o->name . " Desc : " . $o->description . "<br>";
            }
            echo '<br>';
            echo '<br>';
        }
    }
}
if (strcmp($cibleTest, 'Delete') == 0) {
    //=====DELETE TESTS ================================================
    require_once 'EPPersistentDataManager.php';
    require_once 'EPAptitude.php';
    require_once 'EPListProvider.php';
    $listProvider = new EPListProvider('./config.ini');
    $persistManager = new EPPersistentDataManager('./config.ini');
    //Aptitude
    echo "<br><br>APTITUDE DELETION------------------------------------------ <br><br>";
    $apdel = new EPAptitude('APTITUDE_TODELETE', EPAptitude::$COGNITION, "", array("TODELETE1", "TODELETE2"));
    if (!$persistManager->persistAptitude($apdel)) {
        echo $persistManager->getLastError();
        echo "<br>";
    } else {
        echo "Aptitude added ! <br>";
    }
    if (!$persistManager->deleteAptitude($apdel->name)) {
        echo $persistManager->getLastError();
        echo "<br>";
    } else {
        echo "Aptitude Deleted ! <br>";
    }
Beispiel #6
0
        <title>Manage Morph</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 '../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/EPMorph.php';
$epListP = new EPListProvider('../php/config.ini');
$persistManager = new EPPersistentDataManager('../php/config.ini');
$_SESSION['morphList'] = $epListP->getListMorph();
$_SESSION['bmList'] = $epListP->getListBonusMalus();
$_SESSION['traitList'] = $epListP->getListTraits();
$_SESSION['gearList'] = $epListP->getListGears();
if (isset($_POST['addMorph'])) {
    $bmlistInject = array();
    if (!empty($_POST['selectedBM'])) {
        foreach ($_POST['selectedBM'] as $bm) {
            $bmObj = $epListP->getBonusMalusByName($bm);
            array_push($bmlistInject, $bmObj);
        }
    }
    $traitlistInject = array();
    if (!empty($_POST['selectedTrait'])) {
        foreach ($_POST['selectedTrait'] as $trait) {
    <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/EPBackground.php';
require_once '../php/EPTrait.php';
require_once '../php/EPGear.php';
require_once '../php/EPPsySleight.php';
$epListP = new EPListProvider('../php/config.ini');
$persistManager = new EPPersistentDataManager('../php/config.ini');
$_SESSION['backgroundList'] = $epListP->getListBackgrounds();
$_SESSION['traitList'] = $epListP->getListTraits();
$_SESSION['gearList'] = $epListP->getListGears();
$_SESSION['psyList'] = $epListP->getListPsySleights();
$_SESSION['morphList'] = $epListP->getListMorph();
$_SESSION['aiList'] = $epListP->getListAi();
if (isset($_POST['addPage'])) {
    $totalInject = array();
    if (isset($_POST['selectedBackground'])) {
        foreach ($_POST['selectedBackground'] as $b) {
            array_push($totalInject, $b);
        }
    }
    if (isset($_POST['selectedTraits'])) {
        foreach ($_POST['selectedTraits'] as $t) {
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Manage Bonus / Malus</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/EPBonusMalus.php';
$epListP = new EPListProvider('../php/config.ini');
$persistManager = new EPPersistentDataManager('../php/config.ini');
$_SESSION['bonusmalusList'] = $epListP->getListBonusMalus();
if ($_SESSION['bonusmalusList'] == null) {
    echo $epListP->getLastError();
}
$_SESSION['groupsList'] = $epListP->getListGroups();
if (isset($_POST['addBonusmalus'])) {
    $glistInject = array();
    if (isset($_POST['selectedGroups'])) {
        foreach ($_POST['selectedGroups'] as $g) {
            array_push($glistInject, $g);
        }
    }
    $arrayNewGroups = explode(";", $_POST['newGroups']);
    if ($arrayNewGroups != null || $arrayNewGroups != "") {
        foreach ($arrayNewGroups as $h) {
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Manage Reputation</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 '../php/EPConfigFile.php';
require_once '../php/EPListProvider.php';
require_once '../php/EPPersistentDataManager.php';
require_once '../php/EPReputation.php';
$epListP = new EPListProvider('../php/config.ini');
$persistManager = new EPPersistentDataManager('../php/config.ini');
$_SESSION['repList'] = $epListP->getListReputation();
$_SESSION['groupsList'] = $epListP->getListGroups();
if (isset($_POST['addRep'])) {
    $glistInject = array();
    foreach ($_POST['selectedGroups'] as $g) {
        array_push($glistInject, $g);
    }
    $arrayNewGroups = explode(";", $_POST['newGroups']);
    foreach ($arrayNewGroups as $h) {
        array_push($glistInject, $h);
    }
    $newRep = new EPReputation($_POST['name'], $_POST['desc'], $glistInject);
    if (!$persistManager->persistReputation($newRep)) {
        echo $persistManager->getLastError();
        echo "<br><br>";
Beispiel #10
0
    <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 '../php/EPConfigFile.php';
require_once '../php/EPListProvider.php';
require_once '../php/EPPersistentDataManager.php';
require_once '../php/EPConfigFile.php';
require_once '../php/EPAptitude.php';
require_once '../php/EPSkill.php';
require_once '../php/EPAi.php';
require_once '../php/EPStat.php';
$epListP = new EPListProvider('../php/config.ini');
$persistManager = new EPPersistentDataManager('../php/config.ini');
$configValues = new EPConfigFile('./config.ini');
$_SESSION['aiList'] = $epListP->getListAi();
$_SESSION['aptList'] = $epListP->getListAptitudes();
$_SESSION['skillList'] = $epListP->getListSkills($_SESSION['aptList']);
$_SESSION['statList'] = $epListP->getListStats($configValues, $_SESSION['cc']);
if (isset($_POST['addAi'])) {
    $aptListInject = array();
    foreach ($_SESSION['aptList'] as $m) {
        if (isset($_POST['check_' . $m->abbreviation])) {
            $apatObj = $epListP->getAptitudeByName($_POST['check_' . $m->abbreviation]);
            $apatObj->value = $_POST['val_' . $m->abbreviation];
            array_push($aptListInject, $apatObj);
        }
    }
    $sklListInject = array();
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Manage Skill Prefix</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 '../php/EPConfigFile.php';
require_once '../php/EPListProvider.php';
require_once '../php/EPPersistentDataManager.php';
$epListP = new EPListProvider('../php/config.ini');
$persistManager = new EPPersistentDataManager('../php/config.ini');
$_SESSION['prefixList'] = $epListP->getListPrefix();
$_SESSION['aptitudesList'] = $epListP->getListAptitudes();
if (isset($_POST['addPrefix'])) {
    if (!$persistManager->persistSkillPrefix($_POST['name'], $_POST['apt'], $_POST['type'], $_POST['desc'])) {
        echo $persistManager->getLastError();
        echo "<br><br>";
    } else {
        $_SESSION['prefixList'] = $epListP->getListPrefix();
        echo "<b> Skill Prefix Added ! </b><br><br>";
    }
} else {
    if (isset($_POST['deletePrefix'])) {
        if (!$persistManager->deleteSkillPrefix($_POST['deletePrefix'])) {
            echo $persistManager->getLastError();
            echo "<br><br>";
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Manage PsySleight</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/EPBonusMalus.php';
require_once '../php/EPPsySleight.php';
$epListP = new EPListProvider('../php/config.ini');
$persistManager = new EPPersistentDataManager('../php/config.ini');
$_SESSION['psyList'] = $epListP->getListPsySleights();
$_SESSION['bmList'] = $epListP->getListBonusMalus();
if (isset($_POST['addPsy'])) {
    $bmlistInject = array();
    if (isset($_POST['selectedBM']) && !empty($_POST['selectedBM'])) {
        foreach ($_POST['selectedBM'] as $bm) {
            $bmObj = $epListP->getBonusMalusByName($bm);
            array_push($bmlistInject, $bmObj);
        }
    }
    $newPsy = new EPPsySleight($_POST['name'], $_POST['desc'], $_POST['pType'], $_POST['range'], $_POST['duration'], $_POST['action'], $_POST['strain'], $_POST['level'], $bmlistInject, $_POST['needed']);
    if (!$persistManager->persistPsySleight($newPsy)) {
        echo $persistManager->getLastError();
        echo "<br><br>";
    } else {
        <title>Manage Skills</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/EPSkill.php';
require_once '../php/EPAptitude.php';
$epListP = new EPListProvider('../php/config.ini');
$persistManager = new EPPersistentDataManager('../php/config.ini');
$_SESSION['prefixList'] = $epListP->getListPrefix();
$_SESSION['groupsList'] = $epListP->getListGroups();
$_SESSION['skillList'] = $epListP->getListSkills($epListP->getListAptitudes());
if (isset($_POST['addSkill'])) {
    $glistInject = array();
    if (isset($_POST['selectedGroups'])) {
        foreach ($_POST['selectedGroups'] as $g) {
            array_push($glistInject, $g);
        }
    }
    $arrayNewGroups = explode(";", $_POST['newGroups']);
    foreach ($arrayNewGroups as $h) {
        array_push($glistInject, $h);
    }
    $skill = new EPSkill($_POST['name'], $_POST['desc'], $epListP->getAptitudeByAbbreviation($_POST['linkedApt']), $_POST['type'], $_POST['defaultable'], $_POST['prefix'], $glistInject);
        <title>Manage Background</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/EPBonusMalus.php';
require_once '../php/EPBackground.php';
$epListP = new EPListProvider('../php/config.ini');
$persistManager = new EPPersistentDataManager('../php/config.ini');
$_SESSION['backgroundList'] = $epListP->getListBackgrounds();
$_SESSION['groupsList'] = $epListP->getListGroups();
$_SESSION['bmList'] = $epListP->getListBonusMalus();
$_SESSION['traitsList'] = $epListP->getListTraits();
if (isset($_POST['addBackground'])) {
    $bmlistInject = array();
    foreach ($_POST['selectedBM'] as $bm) {
        $bmObj = $epListP->getBonusMalusByName($bm);
        array_push($bmlistInject, $bmObj);
    }
    $traitlistInject = array();
    if (isset($_POST['selectedTraits'])) {
        foreach ($_POST['selectedTraits'] as $t) {
            $traitObj = $epListP->getTraitByName($t);
            array_push($traitlistInject, $traitObj);
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Manage Trait</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/EPBonusMalus.php';
require_once '../php/EPTrait.php';
$epListP = new EPListProvider('../php/config.ini');
$persistManager = new EPPersistentDataManager('../php/config.ini');
$_SESSION['traitList'] = $epListP->getListTraits();
$_SESSION['bmList'] = $epListP->getListBonusMalus();
if (isset($_POST['addTrait'])) {
    $bmlistInject = array();
    if (isset($_POST['selectedBM'])) {
        foreach ($_POST['selectedBM'] as $bm) {
            $bmObj = $epListP->getBonusMalusByName($bm);
            array_push($bmlistInject, $bmObj);
        }
    }
    $newTrait = new EPTrait($_POST['name'], $_POST['desc'], $_POST['side'], $_POST['applyTo'], $_POST['cost'], $bmlistInject, $_POST['level'], $_POST['isFor']);
    if (!$persistManager->persistTrait($newTrait)) {
        echo $persistManager->getLastError();
        echo "<br><br>";
    } else {
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <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>";