<?php
require_once('head2Alt.php');
//require_once('buda_connect.php');
if(isset($_POST['post']) || isset($_POST['search']  )){
	if(isset($_POST['owniD'])){

		    //$ownID=$_POST['owniD'];
      //  $con = new connect_class();
		   
?>
<center>
<table width="100%">
<tr><td colspan="2"><b>RESERVATION HOUSES</b></td></tr>
<tr>
  <td> 


                            <form action="hotel_default_entry.php" method="post">
 

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

 

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

                           </form> 
 </td>
 <td align="right">


                            <form action="afterLoginHotel.php" method="post">
 

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

 

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

                           </form> 
  
 </td>
</tr>
<tr>
  <td colspan="2" align="center">
    
      <form action="afterLoginHotel.php" method="post">

            <label id="search_lab">
                       <i>
                          Search hotel here:-
                      </i> 
             </label>
                      <input type="text" class="hotel_info" height="25px" name="searchValue">
                      <input class="hi" type="text" name="owniD"  value="<?php echo $ownID;?>">
                      <input class="subs" type="submit" value="Search" name="search"><br>
                      <i>You can search by name,location(eg: country, region/city,district/town,ward and street) and polular mark.</i>
            
      </form>
  </td>
</tr>
</table>




       <?php 
       /*
       if(isset($_POST['search']))
       {

        $searchValue=$_POST['searchValue'];
        if ($searchValue!="") {
           
              $HD=$con->getHotelBySearch($searchValue);
              echo $HD->rowCount(). " results found!..";
         }////////////////////EMPTY POST 
         else{
          ?>
          <p><label id="min_lab">
           Searching empty results!.. 
           </label>
           <?php

              $HD=$con->getMyHotel($ownID);
         }
       }
       else{
        /////////////NONE POST
              $HD=$con->getMyHotel($ownID);
       }
 *//////
    if(isset($_POST['search']))
       {

        $searchValue=$_POST['searchValue'];
        if ($searchValue!="") {
           
            $dD=$con->getHotelBySearch($searchValue);
           require("other_Only_Hotel_in_detail.php");
         }////////////////////EMPTY POST 
         else{
          ?>
          <p><label id="min_lab">
           Searching empty results!.. 
           </label>
           <?php

         }
       }
       else{
        /////////////NONE POST
          
           require("my_Only_Hotel_in_detail.php");

           $dD=$con->getOtherHotel($ownID);
           require("other_Only_Hotel_in_detail.php"); 
       }
 

            //REPLACED CONTENT..

///

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

/*CODE FOR RETRIEVING OTHER HOTEL
     if(isset($_POST['search']))
       {

        $searchValue=$_POST['searchValue'];
        if ($searchValue!="") {
           
              $dD=$con->getHotelBySearch($searchValue);
              
         }////////////////////EMPTY POST 
         else{
           

        $dD=$con->getOtherHotel($ownID);
         }
       }
       else{
        /////////////NONE POST
        $dD=$con->getOtherHotel($ownID);
       }
 *//////
 
 
require_once('footerIn.php');
?>
