forked from vibrog/OpenLinkMap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·217 lines (214 loc) · 8.91 KB
/
index.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?php
require_once("api/functions.php");
if (isset($_GET['lang']) && in_array($_GET['lang'], $langs))
$lang = $_GET['lang'];
else
$lang = getUserLang();
require_once("locales/".$lang.".php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<? echo $lang; ?>" lang="<? echo $lang; ?>">
<head>
<title><?=$appname?></title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-language" content="<? echo $lang; ?>" />
<meta name="keywords" content="openstreetmap, openlinkmap, alexander matheisen, rurseekatze, openlayers, osm, matheisen, olm" />
<meta name="title" content="<?=$appname?>" />
<meta name="author" content="rurseekatze, Alexander Matheisen" />
<meta name="publisher" content="rurseekatze, Alexander Matheisen" />
<meta name="copyright" content="GNU General Public License v3" />
<meta name="revisit-after" content="after 90 days" />
<meta name="date" content="2010-01-01" />
<meta name="page-topic" content="<?=$appname?>" />
<meta name="robots" content="index,follow" />
<link rel="shortcut icon" href="img/favicon.ico" type="image/vnd.microsoft.icon" />
<link rel="icon" href="img/favicon.ico" type="image/vnd.microsoft.icon" />
<meta http-equiv="content-script-type" content="text/javascript" />
<meta http-equiv="content-style-type" content="text/css" />
<link rel="stylesheet" type="text/css" href="css/map.css" />
<script type="text/javascript" src="js/OpenLayers.js"></script>
<?php
// params
echo "<script type=\"text/javascript\">\n";
echo "var params={\n";
echo "id : ".(isset($_GET['id']) ? ($_GET['id']) : ("null")).",\n";
$type = isset($_GET['type']) ? $_GET['type'] : null;
if (!isset($type))
$type = isset($_GET['objecttype']) ? $_GET['objecttype'] : null;
echo "type : ".(isset($type) ? ("\"".$type."\"") : ("null")).",\n";
echo "ext : ".((isset($_GET['ext']) && ($_GET['ext'] == 1)) ? ("true") : ("false")).",\n";
echo "lat : ";
if (isset($_GET['lat']))
echo $_GET['lat'].",\n";
else
{
$latlon = getLatLon($_GET['id'], $type);
if ($latlon)
echo $latlon[1].",\n";
else
echo "null,\n";
}
echo "lon : ";
if (isset($_GET['lon']))
echo $_GET['lon'].",\n";
else
{
$latlon = getLatLon($_GET['id'], $type);
if ($latlon)
echo $latlon[0].",\n";
else
echo "null,\n";
}
echo "zoom : ".(isset($_GET['zoom']) ? ($_GET['zoom']) : ("null")).",\n";
echo "bounded : ".(((isset($_GET['bounded'])) && ($_GET['bounded'] == 1)) ? 1 : 0).",\n";
echo "offset : ".(isset($_GET['offset']) ? ($_GET['offset']) : ("null")).",\n";
echo "searchquery : \"".(isset($_GET['q']) ? ($_GET['q']) : (""))."\",\n";
echo "lang : \"".$_GET['lang']."\"\n";
echo "};\n";
echo "</script>\n";
switch ($lang)
{
case "de":
$paypalbuttonlang = "de_DE";
break;
case "en":
$paypalbuttonlang = "en_US";
break;
case "fr":
$paypalbuttonlang = "fr_FR";
break;
case "es":
$paypalbuttonlang = "es_ES";
break;
case "nl":
$paypalbuttonlang = "nl_NL";
break;
case "it":
$paypalbuttonlang = "it_IT";
break;
case "ru":
$paypalbuttonlang = "ru_RU";
break;
case "pl":
$paypalbuttonlang = "pl_PL";
break;
default:
$paypalbuttonlang = "en_US";
break;
}
?>
<script type="text/javascript" src="locales/<? echo $lang; ?>.js"></script>
<script type="text/javascript" src="api/langfile.php?lang=<? echo $lang; ?>"></script>
<script type="text/javascript" src="js/OpenStreetMap.js"></script>
<script type="text/javascript" src="js/search.js"></script>
<script type="text/javascript" src="js/startposition.js"></script>
<script type="text/javascript" src="js/timestamp.js"></script>
<script type="text/javascript" src="js/format.js"></script>
<script type="text/javascript" src="js/fullscreen.js"></script>
<script type="text/javascript" src="js/panorama.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
<script type="text/javascript" src="js/addressformats.js"></script>
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://www.openlinkmap.org/piwik/" : "http://www.openlinkmap.org/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try
{
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
}
catch( err )
{}
</script>
<noscript>
<p><img src="http://www.openlinkmap.org/piwik/piwik.php?idsite=1" style="border:0" alt="" /></p>
</noscript>
<!-- End Piwik Tracking Code -->
<script type="text/javascript">
/* <![CDATA[ */
(function(){
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */</script>
</head>
<body onload="createMap();">
<div id="fullscreen" class="fullscreenOut"></div>
<div id="moreInfo" class="moreInfoFalse"></div>
<div id="sideBar" class="sideBar" onmouseover="hoverSidebar();" onmouseout="unhoverSidebar();">
<b id="header"><a href="index.php"><?=$appname?></a></b>
<form id="langSelection">
<select id="langSelector" name="language" size="1" onChange="changeLanguage(this.form.language.options[this.form.language.selectedIndex].value);">
<?php
$languages = array(
"de" => "Deutsch",
"en" => "English",
"fr" => "Français",
"it" => "Italiano",
"ru" => "Русский",
"ja" => "日本語"
);
foreach ($languages as $short => $name)
{
echo "<option value=\"".$short."\"";
if ($short == $lang)
echo " selected";
echo ">".$name."</option>\n";
}
?>
</select>
</form>
<br />
<p id="osm">Maps and data <a href="http://www.openstreetmap.org/copyright">© OpenStreetMap contributors</a>.<br />Hillshading: <a href="http://nasa.gov/">NASA SRTM</a>.</p>
<a href="http://joker.com/" id="poweredby"><img src="img/ad.png" /></a>
<p id="ad" onclick="clickAd();">Improve the data! Correct wrong website links with the new website checker from Keepright!</p>
<form target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post" id="PaypalButton">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="ELF9KT74GH32G">
<input type="image" src="https://www.paypalobjects.com/<?=$paypalbuttonlang?>/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal">
<img alt="" border="0" src="https://www.paypalobjects.com/<?=$paypalbuttonlang?>/i/scr/pixel.gif" width="1" height="1">
</form>
<a class="FlattrButton" id="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://www.openlinkmap.org/"></a>
<noscript>
<a href="http://flattr.com/thing/832440/OpenLinkMap" target="_blank">
<img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" />
</a>
</noscript>
<p id="info"></p>
<div id="linkBar">
<a class="links" id="spamButton" onclick="reportSpam();">Report bug in map</a> •
<a class="links" id="infoButton" href="http://wiki.openstreetmap.org/wiki/OpenLinkMap" target="_blank">More Info</a> •
<a class="links" id="contactButton" href="#">Contact</a>
<script language="javascript">
var usr = "info";
var dom = "openlinkmap";
var tld = "org";
gEBI("contactButton").href="mailto:"+usr+"@"+dom+"."+tld;
</script>
</div>
<input type="text" id="searchBox" size="20" />
<img id="searchButton" src="img/search.png" onclick="Search.request();" title="Search" />
<img id="clearButton" src="img/clear.png" onclick="Search.clear();" />
<br />
<input type="checkbox" id="searchOption"><label for="searchOption" id="searchOptionCaption">Search only in the current map view</label><br /><br />
<div id="searchBar" class="infoBarOut"></div>
<div id="detailsBar" class="infoBarOut"></div>
<iframe id="josmFrame" src="about:blank"></iframe>
</div>
<div class="hideSidebarButton" id="hideSidebarButton" onclick="hideSideBar();" title="Hide"><b id="hideText">«</b></div>
<img class="locateButton" id="locateButton" src="img/locate.png" />
<div id="mapFrame" class="mapFrame">
<noscript>
<p><b><?=$translations['captions']['nojavascriptheader']?></b><br /><?=$translations['captions']['nojavascripttext']?></p>
</noscript>
</div>
<b class="errorBarFalse" id="errorBar"></b>
<b class="messageBarFalse" id="messageBar"></b>
</body>
</html>