 <?php 
   require_once("header.php");
   if(isset($_POST['post']))
$ownID="";
  {

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

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

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

                     <li id="liL">
                            <form action="otherHotelAdertisementOut.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="otherHotelImagesOut.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="otherHotelRoomViewOut.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 width="100%" >
    <?php
    if($imgH->rowCount()>0)
    {
       $mg=$imgH->fetchAll();
       foreach ($mg as $key => $gm) 
       {
          
      
       ?>
        <tr class="tr">
           <td valign="bottom" height="45px" align="left">

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

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

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

           </td>

        </tr>
        <tr>

           <td align="center">

               <img id="ng" src="<?php echo $gm["directory"];?>" alt="Advertisement image was here ">
           </td>

           </tr>
    <?php
       }
    }
    else{
      ?>
      <tr class="tr2"><td>No image uploaded!..</td></tr>
   <?php
    }
    ?>
    </table>
     </section> 
     </center>

     <?php
require_once('footer.php');
?>