 <?php 
   require_once("head2Alt.php");
   if(isset($_POST['post']))

  {

     if( isset($_POST['hiD']) && isset($_POST['owniD']))
     {

        $hnm=$_POST['hiD'];
        $ownID=$_POST['owniD']; 
         require_once("buda_connect.php");
         $con = new connect_class();
         $HD=$con->getThisHotel($hnm);
    
        if($HD->rowCount()>0)
        {
          $ro=$HD->fetch();
        }
      
    }

         $imgH=$con->getHotelAdvImages($hnm);
 
     }
     ?>
     
        
      <ul><li> <label id="main_lab"><?php echo $ro["hname"];?>  IMAGES</label></li></ul>
      <ul>

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


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


                              <input class="hi" type="hidden" name="hiD"  value="<?php echo $hnm;?>">

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

                        </form>

                        </li>


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


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


                              <input class="hi" type="hidden" name="hiD"  value="<?php echo $hnm;?>">

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

                        </form>

                        </li>

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


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

                                

                              <input class="hi" type="hidden" name="hiD"  value="<?php echo $hnm;?>">

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

                        </form>
                        </li>
              </ul>
      
      
    <table id="h_adv">
       <tr><td>
                   
    <ul>
    <?php
    if($imgH->rowCount()>0)
    {
       $mg=$imgH->fetchAll();
       foreach ($mg as $key => $gm) 
       {
          
      
       ?>
        <li id="liMg"> 

           <label id="main_lab"><?php echo $gm["title"];?>   </label>

              <small><i>Posted on:<?php echo $gm["timePosted"];?></i></small><br/>

              <?php echo $gm["content"];?>   
 
           

               <img style="height:200px;" id="ng" src="<?php echo $gm["directory"];?>" alt="Advertisement image was here ">
            

           </li>
    <?php
       }
    }
    else{
      ?>
      <li>No image uploaded!..</li>
   <?php
    }
    ?>
    </ul>
    </td></tr>
     </table> 
<?php
require_once('footerIn.php');
?>



 


    