-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmap.php
35 lines (30 loc) · 1.47 KB
/
map.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
require_once('runtime.php');
if(isset($_GET['embed']) AND $_GET['embed']) {
if(isset($_GET['key']))
$smarty->assign('key', $_GET['key']);
else
$smarty->assign('key', false);
if(!isset($_GET['longitude'])
OR !isset($_GET['latitude'])
OR !isset($_GET['zoom'])) {
$smarty->assign('community_location_longitude', Config::getConfigValueByName('community_location_longitude'));
$smarty->assign('community_location_latitude', Config::getConfigValueByName('community_location_latitude'));
$smarty->assign('community_location_zoom', Config::getConfigValueByName('community_location_zoom'));
} else {
$smarty->assign('community_location_longitude', $_GET['longitude']);
$smarty->assign('community_location_latitude', $_GET['latitude']);
$smarty->assign('community_location_zoom', $_GET['zoom']);
}
$smarty->assign('google_maps_api_key', $GLOBALS['google_maps_api_key']);
$smarty->display("map_embed.tpl.html");
} else {
$smarty->assign('community_location_longitude', Config::getConfigValueByName('community_location_longitude'));
$smarty->assign('community_location_latitude', Config::getConfigValueByName('community_location_latitude'));
$smarty->assign('community_location_zoom', Config::getConfigValueByName('community_location_zoom'));
$smarty->assign('google_maps_api_key', $GLOBALS['google_maps_api_key']);
$smarty->display("header.tpl.html");
$smarty->display("map.tpl.html");
$smarty->display("footer.tpl.html");
}
?>