<?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 = $_POST['hotel_id'];
$hotel_name = $_POST['hotel_name'];
$room_type_name = $_POST['room_type_name'];
$room_type_short_description = $_POST['room_type_short_description'];
$room_type_description = $_POST['room_type_description'];
$room_type_capacity = $_POST['room_type_capacity'];
$max_adults = $_POST['max_adults'];
$max_kids = $_POST['max_kids'];
$room_type_inventory = $_POST['room_type_inventory'];

mysqli_query($conn, "INSERT INTO hotel_room_type (hotel_id, account_id, room_type_name, room_type_short_description, room_type_description, room_type_capacity, max_adults, max_kids, room_type_inventory) VALUES('$hotel_id', '1', '$room_type_name', '$room_type_short_description', '$room_type_description', '$room_type_capacity', '$max_adults', '$max_kids', '$room_type_inventory')");

mysqli_close($conn);

header("Location: ../../manage-hotel.php?hotelid=".$hotel_id."&hotelname=".$hotelname."&tabhotel=roomies&hotelmsn=addedroom&tab=2");
?>