<!-- Main Content -->
<div class="container">
  <div class="row">
    <!-- Widget Item -->
    <div class="col-md-12">
      <div class="widget-area-2 proclinic-box-shadow">
        <h3 class="widget-title">Database Synchronisation</h3>
        <div class="row justify-content-center">
          <div class="col-md-10">
            <h3 align='center'>Success!</h3>
              <?php

              require_once getcwd() . "/functions/db.class.php";
              require_once getcwd() . "/functions/form.data.php";
              require_once getcwd() . "/functions/robot.php";
              require_once getcwd() . "/functions/config.php";
              require_once getcwd() . "/functions/curl.php";


              if (isset($_SESSION['YUZA_ID'])) {
                  ?>
                <div class="alert alert-success"><?php include "sync/sync-patients.php"; ?></div><?php
                  ?>
                <div class="alert alert-success"><?php include "sync/sync-reports.php"; ?></div><?php
              }
              include "sync/sync-all.php";

              ?>

            <div style="height:20px"></div>

            <h1 align="center"><button onclick="closeBtn();" class="btn btn-success" id="close-btn">Close</button></h1>

            <div style="height:100px"></div>

          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<?php


?>

<script language='javascript'>
    alert('Synced successfully.');
    function closeBtn() {
        window.close();
    }
</script>