<?php 
   require_once("../head2Alts.php");
   if(isset($_POST['post']) || isset($_POST['submit']))
    {
    	?>
    	<table border="1">
    		<tr class="tr1">
    		  <td align="center"><label id="inner_top">SENDER</label></td> 
              <td align="center"><label id="inner_top">MESSAGE</label></td>
             <td align="center"><label id="inner_top">POSTED ON</label></td>
    		   </tr>
    		   
 
    	      <?php
               $receiverid=$ownID;
               $uQ=$hcon->getMyAllInquiry($receiverid);
               if ($uQ->rowCount()>0) 
                 {
                 	$val=$uQ->Fetch();
                 	//foreach ($va as $key => $val) {
                  	$house_no=$val['house_no'];
                  	$roomid=$val['roomid'];
               
                	$QR=$hcon->getThisMyHouseRoomResideInquiry($house_no ,$roomid,$receiverid);
                	 if ($QR->rowCount()>0)
                	  {
                      $QU= $QR->fetchAll();
                       foreach ($QU as $key => $Qi)
                       { 
  	                 ?>
  	               <tr>
  	               	<td>
  	               		<?php
  	               		  
                        
                		           $ownIDS=$Qi['senderid'];
	                               $oD=$con->getMyProfileForContract($ownIDS);
                                   $oN=$oD->fetch();
                                   echo $oN['lname']." ".$oN['mname']." ".$oN['fname']; 
                	             
  	               		?>
  	               	</td>
    			    <td>
  	                <form action="getMyQnOnThisRoomDetailIn.php" method="post">

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


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


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

 

                      <input  id="item" type="submit" value="<?php echo $Qi['inquiry'] ; ?>" name="post"  > 

                 </form>
                

    			</td>
    			<td>
    				<?php echo $Qi['postDate'] ; ?>
    			</td>
    		</tr>
    		 <?php
    		   }
                                
    		}
    		 ?>
    	</table>
    	<?php
    }
   else{
   	echo "Session expired!..";
   }
   }
   
 require_once('../footerIns.php');
?>