<?php
    include 'session.php';
    include 'style.php';
    include 'navbar.php'; 

    if(isset($_GET["status_delete"])){
        if($_GET["status_delete"] == 'ya'){
            $order_no = $_GET["order_no"];
            $query_sql = "DELETE FROM order_data 
                    WHERE order_no = $order_no";
                if (mysqli_query($conn, $query_sql)) { 
                    header("Location: orderlistall.php");
                } 
            
        } else {
            echo "masuk sini";
            header("Location: orderlistall.php");
        }    
    
    }

    if(isset($_GET["order_no"])){
        $order_no = $_GET["order_no"];
        //echo $id_team;
        /*
        $tampilMas = "SELECT * 
        FROM team_temp
        LEFT JOIN user_login ON user_login.id = team_temp.temp_userid
        LEFT JOIN team ON team.id = team_temp.temp_teamid
        LEFT JOIN events ON team_temp.temp_eventid = events.event_id
                        WHERE team_temp.temp_id = '$temp_id' ";
        $result_tampilMas = mysqli_query($conn, $tampilMas);
        while($mas = mysqli_fetch_array($result_tampilMas)) {
            $firstname = $mas['firstname'];
            $event_name = $mas['event_name'];
            $event_date = $mas['event_date'];
            $event_durasi = $mas['event_durasi'];            
            $event_koord = $mas['event_koord'];            
        }
        */
    }

?> 
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
  font-family: Arial;
}

.coupon {
  border: 5px dotted #bbb;
  width: 80%;
  border-radius: 15px;
  margin: 0 auto;
  max-width: 600px;
}

.container {
  padding: 2px 16px;
  background-color: #f1f1f1;
}

.promo {
  background: #ccc;
  padding: 3px;
}

.expire {
  color: green;
  font-size: 10px;
}
.btn {
  border: none;
  color: white;
  padding: 14px 28px;
  font-size: 16px;
  cursor: pointer;
  width:125px;
}

.success {background-color: #04AA6D;} /* Green */
.success:hover {background-color: #46a049;}

.info {background-color: #2196F3;} /* Blue */
.info:hover {background: #0b7dda;}

.warning {background-color: #ff9800;} /* Orange */
.warning:hover {background: #e68a00;}

.danger {background-color: #f44336;} /* Red */ 
.danger:hover {background: #da190b;}

.default {background-color: #e7e7e7; color: black;} /* Gray */ 
.default:hover {background: #ddd;}
</style>
</head>
<body>

<div class="coupon">
  <div class="container">

  </div>

  <div class="container" style="background-color:white">
    <h2><b>KONFIRMASI HAPUS PESANAN</b></h2> 
    <p>Apakah Anda yakin menghapus pesanan ini?</p>
    <hr>
  </div>
  <div class="container">
  <button class="btn success" onclick="window.location.href='delete_confirm.php?status_delete=ya&order_no=<?php echo $order_no;?>'"  type="button">Ya</button>
  <button class="btn danger" onclick="window.location.href='delete_confirm.php?status_delete=tidak&order_no=<?php echo $order_no;?>'"  type="button">Tidak</button>


  </div>
</div>

</body>
</html> 
