Skip to content
Newer
Older
100644 710 lines (575 sloc) 28.4 KB
417dc9e @simison PHP maintenance
simison authored Jan 14, 2016
1 <?php
14c35bf @simison Directory structure, jquery, icons, headers to index.php
simison authored May 20, 2010
2 /*
3 * Hitchwiki Maps: index.php
4 * 2010
5 *
6 */
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
7
8
c59a347 @simison pages
simison authored May 28, 2010
9 /*
10 * Initialize Maps
11 */
9bfc5bd @simison Places
simison authored Aug 4, 2010
12 if(@is_file('config.php')) require_once "config.php";
949249a little txt tweaks
Mikael Korpela authored Dec 16, 2010
13 else { $settings["non_maintenance_ip"] = array(); $settings["maintenance_page"] = true; }
9bfc5bd @simison Places
simison authored Aug 3, 2010
14
15 /*
16 * Put up a maintenance -sign
17 * Set it up from config.php or test it from ./?maintenance
18 */
949249a little txt tweaks
Mikael Korpela authored Dec 16, 2010
19 if(isset($_GET["maintenance"])) { $settings["non_maintenance_ip"] = array(); $settings["maintenance_page"] = true; }
20 if($settings["maintenance_page"]===true && !in_array($_SERVER['REMOTE_ADDR'], $settings["non_maintenance_ip"])) { @include("maintenance_page.php"); exit; }
9bfc5bd @simison Places
simison authored Aug 3, 2010
21
22
70f1179 @simison index
simison authored Dec 3, 2010
23
9bfc5bd @simison Places
simison authored Aug 3, 2010
24 /*
3c84ee3 @simison bugs and trips
simison authored Sep 28, 2011
25 * Redirect to clean "rdfrom" set by mediawiki
fc24c75 @simison bugs and stuff
simison authored Dec 1, 2010
26 */
27 if(isset($_GET["rdfrom"])) {
28 header("Location: ".$settings["base_url"]);
29 exit;
30 }
31
32
33
34 /*
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
35 * Returns an info-array about logged in user (or false if not logged in)
9bfc5bd @simison Places
simison authored Aug 3, 2010
36 * With this we also check if user is logged in by every load
37 * You should include this line to every .php where you need to know if user is logged in
38 */
39 $user = current_user();
5d738b4 @MrTweek got json-rpc running
MrTweek authored May 19, 2010
40
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
41 $title = '';
c59a347 @simison pages
simison authored May 28, 2010
42
df3c86a @simison Better login form
simison authored Jun 4, 2010
43
44 /*
45 * Map settings
46 */
47 // Zoom, lat, lon, layers
9bfc5bd @simison Places
simison authored Aug 3, 2010
48 $zoom = (isset($_GET["zoom"]) && ctype_digit($_GET["zoom"])) ? $_GET["zoom"] : '4';
49
50 // Centered to Germany (51,9). Projection center would be '49','8.3'
511e39d @simison big update
simison authored Sep 2, 2010
51
9bfc5bd @simison Places
simison authored Aug 3, 2010
52 $lat = (isset($_GET["lat"]) && is_numeric($_GET["lat"])) ? $_GET["lat"] : '51';
53 $lon = (isset($_GET["lon"]) && is_numeric($_GET["lon"])) ? $_GET["lon"] : '9';
df3c86a @simison Better login form
simison authored Jun 3, 2010
54 #$layers = (isset($_GET["layers"]) && !empty($_GET["layers"])) ? strip_tags($_GET["layers"]) : 'B';
55 $layers = 'B';
56
511e39d @simison big update
simison authored Sep 1, 2010
57 if(!isset($_GET["lat"]) && !isset($_GET["lon"]) && !empty($user["country"])) {
58 $countryinfo = country_info($user["country"]);
59 if($countryinfo!==false) {
60 $lat = $countryinfo["lat"];
61 $lon = $countryinfo["lon"];
62 if(!isset($_GET["zoom"])) $zoom = '5';
63 }
64 }
65
9bfc5bd @simison Places
simison authored Aug 3, 2010
66 // Markers visible -level
67 // Limit loading new markers only to this zoom level and deeper (bigger numbers = more zoom)
68 // Also hides markers-layer before this zoom level and show country places count -labels instead
69 $default_markersZoomLimit = '7';
70 $markersZoomLimit = (isset($_COOKIE[$settings["cookie_prefix"]."markersZoomLimit"]) && ctype_digit($_COOKIE[$settings["cookie_prefix"]."markersZoomLimit"])) ? $_COOKIE[$settings["cookie_prefix"]."markersZoomLimit"] : $default_markersZoomLimit;
71
72
73 if(isset($_GET["place"]) && $_GET["place"] != "" && preg_match ("/^([0-9]+)$/", $_GET["place"])) {
74 $place = get_place($_GET["place"], true);
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
75 if (isset($place['error']) and $place['error'] !== true) {
511e39d @simison big update
simison authored Sep 1, 2010
76 $show_place = htmlspecialchars($_GET["place"]);
77 }
78 else {
79 $show_place_error = true;
80 unset($place);
81 }
9bfc5bd @simison Places
simison authored Aug 3, 2010
82 }
83
e4047a3 @simison big summer update
simison authored Aug 3, 2011
84
511e39d @simison big update
simison authored Sep 1, 2010
85 /*
c6a8fe7 static map function
Mikael Korpela authored Dec 17, 2010
86 * Build a title, image, slogan and description
511e39d @simison big update
simison authored Sep 1, 2010
87 */
e4047a3 @simison big summer update
simison authored Aug 3, 2011
88
c6a8fe7 static map function
Mikael Korpela authored Dec 17, 2010
89 // Title
511e39d @simison big update
simison authored Sep 1, 2010
90 // If place
c6a8fe7 static map function
Mikael Korpela authored Dec 17, 2010
91 if(isset($show_place) && !isset($show_place_error)) {
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
92 $title .= _("a Hitchhiking spot in").' ';
511e39d @simison big update
simison authored Sep 1, 2010
93
94 // in city, country
95 if(!empty($place["location"]["locality"])) $title .= $place["location"]["locality"].', ';
96
97 $title .= $place["location"]["country"]["name"];
98 $title .= ' - ';
99 }
e4047a3 @simison big summer update
simison authored Aug 3, 2011
100 if(isset($_GET["page"]) && !empty($_GET["page"]) && !empty($settings["views"]["pages"][$_GET["page"]]["title"])) {
101
102 $title .= htmlspecialchars($settings["views"]["pages"][$_GET["page"]]["title"]);
103 $title .= ' - ';
104 }
d4045be @simison languages and tweaking many things
simison authored Jan 3, 2011
105 $title .= 'Hitchwiki '._("Maps");
e4047a3 @simison big summer update
simison authored Aug 3, 2011
106
c6a8fe7 static map function
Mikael Korpela authored Dec 17, 2010
107 // Image
108 if(isset($show_place) && !isset($show_place_error)) $website_img[] = image_map($place["lat"],$place["lon"]);
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
109 $website_img[] = $settings["base_url"].'/badge.png';
e4047a3 @simison big summer update
simison authored Aug 3, 2011
110
c6a8fe7 static map function
Mikael Korpela authored Dec 17, 2010
111 // Slogan
112 $slogan = _("Find good places for hitchhiking and add your own");
0e5b19f @simison js/css optimization
simison authored Nov 25, 2010
113
c6a8fe7 static map function
Mikael Korpela authored Dec 17, 2010
114 // Description
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
115 if(isset($show_place) && !isset($show_place_error) && !empty($place["description"]["en_UK"]["description"])) $description = htmlspecialchars(strip_tags($place["description"]["en_UK"]["description"]));
c6a8fe7 static map function
Mikael Korpela authored Dec 17, 2010
116 else $description = $slogan;
b0fd566 static map function
Mikael Korpela authored Dec 17, 2010
117
e4047a3 @simison big summer update
simison authored Aug 3, 2011
118 // OG:URL
119 // OG:Type
120 if(isset($show_place) && !isset($show_place_error)) {
121 /*
122 if(!empty($place["location"]["locality"])): $og_type = "city";
123 elseif(!empty($place["location"]["country"]["name"])): $og_type = "country";
124 else */$og_type = "landmark";
125
126 $og_url = $place["link"];
127 } else {
128 $og_type = "website";
129 $og_url = $settings["base_url"];
130 }
131
0e5b19f @simison js/css optimization
simison authored Nov 25, 2010
132
14c35bf @simison Directory structure, jquery, icons, headers to index.php
simison authored May 19, 2010
133 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
134 <html
135 xmlns="http://www.w3.org/1999/xhtml"
136 xmlns:og="http://opengraphprotocol.org/schema/"
137 <?php
511e39d @simison big update
simison authored Sep 1, 2010
138 // Load schema only if FB-tags are filled in config
e4047a3 @simison big summer update
simison authored Aug 3, 2011
139 if(!empty($settings["fb"])) echo 'xmlns:fb="http://developers.facebook.com/schema/"'."\n"; ?>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
140 dir="<?php echo langdir(); ?>"
cb08b12 contact form, tweaking, edit descriptions...
Mikael Korpela authored Feb 1, 2011
141 lang="<?php echo langcode(); ?>">
6851679 bugs
Mikael Korpela authored Oct 14, 2010
142 <head profile="http://gmpg.org/xfn/11">
143 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
fc24c75 @simison bugs and stuff
simison authored Dec 1, 2010
144 <title><?php echo $title; ?></title>
47ae46b @simison preparing big update
simison authored May 25, 2012
145 <link href="<?= $settings["base_url"]; ?>/static/css/ui-lightness/jquery-ui.css?c=<?php echo $settings["cache_buster"]; ?>" media="all" rel="stylesheet" type="text/css" />
6851679 bugs
Mikael Korpela authored Oct 14, 2010
146 <?php
e4047a3 @simison big summer update
simison authored Aug 3, 2011
147
6851679 bugs
Mikael Korpela authored Oct 14, 2010
148 /*
149 * Map Services
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
150 * You need to enable these from init_map() in static/js/main.js
6851679 bugs
Mikael Korpela authored Oct 14, 2010
151 * Set API keys and such to the config.php
152 */
e4047a3 @simison big summer update
simison authored Aug 3, 2011
153
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
154 // Google Maps API
155 if($settings["google"]["api"]["maps"] == true) {
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
156 if($user["logged_in"]===true && empty($user["map_google"])) $print_map_google = false;
157 else $print_map_google = true;
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
158
159 /* This is Maps API V3 script, wich doesn't need API key anymore.
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
160 * It's already supported by OpenLayers, but there's annoying bug that stops us using it.
161 * While dragging map, overlay vectors follow with different speed.
162 * http://trac.osgeo.org/openlayers/ticket/2929
163 * http://openlayers.org/blog/2010/07/10/google-maps-v3-for-openlayers/
164 *
165 * Use V3 API by removing API key from the config file.
166 */
167 if($print_map_google && empty($settings["google"]["api"]["maps_api"])) {
168 echo '<script src="http://maps.google.com/maps/api/js?v=3.2&&amp;sensor=false" type="text/javascript"></script>'."\n\t\t";
169 echo '<script type="text/javascript"> var google_maps_api_v2 = false; </script>'."\n\t\t";
170 }
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
171 /*
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
172 * Old Maps API v2 script:
173 * Remove from use when v3 works better.
174 */
175 elseif($print_map_google && !empty($settings["google"]["api"]["maps_api"])) {
176 echo '<script src="http://maps.google.com/maps?file=api&amp;l='.shortlang().'&amp;v=2&amp;key='.$settings["google"]["api"]["maps_api"].'" type="text/javascript"></script>'."\n\t\t";
177 echo '<script type="text/javascript"> var google_maps_api_v2 = true; </script>'."\n\t\t";
178 }
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
179 }
6851679 bugs
Mikael Korpela authored Oct 14, 2010
180
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
181 // Bing
182 if(!empty($settings["bing"]["maps_api"])) {
183 if($user["logged_in"]===true && empty($user["map_bing"])) $print_map_bing = false;
184 else $print_map_bing = true;
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
185 }
e4047a3 @simison big summer update
simison authored Aug 3, 2011
186
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
187 // Nokia Ovi
188 if($settings["ovi"]["maps"]===true) {
189 if($user["logged_in"]===true && empty($user["map_ovi"])) $print_map_ovi = false;
190 else $print_map_ovi = true;
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
191 }
e4047a3 @simison big summer update
simison authored Aug 3, 2011
192
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
193 ?><script src="//cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js" type="text/javascript"></script>
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
194 <script src="<?php echo $settings["base_url"]; ?>/ajax/js-translation.json.php?c=<?php echo $settings["cache_buster"]; ?>&amp;lang=<?php echo $settings["language"]; ?>" lang="<?php echo $settings["language"]; ?>" rel="gettext"></script>
6851679 bugs
Mikael Korpela authored Oct 14, 2010
195 <script type="text/javascript">
df3c86a @simison Better login form
simison authored Jun 3, 2010
196 //<![CDATA[
49bf7e4 @simison public transport catalog
simison authored Oct 10, 2010
197
6851679 bugs
Mikael Korpela authored Oct 14, 2010
198 /*
199 * Misc settings
200 */
6fade21 little fixes and languages
Mikael Korpela authored Jan 11, 2011
201 var ip = "<?php echo htmlspecialchars($_SERVER['REMOTE_ADDR']); ?>";
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
202 var geolocation = "ajax/geolocation_ip_proxy.php";
9bfc5bd @simison Places
simison authored Aug 3, 2010
203 var cookie_prefix = "<?php echo $settings["cookie_prefix"]; ?>";
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
204 var geolocation_cookiename = "<?php echo $settings["cookie_prefix"]; ?>geolocation";
826a1d8 files called with JS from ./lib/ to ./ajax/
Mikael Korpela authored Oct 15, 2010
205 var geolocation_cookieoptions = { path: '/', expires: 6 }; // expires: hours
c59a347 @simison pages
simison authored May 28, 2010
206 var locale = "<?php echo $settings["language"]; ?>";
84b9f71 @simison finalizing new permalinks struckture
simison authored May 31, 2012
207 var base_url = "<?= $settings["base_url"]; ?>";
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
208 var private_location = <?php echo (!empty($user["private_location"]) ? 'true' : 'false'); ?>;
44c56b5 @simison login iframe refresh too short -fix
simison authored Aug 9, 2011
209 var google_analytics = <?php echo (!empty($settings["google"]["analytics_id"]) ? 'true' : 'false'); ?>;
210 var piwik_analytics = <?php echo (!empty($settings["piwik"]["id"]) ? 'true' : 'false'); ?>;
e1339a7 @simison Updated geonames API
simison authored Apr 18, 2012
211 var geonames_username = <?php echo (!empty($settings["geonames"]["user"]) ? '"'.$settings["geonames"]["user"].'"' : 'false'); ?>;
e4047a3 @simison big summer update
simison authored Aug 3, 2011
212 var show_log = <?php echo (isset($_GET["show_log"]) ? 'true' : 'false'); ?>;
213 var open_page_at_start = <?php echo (isset($_GET["page"]) && !empty($_GET["page"]) ? 'true' : 'false'); ?>;
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
214 var debug = <?php echo ($settings["debug"] == true) ? 'true' : 'false'; ?>;
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
215
216 /*
217 * Loaded Map layers
218 */
219 var layer_default = "<?php echo (isset($user["map_default_layer"]) && !empty($user["map_default_layer"])) ? htmlspecialchars($user["map_default_layer"]): 'mapnik'; ?>";
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
220 var layer_google = <?php echo ($settings["google"]["api"]["maps"]===true && $print_map_google===true) ? "true": "false"; ?>;
221 var layer_ovi = <?php echo ($settings["ovi"]["maps"]===true && $print_map_ovi===true) ? "true": "false"; ?>;
222 var layer_bing = <?php echo (!empty($settings["bing"]["maps_api"]) && $print_map_bing===true) ? "true": "false"; ?>;
223 <?php if(!empty($settings["bing"]["maps_api"])) echo 'var layer_bing_key = "'.$settings["bing"]["maps_api"].'";'; ?>
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
224
df3c86a @simison Better login form
simison authored Jun 3, 2010
225 /*
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
226 * Map settings
df3c86a @simison Better login form
simison authored Jun 3, 2010
227 */
228 var lat = <?php echo $lat; ?>;
229 var lon = <?php echo $lon; ?>;
230 var layers = '<?php echo $layers; ?>';
231 var zoom = <?php echo $zoom; ?>;
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
232 var markersZoomLimit = <?php echo $markersZoomLimit; ?>;
49bf7e4 @simison public transport catalog
simison authored Oct 10, 2010
233
631cae2 @simison jquery UI stuff
simison authored Jun 30, 2010
234 //]]>
6851679 bugs
Mikael Korpela authored Oct 14, 2010
235 </script>
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
236
47ae46b @simison preparing big update
simison authored May 24, 2012
237 <script src="<?= $settings["base_url"]; ?>/static/js/jquery.min.js?c=<?php echo $settings["cache_buster"]; ?>" type="text/javascript"></script>
238 <script src="<?= $settings["base_url"]; ?>/static/js/jquery-ui.min.js?c=<?php echo $settings["cache_buster"]; ?>" type="text/javascript"></script>
239 <script src="<?= $settings["base_url"]; ?>/static/js/jquery.json-2.2.min.js" type="text/javascript"></script>
240 <script src="<?= $settings["base_url"]; ?>/static/js/jquery.cookie.js" type="text/javascript"></script>
241 <script src="<?= $settings["base_url"]; ?>/static/js/jquery.gettext.js" type="text/javascript"></script>
242 <script src="<?= $settings["base_url"]; ?>/static/js/main.js?c=<?php echo ($settings["debug"] == true) ? time() : $settings["cache_buster"]; ?>" type="text/javascript"></script>
0e5b19f @simison js/css optimization
simison authored Nov 25, 2010
243
244 <!-- Keep main stylesheet here after min.js/main.js -->
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
245 <link rel="stylesheet" type="text/css" href="<?= $settings["base_url"]; ?>/static/css/main.css?c=<?php
246 if($settings["debug"]==true) echo time();
972e9c2 Cache control
Mikael Korpela authored Mar 24, 2011
247 else echo $settings["cache_buster"];
248 ?>" media="all" />
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
249
511e39d @simison big update
simison authored Sep 1, 2010
250 <script type="text/javascript">
631cae2 @simison jquery UI stuff
simison authored Jun 30, 2010
251 //<![CDATA[
e4047a3 @simison big summer update
simison authored Aug 3, 2011
252 <?php
9094c0d @simison opening JS-pages by get-page
simison authored May 27, 2010
253 /*
9fc82fb @simison map selector started
simison authored Jul 3, 2010
254 * Open JS-pages requested by GET 'page'
9094c0d @simison opening JS-pages by get-page
simison authored May 26, 2010
255 */
e4047a3 @simison big summer update
simison authored Aug 3, 2011
256 ?>
9094c0d @simison opening JS-pages by get-page
simison authored May 26, 2010
257 $(document).ready(function() {
0e5b19f @simison js/css optimization
simison authored Nov 25, 2010
258
9bfc5bd @simison Places
simison authored Aug 3, 2010
259 <?php // Open page
e4047a3 @simison big summer update
simison authored Aug 3, 2011
260 if(isset($_GET["page"]) && !empty($_GET["page"])): ?>
9bfc5bd @simison Places
simison authored Aug 3, 2010
261
e4047a3 @simison big summer update
simison authored Aug 3, 2011
262 open_page("<?php echo htmlspecialchars($_GET["page"]); ?>", false, true);
44c56b5 @simison login iframe refresh too short -fix
simison authored Aug 9, 2011
263
984f9d1 publish editing descriptions + bugs
Mikael Korpela authored Feb 27, 2011
264 <?php endif; ?>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
265
9bfc5bd @simison Places
simison authored Aug 3, 2010
266 <?php // Open marker
984f9d1 publish editing descriptions + bugs
Mikael Korpela authored Feb 27, 2011
267 if(isset($show_place)): ?>
0e5b19f @simison js/css optimization
simison authored Nov 25, 2010
268
511e39d @simison big update
simison authored Sep 1, 2010
269 showPlacePanel("<?php echo $show_place; ?>", true);
270
271 <?php // Place asked, but didn't exist
272 elseif(isset($show_place_error)): ?>
0e5b19f @simison js/css optimization
simison authored Nov 25, 2010
273
274 info_dialog("<?php echo _("Sorry, but the place cannot be found.")."<br /><br />"._("The place you are looking for might have been removed or is temporarily unavailable."); ?>", "<?php echo _("The place cannot be found"); ?>", true);
9bfc5bd @simison Places
simison authored Aug 3, 2010
275
984f9d1 publish editing descriptions + bugs
Mikael Korpela authored Feb 27, 2011
276 <?php endif; ?>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
277
9bfc5bd @simison Places
simison authored Aug 3, 2010
278 <?php // Perform search
984f9d1 publish editing descriptions + bugs
Mikael Korpela authored Feb 27, 2011
279 if(isset($_GET["q"]) && !empty($_GET["q"])): ?>
0e5b19f @simison js/css optimization
simison authored Nov 25, 2010
280
0dbf256 @simison bug fixes
simison authored Feb 26, 2012
281 search("<?php echo htmlspecialchars(strip_tags($_GET["q"])); ?>");
0e5b19f @simison js/css optimization
simison authored Nov 25, 2010
282
9bfc5bd @simison Places
simison authored Aug 3, 2010
283 <?php endif; ?>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
284
984f9d1 publish editing descriptions + bugs
Mikael Korpela authored Feb 27, 2011
285 <?php // Show welcome text after a maintenance break
286 if(isset($_GET["post_maintenance"])): ?>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
287
e4047a3 @simison big summer update
simison authored Aug 3, 2011
288 info_dialog('<?php echo _('Sorry about that!').'<br /><br />'._('If something on the website seems wrong to you, please use "contact us" link at the bottom of the page.'); ?>', '<?php echo _("The maintenance break is now over"); ?>', false);
984f9d1 publish editing descriptions + bugs
Mikael Korpela authored Feb 27, 2011
289
290 <?php endif; ?>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
291
9bfc5bd @simison Places
simison authored Aug 3, 2010
292 });
df3c86a @simison Better login form
simison authored Jun 3, 2010
293 //]]>
511e39d @simison big update
simison authored Sep 1, 2010
294 </script>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
295
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
296 <?php mobile_meta(false); ?>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
297
c6a8fe7 static map function
Mikael Korpela authored Dec 17, 2010
298 <meta name="description" content="<?php echo $description; ?>" />
0dbf256 @simison bug fixes
simison authored Feb 26, 2012
299
8351ddd @simison translations
simison authored May 27, 2010
300 <!-- The Open Graph Protocol - http://opengraphprotocol.org/ -->
fc24c75 @simison bugs and stuff
simison authored Dec 1, 2010
301 <meta property="og:title" content="<?php echo $title; ?>" />
9bfc5bd @simison Places
simison authored Aug 3, 2010
302 <meta property="og:site_name" content="Hitchwiki.org" />
c6a8fe7 static map function
Mikael Korpela authored Dec 17, 2010
303 <meta property="og:description" content="<?php echo $description; ?>" />
e4047a3 @simison big summer update
simison authored Aug 3, 2011
304 <meta property="og:url" content="<?php echo $og_url; ?>"/>
305 <meta property="og:type" content="<?php echo $og_type; ?>" />
0dbf256 @simison bug fixes
simison authored Feb 26, 2012
306 <?php
307 /*
308 * Language versions of the frontpage
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
309 */
0dbf256 @simison bug fixes
simison authored Feb 26, 2012
310 foreach($settings["valid_languages"] as $code => $name) {
311 echo '<meta property="og:locale';
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
312
0dbf256 @simison bug fixes
simison authored Feb 26, 2012
313 if($settings["language"] != $code) echo ':alternate';
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
314
0dbf256 @simison bug fixes
simison authored Feb 26, 2012
315 echo '" content="'.$code.'" />'."\n\t\t";
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
316
0dbf256 @simison bug fixes
simison authored Feb 26, 2012
317 }
318 ?>
4918b9a changes to place-view
Mikael Korpela authored Mar 24, 2011
319 <?php foreach($website_img as $img): ?><meta property="og:image" content="<?php echo $img; ?>" /><?php endforeach; ?>
c6a8fe7 static map function
Mikael Korpela authored Dec 17, 2010
320 <?php /*<meta property="og:email" content="<?php echo $settings["email"]; ?>" /> */ ?>
9bfc5bd @simison Places
simison authored Aug 3, 2010
321 <?php if(isset($place)): ?>
322 <meta property="og:latitude" content="<?php echo $place["lat"]; ?>" />
323 <meta property="og:longitude" content="<?php echo $place["lon"]; ?>" />
e4047a3 @simison big summer update
simison authored Aug 3, 2011
324 <?php if(!empty($place["location"]["locality"])): ?><meta property="og:locality" content="<?php echo $place["location"]["locality"]; ?>" /><?php endif; ?>
325 <?php if(!empty($place["location"]["country"]["name"])): ?><meta property="og:country-name" content="<?php echo $place["location"]["country"]["name"]; ?>" /><?php endif; ?>
6851679 bugs
Mikael Korpela authored Oct 14, 2010
326 <meta name="geo.position" content="<?php echo $place["lat"].','.$place["lon"]; ?>" />
9bfc5bd @simison Places
simison authored Aug 3, 2010
327 <?php endif; ?>
8e5b4b6 @simison language selection
simison authored May 27, 2010
328
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
329 <?php
0e5b19f @simison js/css optimization
simison authored Nov 25, 2010
330 if(isset($settings["fb"]["admins"]) && !empty($settings["fb"]["admins"])) echo '<meta property="fb:admins" content="'.$settings["fb"]["admins"].'" />'."\n";
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
331
0e5b19f @simison js/css optimization
simison authored Nov 25, 2010
332 if(isset($settings["fb"]["page_id"]) && !empty($settings["fb"]["page_id"])) echo '<meta property="fb:page_id" content="'.$settings["fb"]["page_id"].'" />'."\n";
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
333
0e5b19f @simison js/css optimization
simison authored Nov 25, 2010
334 if(isset($settings["fb"]["app"]["id"]) && !empty($settings["fb"]["app"]["id"])) echo '<meta property="fb:app_id" content="'.$settings["fb"]["app"]["id"].'" />'."\n";
335 ?>
6851679 bugs
Mikael Korpela authored Oct 14, 2010
336 <link rel="home" href="<?php echo $settings["base_url"]; ?>/" title="Hitchwiki <?php echo _("Maps"); ?>" />
47ae46b @simison preparing big update
simison authored May 24, 2012
337 <link rel="help" href="<?php echo $settings["base_url"]; ?>/about/" title="Hitchwiki <?php echo htmlspecialchars(_("Help & About")); ?>" />
0dbf256 @simison bug fixes
simison authored Feb 26, 2012
338 <link rel="search" type="application/opensearchdescription+xml" href="<?php echo $settings["base_url"]; ?>/opensearch/?lang=<?php echo $settings["language"]; ?>" title="Hitchwiki <?php echo _("Maps"); ?>" />
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
339 <link rel="author" href="<?php echo $settings["base_url"]; ?>/humans.txt" type="text/plain" />
6851679 bugs
Mikael Korpela authored Oct 14, 2010
340 <?php
341 /*
342 * Language versions of the frontpage
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
343 */
6851679 bugs
Mikael Korpela authored Oct 14, 2010
344 foreach($settings["valid_languages"] as $code => $name) {
345 // Don't print current in-use-language page
0dbf256 @simison bug fixes
simison authored Feb 26, 2012
346 if($settings["language"] != $code) echo '<link type="text/html" rel="alternate" hreflang="'.shortlang($code).'" href="'.$settings["base_url"].'/?lang='.$code.'" title="'.$name.'" />'."\n\t";
6851679 bugs
Mikael Korpela authored Oct 14, 2010
347 }
348 ?>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
349
b934b0d @simison iepngfix
simison authored May 26, 2010
350 <!--[if lt IE 7]>
e4047a3 @simison big summer update
simison authored Aug 3, 2011
351 <style type="text/css"> .png, .icon { behavior: url(static/js/iepngfix.htc); } </style>
6851679 bugs
Mikael Korpela authored Oct 14, 2010
352 <link rel="shortcut icon" href="<?php echo $settings["base_url"]; ?>/favicon.ico" type="image/x-icon" />
353 <link rel="bookmark icon" href="<?php echo $settings["base_url"]; ?>/favicon.ico" type="image/x-icon" />
b934b0d @simison iepngfix
simison authored May 25, 2010
354 <![endif]-->
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
355
356 <?php
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
357 // Google analytics
358 init_google_analytics();
359 ?>
5d738b4 @MrTweek got json-rpc running
MrTweek authored May 19, 2010
360 </head>
e4047a3 @simison big summer update
simison authored Aug 3, 2011
361 <body class="<?php echo $settings["language"]." ".langdir(); ?>">
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
362 <iframe src="http://hitchwiki.org/en/index.php?title=Maps.hitchwiki.org&amp;redirect=no&amp;action=render&amp;ctype=text/plain" frameborder="0" width="0" height="0" scrolling="no" style="display: block; width: 0; height: 0; border:0; position: absolute; top:-100px; left: -100px;" id="loginRefresh" name="loginRefresh"></iframe>
081ac1d @simison map and geocoding 2
simison authored May 26, 2010
363 <div id="Content">
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
364
7e88e7e @simison new index.php with some functionality
simison authored May 23, 2010
365 <div id="Header">
366 <div id="Logo">
df3c86a @simison Better login form
simison authored Jun 3, 2010
367 <h1><a href="http://www.hitchwiki.org/"><span>Hitchwiki</span></a></h1>
8e5b4b6 @simison language selection
simison authored May 26, 2010
368 <h2><?php echo _("Maps"); ?></h2>
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
369 <h3 class="hide-fix"><?php echo $slogan; ?></h3>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
370 <?php /*
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
371 <div class="HitchwikiPages">
372 <a href="<?php echo _("http://hitchwiki.org/en/"); ?>"><?php echo _("Wiki"); ?></a>
373 | <a href="http://hitchwiki.org/community/"><?php echo _("Community"); ?></a>
374 <!--| <a href="http://hitchwiki.org/planet/"><?php echo _("Planet"); ?></a>-->
7e88e7e @simison new index.php with some functionality
simison authored May 23, 2010
375 </div>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
376 */ ?>
377
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
378 <div class="clear"></div>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
379
e4047a3 @simison big summer update
simison authored Aug 3, 2011
380 <ul id="Navigation" class="Navigation" role="navigation">
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
381 <li><a href="#" id="add_place" class="icon add"><?php echo _("Add place"); ?></a></li>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
382 <!--
47ae46b @simison preparing big update
simison authored May 24, 2012
383 <li><a href="<?= $settings["base_url"]; ?>/countries/" id="countries" class="icon world pagelink"><?php echo _("Countries"); ?></a></li>
384 <li><a href="<?= $settings["base_url"]; ?>/public_transport/" id="public_transport" class="icon pagelink underground"><?php echo _("Public transport"); ?></a></li>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
385 -->
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
386 </ul>
e4047a3 @simison big summer update
simison authored Aug 3, 2011
387 <ul id="Navigation2" class="Navigation" role="navigation"><?php
388 $naviRefreshArea = true;
389 require_once("ajax/header_navi.php");
390 ?></ul>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
391
7e88e7e @simison new index.php with some functionality
simison authored May 23, 2010
392 <!-- /Logo -->
393 </div>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
394
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
395 <div class="align_right">
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
396
47ae46b @simison preparing big update
simison authored May 24, 2012
397 <div id="loginRefreshArea"></div>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
398
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
399 <div id="search">
47ae46b @simison preparing big update
simison authored May 24, 2012
400 <form method="get" action="<?= $settings["base_url"]; ?>/" id="search_form" name="search" role="search">
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
401 <div class="ui-widget">
0dbf256 @simison bug fixes
simison authored Feb 26, 2012
402 <input type="text" value="<?php if(isset($_GET["q"]) && !empty($_GET["q"])) echo htmlspecialchars(strip_tags($_GET["q"])); ?>" id="q" name="q" />
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
403 <button type="submit" class="search_submit button" title="<?php echo _("Search"); ?>"> <span class="icon magnifier">&nbsp;</span><span class="hidden"><?php echo _("Search"); ?></span></button>
404 <div class="clear"></div>
405 </div>
406 </form>
407 </div>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
408
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
409 <div id="nearby" style="display:none;">
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
410 <span class="locality" style="display:none;"><a href="#" title="<?php echo _("Show the city on the map"); ?>"></a></span>
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
411 <!--<span class="country" style="display:none;"><a href="#" title="<?php echo _("Show the country on the map"); ?>"></a></span>-->
d4045be @simison languages and tweaking many things
simison authored Jan 3, 2011
412 </div>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
413
9bfc5bd @simison Places
simison authored Aug 3, 2010
414 <!-- /Login -->
415 </div>
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
416
9bfc5bd @simison Places
simison authored Aug 3, 2010
417 <!-- /Header -->
418 </div>
419 <div id="Login">
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
420 <?php /* By submitting this with JS, you can reload this page and map will be as it was, if you fill lat/lon/zoom inputs and change post->get */ ?>
47ae46b @simison preparing big update
simison authored May 24, 2012
421 <form method="post" action="<?= $settings["base_url"]; ?>/" id="reloadPage" class="hidden"><input type="submit" /></form>
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
422 </div>
cb08b12 contact form, tweaking, edit descriptions...
Mikael Korpela authored Feb 1, 2011
423
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
424
511e39d @simison big update
simison authored Sep 1, 2010
425 <!-- Adding a alace panel -->
426 <div id="AddPlacePanel">
427 <h4 class="icon add"><?php echo _("Add place"); ?></h4>
428 </div>
429 <!-- /Adding a alace panel -->
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
430
431
511e39d @simison big update
simison authored Sep 1, 2010
432 <!-- AJAX Content Area for pages-->
433 <div id="pages">
47ae46b @simison preparing big update
simison authored May 24, 2012
434 <a href="#close" class="close ui-button ui-corner-all ui-state-default ui-icon ui-icon-closethick" title="<?php echo _("Close"); ?>"><?php echo _("Close"); ?></a>
511e39d @simison big update
simison authored Sep 1, 2010
435 <div class="page">
e4047a3 @simison big summer update
simison authored Aug 3, 2011
436 <div class="content"><?php
437 // Open page
438 if(isset($_GET["page"]) && !empty($_GET["page"])) {
439 $views_cold_include = true;
440 require_once("ajax/views.php");
441 }
442 ?> </div>
511e39d @simison big update
simison authored Sep 1, 2010
443 </div>
444 </div>
445 <!-- /pages -->
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
446
447
511e39d @simison big update
simison authored Sep 1, 2010
448 <!-- cards -->
449 <div id="cards"></div>
450 <!-- /pages -->
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
451
452
7e88e7e @simison new index.php with some functionality
simison authored May 23, 2010
453 <!-- The Map -->
8e5b4b6 @simison language selection
simison authored May 26, 2010
454 <div id="map">
7e88e7e @simison new index.php with some functionality
simison authored May 23, 2010
455 <br /><br />
8351ddd @simison translations
simison authored May 26, 2010
456 <?php echo _("Turn JavaScript on from your browser."); ?>
631cae2 @simison jquery UI stuff
simison authored Jun 30, 2010
457 </div>
081ac1d @simison map and geocoding 2
simison authored May 25, 2010
458 <!-- /map -->
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
459
460
9bfc5bd @simison Places
simison authored Aug 3, 2010
461 <!-- The Place panel -->
462 <div id="PlacePanel"></div>
463 <!-- /Place panel -->
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
464
465
511e39d @simison big update
simison authored Sep 1, 2010
466 <!-- Tools -->
d4045be @simison languages and tweaking many things
simison authored Jan 3, 2011
467 <div id="toolsPanel" class="floatingPanel draggable hidden">
511e39d @simison big update
simison authored Sep 1, 2010
468 <h4 class="icon lorry">
469 <?php echo _("Tools"); ?>
47ae46b @simison preparing big update
simison authored May 24, 2012
470 <a href="#close" class="close ui-icon ui-icon-closethick align_right" title="<?php echo _("Close"); ?>"><?php echo _("Close"); ?></a>
511e39d @simison big update
simison authored Sep 1, 2010
471 </h4>
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
472 <div class="controlToggle">
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
473
9bfc5bd @simison Places
simison authored Aug 3, 2010
474 <span class="icon cursor">
475 <input type="radio" name="type" value="none" id="noneToggle" onclick="toggleControl(this);" checked="checked" />
476 <label for="noneToggle"><?php echo _("Navigate"); ?></label>
477 </span><br />
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
478
9bfc5bd @simison Places
simison authored Aug 3, 2010
479 <span class="icon vector">
480 <input type="radio" name="type" value="line" id="lineToggle" onclick="toggleControl(this);" />
481 <label for="lineToggle"><?php echo _("Measure distance"); ?></label>
482 </span><br />
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
483
9bfc5bd @simison Places
simison authored Aug 3, 2010
484 <span class="icon shape_handles">
485 <input type="radio" name="type" value="polygon" id="polygonToggle" onclick="toggleControl(this);" />
486 <label for="polygonToggle"><?php echo _("Measure area"); ?></label>
487 </span><br />
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
488
489 <?php /*
490 Note that the geometries drawn are planar geometries and the metrics returned by the measure control are planar
491 measures by default. If your map is in a geographic projection or you have the appropriate projection definitions
492 to transform your geometries into geographic coordinates, you can set the "geodesic" property of the control to
9bfc5bd @simison Places
simison authored Aug 3, 2010
493 true to calculate geodesic measures instead of planar measures.
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
494
9bfc5bd @simison Places
simison authored Aug 3, 2010
495 <input type="checkbox" name="geodesic" checked="checked" id="geodesicToggle" onclick="toggleGeodesic(this);" />
496 <label for="geodesicToggle"><?php echo _("Use geodesic measures"); ?></label>
497 */ ?>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
498
9bfc5bd @simison Places
simison authored Aug 3, 2010
499 <div class="align_right clear"><?php echo _("Measure"); ?>: <span id="toolOutput">-</span></div>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
500
9bfc5bd @simison Places
simison authored Aug 3, 2010
501 <hr />
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
502
9bfc5bd @simison Places
simison authored Aug 3, 2010
503 <label class="icon zoom"><?php echo _("Show markers after zoom level"); ?>:</label>
504 <div id="zoom_slider"></div>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
505
9bfc5bd @simison Places
simison authored Aug 3, 2010
506 <span class="align_left"><?php echo _("Default"); ?>: <?php echo $default_markersZoomLimit; ?></span>
507 <span class="align_right">
508 <b id="zoom_slider_amount"></b><span id="zoomlevel">
509 <span class="z_continent hidden"> - <?php echo _("Continent level"); ?></span>
510 <span class="z_country hidden"> - <?php echo _("Country level"); ?></span>
511 <span class="z_city hidden"> - <?php echo _("City level"); ?></span>
512 <span class="z_streets hidden"> - <?php echo _("Street level"); ?></span>
513 </span>
514 </span>
7e88e7e @simison new index.php with some functionality
simison authored May 23, 2010
515
9bfc5bd @simison Places
simison authored Aug 3, 2010
516 </div>
517 </div>
518 <!-- /tools -->
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
519
520
d4045be @simison languages and tweaking many things
simison authored Jan 3, 2011
521 <!-- languages -->
522 <div id="languagePanel" class="floatingPanel hidden">
523 <h4 class="icon world">
524 <?php echo _("Choose language"); ?>
47ae46b @simison preparing big update
simison authored May 24, 2012
525 <a href="#close" class="close ui-icon ui-icon-closethick align_right" title="<?php echo _("Close"); ?>"><?php echo _("Close"); ?></a>
d4045be @simison languages and tweaking many things
simison authored Jan 3, 2011
526 </h4>
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
527 <div class="controlToggle">
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
528
d4045be @simison languages and tweaking many things
simison authored Jan 3, 2011
529 <ul>
530 <?php
531 // Print out available languages
532 foreach($settings["valid_languages"] as $code => $name) {
533 ?>
534 <li>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
535 <span class="icon" style="background-image: url(<?= $settings["base_url"]; ?>/static/gfx/flags/<?php echo strtolower(shortlang($code, 'country')); ?>.png);">
d4045be @simison languages and tweaking many things
simison authored Jan 3, 2011
536 <?php
47ae46b @simison preparing big update
simison authored May 24, 2012
537 echo '<a href="'.$settings["base_url"].'/?lang='.$code.'"';
d4045be @simison languages and tweaking many things
simison authored Jan 3, 2011
538 if($code == $settings["language"]) echo ' class="selected"';
539 echo ' title="'.$settings["languages_in_english"][$code].'">'.$name.'</a>';
540 ?>
541 </span>
542 </li>
543 <?php
544 }
545 ?>
546 </ul>
47ae46b @simison preparing big update
simison authored May 24, 2012
547 <a href="<?= $settings["base_url"]; ?>/translate/" id="translate" class="pagelink"><small class="light"><?php echo _("Help us with translating!"); ?></small></a>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
548
d4045be @simison languages and tweaking many things
simison authored Jan 3, 2011
549 </div>
550 </div>
551 <!-- /languages -->
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
552
7e88e7e @simison new index.php with some functionality
simison authored May 23, 2010
553
d4045be @simison languages and tweaking many things
simison authored Jan 3, 2011
554 <!-- Placeholder for simple error/info -dialog. see info_dialog(); from main.js for more. -->
9bfc5bd @simison Places
simison authored Aug 3, 2010
555 <div id="dialog-message"></div>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
556
557
9bfc5bd @simison Places
simison authored Aug 3, 2010
558 <!-- Loading -bar -->
559 <div id="loading-bar"><small class="title"></small></div>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
560
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
561
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
562 <!-- Map selector -->
563 <div id="map_selector">
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
564
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
565 <div id="maplist" class="ui-corner-top">
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
566 <ul>
daf31fa @simison maintenance
simison authored Sep 24, 2012
567 <li>
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
568 <h4 class="icon icon-osm">Open Street Map</h4>
569 <ul class="map_options">
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
570
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
571 <li><a href="#" name="mapnik"<?php
572 if($user["map_default_layer"]=='mapnik' OR empty($user["map_default_layer"]) OR !isset($user["map_default_layer"])) {
573 echo ' class="selected"';
574 $selected_map_name = $map_layers["osm"]["mapnik"];
575 } ?>><?php echo $map_layers["osm"]["mapnik"]; ?></a></li>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
576
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
577 <li><a href="#" name="osmarender"<?php
578 if($user["map_default_layer"]=='osmarender') {
579 echo ' class="selected"';
580 $selected_map_name = $map_layers["osm"]["osmarender"];
581 } ?>><?php echo $map_layers["osm"]["osmarender"]; ?></a></li>
582 </ul>
583 </li>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
584
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
585 <?php
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
586
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
587 // Google
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
588 if($settings["google"]["api"]["maps"]===true && $print_map_google===true) {
589 ?>
590 <li>
591 <h4 class="icon icon-google">Google</h4>
592 <ul class="map_options">
593 <?php
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
594 foreach($map_layers["google"] as $map => $name) {
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
595 echo '<li><a href="#google_'.$map.'" name="'.$map.'"';
e4047a3 @simison big summer update
simison authored Aug 3, 2011
596 if($user["map_default_layer"]==$map) {
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
597 echo ' class="selected"';
598 $selected_map_name = $name;
599 }
600 echo '>'.$name.'</a></li>';
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
601 }
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
602 ?>
603 </ul>
604 </li>
605 <?php
606 } //google
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
607
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
608 // Bing
609 if(!empty($settings["bing"]["maps_api"]) && $print_map_bing===true) {
610 ?>
611 <li>
612 <h4 class="icon icon-bing">Bing</h4>
613 <ul class="map_options">
614 <?php
615 foreach($map_layers["bing"] as $map => $name) {
616 echo '<li><a href="#bing_'.$map.'" name="'.$map.'"';
e4047a3 @simison big summer update
simison authored Aug 3, 2011
617 if($user["map_default_layer"]==$map) {
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
618 echo ' class="selected"';
619 $selected_map_name = $name;
620 }
621 echo '>'.$name.'</a></li>';
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
622 }
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
623 ?>
624 </ul>
625 </li>
626 <?php
627 } //bing
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
628
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
629 // Nokia Ovi
630 if($settings["ovi"]["maps"]===true && $print_map_ovi===true) {
631 ?>
632 <li>
633 <h4 class="icon icon-nokia_ovi">Nokia Ovi</h4>
634 <ul class="map_options">
635 <?php
636 foreach($map_layers["ovi"] as $map => $name) {
637 echo '<li><a href="#ovi_'.$map.'" name="'.$map.'"';
e4047a3 @simison big summer update
simison authored Aug 3, 2011
638 if($user["map_default_layer"]==$map) {
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
639 echo ' class="selected"';
640 $selected_map_name = $name;
641 }
642 echo '>'.$name.'</a></li>';
e4047a3 @simison big summer update
simison authored Aug 3, 2011
643 }
3033772 @simison New map layers and preparing for mobile maps
simison authored Mar 26, 2012
644 ?>
645 </ul>
646 </li>
647 <?php
648 } //ovi
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
649
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
650 ?>
651 </ul>
652 </div>
e4047a3 @simison big summer update
simison authored Aug 3, 2011
653 <button id="selected_map" class="ui-corner-bottom"><?php echo _("Map"); ?>: <span class="map_name"><?php echo htmlspecialchars($selected_map_name); ?></span></button>
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
654 </div>
60be661 @simison Different map layers and more
simison authored Nov 22, 2010
655
e4047a3 @simison big summer update
simison authored Aug 3, 2011
656
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
657
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
658 <div id="Footer">
659 <div class="content">
e4047a3 @simison big summer update
simison authored Aug 3, 2011
660
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
661 <ul class="ToolsNavigation">
662 <li><a href="#" id="download" class="icon page_white_put cardlink"><?php echo _("Download"); ?></a></li>
663 <li><a href="#" id="link_here" class="icon link cardlink"><?php echo _("Link here"); ?></a></li>
664 <li><a href="#" id="tools" class="icon lorry"><?php echo _("More tools"); ?></a></li>
665 </ul>
666
667
668 <ul class="MetaNavigation">
47ae46b @simison preparing big update
simison authored May 24, 2012
669 <!--<li><a href="#" id="news" class="icon new pagelink"><?php echo _("News"); ?></a></li>-->
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
670 <li><a href="#" id="toggleLanguages" title="<?php echo _("Choose language"); ?>">Language</a></li>
47ae46b @simison preparing big update
simison authored May 24, 2012
671 <li><a href="<?= $settings["base_url"]; ?>/about/" class="pagelink" id="about"><?php echo htmlspecialchars(_("Help & About")); ?></a></li>
672 <li><a href="<?= $settings["base_url"]; ?>/statistics/" class="pagelink" id="statistics"><?php echo _("Statistics"); ?></a></li>
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
673 <li><a href="#" class="cardlink" id="contact"><?php echo _("Contact us!"); ?></a></li>
47ae46b @simison preparing big update
simison authored May 24, 2012
674 <li><a href="<?= $settings["base_url"]; ?>/mobile/" class="pagelink" id="mobile"><?php echo _("Mobile"); ?></a></li>
675 <li><a href="<?= $settings["base_url"]; ?>/about_api/" class="pagelink" id="api" title="<?php echo _("Developers"); ?>"><?php echo _("API"); ?></a></li>
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
676
677 <?php // Visible only for admins
678 if($user["admin"]===true): ?>
899eb96 @simison bugs and fb stuff
simison authored Sep 27, 2011
679 <?php if($settings["debug"] == true) { echo '<li><a href="#" class="toggle_log">'._("Toggle log").'</a></li>'; } ?>
47ae46b @simison preparing big update
simison authored May 24, 2012
680 <li><a href="<?= $settings["base_url"]; ?>/admin/"><?php echo _("Admins"); ?></a></li>
899eb96 @simison bugs and fb stuff
simison authored Sep 27, 2011
681 <?php endif; ?>
682 <?php if(!isset($user["disallow_facebook"]) && $user["disallow_facebook"] != 1): ?><li><a href="http://www.facebook.com/Hitchwiki" class="icon facebook" title="Hitchwiki @ Facebook" style="float: left; padding: 0; margin: 0; width: 16px; height: 16px;"><span class="hidden">Hitchwiki @ Facebook</span></a></li><?php endif; ?>
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
683 <li><a rel="license" href="<?php echo _("http://creativecommons.org/licenses/by-sa/3.0/"); ?>" title="<?php echo _("Licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License"); ?>"><img alt="<?php echo _("Creative Commons License"); ?>" src="static/gfx/cc-by-sa.png" width="48" height="15"/></a></li>
684 </ul>
685 </div>
686 </div>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
687
688
7e88e7e @simison new index.php with some functionality
simison authored May 23, 2010
689 <!-- /Content -->
690 </div>
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
691
9bfc5bd @simison Places
simison authored Aug 3, 2010
692 <!-- for debugging -->
a5ebc08 trips feature started
Mikael Korpela authored Mar 8, 2011
693 <div id="log" class="hidden">
694 <b class="handle">
695 <?php echo _("Log"); ?>
47ae46b @simison preparing big update
simison authored May 24, 2012
696 <a href="#close" class="close ui-icon ui-icon-closethick align_right" title="<?php echo _("Close"); ?>"><?php echo _("Close"); ?></a>
a5ebc08 trips feature started
Mikael Korpela authored Mar 8, 2011
697 </b>
47ae46b @simison preparing big update
simison authored May 24, 2012
698 <ol><li>Hitchwiki Maps log started <?php echo date("r"); ?> on <?= $settings["base_url"]; ?>/</li></ol>
a5ebc08 trips feature started
Mikael Korpela authored Mar 8, 2011
699 </div>
511e39d @simison big update
simison authored Sep 1, 2010
700
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
701 <?php
09fc5e9 @simison big layout change
simison authored Jul 7, 2011
702
703 // Load Facebook JS
704 init_FB();
705
706 // Piwik analytics
707 init_piwik_analytics();
511e39d @simison big update
simison authored Sep 1, 2010
708
417dc9e @simison PHP maintenance
simison authored Jan 13, 2016
709 ?></body></html>
Something went wrong with that request. Please try again.