Aussenlinie hinzufügen
Füge durch Klicken auf die Übersichtskarte die Aussenlinie für die OL-Karte unten ein und drücke den Aussenlinie Übertragen Button, um diese an die Datenbank zu Übermitteln.} elseif ($submit) { if (!$oktoaddmap) { print "
No addition possible
$errortext"; } else { print "Thank you!
"; print "Outline for map ".$row["name"] ." is now submitted to World of O. An administrator will check the submission before it is available to the public. In the meantime it will not be possible to do any changes for this map outline. Go to World of O Maps"; $verbose=0; // For now, we just set outline=1, and let it go directly out to the // Internet... Check afterwards, as there is no overwriting, and // no big trouble if some are wrong... lat, lng are not updated yet. // Can be done bulk upload way by checking which database entries // have outline and at the same time lat=0, lng=0 after entries are // checked.... $points = spliti (" ", $coords); if ($lat==0 && $lng ==0) { $xmin=1e99; $ymin=1e99; $xmax=-1e99; $ymax=-1e99; for ($i=0; $i < count($points); $i++) { list ($x,$y)=split(",",$points[$i]); $xmin=min($x,$xmin); $xmax=max($x,$xmax); $ymin=min($y,$ymin); $ymax=max($y,$ymax); } $xcenter=($xmin+$xmax)/2; $ycenter=($ymin+$ymax)/2; if (count($points) > 1) { $sqlupdate="UPDATE maps SET outline = '1', lat='$xcenter', lng='$ycenter' WHERE id = '$id' LIMIT 1"; } else { $sqlupdate="UPDATE maps SET lat='$xcenter', lng='$ycenter' WHERE id = '$id' LIMIT 1"; } } else { if (count($points) > 1) { $sqlupdate="UPDATE maps SET outline = '1' WHERE id = '$id' LIMIT 1";} } $result = mysql_query($sqlupdate); if ($verbose) { print "$result: $sqlupdate\n"; echo mysql_error(); } if (count($points) > 1) { $sqlupdate="INSERT INTO outlines (id,coords) values($id,'$coords')"; $result = mysql_query($sqlupdate); if ($verbose) { print "$result: $sqlupdate
\n"; echo mysql_error(); } } else { echo "
Note! As only one point was given, no outline is inserted - instead only center point is given for the map!"; } } } else { if ($oktoaddmap) { print "
