<?php

require 'krypton.php';

$jackpot = mysqli_real_escape_string($krypton, $_REQUEST['jackpot']);

$updatejp = "UPDATE workingtime SET jackpot_amount = '$jackpot' ";
$connect = mysqli_query($krypton, $updatejp);

if($connect) {
  
    echo '<script> 
    alert("Update Jackpot Berhasil diubah!!")
    window.setTimeout(function() {
        window.location = "../ubahjam.php";
      }, 2000);
    </script>';
    
} else {
    echo '<script> 
    alert("Gagal Jackpot diubah")
    window.setTimeout(function() {
        window.location = "../ubahjam.php";
      }, 2000);
    </script>';
}
?>

<style>
.loader {
  border: 16px solid #f3f3f3; /* Light grey */
  border-top: 16px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 9999;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

</style>

<div class="loader"></div>