 <?php

 $dD=$con->getHotel();
  
        if($dD->rowCount()>0){
           $roN=$dD->fetchAll();
?>
<table   class ="hotelR">

       <?php foreach ($roN as $key => $rowN){ 
 
          $hnm=$rowN['hotel_id'];
          $ownID=$rowN["owner_id"];
          $HP=$con->getHotelProfileImages($hnm);
          if($HP->rowCount()>0)
            {
            $hmgp=$HP->fetch();
            $hProfile=$hmgp['directory'];
            }
          else
            {
          $hProfile='hotel_images/defaultHotelimg.png';
            }
 
        ?>

        
	   <tr>
		  <td rowspan="5" valign="top">  

              <ol class="homeD">

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


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



                    <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>

    <!--kkkkkkkkkkkkkkkkkkkkkkkkk-->
    <td valign="top" align="right">
            
           <ul>

                     <li id="liL">
                            <form action="otherHotelAdertisementOut.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="otherHotelImagesOut.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="otherHotelRoomViewOut.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>
         <td height="400px" align="center">
            <img alt="Missing hotel profile picture" id="hprofimg" border="1" src="<?php echo $hProfile;?>"/>  
         </td>
      
    </tr>
    
    <tr>
		<td valign="top">
		<center>

		<table class ="hotelR">
    
    
     <tr>

          <td colspan="9" align="center" valign="top" ><label id="main_lab">SUMMARY OF HOTEL LOCATION</label></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 align="justify">
                  <label id="main_lab">SHORT DESCRIPTION ABOUT <?php echo $rowN["hname"];?> </label><p/>
                  <label id="inner_lab"><?php echo $rowN["description"];?> </label>
                </td>

  </tr>
  
  <tr>

    <td valign="top" >

        <table   width="100%">

            <tr>
               <td valign="top">
               <!--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" align="center"><label id="main_lab">WELCOME TO RESTING HOUSES SERVICES</label></td>
          </tr>


          <tr class="tr2">
            <td colspan="2" align="center"><label id="min_lab">Currently there is no any registered reservation house!..</label></td>
          </tr>

     </table>
  </center>
<?php

}//CLOSE IF OF BUTTON POST
?>