Exemplo n.º 1
0
/**
 * This function dispatches the task at issue to the respective function.
 */
function contactsbookmarks_main($caveID, $caves)
{
    // initialize controller
    $controller = NULL;
    // get current task
    $task = Request::getVar('task', '');
    switch ($task) {
        default:
        case 'Show':
            require_once 'modules/Contacts/controller/Show.php';
            $controller = new Contacts_Show_Controller();
            break;
        case 'Delete':
            require_once 'modules/Contacts/controller/Delete.php';
            $controller = new Contacts_Delete_Controller();
            break;
        case 'Add':
            require_once 'modules/Contacts/controller/Add.php';
            $controller = new Contacts_Add_Controller();
            break;
    }
    return $controller === NULL ? '' : $controller->execute($caveID, $caves);
}
Exemplo n.º 2
0
/**
 * This function dispatches the task at issue to the respective function.
 */
function contacts_main($caveID, $caves)
{
    global $params;
    // initialize controller
    $controller = NULL;
    // get current task
    $task = $params->POST->task;
    switch ($task) {
        default:
        case 'Show':
            require_once 'modules/Contacts/controller/Show.php';
            $controller = new Contacts_Show_Controller();
            break;
        case 'Delete':
            require_once 'modules/Contacts/controller/Delete.php';
            $controller = new Contacts_Delete_Controller();
            break;
        case 'Add':
            require_once 'modules/Contacts/controller/Add.php';
            $controller = new Contacts_Add_Controller();
            break;
    }
    return $controller === NULL ? '' : $controller->execute($caveID, $caves);
}