echo "</td>";
    echo "<td>";
    echo $repo->Worker;
    echo "</td>";
    echo "<td class='arrival' id='" . $repo->JobName . "'>";
    echo "</td>";
    echo "</tr>";
}
?>
						</table>
					</div>
					</fieldset>
					<span id="adddendium" style="font-size: 8px">*Arrival time is an estimate of time when truck is closest to the job site.</span>
					<?php 
//Get the lat/lng of the route
$jobslist = GPSMaps::GetTodaysTaskXML($TruckDriver, $StartDate);
$jobscount = $jobslist->RowCount();
$jobs = $jobslist->fetchAll();
if ($regenerate == 0) {
    while ($ns = $nearsite->fetch(PDO::FETCH_OBJ)) {
        for ($i = 0; $i < $jobscount; $i++) {
            if (!${"Reached_" . $i} != '') {
                ${"Reached_" . $i} = 500;
            }
            $jobLat = $jobLng = "";
            $jobLat = $jobs[$i]["Lat"];
            $jobLng = $jobs[$i]["Lng"];
            $houseNum = $jobs[$i]["JobName"];
            $distance = round(GPSMaps::VGCD($ns->Latitude, $ns->Longitude, $jobLat, $jobLng, 6371000), 3);
            if ($distance < 500) {
                if (${"Reached_" . $i} > $distance) {
<?php

require "inc_header_ps.php";
require_once '../lib/GPS.php';
mysql_select_db($db_name, $oConn);
// 2014-09-17 Created ^CS
$Driver = $_GET['Driver'];
$Date = $_GET['Date'];
$stm = GPSMaps::GetTodaysTaskXML($Driver, $Date);
// Create a new XML Document
$dom = new DOMDocument("1.0");
// New Node Markers
$node = $dom->createElement("markers");
// Create Children for Node Markers Design for Node as per Google
//
// <markers>
//	<marker lat lng extra data />
//	<marker lat lng extra data />
// </markers>
//
$parnode = $dom->appendChild($node);
// Create page based off XML
header("Content-type: text/xml");
// Populate nodes
while ($s = $stm->fetch(PDO::FETCH_OBJ)) {
    $node = $dom->createElement("marker");
    $newnode = $parnode->appendChild($node);
    $newnode->setAttribute("task", $s->EventTypeName);
    $newnode->setAttribute("scheduled", $s->ScheduledDate);
    $newnode->setAttribute("closed", $s->ClosedDate);
    $newnode->setAttribute("jobnum", $s->AssignedJobID);