alert('Record has been saved...');"; } if(isset($_POST['checkOut'])){ $chkInPlate = $_POST['activePlate']; $cReason = $_POST['cReason']; $chkInKM = $_POST['kmstart']; $chkInDriver = $_POST['driver']; mysql_query("INSERT INTO `vts_IN_OUT_history` (`chk_id`, `chk_plate`, `chk_driver`, `chk_km`, `date`, `time`, `chk_transaction`, `user_id`,`deleted`,`location_code`,`comp_code`,`dealer_code`) VALUES('','$chkInPlate','$chkInDriver','$chkInKM','$toDate','$currentTime','OUT','$userID','0','$cReason','$compID','$dealID') "); mysql_query("UPDATE `vts_vehicle_lists` SET `v_in_out`='0',`v_location_id`='0' WHERE `v_plate`='$chkInPlate'"); echo ""; //0 means just checked out and not yet arrive to destination } } ?>

Vehicle Check-In / Check-Out

Use to record IN and OUT transaction of vehicle regardless if it is for service or not. Ex. Road Test, Parking, Claimed by Owner or Transfer to Stockyard etc.
VEHICLE SEARCH...
1){ $qError = $maxRows ." Records Found."; }else{ $qError = $maxRows ." Record Found."; } } echo ""; echo ""; //echo "Max Rows is ".$maxRows; if($maxRows < 1){ $visibility="none"; } while($row=mysql_fetch_array($sql)){ $curRow = $curRow + 1; if($curRow = $maxRows){ $visibility="none"; }else{ $visibility="block"; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
ID PLATE NO BRAND MODEL TYPE COLOR
".$row['v_id']."".$row['v_plate']."".$row['v_brand']."".$row['v_model']."".$row['v_type']."".$row['v_color']."UPDATE
"; }else{ $sql=mysql_query("SELECT * FROM `vts_vehicle_lists` WHERE `v_in_out` = '1' AND `v_status`='1' "); $maxRows=mysql_num_rows($sql); echo ""; echo ""; //echo "Max Rows is ".$maxRows; if($maxRows < 1){ $visibility="none"; } while($row=mysql_fetch_array($sql)){ $curRow = $curRow + 1; if($curRow = $maxRows){ $visibility="none"; }else{ $visibility="block"; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
ID PLATE NO BRAND MODEL TYPE COLOR
".$row['v_id']."".$row['v_plate']."".$row['v_brand']."".$row['v_model']."".$row['v_type']."".$row['v_color']."
"; } ?>

Loading..