getKmlDocumentFromDB($kmlId); if ($kmlDoc) { header("Content-type: application/xhtml+xml; charset=" . CHARSET); echo $kmlDoc; } else { echo "You may not have the rights to access this document. Check your log file."; } ?>