コード例 #1
0
ファイル: Contacts.php プロジェクト: microlefes/Game
/**
 * 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);
}
コード例 #2
0
ファイル: Contacts.php プロジェクト: agatho/uaenhanced
/**
 * 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);
}