]> dev.renevier.net Git - syp.git/blobdiff - items.php
images are stored on a ftp server
[syp.git] / items.php
index 3efed088d44e5138c7ebd9f3eb3467ef877c6206..f8774032cb89d25a7e3b287624124418498dfc10 100644 (file)
--- a/items.php
+++ b/items.php
@@ -8,7 +8,7 @@ require_once ("./inc/db/mysql.php");
 
 function main ($features) {
 
-    header("Cache-control: no-cache");
+    header ("Cache-control: no-cache");
 
     echo '<?xml version="1.0" encoding="UTF-8"?>
 <kml xmlns="http://www.opengis.net/kml/2.2">
@@ -23,7 +23,7 @@ function main ($features) {
         $title = htmlspecialchars ($feature->title, ENT_QUOTES);
         $description = htmlspecialchars ($feature->description, ENT_QUOTES);
         $imgurl = ($feature->imgpath ? 
-                    full_url_from_filename ($feature->imgpath)
+                    full_url_from_imgpath ($feature->imgpath)
                     : "");
         $lon = $feature->lon;
         $lat = $feature->lat;
@@ -32,7 +32,8 @@ function main ($features) {
                     $title;
 
         if ($imgurl) {
-            $imgurlHTML = sprintf ('<img alt="%s" src="%s">', $alt, $imgurl);
+            $imgurlHTML = sprintf ('<a href="%s"><img alt="%s" src="%s"></a>',
+                                    $imgurl, $alt, $imgurl);
         } else {
             $imgurlHTML = "";
         }