<?php
//DB Data
include '../../ASEngine/AS.php';
if(!$login->isLoggedIn())
    header("Location: ../../login.php");
$user = new ASUser(ASSession::get("user_id"));
$userInfo = $user->getInfo();

//basic include files
require_once("../../../db.php");

//variables
$hotel_id = $_GET['hotelid'];
$hotel_name = $_GET['hotelname'];
$amenity_id = $_GET['amenityid'];
$amenity_status = $_GET['amenitystatus'];

mysqli_query($conn, "UPDATE hotel_amenities SET amen_active = '$amenity_status' WHERE amenity_id = '$amenity_id' ");

mysqli_close($conn);

header("Location: ../../manage-hotel.php?hotelid=".$hotel_id."&hotelname=".$hotel_name."&hotelmsn=am".$amenity_status."&tab=3");
?>