 <center>
  <div>
  <sup>
    <?php 
    
   echo $con->updateHotelInfo($ownID,$hnm,$hname,$phoneno, $email,$pobox,$district,$country, $street ,$ward, $region,$popularDistination)."<p/>"; 
   ?>
  </sup>
</div>
</center> 


<?php 
  
       $HD=$con->getMyHotel($ownID);
		
        if($HD->rowCount()>0){
          $ro=$HD->fetchAll();
?>
<center>

<table   class ="roomtab">
    
       <tr class="tr1">
	   <td valign="top" colspan="2"><label id="main_lab">MY HOTEL</label>

     </td>
	   </tr>

       <?php foreach ($ro as $key => $row) { ?>
      
	   <tr>
		  <td rowspan="4" valign="top">  

              <ol class="homeD">

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

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

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

                 </form>

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

		<table class ="roomtab">

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

               <td align="right">
       
                            <form action="editHotelProfileForm.php" method="post">

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


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

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

                           </form>
                        
               </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 $row["country"];?> </label></td><td><label id="inner_lab"><?php echo $row["city"];?> </label></td>

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

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




              

        </table>

        </center>
          

		</td>

	</tr>
  <tr>
    
    <td align="justify">
    <label id="main_lab">SHORT DESCRIPTION ABOUT <?php echo $row["hname"];?> </label><p/>
     <label id="inner_lab"><?php echo $row["description"];?> </label>
   </td>

  </tr>
  <tr>

   <td >

     <table width="100%">

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

                require("hotelAssServices.php");

              ?> 

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

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

              ?> 
             </td>
        </tr>


     </table>                                            

  </td>

    
</tr>

 <tr>

           <td>
<ul>
                        <li id="liL">
                          <form action="hotelImages.php" method="post">

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


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

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

                        </form>

                        </li>

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

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


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

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

                        </form>
                        </li>

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

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


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

                              <input class="pot" type="submit" value="Services" name="post"  >

                        </form>
                        </li>


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

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


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

                              <input class="pot" type="submit" value="Routes" name="post"  >

                        </form>

                        </li>


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

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


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

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

                        </form>

                        </li>


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

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


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

                              <input class="pot" type="submit" value="Workers" name="post"  >

                        </form>
                        </li>

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

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


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

                              <input class="pot" type="submit" value="Visitors" name="post">

                        </form>
                        </li>


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

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


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

                              <input class="pot" type="submit" value="Income Report" name="post"  >

                        </form>
                        </li>



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

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


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

                              <input class="pot" type="submit" value="Expense Report" name="post"  >

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

        </tr>
<?php
}
?>
</table></center>
 <?php   

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


	        <tr class="tr2">
            <td colspan="2"><label id="min_lab">Currently you don't have registered hotel</label></td>
	        </tr>

	   </table>
	</center>

	   <?php

 }
 

 ///CLOSE  ELSE OF ID POST
//VIEW FOR HOTEL WITH OWNER BY USER LOGED IN IN HIS ACCOUNT END

// CODE FOR RETRIEVING OTHER HOTEL

 	$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="hotelServiceInfo.php" method="post">

                    <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 $rowN["owner_id"];?>">


                              <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 $rowN["owner_id"];?>">


                              <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 $rowN["owner_id"];?>">


                              <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">You have any registered hotel</label></td>
          </tr>

     </table>
  </center>
<?php

}//CLOSE IF OF BUTTON POST


?>