125 lines
2.5 KiB
PHP
125 lines
2.5 KiB
PHP
<head>
|
||
|
||
<link rel = "stylesheet" href = "http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
|
||
|
||
<script src = "http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
|
||
|
||
<script>
|
||
// Creating map options
|
||
var mapOptions = {
|
||
center: [17.385044, 78.486671],
|
||
zoom: 10
|
||
}
|
||
|
||
// Creating a map object
|
||
var map = new L.map(‘map’, mapOptions);
|
||
|
||
// Creating a Layer object
|
||
var layer = new L.TileLayer(‘http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png’);
|
||
|
||
// Adding layer to the map
|
||
map.addLayer(layer);
|
||
</script>
|
||
|
||
|
||
|
||
</head>
|
||
|
||
<?php
|
||
#
|
||
|
||
|
||
|
||
$kodf="princip";
|
||
$username="zacek";
|
||
$pass="curamajzlik";
|
||
$carid_list="174167";
|
||
|
||
#$DateStart="2019-07-27 00:00:00";
|
||
#$DateEnd="2019-07-27 23:59:00";
|
||
|
||
$DateStart=date("Y-m-d 00:00:00");
|
||
$DateStart="2019-01-01 00:00:00";
|
||
$DateEnd=date("Y-m-d 23:59:00");
|
||
|
||
|
||
|
||
?>
|
||
|
||
<form action="testpage2.php">
|
||
Date from: <input type = "date">
|
||
|
||
<input type="submit" value="Submit">
|
||
|
||
</form>
|
||
|
||
|
||
|
||
<?php
|
||
|
||
|
||
|
||
$client = new SoapClient('https://api.webdispecink.cz/code/WebDispecinkServiceNet.php?wsdl');
|
||
$return = $client->_getCarsIDPosition($kodf, $username, $pass, $carid_list);
|
||
|
||
$return2 = $client->_getCarConsumption($kodf, $username, $pass, $carid_list, $DateStart, $DateEnd);
|
||
|
||
|
||
|
||
|
||
#print_r($return);
|
||
|
||
|
||
$idcar= $return->item->cd;
|
||
$zs= $return->item->Zs;
|
||
$zd= $return->item->Zd;
|
||
$ln= $return->item->LN;
|
||
$km= $return->item->Km;
|
||
$palivo= $return->item->Fl;
|
||
$usedfuel= $return->item->usedfuel;
|
||
$altitude= $return->item->altitude;
|
||
|
||
|
||
|
||
|
||
$distkm= $return2->item->Dist_km;
|
||
|
||
|
||
|
||
|
||
echo "Západní šířka: $zs </BR>";
|
||
echo "Západní délka: $zd </BR>";
|
||
echo "Adresa: $ln </BR>";
|
||
echo "Najeto: $km Km</BR>";
|
||
#echo "Spotřebované palivo: $usedfuel </BR>";
|
||
echo "Nadmořská výška: $altitude m</BR>";
|
||
echo "Paliva: $palivo l</BR>";
|
||
echo "Dnes najeto: $distkm Km</BR>";
|
||
|
||
|
||
#echo "<a href=https://maps.google.com?q=$zs,$zd>Link</a>";
|
||
|
||
|
||
|
||
|
||
#echo "<iframe src=http://maps.google.com/maps?q=35.856737,10.606619&z=15&output=embed width=360 height=270 frameborder=0 style=border:0></iframe>";
|
||
|
||
|
||
echo "<iframe src=\"https://maps.google.com/maps?q=$zs,$zd&z=15&output=embed\" width=\"360\" height=\"270\" frameborder=\"0\" style=\"border:0\"></iframe>";
|
||
|
||
|
||
|
||
echo "<iframe width=\"425\" height=\"350\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\"
|
||
src=\"https://www.openstreetmap.org?mlat=$zs&mlon=$zd\" style=\"border: 1px solid black\"></iframe>";
|
||
|
||
echo "<a href=https://www.openstreetmap.org?mlat=$zs?mlon=$zd>link</a>";
|
||
|
||
echo "<div id =\”my-map\” style = \“width:800px; height:600px;\”></div>";
|
||
|
||
?>
|
||
|
||
|
||
|
||
|
||
|