
<?php
session_start();
require_once("headIns.php");
$myp=$dBcon->getLostPhones();
if($myp->rowCount()>0){
 $pho=$myp->fetchAll();

?>

<center><table width="70%" border="1" class="ripotiTab">
	<tr>
		<td>
			<b>
				Imei namba
			</b>
		</td>
		<td>
			<b>
				Mmiliki
			</b>
		</td>
		<td>
			<b>
				Aina ya simu
			</b>
		</td>
		<td>
			<b>
				Lini namba moja
			</b>
		</td>
		<td>
			<b>
				Tarehe ya usajili
			</b>
		</td>	
		<td>
			<b>
				Hali ya umiliki
			</b>
		</td>
		<td>
			<b>
				Tarehe iliyopotea
			</b>
		</td>
		<td>
			<b>
			     Lost ripoti
			</b>
		</td>	
		
	</tr>

<?php
 foreach ($pho as $key => $phone) {
?>

<tr>
		<td>
				<?php
				echo $imei= $phone['imei'];
                $im=$dBcon->getMyLostDate($imei);
                $tDate=$im->fetch();
				?>
		</td>
				<td>
			<?php
				$ownID= $phone['userid'];
                $us=$dBcon->getPhoneOwner($ownID);
                $user=$us->fetch();
                echo $user['fname']." ".$user['lname'];
				?>
		</td>
		<td>
				<?php
				echo $phone['ptype'];
				?>
		</td>
		<td>
		
			   <?php
				echo $phone['lineone'];
				?>
		</td>	
		<td>
		
				<?php
				echo $phone['regDate'];
				?>	
		</td>
		<td>
		
				<?php
				echo $phone['Status'];
				?>	
		</td>
		<td>
		
				<?php
				echo $tDate['regDate'];
				?>	
		</td>
					<td>
			<?php

                $im=$dBcon->getLostRipoti($imei);
                $em=$im->fetch();
			?>
              <a href="<?php echo $em['lripoti'];?>">Lost ripoti</a>
				
		</td>
	</tr>
	<?php
}
}
	?>
</table>
</center>
<?php
require_once("footer.php");
?>