 <?php 
   require_once("headHotelStaff.php");
  

        
         $post=$_POST['post'];


         if ($post=="Set as profile picture")
         {
         $profile=$_POST['directory'];
         echo $con->setHotelProfileImages($hnm,$profile); 
         }
       

         $imgH=$con->getHotelImages($hnm);
      
      


     
          ?>
 <ul><li id="liL"> <label id="main_lab"> IMAGES</label></li></ul>
     
 <ul >
        
              <li id="liL">
                          
                           <form action="hotelImageUploadFormStaff.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="New hotel image" name="post"  >

                              </form>
                </li>

                
                <li id="liL">
                            <form action="roomImageUploadFormStaff.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="New room image" name="post"  >

                          </form>
                </li>

                <li id="liL">
                            <form action="hotelProfilePictureSetStaff.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="Set hotel profile picture" name="post"  >

                          </form>
                </li>

       </ul> 
     <center>
      
    
    

    <fieldset id="new_reports_reg_form">
    <ul>
    <?php
    if($imgH->rowCount()>0)
    {
       $mg=$imgH->fetchAll();
       foreach ($mg as $key => $gm) 
       {
          
      
       ?>
        <li width="60px">

          <label id="main_lab">

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

          </label><br>
         
           <img width="120px" height="120px"  src="<?php echo $gm["directory"];?>" alt="<?php echo $gm["imgname"]." was here";?>">

           <form action="hotelProfilePictureSetStaff.php" method="post">
                            
              <input class="hi" type="hidden" name="owniD"  value="<?php echo $ownID;?>">
 
              
              <input class="hi" type="hidden" name="directory"  value="<?php echo $gm["directory"];?>">

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

              <input class="pos" type="submit" value="Set as profile picture" name="post"  >

         </form>
      </li>
    <?php
       }
    }
    else{
      ?>
      <li>No image uploaded!..</li>
   <?php
    }
    ?>
    </li>
     </fieldset> 

  
  