<?php

session_start();
include ("/home/ronnie/ranger/v2/functions.php");

$arrVehicles = vehicle_movement::getMovements();
if(0 < count($arrVehicles)){

	foreach($arrVehicles as $id => $data){
		if(false == ($vehicle = vehicle_movement::get($id))){
			$res = vehicle_movement::addRecent($id, $data);
			echo "<p>Vehicle added => ".$res."</p>";
		} else {
			echo "<p>Vehicle exists => ".$vehicle['VehicleMovementID']."</p>";
		}
		
	}

}

