function clear_sync_session() { clear_module_sync_session(); unset($_SESSION['comp_sync_msg']); unset($_SESSION['clean_sync']); unset($_SESSION['sync_session']); }
} require_once 'modules/Sync/config.php'; $sync_end_time = $soapclient->call('get_gmt_time', array()); $sync_info['last_sync' . $sync_module] = $sync_end_time; $sync_info['local_last_sync' . $sync_module] = $local_time; if (file_exists('modules/Sync/file_config.php')) { require_once 'modules/Sync/file_config.php'; global $file_sync_info; } $file_sync_info['is_first_sync'] = false; write_array_to_file('file_sync_info', $file_sync_info, 'modules/Sync/file_config.php'); add_to_msg('Storing Sync Info', false); write_array_to_file('sync_info', $sync_info, 'modules/Sync/config.php'); $sync_module_index++; store_msg(); clear_module_sync_session(); update_progress_bar('Total', $sync_module_index, sizeof($sync_modules)); echo '<input type="hidden" name="sync_module_index" value="' . $sync_module_index . '">'; //echo "<input class='button' type='submit' value='Next Module (". $sync_modules[$sync_module_index] . ")'>"; echo '<script>document.getElementById("sync").submit();</script>'; die; } else { $result = $soapclient->call('logout', array('session' => $session)); update_progress_bar('Total', 100, 100); $sync_end_time = $soapclient->call('get_gmt_time', array()); foreach ($sync_info as $key => $val) { $sync_info[$key] = $sync_end_time; } $sync_info['last_sync' . $sync_module] = $sync_end_time; $sync_info['local_last_sync' . $sync_module] = $local_time; unset($_SESSION['sync_start_time']);