
<?php 
    include('../../../../db_connect.php');
    
    $sq = "SELECT COUNT(*) as num FROM gatepass WHERE status = '1' AND end_date < NOW() AND reported IS NULL"; 
    $pgs = mysql_fetch_array(mysql_query($sq));
    $count = $pgs['num'];
    if($count <= 0){echo '';}else {echo $count;}
?>

