<?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_status = $_GET['hstatus'];

$update = mysqli_query($conn, "UPDATE hotels SET active = '$hotel_status' WHERE hotel_id = '$hotel_id' ");
$update2 = mysqli_query($conn, "UPDATE approved_inventory SET active = '$hotel_status' WHERE element_id = '$hotel_id' AND element_type = '1' ");

mysqli_close($conn);

header("Location: ../../hotels.php?hotelmsn=$hotel_status");
?>