<?php

    include("connection.php");



    if(isset($_GET['rv'])){

        //check if reservation existed

        $rvNo = $_GET['rv'];

        $rvId = getDetailByMysqliWhere('reservation','rv_no',$rvNo)['rv_id'];

        $rvApartment = getDetailByMysqliWhere('reservation','rv_no',$rvNo)['rv_apartment'];

        $rvRid = getDetailByTable('reservation',$rvId)['r_id'];



        // find room no via router

        $rId = getDetailByMysqliWhere('router_apartment','ra_title',$rvApartment)['r_id'];

        $rNo = getDetailByTable('rooms',$rId)['r_no'];



        // if($rvRid == NULL){$display = "NULL";}else{$display = $rvRid;};



        if(!sendMessage2(26236173,$display)){sendMessage2(26236173,"NULL");}

        

        // if(('reservation',))

    }

?>