

<div class='row'>
    <div class='col-md-7'>
	 <div class="card">
             <div class="card-header"> 
                  <h5 class='card-title'><i class='fa fa-sync-alt'></i> Sinkron File Pendukung</h5></div>    
			  			  
                    <div class='box-body'>
					<form id="formfile" action="">
                         <center>
						<br><br>
						<h5  style="color:red"><i class='fa fa-sync-alt'></i> Sinkron Tarik File Soal Gambar Data Pusat</h5>
						
						<br>
						<button class='btn btn-outline-primary' ><i class='fa fa-download'></i>&nbsp;Sinkron File</button>
						<br><br>
                           </form>
                        </center>
                    </div>
                </div>
               
                    </div>
               
    
<div class='col-md-5'>
           <div class="card">
             <div class="card-header">	
			  <h5 class='card-title'><i class="fas fa-wifi"></i> Koneksi Server</h5>
                  </div>    
			
						<div class="card-body">
						<div id='server' class="text-center">   
                            </div>
							</div>
							</div>
							</div>
							</div>

<script>

	  $('#formfile').submit(function(e) {
      e.preventDefault();
        var data = new FormData(this);
      
        $.ajax({
            type: 'POST',
           url: '<?= $homeurl ?>/synfile.php',
            enctype: 'multipart/form-data',
            data: data,
            cache: false,
            contentType: false,
            processData: false,
            success: function(data) {
              iziToast.info(
				{
				title: 'Sukses!',
				message: 'Data sedang di prosess....',
				titleColor: '#FFFF00',
				messageColor: '#fff',
				backgroundColor: 'rgba(0, 0, 0, 0.5)',
				 progressBarColor: '#FFFF00',
				 position: 'topRight'					  
				});
                setTimeout(function() {
                    window.location.replace('ujian');
                }, 2000);

            }
        });
        return false;
    });
 
</script>

