Example #1
0
     $res = parse_step1();
     //encode and invoke parse_prepare with limit
 } else {
     if ($action == 'step2') {
         $res = parse_step2($_REQUEST["encoded_filename"], $_REQUEST["original_filename"], 0);
         //}else if($action=='save'){
         // 3$res = parse_db_save();
     } else {
         if ($action == 'step3') {
             // matching - assign record ids
             $res = assignRecordIds($_REQUEST);
             //error_log(print_r($res,true));
         } else {
             if ($action == 'step4') {
                 // validate import - check field values
                 $res = validateImport($_REQUEST);
             } else {
                 if ($action == 'step5') {
                     // perform import
                     //$res = doImport($_REQUEST);
                 } else {
                     if (@$_REQUEST['content']) {
                         $res = parse_content();
                     } else {
                         if ($action == 'set_primary_rectype') {
                             $res = setPrimaryRectype(@$_REQUEST['imp_ID'], @$_REQUEST['rty_ID'], @$_REQUEST['sequence']);
                         } else {
                             if ($action == 'records') {
                                 if (!@$_REQUEST['table']) {
                                     $system->addError(HEURIST_INVALID_REQUEST, '"table" parameter is not defined');
                                 }
Example #2
0
                    <?php 
                    } else {
                        print '<script>form_vals["auto_switch_to_import"] = "1";</script>';
                        //$sa_mode = 1; //ART switch to import  autimatically???
                    }
                }
            }
        } else {
            //importing
            if ($step == 2) {
                //verification
                ob_start();
                echo '<script>showProgressMsg("Please wait, mapping validation in progress")</script>';
                ob_flush();
                flush();
                $res = validateImport($mysqli, $imp_session, $_REQUEST);
            } else {
                if ($step == 3) {
                    //create records - load from import data to database
                    $mode_import_result = ' style="display:none"';
                    ?>

                <div id="main_import_result">
                    <h4>IMPORT DATA RESULTS</h4>
                    <hr width="100%" />
                    <div id="div-progress2"></div>
                    <div>
                        <?php 
                    ob_flush();
                    flush();
                    $res = doImport($mysqli, $imp_session, $_REQUEST, 'html');