Beispiel #1
0
function reservationDispatch($op)
{
    if (isset($_POST['add_event'])) {
        Util::jump_to('index.php?modname=reservation&op=add_event');
    }
    if (isset($_POST['category_gestion'])) {
        Util::jump_to('index.php?modname=reservation&op=view_category&id_course=' . $_SESSION['idCourse']);
    }
    if (isset($_POST['location_gestion'])) {
        Util::jump_to('index.php?modname=reservation&op=classroom&id_course=' . $_SESSION['idCourse']);
    }
    if (isset($_POST['undo'])) {
        Util::jump_to('index.php?modname=reservation&op=reservation&active_tab=subscribed_user');
    }
    if (isset($_POST['undo_switch'])) {
        Util::jump_to('index.php?modname=reservation&op=reservation&active_tab=events');
    }
    if (isset($_POST['undo_profile'])) {
        Util::jump_to('index.php?modname=reservation&op=reservation&active_tab=events');
    }
    if (isset($_POST['undo_mail'])) {
        Util::jump_to('index.php?modname=reservation&op=reservation&active_tab=events');
    }
    if (isset($_POST['okselector'])) {
        if (isset($_GET['id_course'])) {
            $op = 'send_registration';
        }
    }
    if (isset($_POST['cancelselector'])) {
        Util::jump_to('index.php?modname=reservation&op=reservation&active_tab=subscribed_user');
    }
    if (isset($_POST['undo_cat'])) {
        $op = 'view_category';
    }
    if (isset($_POST['undo_lab'])) {
        $op = 'view_laboratories';
    }
    switch ($op) {
        case 'del_subscription':
            delSubscription();
            break;
        case 'add_subscription':
            addSubscription();
            break;
        case 'add_registration':
            addRegistration();
            break;
        case 'send_registration':
            sendRegistration();
            break;
        case 'del_event':
            delEvent();
            break;
        case 'mod_event':
            modEvent();
            break;
        case 'add_event':
            addEvent();
            break;
        case 'view_user_event':
            viewUserEvent();
            break;
        case 'send_user_event':
            sendUserEvent();
            break;
        case 'excel':
            getExcelFile();
            break;
        case 'reservation':
        default:
            reservation();
            break;
        case 'view_category':
            viewCategoy();
            break;
        case 'add_category':
            addCategoy();
            break;
        case 'mod_category':
            modCategoy();
            break;
        case 'del_category':
            delCategoy();
            break;
            /*case 'view_laboratories':
            			viewLaboratories();
            		break;
            		
            		case 'add_laboratory':
            			addLaboratory();
            		break;
            		
            		case 'mod_laboratory':
            			modLaboratory();
            		break;
            		
            		case 'del_laboratory':
            			delLaboratory();
            		break;*/
            //TODO:
        /*case 'view_laboratories':
        			viewLaboratories();
        		break;
        		
        		case 'add_laboratory':
        			addLaboratory();
        		break;
        		
        		case 'mod_laboratory':
        			modLaboratory();
        		break;
        		
        		case 'del_laboratory':
        			delLaboratory();
        		break;*/
        //TODO:
        case "classroom":
            classroom();
            break;
        case "addclassroom":
            editclassroom();
            break;
        case "modclassroom":
            editclassroom(true);
            break;
        case "saveclassroom":
            saveclassroom();
            break;
        case "delclassroom":
            delclassroom();
            break;
            //TODO:
        //TODO:
        case 'switch_subscription':
            switchSubscription();
            break;
        case 'set_room_view_perm':
            setRoomViewPerm();
            break;
        case 'send_mail':
            reservationSendMail();
            break;
        case 'info_location':
            infoLocation();
            break;
    }
}
Beispiel #2
0
function reservationDispatch($op)
{
    if (isset($_POST['undo'])) {
        $op = 'view_event';
    }
    if (isset($_POST['undo_cat'])) {
        $op = 'view_category';
    }
    if (isset($_POST['undo_lab'])) {
        $op = 'view_laboratory';
    }
    if (isset($_POST['okselector'])) {
        if (isset($_GET['id_course'])) {
            $op = 'send_registration';
        }
    }
    if (isset($_POST['cancelselector'])) {
        if (isset($_GET['id_course'])) {
            $op = 'view_registration';
        }
    }
    switch ($op) {
        case 'view_event':
            viewEvent();
            break;
        case 'add_event':
            addEvent();
            break;
        case 'mod_event':
            modEvent();
            break;
        case 'del_event':
            delEvent();
            break;
        case 'view_category':
            viewCategoy();
            break;
        case 'add_category':
            addCategoy();
            break;
        case 'mod_category':
            modCategoy();
            break;
        case 'del_category':
            delCategoy();
            break;
            /*case 'view_laboratory':
            			viewLaboratories();
            		break;
            		
            		case 'add_laboratory':
            			addLaboratory();
            		break;
            		
            		case 'mod_laboratory':
            			modLaboratory();
            		break;
            		
            		case 'del_laboratory':
            			delLaboratory();
            		break;*/
        /*case 'view_laboratory':
        			viewLaboratories();
        		break;
        		
        		case 'add_laboratory':
        			addLaboratory();
        		break;
        		
        		case 'mod_laboratory':
        			modLaboratory();
        		break;
        		
        		case 'del_laboratory':
        			delLaboratory();
        		break;*/
        case 'view_registration':
            viewRegistration();
            break;
        case 'view_user_event':
            viewUserEvent();
            break;
        case 'excel':
            getExcelFile();
            break;
        case 'add_registration':
            addRegistration();
            break;
        case 'send_registration':
            sendRegistration();
            break;
        case 'del_registration':
            delRegistration();
            break;
        case 'set_room_view_perm':
            setRoomViewPerm();
            break;
    }
}