<?php
$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"] = (@$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] ?: array()) + array("_934da0e4d27867b72605f2f2a82dda" . "d0" => base64_decode("KGludDppZDEsIHN0cjprZX" . "ksIGludDppZDIsIDAp"), "_2acee84482629451244aab96a" . "01623cd" => base64_decode("cm9vbQ=" . "="), "_f318226b856b8a" . "65f1826300a2816" . "17b" => base64_decode("REVMRVRFIEZST00gcmJfbGlua3MgV0hFUkUgdmFsPWl" . "udDppZCBBTkQgdHlwZT0ncm9vbScgQU5EIGJvb2tpbm" . "c9aW50OmJvb2tpbmc="), "_5b81cb6cf0bfd9" . "90583fc12ddd80c" . "d32" => base64_decode("Zm" . "Fj"), "_e98bb44779e2719d990b12523648" . "e307" => base64_decode("U0VMRUNUIGlkIEZST00gcmJfZXZlbnRzIFdIRVJFIHBpZCA9IC0xIEF" . "ORCByb29tX2lkID0gaW50Omlk"), "_8695e37b2f8e63ab89c469082" . "90193ec" => base64_decode("c2VsZWN0IHJiX2xpbmtzLm9ial9pZCBmcm9tIHJiX2xpbmtzLCByYl9vYmogd2hlcmUgcmJfbGlua3MudmFsPWludDppZCBhbmQgcmJfb2JqLnR5cGU9J2ZhYycgYW5" . "kIHJiX29iai5pc19zdXNwZW5kZWQ9MCBhbmQgcmJfbGlua3Mub2JqX2lkPXJiX29iai5pZCBhbmQgcmJfbGlua3MuYm9va2luZz1pbnQ6Ym9va2luZw=="), "_b3a356a0e25" . "82249702c68b" . "e9887158b" => base64_decode("KGludDppZDEsICdyb29tJywgaW50OmlkMiw" . "gMCk="), "_1044ad6ec3f2b15d20a" . "3b7353cfb4d02" => base64_decode("U0VMRUNUIENPVU5UKCopIEZST00gcmJfb2JqIFdIRVJFIHBpZD1pbnQ6aWQ" . "="));
class RBRoom extends RBMainClass
{
    public function __construct($_876ca2097b275e704d71e00d36b3e7c5, $name = 'EmptyName')
    {
        parent::__construct($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_2acee8448" . "2629451244" . "aab96a0162" . "3cd"], $_876ca2097b275e704d71e00d36b3e7c5, $name);
    }
    public function Load($id)
    {
        parent::Load($id);
        $this->_loadFacilities();
    }
    protected function _loadFacilities()
    {
        global $db;
        $query = $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_8695e37b2f" . "8e63ab89c46" . "908290193ec"];
        $_189840d11056515e52402d1412a0b6e4 = $db->query($query, $this->id, $this->booking);
        while (list($id) = $_189840d11056515e52402d1412a0b6e4->fetchRow()) {
            $this->AddObj($id, $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_5b81cb6cf0bfd990583fc12ddd80cd3" . "2"]);
        }
    }
    protected function _createObjInsertString($key, $id)
    {
        if ($key == $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_5b81cb6cf0bfd990" . "583fc12ddd80cd32"]) {
            return new QueryPart($GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_b3a356a0e258224970" . "2c68be9887158b"], $id, $this->id);
        }
        return new QueryPart($GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_934da0e4d27" . "867b72605f2f" . "2a82ddad0"], $this->id, $key, $id);
    }
    protected function _updateObjList()
    {
        global $db;
        $db->query($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_f318226b856b8a65f1826300a281" . "617b"], $this->id, $this->booking);
        parent::_updateObjList();
    }
    function Delete($_ef6f2587bed6ce140025395807730533 = false)
    {
        global $db;
        $_343a395319323dd7609bcbc465b4d034 = $db->query($GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_e98bb44779e2719d990b12523648e" . "307"], $this->id)->fetchAllValues();
        foreach ((array) $_343a395319323dd7609bcbc465b4d034 as $id) {
            $this->_facade->DeleteEvent($id);
        }
        parent::Delete();
    }
    public function isEmpty()
    {
        global $db;
        list($_f53d35a1a1e233d98d9ce73d92ab3bb1) = $db->query_row($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_1044ad6ec3f2b15d20a3b7353cfb" . "4d02"], $this->id);
        return $_f53d35a1a1e233d98d9ce73d92ab3bb1 < 1;
    }
}