source: trunk/src/index.php@ 7844

Last change on this file since 7844 was 7839, checked in by Pieter Naber, 15 years ago

Copied src/map/index.php to src/index.php

File size: 3.9 KB
Line 
1<?php
2require_once('config.php');
3require_once($config['root'] . '/map/inc/kmlHandler.php');
4require_once($config['root'] . '/map/inc/node_info_start.php');
5require_once($config['root'] . '/map/inc/search_node.php');
6
7// Getting array from kmlHandler
8$markers = get_node_array($config['kml_file']);
9
10// Key is defined to be the domain name if exists
11$apikey = $config['googlekey']['default'];
12$servername = $_SERVER['SERVER_NAME'];
13
14# Little hack, does not work with foo.co.uk domains
15$servername = implode('.',array_slice(explode('.',$servername),-2));
16if (array_key_exists($servername,$config['googlekey'])) {
17 $apikey = $config['googlekey'][$servername];
18}
19?>
20<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
21<html lang="dutch">
22<head>
23<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24<title>Nodemap Wireless Leiden</title>
25<!-- External stylesheet for all browsers -->
26<link href="style/stylesheet.css" rel="stylesheet" type="text/css">
27<!-- Using stylesheet2.css when browser is any version of Microsoft Internet Explorer -->
28<!--[if IE]>
29 <link href="style/stylesheet2.css" rel="stylesheet" type="text/css">
30<![endif]-->
31
32<!-- Make our $marker[] array from kmlHandler available to javascript in JSON (No idea on how to this another less ugle way)-->
33<script type="text/javascript">
34var markers = <?php echo json_encode($markers); ?>;
35</script>
36
37<!-- Loading in the google-api -->
38<script
39 src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php print $apikey;?>"
40 type="text/javascript"></script>
41<!-- Loading in the markerClusterer that will handle the clustering of markers. -->
42<script type="text/javascript" src="inc/markerClusterer.js"></script>
43<!-- Loading in the javascript that will add the map into #mapcanvas -->
44<script type="text/javascript" src="inc/nodemapWL.js"></script>
45<script type="text/javascript" src="inc/overlay.js"></script>
46<script type="text/javascript" src="inc/iconStyles.js"></script>
47
48<!-- Loading in the javascript that handles the switching between gebruiker and beheerder -->
49<script type="text/javascript" src="inc/gebruiker_beheerder_switch.js"></script>
50
51</head>
52<body onload="suggestMarkers('')">
53<!-- Mainwrapper contains all content on the page -->
54<div id="mainwrapper"><!-- Mapcanvas is the container where the map will be put in. Height and width of map is specified by size of the div -->
55<div id="mapcanvas"><!-- Create the map using the intitialize_map() function from nodemapWL.js -->
56<script type="text/javascript">initialize_map();</script> <!--<script type="text/javascript">nodeAdd();</script>-->
57</div>
58<div id="infowrapper"><!-- Top information space -->
59<div id="infotop"><!-- Calling on the node information from an external php file. inc/node_info.php -->
60<?php node_info_start(); ?></div>
61
62<!-- Bottom information space -->
63<div id="infobottom"><?php searchNodes(); ?>
64<div id="searchlist"></div>
65</div>
66<!-- The buttons under the searchframe. In a table for positioning. -->
67<div id="userpick">
68<table>
69 <tr>
70 <!-- onclick events activate functions from within inc/gebruiker_beheerder_switch.js which load in the selected view with node_info.php -->
71 <td><input type="button" value="Gebruiker"
72 onclick="switchGebruiker();"></td>
73 <td><input type="button" value="Beheerder"
74 onclick="switchBeheerder();"></td>
75 </tr>
76</table>
77</div>
78</div>
79
80<!-- General functions under the map -->
81<div id="navigation">
82<form action="">
83<table>
84 <tr>
85 <!-- First colum -->
86 <td><input type="checkbox" value="shownodes"
87 onclick="toggleAllNodes();" checked="checked">Toon nodes</td>
88 <!-- Second colum -->
89 <td><input type="checkbox" value="showrange">Toon dekking <br>
90 <input type="checkbox" value="showtraffic">Toon dataverkeer</td>
91 <td><input type="checkbox" value="gsearchbar"
92 onclick="toggleGoogleSearchMap();">Toon locatie zoeken</td>
93 </tr>
94</table>
95</form>
96</div>
97</div>
98</body>
99</html>
Note: See TracBrowser for help on using the repository browser.