<?php

define("IN_LIVEZILLA",true);
define("LIVEZILLA_PATH","./");

require(LIVEZILLA_PATH . "_config/config.inc.php");
require(LIVEZILLA_PATH . "_definitions/definitions.inc.php");
require(LIVEZILLA_PATH . "_definitions/definitions.files.inc.php");
require(LIVEZILLA_PATH . "_definitions/definitions.protocol.inc.php");
require(LIVEZILLA_PATH . "_definitions/definitions.dynamic.inc.php");
require(LIVEZILLA_PATH . "_lib/functions.global.inc.php");

$map = getFile(TEMPLATE_HTML_MAP);

if(isset($_GET["lat"]))
	$map = str_replace("<!--dlat-->",$_GET["lat"],$map);
else
	$map = str_replace("<!--dlat-->","25",$map);

if(isset($_GET["lng"]))
	$map = str_replace("<!--dlng-->",$_GET["lng"],$map);
else
	$map = str_replace("<!--dlng-->","10",$map);

if(isset($_GET["zom"]))
	$map = str_replace("<!--dzom-->",$_GET["zom"],$map);
else
	$map = str_replace("<!--dzom-->","1",$map);
	
$map = str_replace("<!--key-->",$CONFIG["gl_api_key"],$map);

exit($map);
?>