From 6752d4defb195739c66a7dec94570d41ea8d295a Mon Sep 17 00:00:00 2001 From: Mathias Mayrhofer Date: Sun, 23 Feb 2020 13:21:51 +0100 Subject: Links/Nodes fertiggestellt --- kml/data.php | 59 ++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 13 deletions(-) (limited to 'kml/data.php') diff --git a/kml/data.php b/kml/data.php index 2513390..0eef510 100644 --- a/kml/data.php +++ b/kml/data.php @@ -383,19 +383,21 @@ foreach ($lines as $num => $line) foreach ($locations as $location) { $data = $locations[$location->locid]; //printf("\t" . '' . "\n", - // $data->locid, $data->locname, $data->lat, $data->lng, $data->pixel_x, $data->pixel_y, $data->state, $data->gallery_link, $data->dnsnames); - printf("\t" .' ' . "\n", $data->locid); - printf("\t" .' %s' . "\n", $data->locname); - printf("\t" .'
%s

%s

#%s, %s
' . "\n", $data->gallery_link, $data->dnsnames, $data->locid, $data->state); - printf("\t" .' #ffstyle_online' . "\n"); - printf("\t" .' ' . "\n"); - printf("\t" .' 1' . "\n"); - printf("\t" .' relativeToGround' . "\n"); - printf("\t" .' ' . "\n"); - printf("\t" .' %s,%s,60' . "\n", $data->lng, $data->lat); - printf("\t" .' ' . "\n"); - printf("\t" .' ' . "\n"); - printf("\t" .'
' . "\n"); + // $data->locid, $data->locname, $data->lat, $data->lng, $data->pixel_x, $data->pixel_y, $data->state, $data->gallery_link, $data->dnsnames); + if ($data->state=='online') { + printf("\t" .'' . "\n", $data->locid); + printf("\t" .' %s' . "\n", $data->locname); + printf("\t" .'
%s

%s

#%s, %s
' . "\n", $data->gallery_link, $data->dnsnames, $data->locid, $data->state); + printf("\t" .' #ffstyle_online' . "\n"); + printf("\t" .' ' . "\n"); + printf("\t" .' 1' . "\n"); + printf("\t" .' relativeToGround' . "\n"); + printf("\t" .' ' . "\n"); + printf("\t" .' %s,%s,60' . "\n", $data->lng, $data->lat); + printf("\t" .' ' . "\n"); + printf("\t" .' ' . "\n"); + printf("\t" .'
' . "\n"); + } } ?> @@ -403,6 +405,25 @@ foreach ($locations as $location) { Offline 0 locid]; + //printf("\t" . '' . "\n", + // $data->locid, $data->locname, $data->lat, $data->lng, $data->pixel_x, $data->pixel_y, $data->state, $data->gallery_link, $data->dnsnames); + if ($data->state=='offline') { + printf("\t" .'' . "\n", $data->locid); + printf("\t" .' %s' . "\n", $data->locname); + printf("\t" .'
%s

%s

#%s, %s
' . "\n", $data->gallery_link, $data->dnsnames, $data->locid, $data->state); + printf("\t" .' #ffstyle_offline0' . "\n"); + printf("\t" .' ' . "\n"); + printf("\t" .' 1' . "\n"); + printf("\t" .' relativeToGround' . "\n"); + printf("\t" .' ' . "\n"); + printf("\t" .' %s,%s,60' . "\n", $data->lng, $data->lat); + printf("\t" .' ' . "\n"); + printf("\t" .' ' . "\n"); + printf("\t" .'
' . "\n"); + } +} ?> @@ -416,6 +437,18 @@ foreach ($links as $link) { $count[$data2->locid]=true; //printf("\t" . '' . "\n", // $data1->locid, $data1->locname, $data1->lat,$data1->lng,$data2->locid, $data2->locname, $data2->lat, $data2->lng, $link->label, $link->channel, $link->defaultroute, $link->frequency, $link->dnsfrom,$link->dnsto); + printf("\t" .'' . "\n", $data1->locid, $data2->locid); + printf("\t" .' %s - %s' . "\n", $data1->locname, $data2->locname); + printf("\t" .' %s' . "\n", ($link->label=='-1' ? '#ffstyle_vpn' : '#ffstyle_link')); + printf("\t" .' ' . "\n"); + printf("\t" .' 11' . "\n"); + printf("\t" .' relativeToGround' . "\n"); + printf("\t" .' ' . "\n"); + printf("\t" .' %s,%s,60' . "\n", $data1->lng, $data1->lat); + printf("\t" .' %s,%s,60' . "\n", $data2->lng, $data2->lat); + printf("\t" .' ' . "\n"); + printf("\t" .' ' . "\n"); + printf("\t" .'' . "\n"); } ?> -- cgit v1.2.1