<?php
 // $dD=$con->getOtherHotel($ownID);
        if($dD->rowCount()>0){
           $roN=$dD->fetchAll();
?>

<center>

<table class ="hotelR">
    
       <tr class="tr1">
     <td colspan="2"><label id="main_lab">OTHER AVAILABLE HOTEL</label></td>
     </tr>

       <?php foreach ($roN as $key => $rowN) { ?>
        
     <tr>
      <td rowspan="2" valign="top">  

              <ol class="homeD">

                <li>
                 <form action="hotelServiceInfoInOther.php" method="post">

                    <input class="hi" type="text" name="owniD"  value="<?php echo $ownID;?>">

                    <input class="hi" type="text" name="hiD"  value="<?php echo $rowN["hotel_id"];?>">

                    <input class="pos" type="submit" value="<?php echo $rowN["hname"];?>" name="post"  >

                 </form>

                </li>
              </ol> 
    </td>
    <td>
    <center>

    <table class ="hotelR">
    
    
     <tr>

          <td colspan="5" ><label id="main_lab">SUMMARY OF HOTEL LOCATION</label></td>


          <td colspan="4" align="right">
            
           <ul>

                     <li id="liL">
                            <form action="otherHotelAdertisement.php" method="post">


                               <input class="hi" type="text" name="owniD"  value="<?php echo $ownID;?>">

                                

                              <input class="hi" type="text" name="hiD"  value="<?php echo $rowN["hotel_id"];?>">

                              <input class="pos" type="submit" value="Advertersement" name="post"  >

                        </form>

                        </li>


                        <li id="liL">
                          <form action="otherHotelImages.php" method="post">


                               <input class="hi" type="text" name="owniD"  value="<?php echo $ownID;?>">

                                

                              <input class="hi" type="text" name="hiD"  value="<?php echo $rowN["hotel_id"];?>">

                              <input class="pos"  type="submit" value="Images" name="post"  >

                        </form>

                        </li>

                        <li id="liL">
                          
                            <form action="otherHotelRoomView.php" method="post">


                               <input class="hi" type="text" name="owniD"  value="<?php echo $ownID;?>">
 

                              <input class="hi" type="text" name="hiD"  value="<?php echo $rowN["hotel_id"];?>">

                              <input class="pos" type="submit" value="Rooms" name="post"  >

                        </form>
                        </li>
              </ul>
                   
    
          </td>

          </tr>   
            
            <tr class="tr1"><td id="td_height" ><label id="inner_top">COUNTRY</label></td><td><label id="inner_top">CITY/REGION</label></td>

                <td id="td_height" ><label id="inner_top">TOWN/DISTRICT</label></td><td><label id="inner_top">STREET</label></td>
 
                <td id="td_height" ><label id="inner_top">PHONE NUMBER</label></td><td  ><label id="inner_top">EMAIL ADDRESS</label></td><td><label id="inner_top">REGISTERED ON</label></td><td ><label id="inner_top">POSTAL ADDRESS</label></td><td><label id="inner_top">POPULAR MARK</label>
 

                </td>

                </tr>

    


               <tr class="tr2"><td id="td_height" ><label id="inner_lab"> <?php echo $rowN["country"];?> </label></td><td><label id="inner_lab"><?php echo $rowN["city"];?> </label></td>

               <td id="td_height" ><label id="inner_lab"><?php echo $rowN["ltown_city"];?> </label></td><td><label id="inner_lab"><?php echo $rowN["lstreet_vil"];?> </label></td>

               <td id="td_height" ><label id="inner_lab"><?php echo $rowN["phoneno"];?> </label></td><td ><label id="inner_lab"><?php echo $rowN["email"];?> </label></td><td ><label id="inner_lab"><?php echo $rowN["reg_date"];?> </label></td><td><label id="inner_lab"><?php echo $rowN["paddress"];?> </label></td><td ><label id="inner_lab"><?php echo $rowN["popularDistination"];?> </label></td>

 

               </tr>    
        </table>

        </center>
          

    </td>

  </tr>
  <tr>

    <td valign="top" >

        <table   width="100%">

            <tr>
               <td>
               <!--CODE FOR RETRIEVING HOTEL ASSOCIATES SERVICES GOES HERE-->
                 <?php
                   $hnm=$rowN["hotel_id"];

                     require("hotelAssServices.php");

                  ?> 

                  </td>
               
                  <td valign="top">

   
                  <?php
              
                   $hD["hname"]=$rowN["hname"];                                               // <!--CODE FOR RETRIEVING ROUTE TO HOTEL GOES HERE-->
 
                   require("routeTohotel.php");

                   ?> 
                 </td>
              </tr>
         </table>                                            

    </td>

    
</tr>
 
<?php
}



}else{
?>
<center>
     <table class ="roomtab">
    
            <tr class="tr1">
                 <td colspan="2"><label id="main_lab">OTHER AVAILABLE HOTEL</label></td>
          </tr>


          <tr class="tr2">
            <td colspan="2"><label id="min_lab">
       <?php
        if(isset($_POST['search']))
             {

               $searchValue=$_POST['searchValue'];
                if ($searchValue!="") {
           
                  $dD=$con->getHotelBySearch($searchValue);
                  echo $searchValue. " not found!..";
                  }////////////////////EMPTY POST 
                 else{
                ?>
                <p><label id="min_lab"> 
                  Currently you don't have registered hotel!..
                </label>
                <?php

            $dD=$con->getOtherHotel($ownID);
               }
           }  
       else{
        /////////////NONE POST

            echo "No registered hotel!.."; 
       }
            ?>

            </label></td>
          </tr>

     </table>
  </center>
<?php

}//CLOSE IF OF BUTTON POST


?>
