Пример #1
0
function initModules()
{
    global $configModuls;
    foreach ($configModuls['moduls'] as $index => $data) {
        $configModuls['moduls'][$index]['class'] = getModulClass($data['modul']);
    }
}
Пример #2
0
/*
	Output the Config for the Modules
*/
/*
	add modul
*/
if (isset($_POST['addModul'])) {
    //get new index number
    end($configModuls['moduls']);
    $last = key($configModuls['moduls']);
    $nextindex = $last + 1;
    //get argument count
    unset($modulInfo);
    //check if defaultInstance exists
    if (method_exists($_POST['modulname'], 'defaultInstance')) {
        $modul = getModulClass($_POST['modulname']);
        $defaultInstance = $modul->defaultInstance();
        //add modul info
        $configModuls['moduls'][$nextindex]['modul'] = $_POST['modulname'];
        $configModuls['moduls'][$nextindex]['data'] = $defaultInstance;
        //save the module data
        saveConfigModuls();
    } else {
        print "DEV-ERROR: Module has no defaultInstance!";
    }
}
/*
	delete modul
*/
if (isset($_GET['deleteModul']) and $_GET['deleteModul'] >= 0) {
    //delete