".$bBrand." ".$selModel." - Latest Inventory Information"; echo ""; echo ""; while($row=mysql_fetch_array($result)){ if($row['reserved']==0 && $row['incoming_unit']==0){ $incomoing = 0; $status= "Available"; $txtColor='Black'; }else if($row['reserved']==1 && $row['incoming_unit']==0){ $status= "Reserved"; $incomoing = 0; $txtColor=' #0c5bdc'; }else{ $status= "Incoming"; $txtColor='#ec6209'; $incomoing = 1; } ?>".$row['unit_location'].""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
UNIT LOCATION YEAR MODEL COLOR CS # VIN # STOCK STATUS DATE RECEIVED AGING ACTION
".$row['year_model']."".$row['color']."".$row['cs_number']."".$row['vin_number']."".$row['status'].""; echo $status; echo"".$row['date_received'].""; $olddate = $row['date_received']; $now = time(); // or your date as well $your_date = strtotime($olddate); $datediff = $now - $your_date; echo "".round($datediff / (60 * 60 * 24)) ." Days"; echo""; if($status != 'Incoming'){ if($row['reserved']==0){ echo ""; echo ""; }else{ echo ""; echo ""; } }else{ echo ""; } echo "
"; exit(); } ?>