Example #1
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;
    }
}
Example #2
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;
    }
}
Example #3
0
        $column->ignoreFileExtension = 'false';
        $column->mappingColumn = 'false';
        $column->name = $detail[1] ? getProperName($detail[1]) : 'noname' . $cnt;
        $column->visible = 'true';
        //ENUM('relmarker','enum','relationtype','resource','file','separator','calculated','fieldsetmarker','urlinclude')
        $cnt++;
    }
    //foreach
    $dataTable->description = $rectypedef[1];
    $dataTable->name = 'H4_' . HEURIST_DBNAME . '_rectype_' . $rt;
    $metadata_content = utf8_encode($meta->asXML());
    file_put_contents($rtfolder . "/dataset.xml", $metadata_content);
    //../ROOT/WEB-INF/lib/*:.
    $batch = $batch . "\n java -cp  org.tdar.utils.CommandLineAPITool -http -username {$fusername} -password {$fpwd} -file " . $rtfolder . "/ -host " . $host . " -projectid " . $projectId;
    $folders = $rtfolder . "/" . ($folders != null ? "," : "") . $folders;
    addRegistration("Dataset", $rtfolder . "/dataset.xml", $metadata_content, $filename, $rt);
    //break;
}
// end foreach ($rectyps as $rt)
// END OF LOOP FOR EACH RECORD TYPE TO BE EXPORTED
//print "Generation of output data have been completed<br/>";
//print "Start upload/registration<br/>";
//copy images
//print "<p>Export images</p>";
//copy used terms to coding sheet
//print "<p>Create coding sheet from terms</p>";
file_put_contents($folder . "/loadtotdar.sh", $batch);
// REGISTRATION
if (count($data_toreg) < 1) {
    print "No data to export<br>";
    return;