<?php

$module = new modules($_GET['m']);
if ($_GET['mf']) {
    $module->inner_function($_GET['mf']);
} else {
    switch ($_GET['f']) {
        case 'install':
            $module->install();
            break;
        case 'add':
            $module->add();
            break;
        case 'edit':
            $module->edit();
            break;
        case 'remove':
            $module->remove();
            break;
        default:
            $module->show();
            break;
    }
}
function doRun($id, $data)
{
    if ($_GET['m'] == 'products') {
        if ($GLOBALS["products"]->parent->module_exists("distributions")) {
            //add distribution data
            $distribution_ids = $GLOBALS["distributions"]->contents();
            //		while (list($title_key, $title_val) = each($_POST['DistTitel']))