hallo ingo,
versuche mal diese php dies
das problem lag am pfad... da oben ja der root pfad definiert ist, wird nun alles sauber aufgerufen..
inkl. datenbank
p.s vielleicht könnte uns kurt, mawenzi, nicky etc helfen den code zu optimieren...
ist echt eine toole sache....
z.b das wenn man in eine kategorie springt, dann nur eine kategorie angezeigt wird.
google-photo-map.php
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: google-photo-map.php *
* Copyright: (C) 2008 Ingo *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.7.6 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (Lizenz.txt) für weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (Licence.txt) for further information. *
* *
*************************************************************************/
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
function parseToXML($htmlStr)
{
$xmlStr=str_replace('<','<',$htmlStr);
$xmlStr=str_replace('>','>',$xmlStr);
$xmlStr=str_replace('"','"',$xmlStr);
$xmlStr=str_replace("'",'&#38;#38;#39;',$xmlStr);
$xmlStr=str_replace("&",'&',$xmlStr);
return $xmlStr;
}
// Select all the rows in the markers table
$query = "SELECT * FROM (".IMAGES_TABLE.") WHERE `image_gmap_show` = 1";
$result = mysql_query($query);
if (!$result) {
die('Invalid query: ' . mysql_error());
}
header("Content-type: text/xml ; charset=iso-8859-15");
// Start XML file, echo parent node
echo '<markers>';
// Iterate through the rows, printing XML nodes for each
while ($row = @mysql_fetch_assoc($result)){
// ADD TO XML DOCUMENT NODE
echo '<marker ';
echo 'name="' . parseToXML($row['image_name']) . '" ';
echo 'address="' . parseToXML($row['image_']) . '" ';
echo 'lat="' . $row['image_gmap_latitude'] . '" ';
echo 'lng="' . $row['image_gmap_longitude'] . '" ';
echo 'kml="' . "".ROOT_PATH."data/kml/" . $row['image_id'] . ".kml" . '" ';
$max_length = 100; // Max. Anzahl der Zeichen in der Bildbeschreibung
$description = $row['image_description'];
$description_short = $description;
if (strlen($description) > $max_length) {
$description_short = substr($description, 0, $max_length)." ... ";
}
echo 'desc="' . parseToXML($description_short) . '" ';
echo 'type="' . "".ROOT_PATH."details.php?image_id=" . $row['image_id'] . '" ';
echo 'thumb="' . "".ROOT_PATH."data/thumbnails/" . $row['cat_id'] . "/" . $row['image_media_file'] . '" ';
echo 'cat="' . "".ROOT_PATH."categories.php?cat_id=" . $row['cat_id'] . '" ';
echo '/>';
}
// End XML file
echo '</markers>';
?>