svn commit: r977 - trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php
christoph at osgeo.org
christoph at osgeo.org
Mon Dec 11 06:07:41 EST 2006
Author: christoph
Date: 2006-12-11 11:07:41+0000
New Revision: 977
Modified:
trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php
Log:
added generation of temporary kml
Modified: trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php?view=diff&rev=977&p1=trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php&p2=trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php&r1=976&r2=977
==============================================================================
--- trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php (original)
+++ trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php 2006-12-11 11:07:41+0000
@@ -84,14 +84,20 @@
$res = db_prep_query($sql, $v, $t);
if (db_error()) {
- echo "<script>var title = \"" . $title . "\";alert(\"Error while saving KML document \" + title + \"!\");</script>";
+ echo "<script>var title = \"" . $title . "\";alert(\"Error while saving KML document \" + title + \"! ".db_error()."\");</script>";
}
else {
if ($alert) {
echo "<script>var title = \"" . $title . "\";alert(\"KML document \" + title + \"has been saved!\")</script>";
}
}
- echo "Please feel free to add the <a href = 'http://wms1.ccgis.de/mburl/".$kml->kml_id."'>link</a> to your meeting point to your website.";
+ $filename = "../tmp/".$kml->kml_id.'.kml';
+ $handle = fopen($filename, "w");
+ fputs($handle, str_replace("&", "&" , html_entity_decode($kml->kml)));
+ fclose($handle);
+
+ echo "Please feel free to add the <a href = 'http://".$_SERVER['HTTP_HOST']."/mburl/".$kml->kml_id."'>link</a> to your meeting point to your website.<br><br>";
+ echo "<a href='".$filename."'>kml</a>";
}
?>
More information about the Mapbender_commits
mailing list