Ejemplo n.º 1
0
    ?>
					<span id="spanIgn2-<?php 
    echo $drVehicle["id"];
    ?>
" onmousemove="ShowPopup(event, '<span class=\'text5\'><?php 
    echo dic("Reports.TimeLastData");
    ?>
</span>')" onmouseout="HidePopup()"><?php 
    echo $ign2;
    ?>
</span>
					<?php 
    echo "<br>";
    $ignTotal = "/";
    if ($firstIgnsOn != "/") {
        $ignTotal = Sec2Str(dlookup("select datediff('', '" . $firstIgnsOn . "', '" . $dtCurrPos . "')"));
    }
    ?>
	            	<?php 
    echo dic_("Reports.Tot");
    ?>
 <span id="spanIgnTotal-<?php 
    echo $drVehicle["id"];
    ?>
" onmousemove="ShowPopup(event, '<span class=\'text5\'><?php 
    echo dic("Reports.TotalTimeBetween");
    ?>
</span>')" onmouseout="HidePopup()"> <?php 
    echo $ignTotal;
    ?>
</span>
Ejemplo n.º 2
0
    $cntH = dlookup("select count(*) from historylog where vehicleid=" . $drVehicle["id"] . " and datetime between '" . DateTimeFormat(now(), "Y-m-d 00:00:00") . "' and '" . DateTimeFormat(now(), "Y-m-d H:i:s") . "'");
    $firstIgnsOn = "/";
    if ($cntH > 0) {
        $firstIgnsOn = nnull(dlookup("select datetime from historylog where vehicleid=" . $drVehicle["id"] . " and datetime between '" . DateTimeFormat(now(), "Y-m-d 00:00:00") . "' and '" . DateTimeFormat(now(), "Y-m-d H:i:s") . "' order by datetime asc limit 1"), "/");
    }
    if ($firstIgnsOn != "/") {
        echo DateTimeFormat($firstIgnsOn, $timeformat);
    } else {
        echo $firstIgnsOn;
    }
    echo " - ";
    $dtCurrPos = pg_fetch_result($dsCurrPos, 0, "\"DateTime\"");
    echo DateTimeFormat($dtCurrPos, $timeformat);
    echo "<br>";
    if ($firstIgnsOn != "/") {
        echo "Вк. " . Sec2Str(dlookup("select datediff('', '" . $firstIgnsOn . "', '" . $dtCurrPos . "')"));
    } else {
        echo "Вк. /";
    }
    ?>
	            	</div>
	            </td>
	            <td width=90px style="font-size:11px" align="center" class="corner5 text5 <?php 
    echo $classTr;
    ?>
">
	            	<div>
	            	<?php 
    $all_rastojanie = dlookup("select getdistancenew('" . DateTimeFormat(now(), "Y-m-d 00:00:00") . "', '" . DateTimeFormat(now(), "Y-m-d H:i:s") . "', " . $drVehicle["id"] . ")");
    echo number_format(round($all_rastojanie * $metricvalue, 1)) . " " . $metric;
    ?>